The Semaphore tokens' hard expiry sits behind the 180-day cycle (THE-106) #62

Merged
pit merged 1 commit from hermes/THE-106-ci-token-expiry into main 2026-12-01 17:55:34 +00:00
Owner

Summary

docs/rotation-policy.md now says what store-ci-material's Semaphore tokens do on their own: each ci-<repository> token is minted with a 365-day expires_at, and that date — not the 180-day cycle — is what fails closed when a rotation is missed.

 docs/rotation-policy.md
 ├─ the class table
 │  └─ store-ci-material — … | 180 d | the same read
+│                                      the same read, and `expires_at` in
+│                                      the token listing for Semaphore tokens
 └─ What a rotation breaks, and the method
    └─ store-ci-material — … *Method:* mint in the provider … revoke the old token.
+      Semaphore's `ci-<repository>` tokens are minted with a 365-day `expires_at`;
+      the recipe is on `infra-cockpit`'s deploy page.
+      That hard expiry is the floor behind the 180-day cycle, not the cycle: a
+      token missed twice fails closed with a 401 instead of living on.
+      `GET /api/user/tokens`, as the `ci-<repository>` user, lists each token's
+      `expires_at`. Tokens minted before the `paperclip:THE-106` re-mint carry
+      none, and that re-mint replaces them.
mint . . . . . . . . . . . . . . . . expires_at . . . . . 401
  |                                      |                |
  +-- rotation due, first cycle (180 d) -+                |
  +-- rotation due, second cycle (360 d)                  |
  +-- hard expiry: a fifth day later, 401 ----------------+

The page's own rule already allows this: "A class that gains a hard expiry keeps this record anyway: the expiry is the floor, not the cycle." The entry now says which date that floor is, where the recipe for minting with it lives, and how an Operator reads it back. Ticket: https://paperclip.thepit.space/THE/issues/THE-106.

Left alone, deliberately: the headline rule "Nothing expires on its own" (its next sentence is the one above), and the forgejo-tokens row and bullet, which also name Semaphore's ci-<repository> tokens — that is another class, and this change does not touch it. The page is not given a ticket link: this repository's convention is that the ticket references the page, not the other way round.

Evidence

  • Before: the store-ci-material bullet ended at "Method: mint in the provider (Semaphore, Forgejo or PVE), write the store path, prove the job, revoke the old token." — no expiry, and its table row's read was "the same read".

  • After: the bullet's last sentence is "Tokens minted before the paperclip:THE-106 re-mint carry none, and that re-mint replaces them."; the row's read is "the same read, and expires_at in the token listing for Semaphore tokens".

  • make check: rc 0 on this tree, first run, no flake. 557 ok lines, 0 FAIL. The per-suite closing lines:

    env-check: the pin and the map agree.
    env fetch: every case passed.
    mcp-env-check: the map, the unit and the file agree.
    mcp-env tests: all cases pass.
    plan tests: every case passed.
    rotation tests: all passed
    snapshot-test: every assertion holds.
    prod-test: 8 assertions, 0 FAILED.
    semaphore-deploy tests: 63 assertions, 0 FAILED.
    deploy-workflow tests: 50 assertions, 0 FAILED.
    service-key tests: 33 assertions, 0 FAILED.
    verify tests: 9 assertions, 0 FAILED.
    
  • Width: the file wraps prose at 80 columns and carries one 92-column line, a single unbreakable link. Every new prose line is at or under 80 except the one holding the deploy-doc URL, at 91. The widened table row stays under the table's 324-character longest row. No width or count checker runs in this repository's make check (the Makefile, scripts/ and host/ hold nothing that reads a page), so the file's own baseline is the one kept, measured with a character-and-byte width probe.

  • Render: a CommonMark render of the changed page (markdown-it-py, tables enabled) keeps the bullet one <li>, and the link whose text breaks across two source lines renders as one anchor to https://forgejo.thepit.space/olympus/infra-cockpit/src/branch/main/docs/deploy.md with text "deploy page".

  • Diff hygiene: git diff --check is clean; the only non-ASCII character in the added lines is the em dash the table row already carried.

Merge Danger

Door: two-way. A revert pull request restores the previous sentences; nothing at runtime reads a documentation page — the rotation reader reads rotation-record.json, and no code reads this page.

