test: observe the posture gate through a real spawn, and fix the category #5866 left mislabeled - #5869
Merged
Conversation
atomantic
enabled auto-merge (rebase)
September 2, 2026 18:13
atomantic
disabled auto-merge
September 2, 2026 18:33
…gory #5866 left mislabeled Two follow-ups to #5866, which fixed the outage itself. The gate's guards are source greps: they pin that the call site names `publicReviewProviderBlock` with exactly those arguments. That catches an edit TO that line, but not a second, unconditional posture assertion added beside it — which blocks every ordinary task again. Verified: with such a block added and the pinned call left verbatim, agentLifecycle.test.js passes 61/61 while every agent on the install is blanked. The new spawn-level test fails there, and its fail-closed case still passes, so it cannot be satisfied by deleting the gate instead. validatePublicReviewModel takes a `posture` but hardcoded the no-tool category, so a sandboxed-actions failure reported `public-review-provider-unsupported` for every provider. It now reuses the same descriptor the gate does. Latent today — the one caller passes the no-tool literal — but it fails closed with a plausible-looking wrong code, which is harder to diagnose than the outage was.
atomantic
force-pushed
the
fix/public-review-posture-gate-blocks-all-agents
branch
from
September 2, 2026 18:37
3fb15df to
762f136
Compare
atomantic
enabled auto-merge (rebase)
September 2, 2026 18:37
atomantic
deleted the
fix/public-review-posture-gate-blocks-all-agents
branch
September 2, 2026 18:41
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
Two follow-ups to #5866, which fixed the spawn outage itself. The gate logic there is sound — this adds the coverage its source-grep guards can't provide, and fixes a category the same mechanism still gets wrong.
The guards are source greps.
agentLifecycle.test.jspins that the call site namespublicReviewProviderBlockwith exactly those arguments. That catches an edit to that line — but not a second, unconditional posture assertion added beside it, which blocks every ordinary task again.Verified concretely: with such a block added and the pinned call left verbatim,
agentLifecycle.test.jspasses 61/61 green while every agent on the install is blanked. The new spawn-level test fails there. Its fail-closed case still passes, so the suite can't be satisfied by deleting the gate instead.validatePublicReviewModelmislabels a sandboxed-actions failure. It takes aposturebut hardcoded the no-tool category, so that failure reportedpublic-review-provider-unsupportedfor every provider. It now reuses the same descriptor the gate does — the reason #5866 put the category derivation in the helper.This is latent today: the one caller passes the no-tool literal inside
if (publicReviewNoTools). But it fails closed with a plausible-looking wrong code, which is harder to diagnose than the outage was.Test plan
server/services/agentLifecycle.postureGate.test.js(new) drivesspawnAgentForTaskwith the leaves stubbed — the surface that actually observes the defect. Mirrors the mock set inagentLifecycle.spawnViaRunner.test.js.modelAbuseGuard.test.js: thesandboxed-actionscase now expectspublic-review-actions-provider-unsupported. The test's stated intent ("a vendor with no maintained recipe for the posture is rejected") is unchanged — it had been pinning the mislabel.