gh shim: every Plexus and relay refusal explains what happened and whether a retry is safe
Every refusal the GitHub shim relays from Plexus or AFT's own relay now prints the operator-approved explanation: what happened and whether a retry is safe.
- Explanations: each Plexus
refusal_codeand relay refusal maps to one approved line. All 72 table rows are pinned as independent literal strings, including the reach, actor and rerun suffixes. - Bypass hint: a
not_governedrefusal in a head shell adds the approved operator-bypass line. Worker shells never get a bypass hint, and their refusal lines stay exact. - Warming:
module_warmingretries once after 5 s with the same request ID, so the write goes out at most once. After that it refuses with the approved "nothing reached GitHub" text. - Plexus's own message: where Plexus sends
detail.message(for examplereview_thread_not_own), it's shown through the vendored contract vectors and the real-shim wire test. - Unchanged: the fail-closed manifest check (#1120), the audited operator bypass (#1112), bot-speech binding selection (#1115) and
-F @filereading (#1129). The branch is merged with current main.
Tests: gh_shim_relay_client_tests, gh_shim_speech/policy_tests, gh_shim_runtime_context_test and gh_shim_wire_goldens_test. Eight AFT-owned stderr exchange snapshots are updated to the approved wording. Plexus request and response bytes are unchanged.
The worker's final runs on Linux 12-core passed the gh_shim library tests, including both Landlock canaries, the wire goldens and the Windows compile check. My re-run on the merged branch was refused by a full build server, so this PR's CI is the gate.
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Every refusal the GitHub shim relays from Plexus or AFT's own relay now prints an operator-approved explanation: what happened and whether retrying is safe.
- Each Plexus
refusal_codemaps to one approved literal line, including reach, actor, and rerun suffixes; all 72 table rows are pinned as independent strings. module_warmingrefusals retry once after 5 s with the same request ID so the write goes out at most once, then refuse with the approved "nothing reached GitHub" text.not_governedrefusals in a head shell add the audited operator-bypass hint (GH_SHIM_BYPASS=operator); worker shells never get it.- Plexus detail messages (such as
review_thread_not_own) are preserved verbatim. - Existing behavior is unchanged: the fail-closed manifest check, audited operator bypass, bot-speech binding selection, and
-F @filereading. Plexus request and response bytes are unchanged.
Tests
gh_shim_relay_client_tests,gh_shim_speech/policy_tests,gh_shim_runtime_context_test, andgh_shim_wire_goldens_testcover the new wording; eight AFT-owned stderr snapshots are updated.