Repository navigation
feat(runtime)!: complete durable goal checks and driver bounds - #330
Conversation
Codex Review SummaryThis 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. |
ENG-1063 G2 closeout. Port test-first fd01818e onto current main; retain all current goal regressions.
ENG-1063 G2 closeout. Port 6cd1a811 without old merge history or historical ledgers. Preserve current sponsor deadlines, routing projection, output caps and cooperative preparation drain.
ENG-1063. Port e2d764ce; retain goal_review module.
G2: reserve input and current output/cost before dispatch, recheck absolute caller deadlines inside the store actor, and retain the initial durable-start refresh handshake. Qualify goal/prompt caller caps, count-based final responses, raised budgets and queued expiry.
G2: reject unknown capped spend before pending dispatch proof, reserve worst cached/tier rates, and verify exact input affordability and queued caller deadline controls.
G2: metered real compaction/continuation sends [1024,1024] despite a cumulative caller output cap below1000. Goal-less control retains existing byte-exact summary join assertions.
G2: admit every summary and continuation against current caller and goal remainders using committed helper identity. Preserve absolute deadlines, avoid disabled-path bridge allocation, and read settled durable accounting after interrupted admission. Metered real compaction and post-commit/pre-ack race regressions pass; independent review, goal/summary tests, workspace Clippy and build pass. Full G2 and autonomous-core remain incomplete.
ENG-1063. Port 5e29c757 while preserving all paid-ancestor deadline intersections, sponsor metadata and current output caps. Only a run own goal can classify its final slot.
G2.2: intersect caller limits at admission, tighten live final-slot meters without resetting spend, and refuse extra reserve turns after any consumed turn cap. Persist rejected handoff tool turns before exhaustion.
G3.1: preserve typed acquisition expiry and settle unstarted checks through the queued-run path. The calendar-expiry regression verifies timeout priority and durable queue cleanup.
G3: reuse durable prompt runs and zero-repair output contracts for independent one-turn verification. Fence results against current revision and exhaustion; cap audit attempts and withhold tools.
G3: hold a completed process before settlement, mutate its goal, and require original run diagnostics to survive snapshot and reopen.
G3: persist bounded check results on the original run even after goal edits, replacement or clear. Publish existing message events in the terminal transaction without adding check-only records to model context.
G3.4: extend the existing real-process acceptance with exact Once checked achievement after forty goal runs, preserving the deadline-only variant. Prove ForGoal three-strike blocking and exact terminal reopen evidence.
G3: hard-kill real runtimes at explicit phase barriers, preserve unstarted authority and exact row recovery, and pause started checks without repetition. Observe the orphan boundary with stable test-owned pidfds; decision15 remains open.
|
@codex review Please review current head e86fb41. All four prior findings have published fixes, targeted regressions and per-thread evidence. Final full workspace2704/2704+15intentional skips, minimal-provider211/211, doctests/Clippy and real-binary smoke6/6 pass. Final-head goal-less request parity is8/8 against current main3e34eea2. The PR description records compatibility and remaining qualification. |
There was a problem hiding this comment.
💡 Codex Review
qq/crates/qq-core/src/sessions/streaming.rs
Lines 722 to 724 in e86fb41
When task routing is enabled and a goal has a small max_total_tokens remainder, this admission validates only the router's declared cost; TaskRouter exposes no token ceiling, so the up-to-64-KiB TypeSafe routing request can be dispatched and record usage beyond the goal limit before the later main-request meter stops. Extend routing admission with a conservative token/input reservation and refuse the routing request before dispatch when it exceeds the current goal remainder.
AGENTS.md reference: AGENTS.md:L92-L93
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review published head4bc4f247ceea. Both inline findings are fixed with per-thread regression evidence and resolved. The summary-only routing-token finding is also fixed: router input/output bounds default unknown, and admission checks current caller plus paid-owner remainders, including pending spend, before the dispatch marker. TypeSafe leaves billed output unknown; finite output/total caps fail closed for paid multi-candidate routing. Final full2706/2706, minimal211/211, smoke6/6 and8/8 goal-less byte parity against current main pass. PR body includes final-head evidence and the disk-I/O timeout/reproduction/tmpfs rerun. No gates or assertions weakened; no macOS execution or final-head performance qualification claimed. |
There was a problem hiding this comment.
💡 Codex Review
Lines 2706 to 2708 in 4bc4f24
When four goal/check policy loads already hold this shared semaphore, a fifth validate_goal_check immediately returns Overloaded; in the checked-completion path, goal_check::execute turns every such policy error into Completion::Policy, and finish durably pauses the otherwise valid goal as needs_user: configuration. This can make concurrent autonomous goals require manual recovery solely because configuration reads briefly saturated the pool. Await the permit instead—the execution path already bounds that wait by the check deadline, and command-time validation has its existing 10-second timeout.
AGENTS.md reference: AGENTS.md:L92-L93
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the review-body policy-capacity finding (review5546040233) in 8681c56, published at 4c2578a. Completion-check validation now waits for the shared four-slot pool, matching goal-policy loading. Caller check deadline/cancellation and command timeout bound that wait. The regression reproduced immediate Overloaded while slots were held; afterward it verifies a canceled waiter, successful queued validation and all four permits returned. Three focused policy/managed-denial tests, full2707/2707 +15 deliberate skips, minimal211/211, smoke6/6 and ordinary request parity8/8 pass. Independent source review approved the change. No merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c2578abcd
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review published head 725dabe. The three latest findings have tested published fixes and per-thread evidence; all three threads are resolved. Final-head full workspace gates, real-binary smoke and8/8 ordinary-request byte parity pass, with independent source review approved. PR body carries current evidence. No merge requested. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
QQ drives durable goals to verified completion with bounded paid-family accounting, exact check consent and recoverable interrupted-check holds. G2/G3 builds on merged #308/#309; G4 surfaces are in #331. Linear: ENG-1063 / ENG-1053. Spec: docs/plans/goals.md.
Behavior
Verification
cargo xtask check
Head
725dabe85508vsorigin/main; 0 changed file(s); scope: full workspace.cargo fmt --all -- --checkcargo xtask lintcargo clippy --color never --workspace --all-targets --all-features -- -D warningscargo nextest run --color never --profile default --workspacecargo test --color never --workspace --doccargo clippy --color never -p qq-provider --no-default-features --features test-support --all-targets -- -D warningscargo nextest run --color never --profile default -p qq-provider --no-default-features --features test-supportAll gates passed in 117.4s.
Real-binary smoke: 6/6 passed. Ordinary request recapture: 8/8 byte-identical to main
3e34eea2across Responses, Chat, Anthropic and Google, initial/post-tool turns. Focused completion checks:29/29 pass. Independent source review approves the new fixes at b75b341; the added policy-pool correction is independently approved at8681c56d. Completion-check validation now awaits capacity under caller cancellation/deadline bounds; a red-before-green regression covers canceled waiters and permit recovery.Test-first regressions reproduce final-run verification refusal, sustained descendant output starving exit, disappearing workspaces, portable group confirmation, routing token bounds, refreshed admission and sponsored approval expiry. Red-before-green logs remain private under
/tmp/qq-goal-delivery-20261015/. Tests use command-local tmpfs fixtures on this I/O-loaded host; assertions and timeouts remain unchanged. Native macOS execution was unavailable locally.Compatibility and qualification
Protocol33→34; schema55→58 (forward-only); descriptor15 unchanged. Upgrade clients/servers together and back up database/WAL/SHM before migration. Unix checks execute natively; other platforms fail closed. Current main auth/fixture fixes are preserved; removed PR319 provenance is absent.
G5 is qualified on final runtime
e84e3552in #332: the ninth subscription-only trial settles after 8,744.546 durable goal-event seconds, with four compactions, all 14 checklist identities retained and exact terminal usage reconciled. All 25 checked-in audit checks pass. Earlier trials remain historical; they do not supply final-runtime acceptance. Separate ENG-1058/resource/performance/H0 work remains unqualified. No paid API fallback. Do not merge this stack.Current review repairs at725dabe8 move workspace opening into the bounded blocking preparation task, reset only a changed check’s failure streak, and mask diagnostics before persistence/provider context, conservatively omitting a clipped leading credential fragment. The focused completion suite passes31/31; independent source review approves. Real-binary smoke6/6 and ordinary-request byte parity8/8 pass on this head.