Skip to content

workspace: the run-event contract for Op, component and pipeline runs (#4019) - #4052

Merged
lex00 merged 2 commits into
mainfrom
feat/4019-run-event-contract
Oct 17, 2026
Merged

lex00 merged 2 commits into
mainfrom
feat/4019-run-event-contract

Conversation

@lex00

@lex00 lex00 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Closes #4019

Adds the run-event contract: one stream of events for Op runs, component runs and pipeline runs.

  • packages/core/src/workspace/run-event.schema.json (new), contract 1, floor chant 0.124.28, exported as @intentius/chant/workspace/run-event.schema.json. Events: run-start, run-settle (its status is the verdict), wave-*, component-*, phase-* and step-* start and settle, gate-waiting, gate-resolved.
  • Every event carries $schema, contract, chant, seq, at, runId, kind (op, component, pipeline), name, gitSha (null outside a checkout), runtime (local, steward, ci) and runOrigin, which reuses the deploy record's RunOrigin shape that workspace: run, gate and release records carry the commit sha, the CI locator and the admitting gate #4020 adopts.
  • Step settle status is a closed set: ok, failed, skipped (with skip: receipt, resumed, refused, not-run or null), cached (research: chant and pipeline engines like Dagger (hermetic Op steps, running generated CI locally, warden policy as a lexicon) #4015), gated, waiting.
  • packages/core/src/run-event.ts (new): the types, the one writer (createRunEventWriter, writeRunEvent, buildRunEvent, serializeRunEvent), and runEventOfProgress / runEventsOfStepRecord, which map the two older streams onto the contract. Exported from @intentius/chant. It lives outside workspace/ because a root re-export of a workspace module broke 17 level-0 goldens.
  • RunProgressEvent is marked deprecated; StepRecord is deprecated as a --progress-json line only, since it is still the record an Op run returns.
  • Docs: a "Run events" section and versions-table entry in the read contract, and a pointer from cli/run.mdx.

No emitter changes (that is #4041), so nothing chant prints today changes.

Acceptance

Checks

  • npx tsx scripts/typecheck.ts: no regressions (26 baselined)
  • npx tsx scripts/check-lexicons.ts: no untracked tier-1 failures
  • run-event.test.ts (16 tests, schema validation of writer output and both mappers), run-progress, local-executor: 123 passed
  • test/level0-goldens/: 57 passed
  • Full vitest: everything else passes; op/factory.e2e.test.ts fails 3 tests on a clean origin/main locally too, and lineage-adopt.test.ts timed out once under load and passes alone.
  • lint-docs-sentences (count dropped by one; baseline ratcheted down), lint-prompts, check-docs-diataxis, ./scripts/build-docs.sh: pass

Findings for #4041 (ambiguous old skipped steps, start/settle pairing) are posted there.

lex00 added 2 commits October 16, 2026 18:35
…e runs (#4019)

run-event.schema.json (contract 1, floor chant 0.124.28) covers run, wave,
component, phase and step start and settle, gate-waiting and gate-resolved,
with run-settle as the verdict. Every event carries runId, kind, name,
gitSha, runtime (local, steward, ci) and runOrigin, the RunOrigin shape a
release record carries. Step settle statuses are ok, failed, skipped (with
skip: receipt, resumed, refused, not-run or null), cached, gated and waiting.

@intentius/chant exports the types and the one writer
(createRunEventWriter, writeRunEvent, buildRunEvent, serializeRunEvent),
plus runEventOfProgress and runEventsOfStepRecord, which map the older
RunProgressEvent and StepRecord lines onto the contract. Those two shapes
are deprecated for new readers; the emitted JSON is unchanged until #4041
moves the emitters. The read-contract page lists the schema.
@lex00
lex00 force-pushed the feat/4019-run-event-contract branch from 1b8e40a to a0ca515 Compare October 17, 2026 00:35
@lex00
lex00 merged commit 1ba403f into main Oct 17, 2026
11 checks passed
@lex00
lex00 deleted the feat/4019-run-event-contract branch October 17, 2026 00:44
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.

workspace: one run-event contract for Op, component and pipeline runs, with commit and runtime on every event

1 participant