Repository navigation
Add dormant Pack worker fences and durable receipt ordering - #1286
sidneyswift wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pre-merge checks:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review disposition at API head The CodeRabbit “SOLID & Clean Code” comment is a nonblocking advisory, not a fixed finding. Its comparison against The actual added protocol branches merit review. They preserve legacy call shapes while carrying original execution/claim identity and enforcing different failure handling for protocol 2. Shared identity/payload logic is already in purpose-named fence helpers. Replacing explicit boundary checks with a strategy or universal policy object is an optional architectural refactor, not a demonstrated correctness repair. The repository config sets this check to An independent source reviewer checked this disposition against the actual diff/config and found no blocking structural issue. No code or test changes were made for this advisory. Functional/creation-race review closure and current-head CI remain separately recorded; this is not rollout approval. |
There was a problem hiding this comment.
All reported issues were addressed across 38 files
Architecture diagram
sequenceDiagram
participant Client as Client (REST/MCP)
participant API as processPackOperation
participant WF as releasePackWorkflow
participant S as Pack Steps (prepare/produce/settle)
participant PG as PostgreSQL (v2 RPC)
participant OB as Provider Observation Journal
participant FP as FAL/AI Provider
Note over Client,PG: Protocol 2 dormant internal opt-in only<br/>Public/legacy remain protocol 1
Client->>API: Pack operation request (protocol 2 admission)
API->>API: Validate protocol 2 identity (transition)
alt Protocol 2 flow
API->>PG: approve/run with execution fence
PG-->>API: Admitted job with execution identity
API->>PG: run command (v2 RPC with fence)
PG-->>API: Confirm dispatch
API->>WF: Start workflow with execution fence
else Protocol 1 flow
API->>PG: Approve/run (original path)
PG-->>API: Job
API->>WF: Start workflow (original args)
end
WF->>S: preparePackStep(execution)
S->>PG: run command (v2: with original identity)
PG-->>S: Saved job
S->>S: Verify execution identity matches original
alt Identity mismatch
S->>S: Throw PackFenceError
end
loop Each pending asset
S->>PG: claim (v2: with fence + deterministic request_id)
PG-->>S: Claim result (original claim ID)
S->>FP: submit provider request
FP-->>S: Request ID accepted
S->>OB: append observation (accepted state)
OB-->>S: Saved confirmation
S->>PG: phase update (with fence + context version)
PG-->>S: Phase saved
S->>FP: poll/retrieve result
FP-->>S: Result data
S->>OB: append observation (completed state with SHA256)
OB-->>S: Saved confirmation
S->>PG: finish_asset (with claim fence)
PG-->>S: Asset completed
end
S->>PG: settle (v2: with execution identity)
PG-->>S: Settlement result
alt Settlement acknowledgement lost
S->>S: No retry (zero-retry bounded step)
end
Note over S,PG: Any PackFenceError stops workflow<br/>No automatic resubmission/fallback
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 27 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Delayed Pack workers can write after their execution or claim changes. This pair adds dormant protocol-2 fences, exact replay/context CAS, and independently committed bounded provider observations before active phase writes.
Successor checks are green; renewed root source acceptance is pending. The prior API0f5f/Database186 acceptance was withdrawn after post-ready findings. Root owns all merges; do not reuse that old acceptance.
Current paired heads:
ebd885f0aa895746713722e712fe58264aa0c034c9d87b85ca53339f4084f8e62ed7c7ac5115f491Post-ready repairs check action/context/attempt/replay before expiry, prevent precharged submission IDs and premature completion, fence bound dispatch uncertainty, replay expired settlement exactly, and restrict receipt append isolation. API foundation writes retain observed and own-acknowledged versions across the complete batch, rejecting competing changes in both new and saved-foundation paths. Receipt response validation and qualification oracles are stricter. SQL remains an inactive proposal outside migration/deployment runners.
Validation:35 actual disposable PostgreSQL tests including11 legacy controls;424 scoped API tests;6 separately run actual API/SQL cases including concurrent foundation CAS; required Pack/production types and lint; actual compiled SDK failure/replay checks with25 source bindings and0runtime network attempts. Current GitHub Actions pass, including full API tests, workflow fixtures and durable-port compilation. Database automated successor review found0newissues. API successor review found one nonblocking hypothetical multi-asset fixture extension, explicitly deferred against the current single-asset contract. All42 inline threads have evidence-backed dispositions; advisory suggestions are not claimed implemented.
Independent Catalog Database successor review passed. The independent Context foundation successor re-review and renewed whole-pair root acceptance remain separate gates. Original red evidence is preserved; green checks do not replace those decisions.
No hosted SQL, migration publication/apply, provider/config/renderer activation, paid live execution or App2269 closure is authorized or claimed. Public REST/MCP and legacy execution remain protocol1 without a new stale-worker guarantee.