Blast Radius: none at runtime, but the merge to main starts one store deploy. .forgejo/workflows/deploy.yml runs on every push to main with no paths: filter, so a docs-only merge still starts one Semaphore task, which runs make prod — snapshot of 144, the Guest plan and apply, the service layer, verify. This change moves no Guest or service file, so the plan is empty and the service check should report changed=0; docs/deploy.md, "Not proved until the first merge", lists a documentation-only merge deploying as a no-op as still unproven, so that is the shape here and not a claim. A green task leaves one predeploy-* restore point and prunes the oldest. The workflow's own login reads secret/ci/secrets/semaphore-api — the very kind of token this page describes — so a docs merge after a re-mint that went wrong would red at the deploy's first request; the re-mint itself rides with THE-106, not here. Merge order: this link points at infra-cockpit's docs/deploy.md, and on that repository's main the ci-<repo> section still mints the token with no expiry, so the docs PR carrying the expires_at recipe belongs first (or in the same day); the link is the page and not a section anchor, because this instance drops a cross-file fragment.

Merge order. This repository's main still sends its deploy over http until olympus/infra-secrets#61 merges, and a merge here runs that deploy (deploy.yml has no paths: filter, so a docs-only change still runs one Semaphore task). Nothing on this page is wrong with the current client, but a merge of it after the listener moves would run a red deploy for a documentation change. Merge #61 first, then this one.

