Repository navigation
fix(guardrails): include preparation in the review deadline - #2009
Merged
Merged
Conversation
Carry a per-assessment review budget across setup, dependency snapshots, evidence preparation, and checker attempts. Keep human waits and post-approval work outside the budget, distinguish caller cancellation from checker timeout, and preserve terminal authority failures. Co-authored-by: Mecatl <[email protected]>
Keep authority and cancellation ordering explicit at three review choke points; remove unused test parameter names. No runtime behavior changes. Co-authored-by: Mecatl <[email protected]>
Start each independent checker after its own serial preparation instead of waiting for the entire batch. Preserve ordered decisions, cancellation cleanup, auxiliary usage, and terminal evidence failures. Do not surface a fallback permission ask after caller cancellation. Co-authored-by: Mecatl <[email protected]>
JAORMX
force-pushed
the
fix/guardrail-review-deadline
branch
from
October 5, 2026 12:41
b01ad42 to
1ff9bbe
Compare
Publish preparation failure health at completion rather than after later checker success. Pin active-checker join, exactly-once evidence cleanup, cancellation usage accounting, and failure telemetry with deterministic regressions. Co-authored-by: Mecatl <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make the existing 90-second contextual guardrail budget cover evidence authorization, dependency snapshots, evidence preparation, and checker attempts together. This addresses the end-to-end budget discrepancy documented in #1510, following #2001 and #2006.
Concurrency, UX, and security
Scope
Routine correction under the existing contextual-guardrail contract. No new exported engine API, wire/configuration, model route, permission/posture policy, evidence capacity, or persistence change. Cancellation remains cooperative: an adapter ignoring its context may return late, but its late success cannot approve an action.
Rebased onto
b9cd7a40c, preserving newer auxiliary-usage accounting and clean-result publication. Current candidate:02cbf17a237885fc85bbd56f1373d23f77cac22a.Verification
task testat the first rebased candidate andtask test:raceat the final candidate failed in unchangedcmd/mecatuiexit-handoff fixtures:no ancestor checkout has a short enough .scratch directory for embedded socket. This is a checkout-path limitation, not a guardrail assertion failure.task lint,task docs,task site:build, and the offline demo passed. The demo showed tool calls, permission ask/approval, and the final result. Lint needed a longer run after the initial 600-second limit; docs passed after making the already-installed pnpm available in the toolbox PATH.Review also confirmed a pre-existing same-run result-pairing gap when a read batch is cancelled; it exists on the base and is not introduced or repaired here. An alleged later-reauthorization usage loss was rejected after tracing the prior usage drain.
Documentation owner:
user-docs/building/what-you-get/permissions.md.