fix(decomposition): make _directory_key relative-path-aware for absolute file paths #9437

Merged
HAL9000 merged 3 commits from fix/decomposition-directory-key-absolute-paths into master 2026-04-19 22:33:07 +00:00

3 Commits

Author SHA1 Message Date
HAL9000 1343dc151c Merge branch 'master' into fix/decomposition-directory-key-absolute-paths
CI / helm (pull_request) Successful in 41s
CI / push-validation (pull_request) Successful in 23s
CI / build (pull_request) Successful in 3m59s
CI / lint (pull_request) Successful in 4m12s
CI / quality (pull_request) Successful in 4m31s
CI / typecheck (pull_request) Successful in 4m50s
CI / security (pull_request) Successful in 4m58s
CI / integration_tests (pull_request) Successful in 8m12s
CI / e2e_tests (pull_request) Successful in 8m21s
CI / unit_tests (pull_request) Successful in 9m46s
CI / docker (pull_request) Successful in 1m37s
CI / coverage (pull_request) Successful in 14m50s
CI / benchmark-regression (push) Failing after 0s
CI / benchmark-publish (push) Failing after 0s
CI / status-check (pull_request) Successful in 4s
CI / helm (push) Successful in 33s
CI / push-validation (push) Successful in 34s
CI / build (push) Successful in 3m50s
CI / lint (push) Successful in 3m59s
CI / quality (push) Successful in 4m21s
CI / typecheck (push) Successful in 4m41s
CI / security (push) Successful in 4m49s
CI / integration_tests (push) Successful in 8m8s
CI / e2e_tests (push) Successful in 8m14s
CI / unit_tests (push) Successful in 9m8s
CI / docker (push) Successful in 1m38s
CI / coverage (push) Successful in 17m16s
CI / status-check (push) Waiting to run
2026-04-19 22:05:53 +00:00
HAL9000 e261ea5abe fix(decomposition): address review feedback for PR #9437
CI / push-validation (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 36s
CI / lint (pull_request) Successful in 3m55s
CI / typecheck (pull_request) Successful in 4m35s
CI / security (pull_request) Successful in 4m43s
CI / build (pull_request) Successful in 3m57s
CI / quality (pull_request) Successful in 4m26s
CI / e2e_tests (pull_request) Successful in 8m57s
CI / integration_tests (pull_request) Successful in 10m49s
CI / unit_tests (pull_request) Successful in 11m56s
CI / docker (pull_request) Failing after 46s
CI / coverage (pull_request) Successful in 14m47s
CI / status-check (pull_request) Failing after 3s
- Remove committed test_reports/ CI artifacts (summary.txt, test_results.json)
- Add test_reports/ to .gitignore to prevent future commits
- Update CHANGELOG.md with Fixed entry for #9401 under [Unreleased]
- Update CONTRIBUTORS.md with credit for directory clustering fix (#9401)
- Add BDD test scenarios for absolute path clustering in
  features/large_project_decomposition.feature:
  * Directory clustering works correctly with absolute file paths
  * _directory_key returns correct key for absolute path with root
  * Directory clustering does not collapse all absolute paths into one bucket
- Add corresponding step implementations in
  features/steps/large_project_decomposition_coverage_steps.py

All 38 scenarios pass (including 3 new absolute path scenarios).
Lint and typecheck pass.

ISSUES CLOSED: #9401
2026-04-17 22:49:46 +00:00
HAL9000 81a584b999 fix(decomposition): make _directory_key relative-path-aware for absolute file paths
Updated _directory_key() in decomposition_clustering.py to accept an optional root parameter and, when provided, compute relative paths before deriving the directory key. This allows proper clustering even for absolute file paths.

ClusterByDirectory updated to accept and propagate the root parameter to _directory_key().

DecompositionService._build_hierarchy() now determines a common root with _common_prefix() and passes it to cluster_by_directory(), ensuring directory clustering groups paths by their actual directory hierarchy rather than absolute paths.

These changes fix ineffective directory clustering for absolute paths in production.

ISSUES CLOSED: #9401
2026-04-17 22:49:46 +00:00