Skip to content

fix(context): retain complete Specialist task constraints across attempts - #232

Merged
Qiyuanqiii merged 6 commits into
codex/lane-c-214-required-project-rules-20261001from
codex/lane-c-215-persistent-task-brief-20261001
Oct 2, 2026
Merged

Qiyuanqiii merged 6 commits into
codex/lane-c-214-required-project-rules-20261001from
codex/lane-c-215-persistent-task-brief-20261001

Conversation

@NanaseInori

@NanaseInori NanaseInori commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When a Specialist's consumed delegation leaves the 12-message or 64 KiB recent-history window, its active task constraints can disappear from later model requests. This change prepares a bounded, immutable per-attempt brief from existing direct-parent instructions and child-owned WorkItems, then requires their complete current content in the actual request and completion checks.

Consumed instructions remain effective across attempts. Explicit specialist_instruction.v2 append/replace/withdraw operations bind exact same-child sources; the existing v1 writer stays compatible. Empty preparation is pinned, later task changes refresh on a new attempt, and delivery/consumption receipts keep the current attempt and lease. Optional Notes and history can be omitted; required overflow stops before dispatch.

The request and completion checks share a deterministic redacted projection. Delivery JSON preserves decoded string meaning through existing text-redaction boundaries, including escaped newlines. Original source hashes, task fingerprints and full required-content comparisons remain enforced. No tools, summaries, credentials or new authority are added.

Forward migration 175 and proposed ADR 0163 define compatibility, recovery and rollback. Historical migration checksums are unchanged.

This draft is stacked on #227 (codex/lane-c-214-required-project-rules-20261001, base f4aae4a346b09d880037236b48130cff3ce1b77d). Its diff contains only #215; retarget after that dependency merges and reverify the resulting exact HEAD.

Fixes #215.

Validation

Validation of the #215 implementation on clean HEAD b49945b4756368e070f5cb2dd7e2bb55f16bd167:

  • Four-package race: go test -race -count=1 -timeout=15m -run 'Specialist|AgentInbox|SchemaV27|SchemaV175' ./internal/domain ./internal/store ./internal/application ./internal/coordinator passed.
  • go vet for those four packages and protocol registry checks passed.
  • Actual-request tests cover history count/byte/window pressure, complete WorkItems, optional Notes competition, retirement, retry/repair, reopen/pinned state, cross-attempt receipts, isolation and fail-closed overflow.
  • Real writer/Runner red-green tests cover redacted constraints, successful model completion and usage settlement, one-time inbox consumption, and rejection of changed required content despite a correct fingerprint.

Current clean HEAD 96a38945e93bda20141d7714d6df1a5434b25e99 adds only the missing v175 history row after independent review; no Go code, migration or test assertion changed. TestSchemaHistoryListsEveryVersionInOrder passed locally on this exact HEAD.

CI run 36946406848 completed with 18/19 jobs passing on 96a38945. All eight Store shards, Go package checks, permission race checks, full vet/vulnerability checks, Go control-plane gate, frontend, real LSP/Edge and macOS Desktop passed. Windows Desktop shell job 110649468315 failed only TestControlPlaneWiresOrdinaryAgentBrowserIntoModelRequests: after 21.90 seconds the Thread handler returned HTTP 499 with a stored cancelled handoff. The exact job log is retained. Three local repeats of that test passed on clean 96a38945, but used Go 1.25.7 and a single-test invocation, whereas CI used Go 1.25.14 and the full tagged Desktop package. They show no local reproduction; they do not establish an environment-only cause. Lease-renewal cancellation is a static candidate, with underlying cancellation timing and Run-state evidence still unavailable. CI remains failed; no timeout, fencing or Root behavior has been changed.

Desktop release run 36946406792 completed successfully on the same HEAD: dependency/license boundaries, Windows dual-product candidate and both macOS archives passed; attestation and publication were skipped under PR conditions. #227's older Windows watchdog failure and denied Actions rerun remain separate dependency evidence. Draft status is retained; this PR does not claim merge readiness or live-model acceptance.

  • go test -count=1 ./... (not run locally; CI package/shard checks passed, but the separate Windows Desktop check failed as above)
  • go vet ./... (passed in exact-HEAD CI; affected packages also passed locally)
  • Relevant CLI smoke tests (not run locally)

Surface governance

  • No Surface is added, promoted, downgraded, deprecated, or removed.
  • Registry declarations: N/A — no Surface change.

Audit

  • No credentials or local runtime data are included; regression secrets are synthetic fixtures.
  • Policy, workspace, sandbox, and persistence boundaries were reviewed.
  • Architecture documentation and proposed ADR 0163 were updated.

@Qiyuanqiii
Qiyuanqiii marked this pull request as ready for review October 2, 2026 04:25
@Qiyuanqiii
Qiyuanqiii merged commit c007558 into codex/lane-c-214-required-project-rules-20261001 Oct 2, 2026
25 checks passed
@Qiyuanqiii
Qiyuanqiii deleted the codex/lane-c-215-persistent-task-brief-20261001 branch October 2, 2026 04:25
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