Commit Graph

3 Commits

Author SHA1 Message Date
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
HAL9000 a15b77f6a6 fix(acms): normalize context path matching for absolute paths in _path_matches
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 50s
CI / helm (pull_request) Successful in 55s
CI / build (pull_request) Successful in 1m34s
CI / lint (pull_request) Successful in 1m55s
CI / typecheck (pull_request) Successful in 2m33s
CI / quality (pull_request) Successful in 2m35s
CI / benchmark-regression (pull_request) Failing after 2m38s
CI / security (pull_request) Successful in 2m50s
CI / integration_tests (pull_request) Successful in 5m21s
CI / e2e_tests (pull_request) Successful in 5m29s
CI / unit_tests (pull_request) Successful in 7m30s
CI / docker (pull_request) Successful in 1m33s
CI / coverage (pull_request) Successful in 11m41s
CI / docker (push) Blocked by required conditions
CI / status-check (push) Blocked by required conditions
CI / coverage (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / benchmark-regression (push) Waiting to run
CI / unit_tests (push) Has started running
CI / integration_tests (push) Has started running
CI / e2e_tests (push) Has started running
CI / status-check (pull_request) Successful in 4s
CI / build (push) Successful in 1m2s
CI / lint (push) Successful in 1m10s
CI / push-validation (push) Successful in 33s
CI / helm (push) Successful in 44s
CI / quality (push) Successful in 1m30s
CI / security (push) Successful in 1m39s
CI / typecheck (push) Successful in 1m42s
Fixes issue #10972 where _path_matches() used PurePath.full_match()/match()
which requires the entire path to match. Since fragment metadata stores
absolute paths (e.g. /app/.opencode/skills/SKILL.md) while project context
--exclude-path/--include-path settings produce relative globs (.opencode/*,
docs/*), include/exclude filters were silently ineffective.

Added _matches_any() static helper in execute_phase_context_assembler.py that:
- Tries full_match(pattern) as-is for relative paths and anchored patterns
- Auto-prefixes relative patterns with **/ so they match absolute paths
Updated _matches_pattern() in context_phase_analysis.py with same logic plus
zero-depth compatibility shim.

Added 7 new BDD regression scenarios with @tdd_issue 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)

ISSUES CLOSED: #10972
2026-05-08 09:57:18 +00:00
aditya ef8f9640fa feat(acms): context analysis produces meaningful summaries
CI / lint (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 1m7s
CI / quality (pull_request) Successful in 46s
CI / security (pull_request) Successful in 1m0s
CI / build (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 41s
CI / integration_tests (pull_request) Successful in 4m11s
CI / unit_tests (pull_request) Successful in 4m38s
CI / docker (pull_request) Successful in 1m22s
CI / coverage (pull_request) Successful in 11m26s
CI / e2e_tests (pull_request) Successful in 18m21s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 58m2s
Add phase-wise context analysis summaries for strategize, execute, and apply, and integrate them into `agents project context inspect` and `agents project context simulate` with per-phase resource counts, size and token utilization, and narrowing diagnostics.\n\nAdd Behave and Robot coverage for empty, single-resource, multi-resource, and budget-constrained context analysis, and tighten the M5 smoke coverage after review feedback with exact summary assertions and a missing-path regression scenario for `agents context add`.\n\nISSUES CLOSED: #849
2026-03-30 08:42:48 +00:00