Skip to content

test: observe the posture gate through a real spawn, and fix the category #5866 left mislabeled - #5869

Merged
atomantic merged 1 commit into
mainfrom
fix/public-review-posture-gate-blocks-all-agents
Sep 2, 2026
Merged

test: observe the posture gate through a real spawn, and fix the category #5866 left mislabeled#5869
atomantic merged 1 commit into
mainfrom
fix/public-review-posture-gate-blocks-all-agents

Conversation

@atomantic

@atomantic atomantic commented Sep 2, 2026

Copy link
Copy Markdown
Owner

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.js pins 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 concretely: with such a block added and the pinned call left verbatim, agentLifecycle.test.js passes 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.

validatePublicReviewModel mislabels a sandboxed-actions failure. It takes a posture but hardcoded the no-tool category, so that failure reported public-review-provider-unsupported for 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) drives spawnAgentForTask with the leaves stubbed — the surface that actually observes the defect. Mirrors the mock set in agentLifecycle.spawnViaRunner.test.js.
    • Ordinary task, and ordinary task with unrelated metadata → not blocked (the regression).
    • Public-review stage on a provider with no maintained recipe → still blocked, with the right reason and category (so the gate isn't weakened).
  • modelAbuseGuard.test.js: the sandboxed-actions case now expects public-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.
  • Full server suite green: 1853 files, 37616 tests.

@atomantic
atomantic enabled auto-merge (rebase) September 2, 2026 18:13
@atomantic
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
atomantic force-pushed the fix/public-review-posture-gate-blocks-all-agents branch from 3fb15df to 762f136 Compare September 2, 2026 18:37
@atomantic atomantic changed the title fix: unbreak every agent spawn, which a posture gate blocked with "no enforced null review mode" test: observe the posture gate through a real spawn, and fix the category #5866 left mislabeled Sep 2, 2026
@atomantic
atomantic enabled auto-merge (rebase) September 2, 2026 18:37
@atomantic
atomantic merged commit d78a778 into main Sep 2, 2026
7 checks passed
@atomantic
atomantic deleted the fix/public-review-posture-gate-blocks-all-agents branch September 2, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant