Skip to content

feat(workspace): agent-run statement signed by a runner or steward key (DSSE) - #3413

Merged
lex00 merged 7 commits into
mainfrom
ws-3192-run-statement
Oct 4, 2026
Merged

lex00 merged 7 commits into
mainfrom
ws-3192-run-statement

Conversation

@lex00

@lex00 lex00 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

An agent run's record is written by whatever ran the agent, so on its own it is only as trustworthy as that writer. This adds the agent-run statement that #2553 handed on: an in-toto Statement v1 in a DSSE envelope, signed by a runner or steward key, that a reader can check offline.

The statement's subjects are the commits the run made, by gitCommit with their patch-id as an annotation. Its predicate (https://intentius.io/chant/agent-run/v1) holds the signer's principal, the run id and the SHA-256 of the run record (the canonical JSON of its start and end lines), and the work item, harness, model, provider and the principal the run worked for, which is what studio-036 b asks for. The signing key is one .chant/trust.json lists at base under runners, the same keys and refusal rules as runner evidence (ws-069), so a person's key from the signers file is refused. Studio's lobby key goes there with class service (studio-033 c, studio-034 a).

New commands:

  • chant workspace runs sign <id> --key <pem> builds the statement from the ledger, signs it and appends it to _agent-runs/<id>.jsonl as a statement line after the run's end.
  • chant workspace runs statement <id> --signer <principal> prints the statement and the base64 payload for a signer that keeps its key elsewhere; runs sign <id> --envelope <file|-> checks what it returns and stores it.
  • chant workspace runs verify [<id>] [--require signed] judges every stored statement against the runner keys at base. It reports and exits 0 unless --require signed is given (studio-035 d).

runs --json now gives each run record, statements and attestation (status signed, unsigned, mismatch, untrusted or invalid, with signer, class, keyid, code and the commits covered), and the document gains trust (the base and its runner principals). workspace verify counts a commit a run made as attested with the attestor agent-run when a verified statement names it, lists the run commits in a new runs part of the report, and takes --require attested-runs, which requires a statement only for commits a run made and needs no signers file. Statements are re-verified on every read, so removing a runner key at base makes what it signed read as untrusted.

New reason codes: run-not-ended, run-statement-invalid, run-statement-signer-mismatch, run-statement-mismatch; runner evidence's envelope and runner-key codes are reused. New schema run-statement.schema.json; runs.schema.json and runs-write.schema.json gain fields within v1. Shared files touched: reason-codes.ts, docs/data/boundary.yaml (new rows and carriers) and the generated boundary page, the read-contract page, and the decisions README. Decision record ws-090.

Verified with core tsc, the new runs-statement.test.ts (signing here and elsewhere, every refusal, record mismatch, report-only and required verify, workspace verify --require attested-runs, revocation at base), the runs, reason-code, trust, boundary-roster, read-contract and CLI help tests, the docs checks, and a CLI run against a scratch workspace.

Closes #3192

…y (DSSE)

A runner or steward key that .chant/trust.json lists at base signs an
in-toto statement over an ended agent run: the run record's hash, its
work item, harness, model, provider and principal, and the commits it
made with their patch-ids. runs sign stores it as a statement line in
the run's ledger file, signing with --key or checking an envelope signed
elsewhere (--envelope, with runs statement printing the payload). runs
--json and runs verify judge every stored statement against the keys at
base; runs verify fails only with --require signed. workspace verify
counts a commit a signed run made as attested by the agent-run attestor,
and --require attested-runs requires it of every commit a run made.

Decision record ws-090.
@lex00 lex00 added area:workspace chant workspace epic (#2525) provenance Workspace provenance: who and what made a change, why, and at what cost labels Oct 4, 2026
lex00 added 6 commits October 3, 2026 18:17
# Conflicts:
#	docs/data/boundary.yaml
#	docs/design/decisions/README.md
#	docs/src/content/docs/reference/boundary.mdx
#	docs/src/content/docs/reference/workspace-read-contract.mdx
# Conflicts:
#	docs/src/content/docs/reference/workspace-read-contract.mdx
@lex00
lex00 merged commit 32998dc into main Oct 4, 2026
1 check passed
@lex00
lex00 deleted the ws-3192-run-statement branch October 4, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workspace chant workspace epic (#2525) provenance Workspace provenance: who and what made a change, why, and at what cost

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workspace: agent-run statement signed by a runner or steward key (DSSE)

1 participant