Skip to content

fix: preserve trial deadline across live authorization - #242

Merged
Dong1017 merged 1 commit into
mainfrom
codex/skill-eval-authorization-deadline
Oct 29, 2026
Merged

Dong1017 merged 1 commit into
mainfrom
codex/skill-eval-authorization-deadline

Conversation

@Dong1017

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #235

The second bounded pilot run40812282302 failed before provider HTTP: the loopback authorization client stopped after10.087 seconds while the broker subsequently completed its live checks and hit BrokenPipe writing its grant. No old/new answer pair resulted. This patch fixes timing, not authorization policy.

Changes

  • Bound authorization wait by min(remaining trial time,60s), not an unconditional10s ceiling.
  • Reject late grants and subtract elapsed gate time from the provider HTTP timeout.
  • A disconnected grant recipient does not receive a second error response; nonce/request slot remains consumed. No replay/retry or check caching.
  • Document socket-timeout versus hard wall-clock cancellation limitations.

Live GitHub/ledger/label checks, request count, payload, model/pricing, task/schema/grader and budget limits are unchanged. Both earlier reservations remain charged conservatively; no refund/reset. No label or provider call in this PR.

Verification

5 new stdlib deadline/disconnect tests and15 full-context tests pass, including12-second valid authorization, remaining-time exhaustion, late/malformed/lost/denied grants and actual simulated BrokenPipe. Independent review reran these and extra replay/concurrent-slot/callback-revocation checks, finding no blocker. Compile and diff checks pass. Full pytest/Ruff unavailable locally; current-head hosted CI remains required.

After merge, freeze a new exact plan and recheck current budgets/authority before any bounded execution. Software checks do not establish provider compatibility or skill efficacy; #235 remains open until valid paired evidence is delivered.

Allow bounded slow authorization checks without bypassing them; debit gate latency before provider I/O and reject late grants.

Agent-assisted-by: OpenAI Codex
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017
Dong1017 marked this pull request as ready for review October 29, 2026 03:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T03:40:45.147389Z 0912a2a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Dong1017 Dong1017 added the area:knowledge Knowledge line: packs, skill library, knowledge admission label Oct 29, 2026 — with ChatGPT Codex Connector

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the bounded authorization deadline correction at0912a2a39eeb41f6fa09d81fd9a9ff72abea1164. Independent review reran five deadline/disconnect tests, fifteen full-context tests and additional replay/slot-bound/revocation checks with no blocker.

Live checks, nonce burn, replay rejection and request bounds remain intact. A valid slow grant may use min(remaining trial time,60s); late/lost/invalid grants fail closed, and authorization elapsed time is deducted before provider I/O. Dropped grant writes do not restore capacity or retry. No pricing, payload, task, grader or ledger change; previous reservations stay retained.

Current-head Ready https://github.com/InferMatrixLab/InferRSI/actions/runs/40813340152 passes all four full-check/installed-package jobs on Python3.10/3.11. This CI tested against5011ea67. Subsequent main32083dfd from #207 changes only knowledge content, related docs/tests and skill resource relocations; independent comparison found no overlap with these four files or affected runtime/controller/cost/planning code. No rebase is needed solely for that unrelated advance, but existing CI is not described as testing the newer combined tree. Verify the actual squash diff preserves current main and observe post-merge checks.

Socket timeouts are not hard wall-clock cancellation, as documented. This is a source/software correction, not a successful provider run or skill-effect result.

@Dong1017
Dong1017 merged commit a0a76b3 into main Oct 29, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:knowledge Knowledge line: packs, skill library, knowledge admission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant