Skip to content

pin: stop using a token the scope assertion just rejected (#87) - #99

Merged
bdelanghe merged 1 commit into
mainfrom
claude/dispatcher-repair-manifest-gate-usikb5
Aug 3, 2026
Merged

pin: stop using a token the scope assertion just rejected (#87)#99
bdelanghe merged 1 commit into
mainfrom
claude/dispatcher-repair-manifest-gate-usikb5

Conversation

@bdelanghe

Copy link
Copy Markdown
Contributor

The caller half of #87. The broker half is infra#172.

1. Point at front-desk-pin, not front-desk

The mint step's own assertion settled #87's open question on the merge of #97:

GRANTED: {"organization_projects":"write","issues":"read","metadata":"read","pull_requests":"write"}
REQUIRE: contents, pull_requests   ->   contents(granted: absent)

Broker registry, not the App installation. And the fan-in entry cannot simply be given contents: it is deliberately unpinned, contents is privileged (infra#140), so the broker would refuse the entry outright and take every other consumer with it. infra#172 adds a separate entry pinned to this workflow instead.

2. Don't use a token the assertion just rejected

This is the part worth reading. require: contents, pull_requests (#93) worked exactly as designed — it reported contents(granted: absent) and named both places the gap could live, which is why diagnosing this took minutes instead of the half-day #87 describes.

Then continue-on-error: true swallowed the verdict, the job used the token anyway, and died on the very push the assertion had just said would fail:

remote: Permission to bounded-systems/.github.git denied to bounded-systems-front-desk[bot]
fatal: ... 403        exit code 128

An assertion whose verdict nothing consumes is decoration. The token is now used only when the mint step actually succeeded.

The fallback is not a downgrade. github.token holds contents: write here — see the job's own permissions: block — and pushed this exact branch fine before the broker was wired in (#79). So on a scope gap the branch now lands with the correct pin and only opening the PR is lost. That is a click, versus the full hand-regenerate it costs today. Four of those so far: #79, #86, #89, #98.

A third annotation distinguishes "broker reachable, scopes insufficient" from "broker unreachable", because the two are fixed in different systems and the existing message only described the second.

Ordering

Safe to land before the broker deploys. An unknown app 404s → the mint step fails → the job takes the github.token path above. Strictly better than today in every branch: today nothing is pushed at all.

Verification

  • workflows.test.mjs: 27 pass — including the column-0 block-scalar check that the new elif prose could have tripped.
  • Full .claude/ suite: 109 pass.

One thing I did not change

The else branch still says ``schema is required on this repo. #78's commit message records that it is not — `.github` is absent from the `ci-green` ruleset — but I could not verify the ruleset's current state from a session, and replacing one unverified claim with another seemed worse than leaving it. Flagging rather than silently editing.


Generated by Claude Code

Two changes, one cause. The `pin` job has never completed a bump: it mints
`front-desk`, then 403s on `git push` as bounded-systems-front-desk[bot]. Four
hand-bumps so far (#79, #86, #89, #98).

1. Point at `front-desk-pin`, not `front-desk`.

The fan-in entry carries no `contents`, so it could never push the branch. It
also cannot be given any: it is deliberately unpinned — authorized by
allowedOwner alone — and `contents` is a privileged permission, so the broker
would refuse the entry outright and take every other consumer down with it.
Hence a separate entry pinned to this workflow, the shape `front-desk-schema`
and `forge` already have. Added in infra; this is the caller side.

2. Do not use the token when the mint step FAILED.

`require: contents, pull_requests` (#93) worked exactly as designed on the merge
of #97 — it reported `contents(granted: absent)` and named both places the gap
could live. Then `continue-on-error: true` swallowed it, the job used the token
anyway, and died on the push it had just been told would fail. An assertion
whose verdict nothing consumes is decoration.

The fallback is not a downgrade. `github.token` holds contents:write here (see
the job's own `permissions:`) and pushed this branch fine before the broker was
wired in (#79). So on a scope gap the branch now LANDS with the correct pin and
only the PR opening is lost — a click, rather than the full hand-regenerate it
costs today. A third annotation distinguishes that case from an unreachable
broker, since the two are fixed in different systems.

Ordering: this is safe to land before the broker deploys the new entry. An
unknown app 404s, the mint step fails, and the job degrades to exactly the
github.token path above — strictly better than today either way.

Refs #87
@bdelanghe
bdelanghe marked this pull request as ready for review August 3, 2026 19:25
@bdelanghe
bdelanghe requested a review from a team as a code owner August 3, 2026 19:25
@bdelanghe
bdelanghe merged commit 0e9c37a into main Aug 3, 2026
9 checks passed
@bounded-systems-front-desk bounded-systems-front-desk Bot moved this from Todo to Done in Front Desk Aug 3, 2026
@bdelanghe
bdelanghe deleted the claude/dispatcher-repair-manifest-gate-usikb5 branch August 3, 2026 19:25
bdelanghe added a commit that referenced this pull request Aug 3, 2026
…on (#100)

The other half of what #87/#99 fixed, on the job #92 predicted would fail.

registry-graph's `sync` had all three defects org-defaults' `pin` had, still
armed and untouched by #99: it minted the scopeless `front-desk` entry, ignored
the require: assertion's verdict via continue-on-error, and would have 403'd on
the push. It has not fired only because it early-exits on "in sync" — a green
job that did nothing, reported in the colour of evidence.

1. app: front-desk-registry — its own pinned broker entry (infra#176). Not
   shareable with front-desk-pin: a workflowRef pins exactly one workflow.
2. The token is used only when the mint step actually succeeded. github.token
   holds contents:write here, so a scope gap still pushes the branch and only
   loses the PR, which this job already handles with a named annotation.

Refs #92, #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants