Commit 8a3435d
committed
feat: bridge Codex v0.7.0 handoff/resume continuity + fresh-context reviewer (v0.6.0)
Port Codex commits b30c2d5 (Harden handoff and resume continuity) and 102849f (Add fresh-context handoff reviewer) into the OpenCode-native port, adapted to OpenCode paths/dialect and preserving local rules. Bumps to v0.6.0.
- /handoff explicit invocation boundary: generic pause/stop/checkpoint wording
only recommends /handoff; review-through-push requires explicit invocation
or an equally explicit commit-and-push instruction (skill, AGENTS.md, docs).
- Context Capacity Gate before Phase 0 (active reported % + estimated cost;
halt-and-fresh-session; never invent a value).
- Deterministic review scope: session-start hook writes gitignored
session-baseline.json every session; Phase 0 proves coverage from
start_head..HEAD + staged + unstaged + untracked + active.md-touched files,
with bulk-directory count checks and git check-ignore diagnosis.
- Fresh-context integrity reviewer for mixed/executable handoffs: one built-in
explore agent, fresh context (never task_id), conclusion-free bounded
packet, instruction-read-only, before-and-after mutation snapshot with
SHA-256 content hashes; failure blocks the gate; explicit-waiver-only
same-session downgrade; pure-document exemption retained; no external
egress preserved.
- /handoff refreshes tracked derived production/resume-index.md (<=10 KB).
- /resume-from-handoff bounded by default (200-line/32-KiB current slice
section) + explicit deep [focus] mode; index freshness states; source
precedence with visible conflicts; ## Source Freshness + cache readback.
- Session-start/pre-compact/post-compact hooks: handoff-first bounded
previews, substantive/pointer/missing classification, pointer elevation.
Local scans/logging preserved.
- audit.sh: handoff-review + resume-contract lockstep rewrite, new inline
hook-behavior (5 scenarios) and negative-fixture (2 fixtures) runners,
coexistence S8 (resume-index survives uninstall); installer allowlist keeps
production/resume-index.md trackable.
Verified: bash .opencode/audit.sh all (0 errors); handoff-review,
resume-contract, hook-behavior, fixtures, coexistence (S1-S8),
smoke-headless, release all pass; token-leak grep clean on ported surfaces.
Plan: .opencode/plans/migrate-codex-v0.7.0-continuity.md
Evidence: production/test-evidence/latest.md1 parent f235dee commit 8a3435d
22 files changed
Lines changed: 1446 additions & 274 deletions
File tree
- .opencode
- docs
- hooks
- lib
- plans
- skills
- handoff
- resume-from-handoff
- tests/fixtures
- invalid-handoff-contract/.opencode/skills/handoff
- invalid-resume-contract/.opencode/skills/resume-from-handoff
- production/test-evidence
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments