2.6 KiB
2.6 KiB
Context Manager Task 3 Scope Fix Report
Status
- Done
- Tightened the remaining user-constraint scope heuristic so ambiguous constraint lines stay
branchscoped. - Preserved the source-stable subject behavior introduced in the prior Task 3 fix.
Changes
-
Narrowed durable session promotion in
.pi/agent/extensions/context-manager/src/extract.ts- Removed the bare-keyword session promotion behavior for terms such as
MVPandcontext window. - Kept
sessionscope promotion limited to clearer durability signals such aswhole session,across branches,session-wide,project-wide, and similar explicit phrasing.
- Removed the bare-keyword session promotion behavior for terms such as
-
Strengthened local-scope detection
- Treated
this module/in this moduleas branch-local cues so module-local rename instructions do not leak across branch switches.
- Treated
-
Added regression coverage in
.pi/agent/extensions/context-manager/src/extract.test.ts- Updated the existing extraction expectation so
We must adapt to the active model context window.remainsbranchscoped. - Added explicit regression assertions for the reviewer’s false-positive examples:
We should keep the MVP branch experimental.→branchWe should rename the context window helper in this module.→branch
- Kept a durable-session control case to verify explicit session phrasing still promotes correctly.
- Updated the existing extraction expectation so
Tests
cd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npx tsx --test src/extract.test.ts- Result: 4 tests passed, 0 failed
cd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npm test- Result: 15 tests passed, 0 failed
Files Changed
- Modified:
.pi/agent/extensions/context-manager/src/extract.ts - Modified:
.pi/agent/extensions/context-manager/src/extract.test.ts - Created:
.pi/reviews/context-manager-task3-scope-fix-report.md
Self-Review Findings
- The fix stays narrowly scoped to
inferConstraintScope()heuristics and targeted regression coverage. - Public APIs and exported function signatures are unchanged.
- The previously fixed source-stable
subjectgeneration remains untouched. - The updated tests cover both the reviewer’s concrete false positives and an existing ambiguous
context windowexample.
Concerns
- Constraint scoping remains heuristic-based by design, so the extractor is intentionally conservative: unclear user constraints now stay
branchscoped unless the text explicitly signals broader durability. - No additional blocking concerns found after the targeted and full test runs.