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
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: #11035Fixes: #11215
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
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.
ISSUES CLOSED: #1232