Show gateway notices on PostToolUse + shared conformance suite (0.6.8) - #4
Open
davidcrowe wants to merge 5 commits into
Open
davidcrowe wants to merge 5 commits into
davidcrowe wants to merge 5 commits into
Conversation
…ct#1334) The plugin read the post-hook response only for redact/block and dropped the notice field, so every cost advisory (compaction, expensive run, subagent model) was silent in Codex. Same contract as the Claude Code plugin: systemMessage, never model context; ACP_SHADOW=off silences notices, not blocks. Tests use a local fake gateway. No version bump yet: bump on merge, after Fable review.
Vendors the shared plugin-corpus.json and adds test/conformance.test.mjs, which drives bin/govern.mjs against a fake gateway to check the notice and post-tool capability contracts. notice-shown is recorded in EXPECTED_DIVERGENCES (#1334): PostToolUse never reads the gateway's notice field, so it never reaches the person. Wires the adapter into CI.
notice-shown and notice-shadow-off only checked stdout/stderr for the marker. Add an explicit assertion that the plugin actually POSTed to /govern/tool-output first, so a request that never arrives (e.g. a sync child-process call deadlocking an in-process fake server) can't be mistaken for the real #1334 behavior.
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.
What this changes
handlePostToolUse()inbin/govern.mjsnow shows the gateway's PostToolUsenoticeto the person as asystemMessage, so it is no longer silent in Codex.ACP_SHADOW=offstill silences it, which matches the Claude Code plugin. New test:test/post-notice.test.mjs.test/conformance.test.mjsand the vendored corpustest/fixtures/plugin-corpus.json(hashaa186d3fb3e7d18c). The adapter also checks that the fake gateway really received each notice request, so a case can't pass without the plugin talking to it.EXPECTED_DIVERGENCESis now empty. Thenotice-shown(#1334) entry is removed, because the fix above makes that case pass. The adapter assertspersonSees === truedirectly..github/workflows/test.yml, which runsnode --test test/.PLUGIN_VERSIONinbin/govern.mjs), following the repo's per-release bump. Nothing is published.Tests
Local run of
node --test test/on this branch: 14 tests, 14 pass, 0 fail. That includes the adapter with no divergences.This is the new workflow's first real run.
Ships under ship-when-confident; Fable reviews after (queue +G/+I).
Refs davidcrowe/gatewaystack-connect#1344, davidcrowe/gatewaystack-connect#1334