feat(runtime): disposable profiles and durable receipt acceptance (PR 3/9) #654
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/disposable-runtime-profiles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Losing a runtime profile must not erase accepted request receipts or silently turn an old provider-thread continuation into a fresh execution. This is PR 3/9 of the merged platform relocation design (#651), based on main after #653.
Store, reject stale history before admission, and retain unknown disposable-profile receipts until reconciliation. Exact request retries still return live/archived receipts before touching local profiles.The runbook is
scripts/platform-storage/DISPOSABLE-RUNTIMES.md. It records the Pi write budget, profile ownership/rendering requirements, provider refresh-token prerequisite, actual-image conformance gates, transcript evidence limitations and rollback boundaries.Validation: 342 targeted tests passed, zero failures; one existing live OpenCode test ignored (requires an installed/authenticated provider). Command:
cargo test --locked --no-default-features -p akh-session-types -p akh-runtime -p akh-session-services -p akh-transcripts --features akh-session-services/runtime --lib --test providers. Theakh-harvestbinary build and synthetic coverage CLI smoke check passed (quiescence required, valid counts-only JSON, no DB credential, no watermark writes, no payload output). Formatting and diff whitespace checks passed. CI now also runs the transcript library tests. Local builds used four jobs, debug info disabled and incremental compilation disabled in a task-specific local cache; the shared houses target was untouched. Deterministic provider fixtures and local redb stores test the runtime contract; they do not constitute real-provider/image conformance or new live Postgres acceptance. No Docker harness was changed or run. No image build, provider installation, deployment, data import, archive extraction, manifest/volume switch, Board use or new credential/store provisioning. Legacy configuration does not opt into disposable behavior. PRs 7–9 remain gated by the disposition ledger and separate operator GO. Please review and merge; I will not merge this PR.Publication provenance: Git HTTP reference advertisements arrived completely but their responses did not finish, preventing Git push. Published the same files through Forgejo's batch file API. Remote
bbf8c22eis exactly local signed62c4c10fwith its signature omitted by that API: matching treeb5d67125024592cbe8279d268ca317fa11606697, parent, author/committer, timestamps and message, verified by reconstructing and hashing the unsigned commit. Local tests cover that exact tree; the remote commit is unsigned.Review fixes
Intentional compatibility tightening: the legacy
POST /v1/jobs/cancel-unsubmittedroute now uses the same authorization assubmit, even without disposable profiles. Inference payloads require theinferencerole, a grant for the requested Akh, and successfulinference.validate; a session-role-only principal now receives HTTP 403. Non-inference payloads still requiresession. Core clients continue using the legacy route and must meet these requirements for inference pre-cancellation. This alignment is intentional and is now explicit in the runbook.New pre-admission cancellation receipts live under
archived_job/instead ofjob/: by-ID reads cover both, but scans ofjob/alone no longer include these Cancelled rows.The runbook also documents that cold preparation can materialize private auth/config and the generation marker before history/conformance refusal, without admitting a job or launching a provider. Archived jobs retain their generation side records; no garbage collection is introduced.
Review follow-up
b754b167changes documentation only. Wording was checked against the authorization, admission and archival code;git diff --checkpassed. The existing 342-test evidence above applies to unchanged source code; no local rebuild or Docker harness rerun was needed.Publication follow-up: the operator identified the earlier HTTP stall as a crawler swarm on milestone pages; Talos #215 adds nginx limiting there. This follow-up was published with normal Git push, with no batch API fallback. The earlier unsigned API publication described above remains part of the branch history.
CI retry after review fixes
Run 9955 (UI run 4287, test-session-platform) failed at
runtime::tests::sweep_closes_a_job_unknown_past_the_stall_threshold_and_only_that_one: actual["fresh", "stale"], expected["stale"](runtime.rs:2273; 170 passed, 1 failed, 6 ignored). Expanded Forgejo UI logs also contained repeated/misassigned output, so the assertion was recovered from Solstice's original per-step log for requestd24f9843-fe16-479b-8983-54ff0fc8499b, task 37054, lines 222–240.This test and its 1,000 ms threshold are unchanged from base main. It records
freshwith wall-clock time before committing and constructing the runtime; runner delay can exceed that window and legitimately expire both records. Runtime/provider suites passed, and the transcript-coverage step was not reached. Classified as an existing test timing flake, not a disposable-profile or coverage assertion failure.Per operator direction, empty commit
6b3f821eretriggers CI without changing the reviewed tree. Whole-run validation remains pending; this retry does not authorize merge or deployment.The first retry (run 9956 / UI 4288,
6b3f821e) passedtest-session-platform: the broad service library suite reported 171 passed / 0 failed / 6 ignored, transcript coverage 204 passed / 0 failed, and the disposable Postgres/OpenBao contracts completed successfully. All three daemon Docker checks, Sokar, Seshat, the core compile check, and chart check also passed.That run instead failed the unchanged
thinking::tests::analogy_goal_recovers_structured_bindingtest intest-akh-medu: actualSome(SymbolId(16)), expectedSome(SymbolId(14)), haltDiminishingReturns { marginal_value: -0.05 }; 3,943 passed / 1 failed / 21 ignored. Original evidence: Solstice request8e5c211a-a39c-4cc3-8d2f-8b07451e7189, task 37072, lines 255–271. The test, thinking implementation and lockfile have no diff from base main. Its approximate search index uses unordered insertion; nondeterministic search is a plausible explanation, not a proven deterministic root cause. No unrelated thinking code was changed.Second empty retry
d41d5ed4preserves the same reviewed tree and starts run 9958. Whole-run CI is still pending; the earlier platform success alone is not the requested final gate.Final current-head CI evidence
All 14/14 jobs passed in run 9958 / UI 4289 at
d41d5ed46563b97efa049bbc29aa355692d1da9c. Both retry commits are empty; the tree is identical to reviewed docs-fix headb754b167.The broad CI-feature platform suite passed, including the formerly timing-sensitive sweep assertion; transcript coverage passed 204/204; disposable Postgres/OpenBao contracts passed. The core library suite also passed (3,944 passed, 0 failed, 21 ignored), including the unchanged analogy test that failed in the first retry. Core integration, all Docker checks, chart and all five platform-image jobs are green at this head. The two earlier failures and their original runner evidence remain documented above; no assertion was disabled or weakened.
No local Rust rebuild was performed for these empty retries. No merge, deployment, data import or volume switch was performed. Ready for operator review and merge.
toasterson referenced this pull request2026-10-16 08:23:34 +00:00