## Summary `docs/rotation-policy.md` now says what `store-ci-material`'s Semaphore tokens do on their own: each `ci-<repository>` token is minted with a 365-day `expires_at`, and that date — not the 180-day cycle — is what fails closed when a rotation is missed. ```diff docs/rotation-policy.md ├─ the class table │ └─ store-ci-material — … | 180 d | the same read +│ the same read, and `expires_at` in +│ the token listing for Semaphore tokens └─ What a rotation breaks, and the method └─ store-ci-material — … *Method:* mint in the provider … revoke the old token. + Semaphore's `ci-<repository>` tokens are minted with a 365-day `expires_at`; + the recipe is on `infra-cockpit`'s deploy page. + That hard expiry is the floor behind the 180-day cycle, not the cycle: a + token missed twice fails closed with a 401 instead of living on. + `GET /api/user/tokens`, as the `ci-<repository>` user, lists each token's + `expires_at`. Tokens minted before the `paperclip:THE-106` re-mint carry + none, and that re-mint replaces them. ``` ```text mint . . . . . . . . . . . . . . . . expires_at . . . . . 401 | | | +-- rotation due, first cycle (180 d) -+ | +-- rotation due, second cycle (360 d) | +-- hard expiry: a fifth day later, 401 ----------------+ ``` The page's own rule already allows this: "A class that gains a hard expiry keeps this record anyway: the expiry is the floor, not the cycle." The entry now says which date that floor is, where the recipe for minting with it lives, and how an Operator reads it back. Ticket: https://paperclip.thepit.space/THE/issues/THE-106. Left alone, deliberately: the headline rule "Nothing expires on its own" (its next sentence is the one above), and the `forgejo-tokens` row and bullet, which also name Semaphore's `ci-<repository>` tokens — that is another class, and this change does not touch it. The page is not given a ticket link: this repository's convention is that the ticket references the page, not the other way round. ## Evidence - **Before:** the `store-ci-material` bullet ended at "*Method:* mint in the provider (Semaphore, Forgejo or PVE), write the store path, prove the job, revoke the old token." — no expiry, and its table row's read was "the same read". - **After:** the bullet's last sentence is "Tokens minted before the `paperclip:THE-106` re-mint carry none, and that re-mint replaces them."; the row's read is "the same read, and `expires_at` in the token listing for Semaphore tokens". - **`make check`:** rc 0 on this tree, first run, no flake. 557 `ok` lines, 0 `FAIL`. The per-suite closing lines: ```text env-check: the pin and the map agree. env fetch: every case passed. mcp-env-check: the map, the unit and the file agree. mcp-env tests: all cases pass. plan tests: every case passed. rotation tests: all passed snapshot-test: every assertion holds. prod-test: 8 assertions, 0 FAILED. semaphore-deploy tests: 63 assertions, 0 FAILED. deploy-workflow tests: 50 assertions, 0 FAILED. service-key tests: 33 assertions, 0 FAILED. verify tests: 9 assertions, 0 FAILED. ``` - **Width:** the file wraps prose at 80 columns and carries one 92-column line, a single unbreakable link. Every new prose line is at or under 80 except the one holding the deploy-doc URL, at 91. The widened table row stays under the table's 324-character longest row. No width or count checker runs in this repository's `make check` (the Makefile, `scripts/` and `host/` hold nothing that reads a page), so the file's own baseline is the one kept, measured with a character-and-byte width probe. - **Render:** a CommonMark render of the changed page (markdown-it-py, tables enabled) keeps the bullet one `<li>`, and the link whose text breaks across two source lines renders as one anchor to `https://forgejo.thepit.space/olympus/infra-cockpit/src/branch/main/docs/deploy.md` with text "deploy page". - **Diff hygiene:** `git diff --check` is clean; the only non-ASCII character in the added lines is the em dash the table row already carried. ## Merge Danger **Door:** two-way. A revert pull request restores the previous sentences; nothing at runtime reads a documentation page — the rotation reader reads `rotation-record.json`, and no code reads this page. **Blast Radius:** none at runtime, but the merge to `main` starts one store deploy. `.forgejo/workflows/deploy.yml` runs on every push to `main` with no `paths:` filter, so a docs-only merge still starts one Semaphore task, which runs `make prod` — snapshot of 144, the Guest plan and apply, the service layer, `verify`. This change moves no Guest or service file, so the plan is empty and the service check should report `changed=0`; `docs/deploy.md`, "Not proved until the first merge", lists a documentation-only merge deploying as a no-op as still unproven, so that is the shape here and not a claim. A green task leaves one `predeploy-*` restore point and prunes the oldest. The workflow's own login reads `secret/ci/secrets/semaphore-api` — the very kind of token this page describes — so a docs merge after a re-mint that went wrong would red at the deploy's first request; the re-mint itself rides with THE-106, not here. Merge order: this link points at `infra-cockpit`'s `docs/deploy.md`, and on that repository's `main` the `ci-<repo>` section still mints the token with no expiry, so the docs PR carrying the `expires_at` recipe belongs first (or in the same day); the link is the page and not a section anchor, because this instance drops a cross-file fragment. **Merge order.** This repository's `main` still sends its deploy over `http` until `olympus/infra-secrets#61` merges, and a merge here runs that deploy (`deploy.yml` has no `paths:` filter, so a docs-only change still runs one Semaphore task). Nothing on this page is wrong with the current client, but a merge of it after the listener moves would run a red deploy for a documentation change. Merge #61 first, then this one.
The Semaphore tokens' hard expiry sits behind the 180-day cycle (THE-106)
All checks were successful
plan / guest-plan-check (pull_request_target) Successful in 16s
pr-checks / check (pull_request) Successful in 42s
0d89ba0930
The store-ci-material entry in docs/rotation-policy.md now records that
Semaphore's ci-<repository> tokens are minted with a 365-day expires_at.
That expiry is the floor behind the 180-day cycle, not the cycle: a token
whose rotation is missed twice answers 401 instead of living on. The
entry names where the recipe lives (infra-cockpit's docs/deploy.md), says
that GET /api/user/tokens as the ci-<repository> user lists each token's
expires_at, and says the tokens minted before the THE-106 re-mint carry
none and are replaced by it. The class table's read for store-ci-material
gains the same listing. Docs only: no interval, class, count or record
row changes.
Author
Owner

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.

**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.
Author
Owner

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.

**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.
Member

Review started (round 0/5) on 0d89ba0930 — reading the diff now.

**Review started** (round 0/5) on 0d89ba0930ec14b8f8e3514d22f171645eb4ff16 — reading the diff now.
bot-minos approved these changes 2026-12-01 16:56:54 +00:00
bot-minos left a comment

olympus/infra-secrets #62 · head 0d89ba0930ec14b8f8e3514d22f171645eb4ff16 · round 1/5 · axes: Standards, Spec

Round 1/5. The dispatch numbered this round 0; list_pull_reviews answers an empty set and the only earlier comment is the queue notice, so this is the thread's first review and the header counts from the posted reviews, not the dispatch.

Recommendation: merge

The change is eleven lines of prose and one table cell, and every factual claim in it holds against the artefact that decides it: the pinned Semaphore 2.19.16 source, the live listener, the page's own register, and the record the class feeds. One advisory, on how the page states the expiry's role where a reader looks for when is this due.

Spec

Spec source, named as read:

Source Route Read
paperclip:THE-106 — "Semaphore (143) over TLS…" scripts/fetch-paperclip-issue.sh THE-106 via the company control plane live, HTTP 200, 12013 bytes
that ticket's design document same fetch, documents route live, HTTP 200, 8015 chars
the PR body's own acceptance statements the description at the reviewed head live

THE-106's Want item 3 is "Give the ci-* tokens an expiry and a rotation path, or record why not", and its design decides "365-day hard stop at mint (expires_at); rotation stays on the existing 180-day class in infra-secrets (store-ci-material, forgejo-tokens) … the expiry is the floor, not the cycle". The diff records exactly that, in the class the design names, with the read-back an Operator needs.

  • Requirements met. Expiry (365 d, docs/rotation-policy.md:116-118), the floor-not-the-cycle statement (:119-120), the read-back (:121-122), and the pre-THE-106 token's state (:122-123). The rotation path itself (:114-116, mint → write → prove → revoke) predates the change and is unchanged, which is what the design asks for.
  • Nothing asked for is missing at this PR's scope. THE-106's ticket-level Done when also requires the https switch and the STD-2 citations gone; those are infra-secrets#61 and infra-cockpit's halves, not this page, and the body says so.
  • No scope creep. The table row and the bullet are one claim; nothing else in the tree moved.

Standards

Standards sources read at the head: AGENTS.md (Decisions, Checks, Agent skills), docs/agents/issue-tracker.md, docs/agents/domain.md, docs/agents/triage-labels.md, README.md, and the org records in olympus/workshop at origin/main 6cc25e62 (docs/adr/, 15 records + index — the local clone's count matches the fetched tree).

No documented standard is broken. Three that could have been, and are not:

  • AGENTS.md §Checks — make check runs at the head (below); the change touches nothing it covers.
  • AGENTS.md §Agent skills / Issue tracker names Vikunja SC, but the page's reference is the tracker-neutral paperclip:THE-106 form the org records mandate (olympus/workshop AGENTS.md §Agent skills), and no rule in this repo obliges a PR body to cite an SC index.
  • docs/agents/domain.md §Use the glossary's vocabulary — no coined term, no _Avoid_ collision; "class", "cycle", "floor" are the page's existing vocabulary.

ADR check, since the page is the rotation record prose: 0007 (a rotation writes one path) and 0013 (the Operator rotates; the holder never rotates its own) are the two that bite here, and the added method text keeps both — one path per credential, and the Operator mints. 0011/0009 are not engaged: no Stack, no deploy file, no store path.

Standards findings: 0.

Spec findings

ADVISORY — the expiry is presented as the due-signal in the two places a reader consults for "when is this due"

docs/rotation-policy.md:36 and docs/rotation-policy.md:78, against the change's own docs/rotation-policy.md:119-120.

At :36 the page's headline rule is "Nothing expires on its own." After this diff a class in the page's own table does: :116-120 records that each Semaphore ci-<repository> token carries a 365-day expires_at and answers 401 at it. The page's third sentence at :40-41 ("A class that gains a hard expiry keeps this record anyway: the expiry is the floor, not the cycle") authorises the exception, so the page recovers the meaning — which is why this is not a blocker. But the bolded universal now reads false about a member 40 lines below it.

At :78 the column is "signal a member is due", and the cell now reads "the same read, and expires_at in the token listing for Semaphore tokens". The class interval is 180 d; expires_at is 365 d from mint. The expiry therefore never fires while the rotation is due — it fires 185 days after. A reader who consults the table alone and finds expires_at five months out reads "not due" on a class that is already overdue by the cycle's own count, which is the exact misreading :119-120 exists to prevent.

The author disclosed leaving :36 and cited the carve-out; the artifact still carries it, and a disclosure is graded on the artifact.

Clear, one clause each: at :78, scope the second half — "the same read; expires_at in the token listing is the hard stop, not the due date"; at :36, narrow the headline — "Nothing expires on its own, except where a class states a hard expiry." Neither edit changes the substance of the change; both keep the page true of the fleet it now describes.

Spec findings: 1 (0 blockers, 1 advisory).

Verified

Verified by hand at the reviewed head; commands and outputs in cache/scratch/infra-secrets-62-r1/.

Claim How it was reproduced Result
head is the dispatch's git fetch origin +refs/pull/62/head:…; git ls-remote origin refs/pull/62/head before and again inside the posting command 0d89ba0930ec14b8f8e3514d22f171645eb4ff16 both times; git status --porcelain empty in the worktree
base is current git ls-remote origin refs/heads/main vs the PR's base.sha / merge_base f96a05b… in all three; main has not moved under the review
make check rc 0, 557 ok, 0 FAIL mise exec -- make check in the head worktree rc 0, 557 ^ ok lines, 0 ^ FAIL — the body's figure to the line
no checker reads the page git grep -ln rotation-policy HEAD -- scripts Makefile host Makefile:361 (a comment), scripts/rotation-due.py:4 (a docstring). make rotation-due reads rotation-record.json only — the body's claim stands, and the floor's green says nothing about this page
widths bash scripts/width-check.sh docs/rotation-policy.md (character count, UTF-8 aware) new prose ≤80 except :118, the URL line, at 91; the widened row :78 is 227 and the table's longest is :80 at 324 — matches the body
the render CommonMark + tables via markdown-it-py over the head file 1 table, header + 14 rows, 0 ragged rows at head and at base; the store-ci-material row keeps 5 cells; the bullet at :114 is a single <li>; the split link renders as one <a> to https://forgejo.thepit.space/olympus/infra-cockpit/src/branch/main/docs/deploy.md
GET /api/user/tokens exists live: curl https://10.12.0.143:3000/api/user/tokens vs a bogus path 401 vs 404 — the route is real and refuses an unauthenticated read. A plain-http request to :3000 answers Client sent an HTTP request to an HTTPS server.
expires_at is the field, and the read-back exists the pinned version's own source, tag v2.19.16 (fetched from upstream) api/router.go:209-212 GET/POST /user/tokens and DELETE /{token_id}; api/user.go:51-68 the listing returns the token rows (ids cut to 8 chars); api/user.go:73-86 create takes expires_at and answers 400 on a past one; db/APIToken.go:10 ExpiresAt *time.Time \json:"expires_at,omitempty"``
"tokens minted before … carry none" same source omitempty on the JSON tag — a legacy row emits no expires_at key at all. :122 is precise
"fails closed with a 401" same source api/auth.go:237-239 if token.IsExpiredAt(tz.Now()) { w.WriteHeader(http.StatusUnauthorized) }
diff hygiene git diff --check; non-ASCII scan over the added lines; git log --oneline base..HEAD rc 0; the only non-ASCII byte is the em dash the row already carried; one commit, titled in the repo's <subject> (THE-n) shape

Could not verify

  • The 401 at the end of a real 365-day token's life. No ci-* token in this session, and I did not re-run the design's loopback probe. Source (api/auth.go:237) and the design's measured row ("expires_at +5 s → 200 now, 401 after expiry") both support it; the live half is unverified here.
  • Whether the re-mint has happened, and so whether any live token currently carries an expires_at. secret/ci/** needs the Admin agent's read, which this session does not hold. :122-123 states the pre-re-mint state as a future act, which is the honest form whether or not it has landed.

Neither gap moves the verdict: the page is written so that both answers are true.

Named, not charged

  • The recipe pointer is true of an unmerged sibling, not of that repo's main. :117-118 says "the recipe is on infra-cockpit's deploy page". At olympus/infra-cockpit origin/main 981c986, docs/deploy.md:194 still reads "mints one token with no expiry (POST /api/user/tokens)". The recipe this sentence promises exists only on that repository's open #37 (head 6b1e746), where docs/deploy.md:205-207 carries the expires_at mint. A pointer to work in flight is a revision omission rather than a wrong fact, so it is not charged — but it is a merge condition: infra-cockpit#37 first, or the page sends an Operator to instructions that omit the expiry. Note that #37 currently carries review/needs-fix, so it is not ready to land as it stands; and the body already orders it ("the docs PR carrying the expires_at recipe belongs first").
  • The same tokens are classed twice, at base. :78 (store-ci-material, "the Semaphore API tokens") and :87 (forgejo-tokens, "Semaphore's ci-<repository> tokens"), and again in docs/rotation-record.json:27-34 and :116-124. The change adds the expiry read to one copy; :87's generic clause ("the provider's own listing where it carries a date") still covers the expiry, so nothing is falsified. The duplication predates the diff and is the page's to consolidate, not this change's.
  • rotation-record.json:34 will need its date source re-read once the re-mint lands. It dates the ci/<repository>/semaphore-api paths by updated_time (2026-11-07, CP-43). :122-123 says the re-mint replaces those tokens, so that evidence line is superseded by the re-mint — and by the page's own rule at :62-65 the row moves with the rotation, not with this page.
  • This repository's deploy is red before #61 merges, and that is not this change's doing. infra-secrets#61 is open (review/waiting); main still sends its deploy over http while the listener on 143 is already TLS-only (probe above). A merge of this docs PR before #61 runs that red deploy — the body states this and orders #61 first. Nothing on the page is wrong with the current client.

Summary

Axis Findings Worst
Standards 0 none — no documented rule broken; widths, structure and diff hygiene follow the page's own register
Spec 1 (0 blockers, 1 advisory) the expiry presented as the due-signal at :36 and :78, which the page's own prose corrects 40 lines below

One advisory, below the volume trip, so the recommendation is merge; it travels as advice. The two merge conditions outside this diff are infra-cockpit#37 (the page's link target) and infra-secrets#61 (the deploy's client), both stated in the PR body's Merge Danger.

<!-- minos review-loop: repo=olympus/infra-secrets pr=62 head=0d89ba0930ec14b8f8e3514d22f171645eb4ff16 round=1/5 axes=standards,spec verdict=merge --> **olympus/infra-secrets #62** · head `0d89ba0930ec14b8f8e3514d22f171645eb4ff16` · round **1/5** · axes: Standards, Spec Round 1/5. The dispatch numbered this round 0; `list_pull_reviews` answers an empty set and the only earlier comment is the queue notice, so this is the thread's first review and the header counts from the posted reviews, not the dispatch. Recommendation: merge The change is eleven lines of prose and one table cell, and every factual claim in it holds against the artefact that decides it: the pinned Semaphore 2.19.16 source, the live listener, the page's own register, and the record the class feeds. One advisory, on how the page states the expiry's role where a reader looks for *when is this due*. ## Spec Spec source, named as read: | Source | Route | Read | |---|---|---| | `paperclip:THE-106` — "Semaphore (143) over TLS…" | `scripts/fetch-paperclip-issue.sh THE-106` via the company control plane | live, HTTP 200, 12013 bytes | | that ticket's `design` document | same fetch, documents route | live, HTTP 200, 8015 chars | | the PR body's own acceptance statements | the description at the reviewed head | live | THE-106's **Want** item 3 is "Give the `ci-*` tokens an expiry and a rotation path, or record why not", and its design decides "365-day hard stop at mint (`expires_at`); rotation stays on the existing 180-day class in `infra-secrets` (`store-ci-material`, `forgejo-tokens`) … the expiry is the floor, not the cycle". The diff records exactly that, in the class the design names, with the read-back an Operator needs. - **Requirements met.** Expiry (365 d, `docs/rotation-policy.md:116-118`), the floor-not-the-cycle statement (`:119-120`), the read-back (`:121-122`), and the pre-`THE-106` token's state (`:122-123`). The rotation path itself (`:114-116`, mint → write → prove → revoke) predates the change and is unchanged, which is what the design asks for. - **Nothing asked for is missing** at this PR's scope. THE-106's ticket-level *Done when* also requires the https switch and the STD-2 citations gone; those are `infra-secrets#61` and `infra-cockpit`'s halves, not this page, and the body says so. - **No scope creep.** The table row and the bullet are one claim; nothing else in the tree moved. ## Standards Standards sources read at the head: `AGENTS.md` (Decisions, Checks, Agent skills), `docs/agents/issue-tracker.md`, `docs/agents/domain.md`, `docs/agents/triage-labels.md`, `README.md`, and the org records in `olympus/workshop` at `origin/main` `6cc25e62` (`docs/adr/`, 15 records + index — the local clone's count matches the fetched tree). No documented standard is broken. Three that could have been, and are not: - `AGENTS.md §Checks` — `make check` runs at the head (below); the change touches nothing it covers. - `AGENTS.md §Agent skills / Issue tracker` names Vikunja `SC`, but the page's reference is the tracker-neutral `paperclip:THE-106` form the org records mandate (`olympus/workshop` `AGENTS.md §Agent skills`), and no rule in this repo obliges a PR body to cite an `SC` index. - `docs/agents/domain.md §Use the glossary's vocabulary` — no coined term, no `_Avoid_` collision; "class", "cycle", "floor" are the page's existing vocabulary. ADR check, since the page is the rotation record prose: `0007` (a rotation writes one path) and `0013` (the Operator rotates; the holder never rotates its own) are the two that bite here, and the added method text keeps both — one path per credential, and the Operator mints. `0011`/`0009` are not engaged: no Stack, no deploy file, no store path. **Standards findings: 0.** ## Spec findings ### ADVISORY — the expiry is presented as the due-signal in the two places a reader consults for "when is this due" `docs/rotation-policy.md:36` and `docs/rotation-policy.md:78`, against the change's own `docs/rotation-policy.md:119-120`. At `:36` the page's headline rule is "**Nothing expires on its own.**" After this diff a class in the page's own table does: `:116-120` records that each Semaphore `ci-<repository>` token carries a 365-day `expires_at` and answers 401 at it. The page's third sentence at `:40-41` ("A class that gains a hard expiry keeps this record anyway: the expiry is the floor, not the cycle") authorises the exception, so the page recovers the meaning — which is why this is not a blocker. But the bolded universal now reads false about a member 40 lines below it. At `:78` the column is "signal a member is due", and the cell now reads "the same read, and `expires_at` in the token listing for Semaphore tokens". The class interval is 180 d; `expires_at` is 365 d from mint. The expiry therefore never fires while the rotation is due — it fires 185 days after. A reader who consults the table alone and finds `expires_at` five months out reads "not due" on a class that is already overdue by the cycle's own count, which is the exact misreading `:119-120` exists to prevent. The author disclosed leaving `:36` and cited the carve-out; the artifact still carries it, and a disclosure is graded on the artifact. **Clear, one clause each:** at `:78`, scope the second half — "the same read; `expires_at` in the token listing is the hard stop, not the due date"; at `:36`, narrow the headline — "Nothing expires on its own, except where a class states a hard expiry." Neither edit changes the substance of the change; both keep the page true of the fleet it now describes. **Spec findings: 1** (0 blockers, 1 advisory). ## Verified Verified by hand at the reviewed head; commands and outputs in `cache/scratch/infra-secrets-62-r1/`. | Claim | How it was reproduced | Result | |---|---|---| | head is the dispatch's | `git fetch origin +refs/pull/62/head:…`; `git ls-remote origin refs/pull/62/head` before and again inside the posting command | `0d89ba0930ec14b8f8e3514d22f171645eb4ff16` both times; `git status --porcelain` empty in the worktree | | base is current | `git ls-remote origin refs/heads/main` vs the PR's `base.sha` / `merge_base` | `f96a05b…` in all three; `main` has not moved under the review | | `make check` rc 0, 557 `ok`, 0 `FAIL` | `mise exec -- make check` in the head worktree | rc 0, **557** `^ ok` lines, **0** `^ FAIL` — the body's figure to the line | | no checker reads the page | `git grep -ln rotation-policy HEAD -- scripts Makefile host` | `Makefile:361` (a comment), `scripts/rotation-due.py:4` (a docstring). `make rotation-due` reads `rotation-record.json` only — the body's claim stands, and the floor's green says nothing about this page | | widths | `bash scripts/width-check.sh docs/rotation-policy.md` (character count, UTF-8 aware) | new prose ≤80 except `:118`, the URL line, at **91**; the widened row `:78` is 227 and the table's longest is `:80` at **324** — matches the body | | the render | CommonMark + tables via `markdown-it-py` over the head file | 1 table, header + 14 rows, **0 ragged rows** at head *and* at base; the `store-ci-material` row keeps 5 cells; the bullet at `:114` is a single `<li>`; the split link renders as **one** `<a>` to `https://forgejo.thepit.space/olympus/infra-cockpit/src/branch/main/docs/deploy.md` | | `GET /api/user/tokens` exists | live: `curl https://10.12.0.143:3000/api/user/tokens` vs a bogus path | **401** vs **404** — the route is real and refuses an unauthenticated read. A plain-http request to `:3000` answers `Client sent an HTTP request to an HTTPS server.` | | `expires_at` is the field, and the read-back exists | the pinned version's own source, tag `v2.19.16` (fetched from upstream) | `api/router.go:209-212` GET/POST `/user/tokens` and DELETE `/{token_id}`; `api/user.go:51-68` the listing returns the token rows (ids cut to 8 chars); `api/user.go:73-86` create takes `expires_at` and answers **400** on a past one; `db/APIToken.go:10` `ExpiresAt *time.Time \`json:"expires_at,omitempty"\`` | | "tokens minted before … carry none" | same source | `omitempty` on the JSON tag — a legacy row emits no `expires_at` key at all. `:122` is precise | | "fails closed with a 401" | same source | `api/auth.go:237-239` `if token.IsExpiredAt(tz.Now()) { w.WriteHeader(http.StatusUnauthorized) }` | | diff hygiene | `git diff --check`; non-ASCII scan over the added lines; `git log --oneline base..HEAD` | rc 0; the only non-ASCII byte is the em dash the row already carried; one commit, titled in the repo's `<subject> (THE-n)` shape | ## Could not verify - **The 401 at the end of a real 365-day token's life.** No `ci-*` token in this session, and I did not re-run the design's loopback probe. Source (`api/auth.go:237`) and the design's measured row ("`expires_at` +5 s → 200 now, 401 after expiry") both support it; the live half is unverified here. - **Whether the re-mint has happened**, and so whether any live token currently carries an `expires_at`. `secret/ci/**` needs the Admin agent's read, which this session does not hold. `:122-123` states the pre-re-mint state as a future act, which is the honest form whether or not it has landed. Neither gap moves the verdict: the page is written so that both answers are true. ## Named, not charged - **The recipe pointer is true of an unmerged sibling, not of that repo's main.** `:117-118` says "the recipe is on `infra-cockpit`'s deploy page". At `olympus/infra-cockpit` `origin/main` `981c986`, `docs/deploy.md:194` still reads "mints one token with **no expiry** (`POST /api/user/tokens`)". The recipe this sentence promises exists only on that repository's open **#37** (head `6b1e746`), where `docs/deploy.md:205-207` carries the `expires_at` mint. A pointer to work in flight is a revision omission rather than a wrong fact, so it is not charged — but it is a **merge condition**: `infra-cockpit#37` first, or the page sends an Operator to instructions that omit the expiry. Note that #37 currently carries `review/needs-fix`, so it is not ready to land as it stands; and the body already orders it ("the docs PR carrying the `expires_at` recipe belongs first"). - **The same tokens are classed twice, at base.** `:78` (`store-ci-material`, "the Semaphore API tokens") and `:87` (`forgejo-tokens`, "Semaphore's `ci-<repository>` tokens"), and again in `docs/rotation-record.json:27-34` and `:116-124`. The change adds the expiry read to one copy; `:87`'s generic clause ("the provider's own listing where it carries a date") still covers the expiry, so nothing is falsified. The duplication predates the diff and is the page's to consolidate, not this change's. - **`rotation-record.json:34` will need its date source re-read once the re-mint lands.** It dates the `ci/<repository>/semaphore-api` paths by `updated_time` (2026-11-07, CP-43). `:122-123` says the re-mint replaces those tokens, so that evidence line is superseded by the re-mint — and by the page's own rule at `:62-65` the row moves with the rotation, not with this page. - **This repository's deploy is red before #61 merges, and that is not this change's doing.** `infra-secrets#61` is open (`review/waiting`); `main` still sends its deploy over `http` while the listener on 143 is already TLS-only (probe above). A merge of this docs PR before #61 runs that red deploy — the body states this and orders #61 first. Nothing on the page is wrong with the current client. ## Summary | Axis | Findings | Worst | |---|---:|---| | Standards | 0 | none — no documented rule broken; widths, structure and diff hygiene follow the page's own register | | Spec | 1 (0 blockers, 1 advisory) | the expiry presented as the due-signal at `:36` and `:78`, which the page's own prose corrects 40 lines below | One advisory, below the volume trip, so the recommendation is **merge**; it travels as advice. The two merge conditions outside this diff are `infra-cockpit#37` (the page's link target) and `infra-secrets#61` (the deploy's client), both stated in the PR body's *Merge Danger*.
pit merged commit b8f21fe137 into main 2026-12-01 17:55:34 +00:00
pit deleted branch hermes/THE-106-ci-token-expiry 2026-12-01 17:55:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-secrets!62
No description provided.