The scheduled run's ref claim is the branch name, so the role binds the event (THE-40) #69
No reviewers
Labels
No labels
ready-for-agent
review
merge-ready
review
needs-fix
review
needs-human
review
needs-review
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-secrets!69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/THE-40-schedule-ref"
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?
paperclip:THE-40
Summary
Forgejo 15.0.9 stores a cron schedule against the default branch's name (
main), and the run it creates copies that column intoaction_run.ref. The run's git context — and so its OIDC token — therefore carriesref: main, notrefs/heads/main. The store'srenovaterole bound the full ref, so the first scheduled run (Monday 04:17Z) would have been refused atauth/jwt/login: the flow's schedule path would fail the first time it ran.bao/service/roles/openbao/defaults/main.ymlrenovatebindsrepositoryandevent_name: schedule; the full-ref binding is gonedocs/store-identity.mdDropping the ref is not a loss: Forgejo schedules only workflows present on the default branch (
services/actions/notifier_helper.go), so a scheduled run's ref cannot be another branch. The dispatch role keepsrefs/heads/main, and the push roles are untouched.Evidence
mise exec -- make checkverify tests: 9 assertions, 0 FAILEDaction_schedule:title=renovate,repo_id=1(olympus/infra-forge),ref=main,event=push, payload{"action":"schedule"}services/actions/schedule_tasks.goatv15.0.9:Ref: cron.Ref,TriggerEvent: scheduleThe merge applies the role (the deploy writes
auth/jwt/role/renovateand reads it back), so Monday's run logs in against the corrected binding.Review started (round 1/5) on
10b1fedf82— reading the diff now.Review loop: repo=olympus/infra-secrets · PR #69 · head=10b1fedf824ac7699a81325d7aca78ecdd62a8ce · round=1/5 · verdict=merge
Recommendation: merge
Round.
list_pull_reviews→[]before this one, so this is round 1/5; the dispatch's "1/5" agrees. Fixed point:git diff 4a45309...(merge-base) 10b1fed— 2 files, 13 insertions, 3 deletions, one commit. Head resolved twice, before and after the probes, both10b1fed.Spec.
paperclip:THE-40— read live over the control plane:GET /api/issues/THE-40→ 200 (in_progress, updated 2026-12-02T21:03:46Z), its design document E4 — hardening in code → 200, 8423 chars, updated 16:47:06Z. Neither names therefbinding: the ticket's store slice stops at "one policy,ci-renovate, and two JWT roles,renovatefor a schedule andrenovate-dispatchfor a manual run", which the tree already had. So the contract this round judges is the PR body's own: the scheduled run'srefclaim is the branch name, the bindings ofrefs/heads/maintherefore refuse it, and the role moves to repository + event.Standards.
AGENTS.md§Decisions and §Checks at the head, andolympus/workshopdocs/adr/0013-access-is-granted-to-a-role.mdat that repository'smain(read live: the Decision lists seven roles and its table carries Updater — the record the page cites resolves). NoCONTRIBUTING.mdordocs/adr/in this repo;AGENTS.mdis the whole of its own written standard.Standards
No findings.
The change is one YAML defaults file and one page. The edit is the smallest shape the defect allows: the claim that could never match is removed (
bao/service/roles/openbao/defaults/main.yml:180-186now bindsrepositoryandevent_nameonly), the dispatch role keeps its full binding (:187-194), the six push roles are untouched, and the rationale sits in the comment above the list (:103-110) rather than only in the PR body.ansible-playbook --syntax-check bao/service/site.ymlparses (rc 0, no-inventory warnings only), and the eight roles'bound_claimsparse to exactly the intended maps.Nothing in the tree reads a
refkey offopenbao_jwt_roles: the two consumers are the read-back comparison and the write body (bao/service/roles/openbao/tasks/store.yml:283-287,:296-317), both of which takeitem.bound_claimswhole. Dropping a key from the map is therefore a reconciliation the deploy performs, not a template that breaks.Spec
ADVISORY —
docs/store-identity.md:340-341,:463-465: two sentences still state the binding as repository + ref + event for "the role"docs/store-identity.md:340-341repositoryandrefthe role's ownbound_claimsalready spell"docs/store-identity.md:463-465refs/heads/mainand to apushevent, so a pull-request run cannot obtain an identity at all"Both sentences were true of all eight roles before this change and are now true of seven. The scheduled role's alias will be
repo:olympus/infra-forge:ref:main— the subject is still built from the repository and the ref (services/actions/auth.go:153at tagv15.0.9), while itsbound_claimsspellrepositoryandevent_name(bao/service/roles/openbao/defaults/main.yml:184-186). The change explains the exception where it edits (:149-153) but not at the two places elsewhere on the page that generalise the rule — the same seam a reader follows when they go looking for the entity name.ADVISORY, not a blocker: no mechanism is broken, nothing in a rebuild or a rename procedure changes, and the page's own renovate paragraph is now correct. Clearing it: one clause in each sentence scoping it to the push roles (
the deploy roles' alias …,the deploy role is bound …), or naming the two roles that bind no ref.Named, not charged
make checkat the head is green, on the second run. The first run was rc 2,plan tests: 1 case(s) FAILED—it names the resource the plan would have replaced (missing [terraform_data.guest]), immediately preceded byscripts/tests/plan-check.sh: line 51: printf: write error: Broken pipe. That is theprintf | grep -qSIGPIPE race this repo's suites carry (earlier rounds met its twin inscripts/tests/run.sh:63).make plan-testthen ran 4/4 green at the head and 4/4 green at the base4a45309, and a second fullmake checkat the head exited 0 withverify tests: 9 assertions, 0 FAILED— the PR body's evidence line reproduced. Pre-existing, not introduced here.ref: mainwas the other way to keep the claim, and it is not the one taken. The schedule row stores the default branch's name at detection time (services/actions/notifier_helper.go:617,Ref: input.Repo.DefaultBranch), so aref: mainbinding would refuse the run again the day the default branch is renamed — the same failure, one rename later. The comment's argument that the ref is redundant underevent_name: scheduleholds: the notifier only detects schedules on the default branch (notifier_helper.go:583). A judgement call the author reasoned and wrote down, so it is not charged.renovate's store identity is a second entity fromforge's —repo:olympus/infra-forge:ref:mainrather than…ref:refs/heads/main. That is the store's own alias rule (subject, first login), the role's policy attaches at login, and the page's alias list (:312-320) is about the push roles. Named so it is not later read as a surprise.Verified
git ls-remote origin refs/pull/69/head10b1fedf…, equal to the dispatch's head, read before the first wave and after the last; worktree at that commit,git status --porcelainemptyGET /api/v1/versionon the instance15.0.9+gitea-1.22.0— the tag the change's comment namesforgejo/forgejoat tagv15.0.9(source tarball, fetched live)notifier_helper.go:617writes the schedule row's ref asinput.Repo.DefaultBranch(the name),:583— "Only working in default branch";schedule_tasks.go:132copies it into the run (Ref: cron.Ref) and:136setsTriggerEvent: schedule;context.go:27—ref := run.Ref, verbatim, and:54—EventName: run.TriggerEvent;auth.go:127putsctxVal("ref")into the ID token'srefclaim and:153builds the subjectrepo:%s:ref:%s. A push run carriesrefs/heads/mainthrough the same lines unchanged (context_test.go:118-150), which is what makes the scheduled run'smaina difference inrun.Refand nothing elseref=main,event_name=schedule,repository=olympus/infra-forge; the two remaining bindings match all three of the values they name, and the removed one could never have matchedtasks/store.yml:263-287reads each role back and compares TTLs, policies, audience andbound_claims;:296-317writes the role when they differ,role_type: jwt,bound_claimsas the whole map.bao/service/site.yml:7runs the role, andAGENTS.md§Checks hasdeploy.ymlstarting that service layer on a push tomain— so the merge reconcilesauth/jwt/role/renovateansible-playbook --syntax-check bao/service/site.ymlbound_claimsat the headrenovate-dispatchcarryrefs/heads/main;renovateis{repository, event_name}mise exec -- make checkat the headverify tests: 9 assertions, 0 FAILEDmake plan-test×4 at the head, ×4 at the base4a4530910b1fedpr-checks / check (pull_request)success 47s;plan / guest-plan-check (pull_request_target)success 17s — both required contexts green at the headolympus/workshopADR-0013 atmaindocs/store-identity.md:147cites resolvesCould not verify
action_schedulerow itself (title=renovate,repo_id=1,ref=main,event=push). That is the author's read of the forge database on 141; I did not repeat it. The code path above forces the same value from the same column, so the binding decision rests on the source and not on that row alone.auth/jwt/loginfrom a scheduled run is unproven. What this round proves is the claim value the binding has to match; the login itself is Monday's evidence.Counts and the gate
Zero blockers and one counted advisory: merging. The advisory travels as advice — it is one clause in each of two sentences and needs no round of its own.
This change touches the store's JWT roles on 144, which the charter lists as tier-1. The dispatch puts that class's hold elsewhere and the state on the findings, so I applied that narrowing, as round 2 of #64 did: no board card was opened (THE-40 is the card —
in_progress, its design document carries the board's answer on the Updater role), and merging remains the board's gate beside this review's.