Skip to content

ci: chant ci list --json for trunk commits and their state (#4021) - #4051

Merged
lex00 merged 1 commit into
mainfrom
feat/4021-ci-list
Oct 17, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/4021-ci-list

Conversation

@lex00

@lex00 lex00 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Closes #4021

Adds chant ci list [--json] [--limit <n>] [--since <rev>] [--forge github]. It lists the first-parent commits of ci.green's branch inside the declared window, newest first. Each commit has a state (green, revoked or undecided) and the result of every required phase.

  • Offline by default. Phase results come from the tag annotations: a green tag records each phase's runs (pass), and a revoked tag marks its phase fail with the failed run. An undecided commit's phases are unrecorded.
  • --forge github reads check runs for undecided commits only, through the same CiForge seam and evaluateCommit that ci tick uses, so those phases become pass, fail or pending.
  • --since <rev> replaces the window and excludes rev, so a reader holding the last sha it saw can ask for what is new. An unknown rev fails with revision-unknown.
  • New read-contract schema ci-list.schema.json, contract v1, floor chant 0.124.28, listed in the read contract's versions and output-schema tables. The boundary roster and the network-egress page gain the new carrier.

GitLab and Forgejo get no status reader. cli/ci.mdx records the decision: they're covered through chant's own run results (#4044), because each forge's job or status model would need its own retry and skip mapping, while a run result is the same everywhere.

Acceptance

  • chant ci list --json with a published schema and tests
  • A recorded decision on GitLab and Forgejo readers (in cli/ci.mdx)

Checks

  • npx tsx scripts/typecheck.ts: no regressions (26 baselined)
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures
  • ci-green.test.ts, read-contract.e2e.test.ts, test/boundary-roster.test.ts: 69 passed
  • Full vitest: 27007 passed. op/factory.e2e.test.ts fails three tests locally on a clean origin/main too (an environment issue, it passes in CI); work-lease.test.ts and lineage-adopt.test.ts failed once and passed on rerun.
  • lint-docs-sentences (no regressions), lint-prompts, check-docs-diataxis, ./scripts/build-docs.sh: pass
  • Ran chant ci list --limit 3 and --json against chant's own main: green and undecided commits read correctly from local tags.

No level-0 output changes: ci last-green output is unchanged.

Follow-up noted for the trunk lane: a commit that failed but was never green stays undecided offline, since no tag records a failure; seeing it as failed needs --forge.

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.

ci: chant ci list --json for trunk commits and their state, and chant runs as a status source for ci tick

1 participant