Skip to content

fix(context): clear previous results when starting a new task - #40

Merged
xiaour merged 3 commits into
xiaour:mainfrom
BigDataDZ:codex/task-result-boundary
Oct 19, 2026
Merged

xiaour merged 3 commits into
xiaour:mainfrom
BigDataDZ:codex/task-result-boundary

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Starting a new task cleared inherited slots and the public result reference but still copied the previous task's artifact, query fingerprint and data hash into taskState.result. Execution-contract and prompt serialization consequently referenced the old result even when inheritance was disallowed.

Retain the previous result only when the existing canInherit policy allows it. Explicit new questions, forced resets and expired inheritance budgets now clear old result metadata. Eligible continuations, result operations and direct result references retain their behavior.

Validation: four reset/expiry regressions reproduced before the fix; seven new cases use actual completed task history and verify the externally consumed prompt/contract. Full npm test: 581 tests, 569 passed, 12 optional skips, 0 failures. Lint: 0 errors / 7 existing warnings; eval: 14/14 fixtures with 2 L3 judgments pending. Independent review approved and ran 25 new/existing context/router tests, all passed. No external model was used.

Depends on #37 for the shared PostgreSQL HTTP acceptance path; merge #37 first. Its prerequisite changes are included to keep this branch verifiable.

@xiaour
xiaour merged commit f2b75e4 into xiaour:main Oct 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants