Commit Graph

5 Commits

Author SHA1 Message Date
hamza.khyari e2167ab8e7 fix(acms): use project-level hot_max_tokens in execute phase context assembly
CI / lint (pull_request) Successful in 1m40s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m46s
CI / helm (pull_request) Successful in 39s
CI / push-validation (pull_request) Successful in 48s
CI / security (pull_request) Successful in 2m11s
CI / build (pull_request) Successful in 1m31s
CI / integration_tests (pull_request) Successful in 4m57s
CI / unit_tests (pull_request) Successful in 6m44s
CI / docker (pull_request) Successful in 1m22s
CI / coverage (pull_request) Successful in 12m7s
CI / status-check (pull_request) Successful in 4s
CI / push-validation (push) Successful in 29s
CI / helm (push) Successful in 37s
CI / lint (push) Successful in 1m14s
CI / build (push) Successful in 1m16s
CI / benchmark-publish (push) Has started running
CI / quality (push) Successful in 1m30s
CI / typecheck (push) Successful in 1m36s
CI / security (push) Successful in 2m14s
CI / benchmark-regression (push) Failing after 44s
CI / e2e_tests (push) Successful in 49s
CI / integration_tests (push) Successful in 4m46s
CI / unit_tests (push) Successful in 5m57s
CI / docker (push) Successful in 1m32s
CI / coverage (push) Successful in 13m20s
CI / status-check (push) Successful in 2s
Fixed _resolve_hot_max_tokens() to read hot_max_tokens from the correct
sub-key in context_policy_json. The value is stored under
context_policy_json["acms_config"]["hot_max_tokens"] by
'agents project context set --hot-max-tokens', not at the top level.
The previous read (config_dict.get("hot_max_tokens")) always returned
None, causing the assembler to silently use the global 16K default even
when a project-level override was configured.

Also adds two Behave regression scenarios with @tdd_issue @tdd_issue_11035
tags that exercise the real DB query code path via a mocked
NamespacedProjectModel row, verifying:
  1. hot_max_tokens=32000 in acms_config is applied to CoreContextBudget
     and ContextRequest (override path).
  2. Missing hot_max_tokens falls back to the constructor-injected global
     default of 4096 (fallback path).

Module-level import json added to steps file; redundant inline MagicMock
import removed.

ISSUES CLOSED: #11035
ISSUES CLOSED: #11215
2026-05-16 16:40:54 +00:00
hamza.khyari b4351ca78d Revert "Merge pull request 'fix(acms): use project-level hot_max_tokens in execute phase context assembly' (#11216) from bugfix/m5-acms-project-budget-override into master"
CI / push-validation (pull_request) Successful in 41s
CI / helm (pull_request) Successful in 50s
CI / build (pull_request) Successful in 1m13s
CI / lint (pull_request) Successful in 1m34s
CI / typecheck (pull_request) Successful in 1m40s
CI / quality (pull_request) Successful in 1m45s
CI / security (pull_request) Successful in 1m50s
CI / integration_tests (pull_request) Successful in 3m52s
CI / unit_tests (pull_request) Successful in 8m50s
CI / docker (pull_request) Successful in 1m39s
CI / coverage (pull_request) Successful in 12m1s
CI / status-check (pull_request) Successful in 6s
This reverts commit 94622f467c, reversing
changes made to 1196c726f2.
2026-05-15 11:15:41 +00:00
hamza.khyari 1baa888659 fix(acms): use project-level hot_max_tokens in execute phase context assembly
CI / lint (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 1m24s
CI / quality (pull_request) Successful in 1m16s
CI / build (pull_request) Successful in 40s
CI / security (pull_request) Successful in 1m28s
CI / integration_tests (pull_request) Successful in 6m2s
CI / helm (pull_request) Successful in 24s
CI / push-validation (pull_request) Successful in 28s
CI / unit_tests (pull_request) Successful in 7m13s
CI / docker (pull_request) Successful in 1m29s
CI / coverage (pull_request) Successful in 11m50s
CI / status-check (pull_request) Successful in 7s
Added _resolve_effective_budget() method to
ACMSExecutePhaseContextAssembler that reads each linked project's
settings.hot_max_tokens and uses the maximum override value as the
pipeline budget instead of the hardcoded global default.

Updated assemble() to use the resolved effective budget for both
CoreContextBudget and ContextRequest.

Added Behave regression scenario with @tdd_issue @tdd_issue_11035 tags
verifying the pipeline receives the project-level budget.

Removed test artifact ANALYSIS.md left over from scenario 20.

Fixes: #11035
Fixes: #11215
2026-05-15 10:27:57 +00: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
freemo 31472b5413 test(coverage): add Behave scenarios for 39 under-covered modules
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.

ISSUES CLOSED: #1232
2026-03-31 21:47:12 +00:00