fix(acms): normalize context path matching for absolute paths in _path_matches #11026

Merged
HAL9000 merged 6 commits from bugfix/m6-acms-path-matching-absolute into master 2026-06-13 19:27:31 +00:00

6 Commits

Author SHA1 Message Date
controller-ci-rerun 745044be86 chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 37s
CI / build (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 57s
CI / helm (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m31s
CI / typecheck (pull_request) Successful in 1m43s
CI / quality (pull_request) Successful in 1m44s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 10m20s
CI / coverage (pull_request) Successful in 11m53s
CI / status-check (pull_request) Successful in 3s
2026-06-13 15:07:27 -04:00
controller-ci-rerun 7cced73c9b chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
controller-ci-rerun bf18c42081 chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
HAL9000 f312cc4555 style(features): apply ruff format to phase analysis steps
Wrap the long @given decorator string to satisfy the 88-char line
length limit enforced by ruff format.

ISSUES CLOSED: #10972
2026-06-13 15:07:27 -04:00
controller-ci-rerun 05c7c86737 chore: re-trigger CI [controller] 2026-06-13 15:07:27 -04:00
HAL9000 6b95320d5f fix(acms): normalize context path matching for absolute paths in _path_matches
Fixes issue #10972 where _path_matches() in execute_phase_context_assembler.py
used PurePath.full_match(pattern) which required the entire path to match.
Since fragment metadata stores absolute paths (e.g. /app/.opencode/skills/
SKILL.md) while project context include/exclude settings produce relative
globs (.opencode/**, docs/*), the include/exclude filters were silently
ineffective.

Added _glob_matches() static helper in execute_phase_context_assembler.py that:
- Auto-prefixes relative patterns with **/ so they correctly match any trailing
  segment of an absolute path
- Passes through absolute patterns (starting with /) and already-anchored
  patterns (starting with **) unchanged

Updated _path_matches() to delegate to _glob_matches(). Fixed _matches_pattern()
in context_phase_analysis.py with the same auto-prefix logic plus zero-depth
compatibility shim.

Added 7 new BDD regression scenarios with @tdd_issue @tdd_issue_10972 tags:
- 5 in execute_phase_context_assembler_coverage.feature (absolute path matching)
- 1 extra trailing ** glob exclusion test
- 1 in project_context_phase_analysis.feature (phase analysis exclusion)

Updated CHANGELOG.md under [Unreleased] and CONTRIBUTORS.md.

ISSUES CLOSED: #10972
2026-06-13 15:07:27 -04:00