Repository navigation
gh-shim: refuse GitHub writes from worker shells with a report-to-parent instruction - #1065
Queued
aft-alfonso[bot] wants to merge 9 commits into
Queued
aft-alfonso[bot] wants to merge 9 commits into
aft-alfonso[bot] wants to merge 9 commits into
Conversation
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit bd95058b5db40cd375158c8fadf5d49a187e2060)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit bfc3c8cd7001d84ab0eb298bdf849ca0a165bb4e)
…nk for tests Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 5cc3b1815a20bfe70881531873d40667d269ac05)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 282847dbf9ab0ade4186d38a096ce632ca911f65)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 97e5251a0a4fb29131b3fc4a74c61bc99a964bce)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
ualtinok
added this pull request to the merge queue
Oct 28, 2026
Any commits made after this event will not be merged.
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.
A worker shell carries the read broker and never a write ticket, so a write such as
gh issue commentfrom it could never succeed. It used to end in the governance-unavailable refusal, which told the agent to retry. Now any write-class command from a worker shell is refused up front, before the manifest lookup, the rung probe and any broker or relay traffic, with exit 86 and the approved text:gh-shim: gh_shim_worker_write_refused: workers cannot write to GitHub; report what should be posted to your parent insteadUnchanged: worker reads still go through the broker. Head-session writes still route through the relay. Credential commands from a worker (
gh auth token,auth status --show-token,auth login) keep their existinggh_shim_operator_credentialsrefusal.Tests check the exact line the agent sees (through a test-only refusal sink), six write shapes with zero delegation, identity lookups, relay requests or broker connections, a brokered worker read and a routed head write that refuse nothing, and the credential commands. 417 gh_shim tests pass on Linux; Windows target check with -D warnings passes.
Summary by cubic
Worker shell GitHub writes are now refused up front instead of ending in the governance-unavailable refusal that looped the agent back to retry.
The refusal exits with 86 and the exact line
gh-shim: gh_shim_worker_write_refused: workers cannot write to GitHub; report what should be posted to your parent instead, before manifest lookup, rung probe, or any broker/relay traffic. Worker reads, head-session writes, and credential commands (gh auth token,auth status --show-token,auth login) keep their existing behavior.Written for commit 9a128a6. Summary will update on new commits.