Skip to content

fix(state): close residual operation and publication ownership gaps - #218

Merged
bordumb merged 2 commits into
mainfrom
codex/residual-state-ownership
Nov 11, 2026
Merged

bordumb merged 2 commits into
mainfrom
codex/residual-state-ownership

Conversation

@bordumb

@bordumb bordumb commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Overlapping shutdown, cancelled operations and interrupted publication could leave resources reusable or report completion while work remained live. Implement AP-SPEC-078 on merged PR #217 (e40bfdd32e3812ef349bb2db84faada443cb1938) with explicit ownership through actual settlement.

  • Gateway: retain serving and endpoint-directory claims through drain and inode-owned cleanup. An overdue drain exits while ownership remains held. Distinct daemons use separate protected endpoint parents; launchers and runbooks follow that rule and wait for actual child readiness.
  • SDKs: retain SQLite workers independently of cancelled waiters, drain them on close, and snapshot mutable inputs before admission. Enforce the original TypeScript signing deadline when accepting a signature, including delayed completion and clock rollback.
  • Exchange: invalidate channels after interrupted or failed admitted I/O, distinguish Iroh STOP from clean acknowledgement, and prevent resubmission after a lost reply.
  • Persistence: publish development software keys through synchronized private staging without replacing identities; expose uncertain acknowledgement. Invalidate the reference lifecycle file store after persistence failure until validated reopen.
  • Demos: serialize Northstar's current-state transitions after bounded body parsing, attribute REST results to their operation, and discard incident refresh/login results from obsolete viewer generations. The incident demo uses current public SDK approval APIs and proves local withdrawal with native evidence and zero provider calls.

AP-SPEC-078 defines the transitions, interruption outcomes and acceptance gates. The implementation map links each requirement to its source and regression owner. Gateway serving ownership documents the topology and shutdown behavior. AGENTS.md now requires ownership through cleanup and explicit handling of uncertain persistence.

Regressions cover controlled late completions, real thread commit barriers, a held-response TLS peer, local Iroh channels, subprocess termination/reopen, competing starts/creators, held HTTP bodies, and viewer/login completion orders. Signing deadline tests run against source and installed packages. Northstar and viewer/native withdrawal contracts run inside the existing compliance job. Maintained semantic/source identities, architecture/proof-coverage metadata and shipped browser artifacts are refreshed.

Reference and demo paths remain distinct from shipping runtime behavior. Google refresh-token rotation remains a provider-dependent hypothesis. This PR does not claim a whole-repository audit, an authorization bypass, physical power-loss guarantees or production qualification.

Verification is pinned to 207c04e14c8bf3729a18f143c66dfbace6295965.

Accepted: 89 successful checks, five intentional protected production-qualification skips, and no failed, cancelled or pending checks. All 13 workflows completed successfully on this exact head.

Workflow Result
Airtable gateway demo Passed
CI Passed
Gateway isolation Passed
Gateway operator package Passed
Git signing branch-protection action Passed
Git signing protocol Passed
Google read demo installed images Passed
PostgreSQL lifecycle qualification Passed
Python SDK package Passed
Recipe qualification Passed
SDK outcome recipes Passed
Stripe gateway demo Passed
TypeScript SDK package Passed

Main CI passed repository preflight, authoritative implementation tests, compliance including the new demo contracts, live service contracts, Kani, two byte-identical translation reproductions, authoritative clean Lean, exact-revision formal evidence and the final CI qualified gate. The Lean assurance audit covered 329 compiled statements; Aeneas qualification reported zero compiled external axioms. These are the repository's bounded formal claims, not a claim that the added runtime code is fully formally verified.

CI was kept to two coherent source cohorts. The first exposed a function-length lint and old source-free launchers sharing endpoint parents; those failures were repaired together. Bounded local repair checks passed all-target/all-feature Clippy, 34 gateway binary/socket tests, 15 demo Python units, five Northstar cases, five REST cases, and public-SDK/WASM viewer/withdrawal contracts. Preflight now collects independent Cargo diagnostics with --keep-going while preserving failure status. No tests or ownership checks were weakened.

@bordumb
bordumb marked this pull request as ready for review November 11, 2026 05:29
@bordumb
bordumb merged commit 41e2d94 into main Nov 11, 2026
94 checks passed
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.

1 participant