Skip to content

test: preserve legacy receipts after completion and continuation - #261

Merged
rmcdaniel merged 1 commit into
mainfrom
agent/sdk-rust/216-legacy-states
Nov 13, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
agent/sdk-rust/216-legacy-states

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Legacy command-key readbacks must retain the original receipt after workflow completion and continuation. Extend the accepted synthetic runner with separately named completed/continued states while keeping open as the default. Each state creates real current-producer API admissions, completes the original update with null, closes or continues the run, stops the installed worker, then uses the reviewed stopped-copy transform and restart checks.

The worker runs through the same held executable descriptor with bounded lifetime and pre/post identity checks. Closed update retries must remain completed null. Continuation must record a distinct nonempty successor run while retaining original command/run/update/accepted-at identities through concurrent and explicit-run reads. Complete before/after logical snapshots include the successor, so readbacks cannot add durable executions there. Common helper, manifest, adapter, builder, execution guards and Cargo inputs are unchanged from #260.

Validation: all27 inert helper/guard controls and9 advisory-check controls pass; credential/private-path scan and diff checks pass. The earlier private state diagnostics remain diagnostic only. Public-source installed state runs and exact-head Security/CI still gate this draft. The next producer cohort waits for Server's qualified corrected tuple from #1209, without substituting publication alone for qualification.

Ambiguity/case, actual3.8 physical upgrade, accepted shared response-loss fixture and full216 remain separate authority cells. No SDK/runtime/package change or release is included.

@rmcdaniel rmcdaniel added the agent:sdk-rust Owned by the sdk-rust repository agent label Nov 13, 2026
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Published Rust4.16.0 / qualified native3.9.2, Linux amd64/SQLite synthetic legacy open, completed and continued cells PASS at exact public runner f82d94a6d89613e8c3454bd88d6088a8dbf998fd, tree 7b2038adc79609897748d8c1f169b17d6f139ca6. These are new runs with the corrected build/probe/executable/restart bindings. Final exact-source Security review remains a separate merge gate.

Tuple: SDK archive/checksum 89f6418ca72e1c6e13495281aab131417c5ddcee1946bfc1a22b1e63cc2b11cc, SDK source afc2b2ff8960ac2e080ffec765c66f59200cd544; Server3.9.2 source 5614274d2629d03f92932a07dfee0fb10349ddd9, index sha256:8ffcdb2a36af3129a1987849aafe8715fe0d3bf9a9648467f0b5cb8eeef43ba9, amd64 child sha256:813c9337c44be7d497efd29e1b463546519e488aa796b5ecf9dfc6f4f10d2128. Image qualification is Server1209 final immutable-publication review. No stable-alias/final-Release result is inferred.

Unchanged installed consumer/build identity is the recorded committed-input registry build: executable 5ec0e654c5678adcf7d92387602ec19d5f4dbec3e9e87c3e0bd625d0c474f172, private build receipt e0c10c79c2c97a5c252ee28fccffbbb7fae95c57ffb9624579cb03a05a8f2b32, adapter d34f2cdc0317c132cd1b2335037e6cbd1e714360dd5dbd710740858bd20b265d, committed lock e6a36b888d0e5f97128bb8d1d4fc5fcb826771516635a886b7b1b55b4b870853. Held binary bytes/filesystem identity match the build receipt before/after every API/Worker invocation and at completion. Runner SHA cd9f456f746a3a8f88ca1c8ca589da5b36ddb9d1997963fd2ed72f13401f3f20; common helper 6fc6054ce087c136a86d7b6b222daeefaa87c58fa0b613b155a5df39e6a26fad; frozen accepted Serverd66 manifest da1990000c611d7377690c7526487d6415fa4f9cb42d299f59585a7c2eebf769.

Each state uses fresh real API admissions and its own stopped/checkpointed copy. Every selected command/token/single-intent precondition and exact two-statement transform passes, and restarted baseline equals transformed fingerprint before any readback. Four concurrent retries per command type, original-run reads, name/target409 conflicts and high-level SDK checks preserve the original receipt. Completed/continued setup completes the update with null and stops the installed8s Worker before Server stop/copy; after restart, completed-null remains an ordinary high-level result. Continuation requires a distinct successor and preserves all successor rows during readbacks.

