Skip to content

trust: signed ci tags, a release gate for who may cut, signed release cuts (#4031) - #4059

Merged
lex00 merged 3 commits into
mainfrom
feat/4031-signed-tags
Oct 17, 2026
Merged

lex00 merged 3 commits into
mainfrom
feat/4031-signed-tags

Conversation

@lex00

@lex00 lex00 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Closes #4031

Green and revoked tags can be required to carry a statement signed by a runner key, who may cut a release is a gate in the declaration, and release cuts are signed and verified on every read. All of it is opt-in: a workspace that sets nothing keeps today's behaviour. chant's own chant.workspace.json, .chant/ and workflows are unchanged here; turning it on for chant is #4040 (steps posted there).

  • Opt-in and cutover: ci.green.signedSince names the full sha of the first commit on the branch whose tags must be signed. A tag on a strict first-parent ancestor of it counts unsigned, so existing tags keep working. Every other tag, including one on the signedSince commit, needs a statement. Position in history decides rather than a date, because whoever makes a commit or tag sets its time; a backdated commit outside the ancestry gains nothing (tested). A sha that names no commit is declaration-invalid. A chant older than 0.124.28 refuses a declaration with signedSince, so the docs say to set minReader with it.
  • Statements: a tag's JSON annotation holds a DSSE in-toto statement (predicate https://intentius.io/chant/ci-tag/v1), reusing the ws-069/ws-090 envelope. It counts only when signed by a key under runners in .chant/trust.json at base, whose principal holds the runner role, and when its subject, record, branch and kind match the tag and the annotation equals what was signed. Otherwise the tag is ignored as unsigned, invalid, untrusted or mismatch, and reported.
  • Readers: ci tick, ci list, ci last-green (which gains --from <rev>) and release cut ignore and report bad tags. The tick signs the tags it makes with --key or CHANT_RUNNER_KEY, refuses a key or principal not trusted as a runner, and names a hand-pushed tag that blocks it, since chant never deletes tags.
  • Requirement 3: chant ci workflow --runner-key-secret <NAME> passes the repository secret to the tick as CHANT_RUNNER_KEY; the docs say the key's principal needs the runner role.
  • Requirements 4 and 5: an identity.gates.release entry makes release cut require --sign [<key file>] and an actor in the gate's class (release-unsigned, release-signer-refused). The cut line's signature is an ssh signature in the chant-release namespace over the release digest, label, actor and time, checked against .chant/allowed_signers at base. release list and workspace status verify it on every read (signatureCheck: verified, unsigned or unverified). The cut reads signedSince and the release gate from the branch tip, so a local edit can't switch them off.

Level-0 output changes

On the exceptions page and #2525: help text for ci last-green, ci tick, ci workflow and release cut; new flags --runner-key-secret, --key, --from, --sign; ci list --json commits gain ignored and signer; ci last-green --json gains ignored; release list --json cuts gain signatureCheck; workspace status --json members gain releaseCuts; ls shows signedSince when set; ci tick text adds ignored, did not make and signed as lines when they apply. No golden moved.

Acceptance

  • A hand-pushed green tag is ignored and reported, with a test (ci-green-signed.test.ts "a hand-pushed green tag is ignored and reported by ci tick, ci list and ci last-green").
  • A tag older than ci.green.signedSince is accepted unsigned, with a test (ancestry-based: a tag on a strict ancestor counts unsigned; one on signedSince itself and on a backdated later commit is ignored).
  • scripts/release-preflight.sh keeps working on chant's own repo: run in a temporary clone with a temporary bare origin and a throwaway runner key. Without signedSince (chant today) the existing check passes unchanged. With it: an old unsigned tag on an ancestor passes, a signed tag passes, a hand-pushed tag is reported and refused, and with no commit named it falls back to the newest signed commit. Nothing was pushed to the real repo.
  • Cutting a release as someone outside the release gate's class is refused, with a test (release-cut-signed.test.ts).
  • Releases carry a signature that workspace status verifies ("a cut by a releaser carries a signature that release list and workspace status verify").
  • A hand-pushed revoked tag without a valid statement is ignored and reported, with a test.

Checks

  • npx tsx scripts/typecheck.ts: no regressions (26 baselined)
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures
  • workspace, lifecycle, handlers, boundary roster, level-0 and wave-loop goldens: 3256 passed with GITHUB_SHA, GITHUB_RUN_ID and CI set, after rebasing on main
  • Full vitest: only the 3 known local op/factory.e2e.test.ts failures
  • lint-docs-sentences (no regressions), lint-prompts, check-docs-diataxis, ./scripts/build-docs.sh: pass

lex00 added 3 commits October 16, 2026 21:04
… signed release cuts (#4031)

A ci tag on a commit committed at or after ci.green.signedSince counts only
when its annotation carries an in-toto statement in a DSSE envelope, signed by
a runner key .chant/trust.json lists under runners for a principal holding the
runner role. An older commit's tag counts unsigned, and without signedSince
every tag counts as before. ci tick signs what it makes from --key or
CHANT_RUNNER_KEY and refuses a key the policy does not list; ci tick, ci list,
ci last-green and release cut ignore and report a tag without a valid
statement. ci last-green gains --from, which release-preflight.sh uses once
signedSince is set. ci workflow --runner-key-secret passes the key from a
repository secret.

identity.gates.release says who may cut: release cut then needs --sign by an
actor in its class. A cut's signature is an ssh signature in the
chant-release namespace over the digest, label, actor and time; release list
and workspace status verify it on every read (signatureCheck, releaseCuts).
A commit's committer time is set by whoever makes it, so a backdated commit
with a hand-pushed unsigned tag passed the time cutover. signedSince is now
the full sha of the first commit whose tags must be signed: a tag counts
unsigned only on a strict first-parent ancestor of it, and any other tag
needs a runner statement. A sha that names no commit in the clone is refused
with declaration-invalid by ci list, ci last-green, ci tick and release cut.
The time form is dropped; nothing shipped it.
@lex00
lex00 merged commit dd79dea into main Oct 17, 2026
11 checks passed
@lex00
lex00 deleted the feat/4031-signed-tags branch October 17, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trust: signed green tags and run statements, a role for who may cut a release, signed release records

1 participant