Repository navigation
workspace: the run-event contract for Op, component and pipeline runs (#4019) - #4052
Merged
Merged
Conversation
…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
force-pushed
the
feat/4019-run-event-contract
branch
from
October 17, 2026 00:35
1b8e40a to
a0ca515
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(itsstatusis the verdict),wave-*,component-*,phase-*andstep-*start and settle,gate-waiting,gate-resolved.$schema,contract,chant,seq,at,runId,kind(op,component,pipeline),name,gitSha(null outside a checkout),runtime(local,steward,ci) andrunOrigin, which reuses the deploy record'sRunOriginshape that workspace: run, gate and release records carry the commit sha, the CI locator and the admitting gate #4020 adopts.ok,failed,skipped(withskip:receipt,resumed,refused,not-runor 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), andrunEventOfProgress/runEventsOfStepRecord, which map the two older streams onto the contract. Exported from@intentius/chant. It lives outsideworkspace/because a root re-export of a workspace module broke 17 level-0 goldens.RunProgressEventis marked deprecated;StepRecordis deprecated as a--progress-jsonline only, since it is still the record an Op run returns.cli/run.mdx.No emitter changes (that is #4041), so nothing chant prints today changes.
Acceptance
reference/workspace-read-contract.mdx.StepRecordandRunProgressEventare expressed in terms of it or deprecated.Checks
npx tsx scripts/typecheck.ts: no regressions (26 baselined)npx tsx scripts/check-lexicons.ts: no untracked tier-1 failuresrun-event.test.ts(16 tests, schema validation of writer output and both mappers),run-progress,local-executor: 123 passedtest/level0-goldens/: 57 passedop/factory.e2e.test.tsfails 3 tests on a clean origin/main locally too, andlineage-adopt.test.tstimed 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: passFindings for #4041 (ambiguous old skipped steps, start/settle pairing) are posted there.