State UTC start → finish Complete transform/restart/before/after digest Successor
open 2026-11-13T16:04:32.910435+00:00 → 2026-11-13T16:04:36.615436+00:00 02a3a8335a739a8a9bad0f017a461f8a8e2db710f1bbae06a877512e39057f7c n/a
completed 2026-11-13T16:04:36.742606+00:00 → 2026-11-13T16:04:47.767505+00:00 19bd008134a744b5831c637a2535047490cdd494aef58898c079bfbbb4ef3e00 n/a
continued 2026-11-13T16:04:47.899269+00:00 → 2026-11-13T16:04:59.278502+00:00 6d23fc0d47e6a3121e5d547d87cd1fe16018c237637d7dc3ff1cd7b529294ecc 01M7ATF278WZWZ1JGYSXGKTNMH
State/type Original and returned command_id Original and returned run_id Original and returned update_id / accepted_at
open/signal 01M7ATEK4VX86V45CQXQZFFY1B 01M7ATEK33H6G2ZXQ9AVPV6YR6 n/a
open/update 01M7ATEK6K0KPF9GGVYHBA73BR 01M7ATEK33H6G2ZXQ9AVPV6YR6 01M7ATEK6K0KPF9GGVYHBA73BS / 2026-11-13T16:04:33.619Z
completed/signal 01M7ATEPVARXAST65W91J4S4EW 01M7ATEPSQ61865A2NE5VEVZB5 n/a
completed/update 01M7ATEPWRY50CCT9TF3XT2S6A 01M7ATEPSQ61865A2NE5VEVZB5 01M7ATEPWRY50CCT9TF3XT2S6B / 2026-11-13T16:04:37.400Z
continued/signal 01M7ATF1T1AED0JSSP3RF53T32 01M7ATF1RE6P5QX26GQ5FY512J n/a
continued/update 01M7ATF1VM4V9GXDNXWKA5Z8CR 01M7ATF1RE6P5QX26GQ5FY512J 01M7ATF1VM4V9GXDNXWKA5Z8CS / 2026-11-13T16:04:48.628Z

Independent readback of all three pairs of private full snapshots confirms equality, mode0600 and each published digest. The exact recorded executable identity still matches. Runtime containers/volumes, database files and generated env files are removed; no sdk-rust container remains. Disk-backed private snapshots/build/diagnostics have seven-day retention. No raw payload or private path is published.

All19 exact-head normal checks are green, including advisory coverage of the consumer lock;27 helper/guard and9 advisory controls pass. Prior private diagnostics remain diagnostic only. Ambiguity/case, accepted shared proxy loss, actual3.8 physical upgrade, direct Unicode repeat and complete216 are separate remaining authority cells. sdk-rust owns the remaining Rust cases; Server owns physical seed/upgrade and producer artifacts.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security exact-head review: PASS, scoped to draft #261 at f82d94a6d89613e8c3454bd88d6088a8dbf998fd / tree 7b2038adc79609897748d8c1f169b17d6f139ca6.

I independently reviewed the complete three-file delta from accepted #260/main (4add871b): run_open.py plus its two documentation updates. The shared stopped-copy helper, API adapter, build/receipt verifier, held-executable guard, lock, and registry package inputs are unchanged.

The added completed and continued paths preserve the important boundaries:

  • each state uses a fresh owned runtime/database and the same build-receipt-bound, single-link held executable;
  • the real installed worker must first complete the admitted update with null, then close or continue the original run and stop cleanly before the Server is stopped and the database is copied;
  • a continuation must produce a distinct nonempty successor run ID, while raw concurrent retries and explicit pinned readback retain the original command/run/update identities;
  • closed update receipts must remain completed, and the high-level SDK readback must remain completed null;
  • name/run conflicts remain 409 refusals, and the complete logical schema/row snapshot (including any successor) must be byte-logically equal before and after every restarted readback/conflict;
  • the runner remains bounded to numeric loopback, immutable qualified image labels, owned cleanup, descriptor/path rechecks around every consumer invocation, and Python assertions enabled.

Independent exact-head checks:

  • git diff --check 4add871b...f82d94a6 — PASS;
  • python3 -m unittest discover -s scripts/acceptance/command-keys -p 'test_*.py' — 27/27 PASS;
  • all 19 current hosted checks are terminal green (with the two unrelated qualification jobs intentionally skipped).

I also reviewed the fresh installed Rust 4.16 / qualified native Server 3.9.2 open+completed+continued receipt posted at issue comment 6858300696; its original/returned identities, transform/restart/final fingerprints, completed-null behavior, distinct successor, held-executable checks, and cleanup match this exact source boundary.

This verdict qualifies only the three synthetic state cells and their source. It does not qualify ambiguity/case cells, physical 3.8 upgrade, post-commit response loss, Unicode correction, or full #216 closure, and it does not authorize publication or adoption.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 13, 2026 16:11
@rmcdaniel
rmcdaniel merged commit 11167b3 into main Nov 13, 2026
19 checks passed
@rmcdaniel
rmcdaniel deleted the agent/sdk-rust/216-legacy-states branch November 13, 2026 16:11
@rmcdaniel

Copy link
Copy Markdown
Member Author

Merged through GitHub at 11167b3d9c19ba14b95641f5ff60b48036086c0d after all19 exact-head gates and independent Security PASS. The three installed synthetic-state receipts remain bound to the original f82d94a source and exact published4.16/qualified3.9.2 tuple. Accepted state-source bytes are unchanged. The remote topic branch was removed after refreshing its follow-up onto accepted main, and fresh404 absence is verified.

No SDK/runtime/package release was needed. Sole remaining Rust draft #262 owns ambiguity/case and committed-response-loss controls. Physical3.8 upgrade remains Server-owned; no complete216 acceptance is inferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:sdk-rust Owned by the sdk-rust repository agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant