Skip to content

Fix Codex borrow observations and cancellation - #268

Merged
HTExplicit merged 2 commits into
mainfrom
codex/borrow-observation-fix
Oct 9, 2026
Merged

HTExplicit merged 2 commits into
mainfrom
codex/borrow-observation-fix

Conversation

@HTExplicit

@HTExplicit HTExplicit commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

The first live acceptance of the unified console exposed two observation errors: prepared HTTP forwarding restored the caller context and lost the transient borrow marker, and read-ahead cancellation after a valid completed stream made diagnostics report failure. The original HTTP responses contained completed terminals and visible OK output.

  • Derive HTTP borrow application from the immutable preparation proof and the actual outgoing cookie; use the same check for the usage table and diagnostic capture.
  • Snapshot captures under a lock. A successful sender plus a parsed completed terminal and visible output determines diagnostic completion; retain trailing read cleanup details separately as read_error. Missing terminals, upstream errors, and incomplete output still fail.
  • Protect usage observation during read/close and preserve the first terminal event, including when cleanup later cancels the reader.
  • Check the task parent before and after execution admission. Cancellation can release one child's permit before reaching a queued sibling; that sibling must not start a request while its own cancellation signal is still propagating.

Validation: regression coverage passes for completed streams with trailing cancellation, missing terminal events, actual borrowed-cookie counters, changed/missing cookies, and terminal ordering. Existing failed/incomplete Pelican cases still pass. The queued/in-flight cancellation regression and a deterministic parent-cancellation propagation-gap case pass without weakening the original no-dispatch assertion. Vue typecheck and focused lint passed; the CI race selection now includes the HTTP completion/dispatch regression. The existing production diagnostic ledger has used 9 of the authorized maximum 20 requests; only affected HTTP combinations will be rechecked after deployment, with the remaining budget enforced.

@HTExplicit HTExplicit changed the title Fix Codex borrow dispatch and completed-stream observations Fix Codex borrow observations and cancellation Oct 9, 2026
@HTExplicit
HTExplicit merged commit a0b890e into main Oct 9, 2026
18 checks passed
@HTExplicit
HTExplicit deleted the codex/borrow-observation-fix branch October 9, 2026 16:34
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