Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Please review the distinction between policy denial and internal evaluation failure at head 379569e, including descendant/model cancellation and WebSocket response guards. Plugin isolation must remain intact, unavailable operations must not disclose protected payloads, and real revocation must still fail closed. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR separates temporary policy evaluation failures from revocation and carries that distinction through operator runs, WebSocket responses, and HTTP authentication. Example: An authorized visitor's policy assertion throws "Plugin invocation scope is closed".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed repair addresses a current source failure, and no blocking code defect remains after checking the earlier findings and the accepted logging exception. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin access policies supply grant assertions and cancellation signals to Gateway admission; authenticated requests and admitted runs consume them before protected operations and responses. flowchart TD
A[Authenticated operator] --> B[Gateway admission]
B --> C[Plugin access policy]
C --> D[Captured operator authority]
D --> E[Admitted agent runs]
D --> F[HTTP and WebSocket responses]
C --> G[Unavailable or revoked outcome]
Technical reviewBest possible solution: Retain the existing grant owner and propagate unavailable outcomes without discarding the original authority or permitting the failed operation. Do we have a high-confidence way to reproduce the issue? Current main visibly turns any policy assertion exception into permanent invalidation, and the submitted regression exercises the reported closed-scope trigger; no target code was executed during this review. Is this the best way to solve the issue? The patch repairs the distinction at the existing policy owner and preserves it through affected consumers without introducing another authority owner, cache, configuration option, or stored format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1b9518af272b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +205, Tests +400, Docs +9, Other +1. Total +615 across 30 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed November 13, 2026, 9:40 AM ET / 14:40 UTC (Revision 6). |
|
Both items from the latest review are addressed at
Codex autoreview is scoped-clean through P2 after these repairs. Final focused tests, exact-parent regression, affected UI e2e tests, and check:changed are still running; no incomplete run is claimed as passing. The PR remains draft while those gates finish. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Addressed every open item in the review of
The earlier unsafe-retry and HTTP-authentication items remain fixed: only failures before actual handler execution promise a retry, and HTTP policy outages are distinct from invalid credentials. The regression for closed invocation scopes retains the same admitted descendants and model authority through failure and recovery, then proves that genuine revocation still stops them. Final repair head: @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed77b3583d
ℹ️ 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".
| function unavailablePolicy(error: unknown, pluginId?: string) { | ||
| const detail = error instanceof Error ? `${error.name}: ${error.message}` : String(error); | ||
| log.warn( | ||
| `Access policy${pluginId ? ` ${pluginId}` : ""} evaluation failed: ${redactSensitiveText(detail, { mode: "tools" })}`, |
There was a problem hiding this comment.
Preserve raw policy diagnostics until log egress
When an access-policy exception contains text matched by the redactor, this call irreversibly removes it before log.warn reaches the file sink, losing the original diagnostic even in local logs. Root AGENTS.md explicitly requires “Logs: write raw; redact only at egress”; createSubsystemLogger already separates file logging from redacted console output. Pass the unredacted diagnostic to the logger and leave redaction to the established egress boundaries.
AGENTS.md reference: AGENTS.md:L63-L63
Useful? React with 👍 / 👎.
|
Review item 1 (raw policy diagnostics): retaining the current implementation deliberately. The explicit requirement for this fix is to record the inner exception's name and message, redacted, in the log. That task-specific requirement overrides the repository's general raw-local-log default. At The four items from the preceding review remain fixed on The evidence remains qualified as production-owner integration and a standalone production-path probe with synthetic state, not a live-provider end-to-end run. The closed-scope regression fails on the exact parent and passes here; it covers recovery on the same admitted authority and real revocation of its descendants. The PR body retains the proof limits and investigated timing failures. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…198245) * fix: preserve operator access when policy evaluation fails * fix(gateway): preserve policy outage retry and HTTP semantics * test(gateway): exercise unavailable policy during lazy preparation * fix: preserve policy outcomes across HTTP and visitor admission
What Problem This Solves
An internal exception during a plugin access-policy assertion, including a closed invocation scope, was treated as a permanent denial. That revoked live operator authority, closed the connection, and invalidated admitted descendant runs even when the underlying grant still allowed access.
User Impact
Temporary policy failures refuse the affected operation while keeping authorized users connected and their admitted runs usable. Real revocation still stops access. An uncertain write outcome requires checking operation status before retrying.
Why This Change Was Made
Keep denial separate from evaluation failure at the access-policy owner. Log the redacted inner error, recompute an unsignaled grant before declaring it revoked, and refuse the failed operation with an unavailable error. Run and model authority retain their live state across that error. Actual grant revocation, ended/replaced grants, identity changes, and plugin disposal still fail closed. Plugin scope entry and isolation remain intact; this adds no config, schema, or cross-request authority cache.
WebSocket failures before actual method execution are retryable. Once a method may have written, the response explicitly says its outcome may be complete and does not promise a safe retry. HTTP policy outages return 503 instead of invalid-credential 401. The router owns the actual handler-start boundary, after lazy preparation and final authorization. Post-authentication HTTP revalidation failures also return 503; the outer response owner warns of a possible completed operation instead of promising a safe retry, and closes partial streams.
Evidence
4aa0168e1f2a17608fa6dbb8d7d07a406794fd96: a real closed invocation scope aborts live authority. It passes with this fix for closed scopes, ordinary policy errors, same-run recovery, and actual grant revocation.4aa0168e1f2a17608fa6dbb8d7d07a406794fd96and pass with the fix. All five real-router policy-failure phases and six existing cancellation cases pass. The database-backed regression uses the existing forked database-worker suite.pnpm check:changed --base 7010ba500068cff1d49f9e211873871107b16008passes on committed headed77b3583db8e57dc9d562ee95dce78208470fc6, including core/extension/test types, lint, format, and all dead-export scans. The optional-grant test type error found during the previous run is repaired and its four cross-profile revocation cases pass. The first local browser invocation passed the guest-question lifecycle but timed out at 120 seconds during sidebar Gateway startup, before browser assertions. One same-order replay with unchanged timeouts and assertions passed both browser cases, including the sidebar behavior in 30.3 seconds. The startup timeout is retained as an unresolved local failure, not a repaired or attributed inherited regression.4aa0168e1f2a17608fa6dbb8d7d07a406794fd96. Its timing-regression introducer is not established; this remains an investigated local failure, not a claimed CI exception.scripts/prexact-head review and GitHub-gated preparation are complete. The final-head ClawSweeper review has zero open items. Exact-head CI completed with the inherited Goal expectation failure documented below; no full-CI-green claim is made.Production LOC delta is +205. The growth carries one unavailable result through the existing independent run and transport owners and distinguishes uncertain write outcomes; no new authority owner or cache is introduced.
The bundled visitor policy now reports an absent invitation through its existing required-role binding, while startup/internal errors remain unavailable. Cookie admission and revalidation preserve that distinction, and the extracted PR wrapper includes the shared error dependency.
This correctness change is separate from the source-lineage allocation optimization. The detached
agent_endhydration ordering is already addressed by open #197990 and is not duplicated here.CI qualification
Exact-head CI run 43439889097, attempt 1 completed with one failing test job, plus the dependent CI gate. The failed job contains two Goal continuation cases expecting “Paused after Stop” but receiving “Paused after an interruption.”
Both failures reproduce unchanged on the exact CI main parent
5dfccbb92b2ab016c8c2082968f0b87798dc13bb(2/2 fail), while both pass on this PR head and its original base. The CI checkout wasb8fd70b604087814cc820852d7a123369954a9f6, whose ordered parents are that main commit and this PR head. The failing test, its continuation helper, and the lifecycle projection are unchanged between the main parent and tested merge.The introducing change is #198276, commit
64fd44bdaae8434611e841f4fb50d2443c9461f6: it changes the pause note to neutral wording but leaves these two continuation expectations unchanged. This is a newly exposed main test regression that still needs its owning test expectations repaired, not noise or a defect introduced by this PR. The scoped checks above remain green. Landing uses the explicitly authorized, pinned-head inherited-failure exception and preserves the failed CI result.Release-note context
Prevent temporary plugin access-policy failures from disconnecting authorized users and aborting their live runs; preserve genuine revocation and provide visible operation failures.