A ci-<repo> token expires in a year, and replacing one has a recipe (THE-106) #37
No reviewers
Labels
No labels
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/infra-cockpit!37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/THE-106-ci-token-expiry"
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?
Summary
docs/deploy.md, section "Theci-<repo>users", stops at "one token with noexpiry". It now carries the mint and the replacement, in the page's own voice.
Every call carries the committed CA,
--cacert semaphore/service/files/ca.crt,and none passes
-k, because Semaphore serves https only. Tokens minted beforethis carry no expiry, and Semaphore offers no way to give one a later expiry,
so the page says the re-mint replaces them: it claims no existing token already
expires.
Ticket: https://paperclip.thepit.space/THE/issues/THE-106
Evidence
Before: this sentence, and nothing on the page about replacing a token:
After: the paragraph above, wrapped to the file's own width (80 columns;
the one longer line is the rotation-policy URL, which cannot wrap), and the
password_wo_versionsentence reworded tothe password set by hand to mint a token (below)so the drift note stays true with the minting moved below it.mise exec -- make checkon this branch: rc 0, 279oklines, 0FAIL, with
env tests,plan testsandplan workflow testseach ending"every case passed",
install-reinstall"every case passed", andtofu fmt -recursive -check -diffsilent. The same command onorigin/main(
981c986, #36's squash): rc 0, 279oklines, 0 FAIL. The 267 this linecarried was counted before the branch was rebased onto that merge.
Base: #36 merged first and this branch sits on it:
981c986is #36'ssquash on
main(git merge-base --is-ancestor origin/main HEADexits 0),and this branch does not touch "The certificate" that #36 adds.
Sweep for the old claim:
git grep -i 'no expiry' HEAD -- docsanswers twice,both intended: the new "a token minted without
expires_atcarries noexpiry" sentence, and
docs/environment.md's admin token(
SEMAPHOREUI_API_TOKEN), a different credential this change leaves alone.The 2.19.16 behaviours the paragraph states were measured offline against the
pin by the ticket's own work, not re-measured here: a past
expires_atisrefused with 400; one a few seconds ahead answers 200 and then 401; a revoked
token answers 401;
GET /api/user/tokenscuts ids to eight characters. Theroutes were re-read at the tag:
api/router.gohas onlyGET/POSTon/user/tokensandDELETEon/user/tokens/{token_id}(no update route, so are-mint is the only way to give an existing token an expiry), and
api/user.gotruncates the listing's ids to eight.Merge Danger
Door: two-way. A docs page; a revert pull request restores the previous
wording and touches nothing else.
Blast Radius: none at runtime. No code, workflow, Stack or store path
changes: the paragraph describes what the Operator does by hand, and no run
reads it. The page names
semaphore/service/files/ca.crt, and the basecarries it:
981c986is #36's squash onmain(git cat-file -e 981c986:semaphore/service/files/ca.crtsucceeds), so no merge order remains.Waiting — queued behind olympus/workshop#57 (one review run at a time). The review run resumes on its own at Tue 1 Dec, 17:22 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 0/5) on
6b1e746cd8— reading the diff now.olympus/infra-cockpit· PR #37 · reviewed head6b1e746· round 1/5 · verdict: fix. The dispatch labelled this round 0/5; the review list carries no earlier review, so this is the thread's first and the header's count is the thread's.Recommendation: fix
Spec source.
paperclip:THE-106(read live 2026-12-01T16:46Z,status: in_review) and itsdesigndocument, "native TLS on Semaphore (143), pinned by every client" (updated 2026-11-17), row Token expiry: "365-day hard stop at mint (expires_at); rotation stays on the existing 180-day class … Expiry is the backstop six months behind the rotation: a forgotten token fails closed (401, a red deploy that says so) instead of living on." The PR description adds no requirement of its own, so the design row and the page's own promise — a replacement recipe — are the contract.Spec
docs/deploy.md:212-217— the replacement recipe cannot be completed as written: its last step needs the old token's full id, and the step before it writes over the only place that id exists.S1 — evidence. The full id is the token (
docs/deploy.md:208-209: the answer'sid"is the token, shown once; it goes tosecret/ci/<repo>/semaphore-api"), and the store path is its only home. The recipe at:213writes that path — the new value replaces the old — and only then says "revoke the old token by its full id" (:214). The listing cannot supply it::215-217states thatGET /api/user/tokens"cuts each id to eight characters … and cannot name one for the delete". I confirmed both halves in the pinned source:api/user.go:61-62truncates the listing's ids to eight characters, andDELETE /api/user/tokens/{token_id}takes the exact id (api/router.go:212, v2.19.16, fetched 2026-12-01). So a reader who follows the page in order arrives at the revoke with no handle on the old token: the value was overwritten one step earlier, and nothing on the page says to keep it.Why this blocks rather than nits: the four
ci-*tokens live today carry no expiry — the page says so itself at:219-220— so a revoke that cannot be performed leaves a Manager token that never dies, which is the state THE-106 andinfra-secretsdocs/rotation-policy.md§store-ci-materialexist to end. ADR-0013 puts it in one clause: "a revocation that leaves the credential alive is not one."Smallest clearing change — one clause at
:212-214, naming where the id is kept. For example: "read the old value out of the path before writing the new one (the mount keeps ten versions —rotation-policy.md§The rule), or keep it beside the new token until the revoke". Nothing else in the paragraph needs to move.Standards
Standards sources read:
AGENTS.md(§Secrets, §Toolchain, §Docs),docs/agents/domain.md, andolympus/workshopdocs/adr/atmain(15 records; 0007, 0009, 0010, 0011, 0013 bear on this change and none is crossed — the page documents a manual act by the Operator, which ADR-0013 assigns to that role, and touches no path, Stack or deploy). No documented standard is breached and there is no baseline smell in a 27-line prose addition: no literal value, no abstraction, no duplicated logic.T1 — evidence. The body's "on this branch: 267
oklines" does not reproduce:mise exec -- make checkat6b1e746prints 279ok, 0 FAIL, rc 0 — and so does the base981c986(279, rc 0). 267 is the count from before the branch was rebased onto #36's merge. Same cause, same block: "today'smaindoes not carrysemaphore/service/files/ca.crt" (Merge Danger) is false at the reviewed head —git cat-file -e 981c986:semaphore/service/files/ca.crtsucceeds and the raw URL answers 200. The merge-order instruction it supports is already satisfied (#36 is the merge-base). The green result stands; only the figures need refreshing.Verified
6b1e746…refs/pull/37/headfetched and resolved; equals the dispatch's SHA981c986is #36's squash onmain;ca.crtpresent at base and at headmake checkgreenok, 0 FAIL at head; base981c986the samepr-checks / checksuccess, all threeplan /*-plan-checksuccess (get_commit_statuses,6b1e746)POST /api/users/<id>/passwordexistsapi/router.go:272-274(v2.19.16)POST /api/user/tokenstakes{name, expires_at}; a past expiry is a 400api/user.go:73-83api/user.go:61-62,:94;api/router.go:210-212store-ci-materialclass exists and coverssecret/ci/**infra-secretsdocs/rotation-policy.mdatmain, read live:211(120, the URL)password_wo_versionclaim holdssemaphore/projects/projects.tf:145(password_wo_version = 1)git grep -i 'no expiry'at head:docs/deploy.md:219,docs/environment.md:71Could not verify
The
+5 sexpiry answering 200 then 401, and a revoked token answering 401, are the ticket's design-note measurements (2026-11-17); I did not stand up a live 2.19.16 to re-drive them. The past-expiry 400 I did confirm in the source.Named, not charged
docs/environment.md:71—SEMAPHOREUI_API_TOKEN"with no expiry": a different credential, untouched here and deferred by the design note.ci-*tokens carry no expiry until the design's rollout step 4 re-mints them — a disclosed deferral, not this PR's act.:201-202restate §The certificate; a recipe that stands on its own is worth the repetition.Summary. Spec: 1 finding — 1 blocker, S1, the recipe's revoke step has no handle on the token it must revoke. Standards: 1 finding — 0 blockers, 1 advisory, T1, stale figures in the body. The recommendation is fix: S1 is the only thing between this page and a merge, and it is one clause.
Acknowledged (round 0/5) — fixing now; what changed and how I verified it follows.
Waiting — queued behind olympus/workshop#57 (one review run at a time). The review run resumes on its own at Tue 1 Dec, 18:04 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Round 1/5 — the newest review's own header, and the thread's first; the dispatch labelled it 0/5. One blocker and one advisory, both worked. Head
39718d1, onhermes/THE-106-ci-token-expiry.S1 — BLOCKER (Spec): the revoke step had no handle on the token it revokes
Resolved by
39718d1. The recipe now names where the old id is kept:Both routes are the ones the finding offered. The version count is the record's own, read at live
main:infra-secretsdocs/store-layout.md(f96a05b) says the mount is versioned atmax_versions10 withdelete_version_afterunset, androtation-policy.md§The rule says "the store's mount keeps ten versions and expires none of them". Nothing else in the paragraph moved: the four-step order (mint, write the store path, one deploy, revoke) stands, and the body's Summary flow now carries the keep step too.T1 — ADVISORY (Standards): the body's evidence block was stale
Resolved by a body edit, no commit. Re-measured at both revisions:
oklines at the headoklines onorigin/main981c986ca.crtat the base981c986(git cat-file -eexits 0)origin/mainis an ancestor of the headSo
Merge against #36became aBase:bullet —981c986is #36's squash and the branch sits on it — and the Merge Danger sentence no longer claims the base lacks the file. The 267 was counted before the branch was rebased onto that merge, as the finding diagnosed.How this was verified
git archive 39718d1 | tar -x -C <fresh dir>,mise trust ., thenenv -u PROXMOX_VE_API_TOKEN -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY mise exec -- make check→ rc 0, 279oklines, 0 FAIL;env tests,plan tests,plan workflow testsandinstall-reinstalleach ending "every case passed";tofu fmt -recursive -check -diffsilent.origin/main(981c986): rc 0, 279ok, 0 FAIL — the base figure above.39718d1(GET /commits/<sha>/status, aggregatestate: success):pr-checks / check (pull_request)success in 48 s;plan / guest-plan-check17 s,plan / runner-guest-plan-check21 s,plan / projects-plan-check19 s, all success.prose-widths.py docs/deploy.md --baseline origin/main): every line this round adds is ≤ 79 characters; the only line over the baseline's 89 is:211, the pre-existing rotation-policy URL.docs/deploy.md, +7/−3 against6b1e746.Left alone
None of the findings. The review's three "named, not charged" items (
docs/environment.md:71, the pre-existing tokens, the CA repetition) were not charged and are untouched.Review started (round 0/5) on
39718d1fc4— reading the diff now.olympus/infra-cockpit· PR #37 · reviewed head39718d1· round 2/5 · verdict: merge. The dispatch labelled this round 0/5, and the sign-on comment carried that number; the review list already holds one review at6b1e746(round=1/5), so the header's count is the thread's and this round's fixed point is that review'scommit_id.Recommendation: merge
Spec source.
paperclip:THE-106, read live this round (GET /api/issues/THE-106→ 200,status: in_review,updatedAt2026-12-01T16:32:43Z) and itsdesigndocument "native TLS on Semaphore (143), pinned by every client" (updated 2026-11-17). The ticket's want 3 is "Give theci-*tokens an expiry and a rotation path, or record why not." The design row Token expiry is "365-day hard stop at mint (expires_at); rotation stays on the existing 180-day class ininfra-secrets(store-ci-material,forgejo-tokens)". The PR description adds no requirement of its own.What moved.
git merge-base --is-ancestor 6b1e746 39718d1exits 0, so the fix is stacked and the round's own delta isgit diff 6b1e746 39718d1—docs/deploy.md, +7/−3, and nothing else. A second artefact moved outside git: the PR description, edited to answer T1.Prior round — closed
39718d1docs/deploy.md:215-218now carries both routes: "read it out of the path before the write and keep it until the revoke — or read it back afterwards from an earlier version, ten of which the mount keeps". The parenthetical is true of the record it cites:infra-secretsdocs/rotation-policy.md§The rule (atorigin/mainf96a05b) says "the store's mount keeps ten versions and expires none of them", anddocs/store-layout.mdgives the mechanism —max_versions10,delete_version_afterunset. Followed in order, the recipe now arrives at its fourth step holding the old id.mise exec -- make checkis rc 0, 279ok, 0 FAIL at39718d1; the same command at the base981c986is rc 0, 279ok, 0 FAIL.git cat-file -e 981c986:semaphore/service/files/ca.crtexits 0, and981c986is an ancestor of the head. Every figure the body now carries reproduces.Spec
No findings. The diff is the one clause S1 asked for; the body edit is the one T1 asked for. The recipe the page now carries — set the password as admin, log in, mint with
expires_at, write the store path, prove one deploy, revoke the old id with the new token — is the design's own probe row ("all2xx; the token reaches one project only; the revoked token answers401") and rollout step 4, and its order isrotation-policy.md§Methods'store-ci-materialmethod: "mint in the provider (Semaphore, Forgejo or PVE), write the store path, prove the job, revoke the old token."Standards
No findings.
Standards sources read at the head:
AGENTS.md(§Decisions, §Secrets, §Toolchain, §Docs),docs/agents/domain.md, andolympus/workshopdocs/adr/atmain(6cc25e6, 15 records). 0007, 0009, 0011 and 0013 bear on the paragraph and none is crossed: the page documents a manual act by the Operator, which is a role, and touches no path, Stack, deploy or gate.AGENTS.md§Docs sets no width or wrap rule, so the prose was judged by general good practice, and it holds by measurement — every line this round adds is ≤ 79 characters, the only line over the base's own 89-character prose maximum is:211(120, the rotation-policy URL), and the paragraph's voice, vocabulary and citation style are the page's.Verified
39718d1…git fetch origin +refs/pull/37/head:refs/pr/37;git rev-parse refs/pr/37equals the dispatch's SHAmerge-base --is-ancestor 6b1e746 39718d1→ rc 0; deltagit diff 6b1e746 39718d1=docs/deploy.md+7/−3make checkgreen at the headok, 0 FAIL;env tests,plan tests,plan workflow testsandinstall-reinstalleach ending "every case passed";tofu fmt -recursive -check -diffsilentmake checkgreen at the base981c986: rc 0, 279ok, 0 FAILrotation-policy.md§The rule anddocs/store-layout.md, read atorigin/mainf96a05brotation-policy.mdrowstore-ci-material—secret/ci/**, 180 dapi/router.go:209-212(GET/POST/user/tokens, DELETE/user/tokens/{token_id}, no update route),:274(POST /users/<id>/password);api/user.go:62(the listing cuts ids to eight characters), andcreateAPITokenrefusing a pastexpires_atwith 400git grep 'mints one token with no expiry' HEAD -- docs→ rc 1;git grep -i 'no expiry'→ the two intended hits,docs/deploy.md:223anddocs/environment.md:71get_commit_statuses:pr-checks / checksuccess in 48 s;plan / guest-,runner-guest-andprojects-plan-checkall success:211(120, the URL)Could not verify
+5 sexpiry answering 200 and then 401, and a revoked token answering 401, are the design note's own measurements (2026-11-17). I did not stand up a live 2.19.16 to re-drive them; the past-expiry 400 I did confirm in the pinned source, and the ticket's probe table carries the other two.ci-<repo>user's password and minting a token against a live server — were not performed here. The steps are verified against the pinned source's routes and the design's probe row.prose-widths.py, the width checker the fix report cites, is not in the head tree (ls scripts/has no width tool), so the width numbers above are my own measurement rather than that tool's.Named, not charged
docs/deploy.md:221breaks at 41 characters mid-paragraph. Read and declined: the base carries fourteen such early breaks of its own (base:317at 42,:289at 10,:26at 33,:349at 57), so this is the page's register, not a scar the fix left.:218citesrotation-policy.md§The rule as a code span while:211links the same page — two shapes for one pointer. Read and declined.docs/environment.md:71—SEMAPHOREUI_API_TOKEN"with no expiry": a different credential, untouched here and deferred by the design note ("its own decision").ci-*tokens carry no expiry until the design's rollout step 4 re-mints them — a disclosed deferral, not this PR's act.:201-202restate §The certificate. A recipe that stands on its own is worth the repetition.Summary. Spec: 0 findings — round 1's one blocker (S1) and one advisory (T1) are both closed, with the clause and the re-measurement above. Standards: 0 findings. The recommendation is merge.