Repository navigation
Conversation
Approved engine-first delivery planArchived: 2026-10-18. Applies to review stack #2404 → #2405 → #2406 → #2407; exact branch/head/baseline identities below. Local plan paths are provenance only, not remote links. This is the full selected split/qualification plan; verification tasks below describe intended checks, not implicit pass claims. Actual results and remaining gates are recorded separately in the PR bodies. Engine-first identity deliverySlug: 2117-engine-identity Immutable delivery baseline and branchesBase branch: main; recorded start commit f9a3297. Remote main observed at c4a043f (#2402, TUI/docs only); no automatic rebase. Host requires current-main merge qualification before merge.
These bases organize review, not new module dependencies: providers and adapters both depend directly on engine. The host source tree exactly equals the retained assembled qualification candidate (tree 3763ffe56e1ba21bab363d3ad416c5e4a50077d7). The root checkout remains on the engine review branch; assembled/preparation worktrees stay under .scratch/2117-engine-split/. Approved outcome and authorityJoe approved on 2026-10-18: prepare, commit, push and open four draft PRs: engine; changed providers; persistence adapters; host/contracts/required client integration. Humans alone merge. No tags/releases, deployment, invented dependency pins, CI bypasses or new TUI presentation work. Preserve the assembled candidate in a local worktree under .scratch and keep the engine review branch at the main checkout root. Source boundary and contracts
API compatibilityThis is the already-approved breaking pre-v1 Go API minor, not additive-only and not /v2 import migration. Engine APIs change invocation identity, provider-neutral DTOs and private replay ownership. The engine PR does not itself change protobuf fields/server major, but carries engine-originated observable semantics that the final host PR exposes as approved Harness API major 2. Public opaque archive reasoning fields are removed/reserved in that final coordinated host/client change; readable reasoning/text/media/phase remain. Snapshot/event writers advance to sessnap-json/2 and eventlog-json/2; upgraded readers accept /1 and /2. Drain old readers/writers, upgrade both decoding drivers, then harness/clients; no mixed writers or downgrade after new writes. Exact module release versions remain unselected and publication requires separate authority. Tasks and evidence
Merge/release readinessReviewable source is not merge/release-ready. Before the engine merge, dependent source must be reviewable, assembled behavior qualified and release/pin order explicit. Real engine publication precedes provider/adapter pins and independent releases, then final host/integration pins and standalone/publication qualification. Existing required checks are not waived: Joe accepted review drafts with accounted-for consumer failures; any intermediate merge still needs a separate explicit maintainer decision. Release latency cannot be eliminated. Browser/image qualification remains unclaimed unless actually completed; final host draft must disclose inherited limitations. Verification ownershipThe directing agent owns split, integration, PR publication and evidence. A focused writable worker adds provider composition tests only in the retained assembled worktree and runs narrow checks. New tests get independent incremental panel review. Full Go gates use 1800-second outer limits; other full gates 600 seconds. Heavy suites run serially. No HANDOFF update. |
Separate provider pairing from engine invocation identity; preserve occurrence-bound replay, exact continuations and legacy evidence migration. Co-authored-by: Mecatl <noreply@mecatl.dev>
…aries Add snapshot round-trip coverage for provider pairing, replay, and argument key order. Explain the cache implications and the acceptance, continuation, migration, and evidence boundaries used in source review. Co-authored-by: Mecatl <noreply@mecatl.dev>
Normalize legacy snapshots and complete event sources at codec seams, preserve provable controls and historical evidence, and remove persistent migration holds. Reject stale controls without effects and preserve later canonical lifecycle across migrated event segments. Co-authored-by: Mecatl <noreply@mecatl.dev>
Keep latest-main permission-mode and yolo-review regressions meaningful after the identity rebase by resolving accepted call IDs and returned child handles. Assert completed background denial and non-vacuous canonical results. Co-authored-by: Mecatl <noreply@mecatl.dev>
701df1f to
1928b18
Compare
Remove legacy pending approval and authorization preservation, unshipped candidate-hold normalization, and old direct Snapshot construction compatibility. Keep nonpending stored-history migration and current-schema continuations, with boundary regression coverage and clarified upgrade policy. Co-authored-by: Mecatl <noreply@mecatl.dev>
Decode legacy storage through dedicated DTOs and normalize snapshots before reconstructing sessions. Remove legacy staging and old-format marshaling, preserving deterministic identity, history migration, and current continuation validation. Co-authored-by: Mecatl <noreply@mecatl.dev>
Keep eventcodec focused on versioned records and sparse historical projection. Move pairing, segmentation, and abandonment into eventsource with a narrow codec-owned legacy decoding seam. Relocate tests with their responsibilities and remove obsolete codec reconstruction APIs. Rename the snapshot legacy ToolCallID helper without changing derivation, and pin its output with a fixed-vector regression. Co-authored-by: Mecatl <noreply@mecatl.dev>
…sources Separate legacy and current event decoders without changing storage formats. Restore incremental folding with shared legacy conversion, preserve straightforward provider-reference reuse, and reject unsupported reconstruction instead of synthesizing repair history. Co-authored-by: Mecatl <noreply@mecatl.dev>
…ning Keep straightforward snapshot conversion, omit unsupported legacy events, and remove historical identity carriers and obsolete learning evidence compatibility APIs. Persist irreversible learning eligibility and preserve current replay and continuation validation. Co-authored-by: Mecatl <noreply@mecatl.dev>
… conversion Enforce current evidence protocols before ordinary or validated skill activation while retaining active history and rollback. Remove unused archive migration plumbing, preserve snapshot identity derivation, and correct replay documentation. Co-authored-by: Mecatl <noreply@mecatl.dev>
Engine foundation: canonical tool-call identity and private replay
Review scope
Engine foundation for #2117. Review
engine/**and the necessary.golangci.ymldepguard allowance. Provider implementations, external persistence drivers, host/contracts/SDK/client changes, and TUI presentation belong to the dependent drafts, not this PR.Current engine checkpoint
Rebased the original commits from
701df1f6aonto55b980d34b4518221c9385a2ab32e2bb5c3f4f8a. Published engine head:80ddd21affb4dcf7c6141f64866e17d7456ef88b; this is not a claim of qualification against today's main.StopDetailhandling into the newfoldTurnChunkterminal branch; the regenerated port API snapshot retains the field.git range-diffconfirms the cache-review and codec-abandonment commits replay unchanged.1928b1875adapts new main tests to accepted canonical call IDs and returned child handles. It also makes background-child denial/collection and evidence-failure result assertions non-vacuous. No production change in that follow-up.31e9f27ebrejects unsupported legacy snapshot continuations and never-shipped hold formats.71b1352aaisolates legacy/current decoding and normalizes before Restore.80ddd21afmoves complete-history reconstruction into eventsource and renames the deterministic snapshot helper without changing its derivation.Migration contract: reject unsupported snapshots, preserve evidence
This supersedes the original draft's persistent identity-hold policy and the earlier blanket load-time abandonment policy:
/1history, canonical identity/provenance/replay migration, argument key order and stable metadata. Reject legacy awaiting/authorizing states even with absent/null pending payloads; reject any non-null legacy pending approval/private-authorization payload in any state. These snapshots are unloadable, not normalized to idle. Resolve parked work before upgrade or start fresh; no silent fallback./1DTO decoding migrates before Session construction;/2uses the current decoder. Both yield a current Snapshot. Restore only reconstructs the current schema, and re-encoding writes/2. Valid stored incarnation survives; absent identity derives deterministically; invalid nonempty identity rejects.identity_holdkey, including null and schema 2. Direct schema-zero Snapshot inputs reject; supported legacy storage migration enters through JSON decoding. No speculative compatibility for candidate-only formats./2controls: preserve valid asks/private authorization, exact effective argument bytes, ordered deferred calls, retry and enrollment metadata. Stale approval/retry/post-authorization entry rejects before effects or saves.ErrPrivateStateRequired.DecodeLegacyRecordfacts and sparseProjectRecord. Eventsource owns complete-sourceProject/Projection, pairing/continuation proof, segmentation and private history normalization. Old codec reconstruction exports/wrappers are removed. Sparse records are display-only, never continuation authority.Normal resume loads snapshots, not event folds. Learning's exact-run evidence and debugger history inspection use folds; copied history or stored IDs cannot establish execution, learning or promotion authority. No broader persistence, compaction or learning-storage redesign is included.
The approved ACP boundary remains unchanged: passive hydration is effect-free, while explicit editor reconnect may attach placement, mount supplied MCP servers, discover commands/capabilities, and report setup errors. It cannot execute tools, resume abandoned work, create permission grants, or publish learning; a separate prompt uses normal admission. ACP implementation and handler tests belong to #2407.
Additional behavior fixes worth reviewing
These were identified against the original base
f9a3297c1, rather than claimed as defects introduced by recent main changes:engine/agent/continuation_identity_test.go.ChunkDone(StopError/StopCancelled)discards tentative calls/private replay while retaining usage and display content. Iterator errors and context cancellation already rejected tentative calls at the original base. Seeengine/agent/tool_call_identity_test.go.engine/agent/canonical_results_test.go.engine/adapter/sessnap/replay_test.go.BranchIndexand private provenance. This is a source-verified ownership fix, not a claim of a dedicated newBranchIndexmutation regression.Whole-batch validation, compaction projection admission, eventsource-owned abandonment, original-source coordinates, verified reflection bindings, and private-ID redaction are identity/replay/evidence hardening, not additional historical-bug claims. Host replay/inspection fixes belong to the follow-on PR.
The cache investigation added comments and an offline snapshot/projection regression, not a runtime serialization fix. Historical probes retained cache hits after whitespace/escaping changes and reloads; argument-key reordering missed. No general cross-provider cache guarantee is claimed, and no paid probes were rerun for this rebase.
API compatibility
Assessment: approved intentional breaking pre-v1 Go API minor. This is not additive-only, a v1 release, or a
/v2import migration.engine/CHANGELOG.mdclassifies exported removals/signature/type changes; generated API snapshots capture the surface. Provider/host callers need coordinated source updates for LLM DTOs, replay chunks, removed reasoning/item fields, and canonical typed references.Wire: engine semantics count separately from protobuf syntax. This engine PR does not change the advertised host major or protobuf fields. The coordinated host/client change uses the already-approved Harness API major 2, including removal/reservation of public opaque archive reasoning fields while retaining readable reasoning/text/media/phase. SDK versioning is independent. No new wire break or additional major bump is introduced by this rebase. Do not deploy an intermediate engine/host mixture.
Stored data: writers use
sessnap-json/2andeventlog-json/2; readers support/1and/2subject to the snapshot rejection and complete-event proof policies above. Legacy parked snapshots do not resume after upgrade; resolve them beforehand or start fresh. Drain old readers/writers and upgrade decoding snapshot/event drivers before harness/clients. No mixed writers or downgrade after new-format writes. Exact release versions remain unselected. The normalization/ownership follow-ups introduce no additional stored-format, wire field, feature or major change; reference-adapter source APIs are excluded from the stable core API.Verification
Recorded qualification for published engine head
80ddd21af:GOWORK=off, full engine race (-count=1), API snapshot freshness, pinned engine-only lint and whitespace checks.task test,task lintand offline demo at unchanged root/provider migration boundaries. The root hook still expects provider tokenc1. These failures are recorded, not waived.Earlier assembled-source all-module lint, workspace race, docs/site, metadata and offline tool/result plus ask/approval/result demo receipts are historical, not qualification of this engine plus a refreshed downstream stack. No tests were rerun for this description-only update.
Intermediate integration failures and coordinated delivery
This remains an engine-only review draft. Unchanged root/provider consumers use the old API; current compilation failures include
[]session.Messageversus[]port.LLMMessage, removedChunkReasoningItem/reasoning/item fields, and typed canonical references. Standalone provider tests against published older engine pins do not prove integration with this candidate.Review stack: #2404 engine → #2405 providers → #2406 persistence adapters → #2407 host/contracts/clients. Providers and persistence adapters both depend directly on engine; their release dependency is not linear.
The original delivery-plan archive still contains the superseded hold policy. Use this description and current source for migration behavior; the archive was not edited in this update.
Before merge/release:
No invented PR-head versions, permanent replacements, disabled checks, or implicit merge waiver. Any intermediate merge with failing required checks requires an explicit maintainer decision. No release, deployment, or merge performed. Draft, not merge/release-ready.