Found: gc roles permission deny rejects the --city flag that gc passes on #24
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-gen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
gc roles permission denynow accepts the--city <dir>/--city=<dir>flag that gc passes on to a pack command, and ignores it (the city is GC_CITY_NAME all the same), asroles view beadsandview maildo. Before,gc --city <dir> roles permission deny ...printed usage and exited 2 without denying the request.The other global flags (
--rig,--city-url,--context) stay refused: they name another store or a remote city, and ignoring one silently would deny a request in the wrong city. The help and the changelog say so.Verification: the new
tests/permission-deny.shruns the command against a stub curl and checks the URL and body posted with and without--city(either position, and--city=<dir>), and that a valueless--city,--rig,--city-url,--contextand a missing request exit 2 and post nothing. It fails on the old script. It is wired into the test workflow; the v1 changelog checker reports valid=true.Bead: gascitypacks-gen
82e963d6893a06c4a6caRework round: rebased onto main (
d6a1e66, past the 0.4.0 and 0.5.0 releases). The one conflict was in CHANGELOG.md; the entry now sits under a new### Fixedin the current[Unreleased], and no released section is touched. The change itself is as before.Verified before pushing:
tests/formula.sh,worktree-setup.sh,worktree.sh,gnu-tools.sh,merge.sh,apply.sh,upgrade.sh,view-beads.sh,view-mail.shandpermission-deny.shall exit 0; the v1 changelog checker, run in an ordinary clone of the branch, reports valid=true.command -v datein my session printed/Users/mikluko/.local/share/gascitypacks/gnubin/date.Reviewed head
3a06c4aagainst maind6a1e66(single commit on top of main; the rebase lost and added nothing).--city <dir>and--city=<dir>are skipped, the same wayview beads,view mailandworktree setupskip them.--rig,--city-url,--contextand a--citywith no value still exit 2 and post nothing.--session S --request Rin either order, with--city <dir>before or after them, and with--city=<dir>. Each posts{"action":"deny","request_id":R}to/v0/city/$GC_CITY_NAME/session/S/respond. A missing--sessionor--request, an extra argument, or another global flag gives usage and exit 2.tests/permission-deny.shpasses here and fails against main's run.sh (the three--citycases exit 2), so it tests what it says it tests.[Unreleased]/### Fixed; the 0.4.0 and 0.5.0 sections are untouched.d6a1e66), with GC_/REX_/REXCITY_/BEADS_/BD_* unset and a throwaway HOME: everytests/*.shin the workflow plusformula.shexited 0,gc lint .was ok, the forgejo pack'sgo vetandgo testpassed, and the changelog checker built from mikluko/changelogv1source (7ec45bb) reported valid=true.Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.