Repository navigation
Description
Sub-issue of INTENTIUS/behold#678. Works on any forge today.
Split: this issue keeps the commit sha and CI locator on run and gate records, and the admitting gate on deploy records. The join through the release digest moved to #4043.
Context
A gate can't be joined to the commit it is waiting on. PendingGateRecord carries runId and planDigest but no sha (packages/core/src/lifecycle/gate-ledger.ts:285-345). OpRunRecord (op/runtime.ts:116) carries no sha and no CI locator. Deploy records (ReleaseRecord in releases.jsonl) appear under releases in workspace status --json with gitSha, runId and actor (workspace/status.schema.json:910-925). They already carry approver (#1035) and runOrigin (#2045), but not the gate id or the time it resolved. #3990 lists the CI locator as a gap.
Two run-locator shapes exist. ReleaseRecord.runOrigin is a RunOrigin (lifecycle/release-ledger.ts:44-56: forge of github, gitlab, op or local, plus repo and url). Pending gate facts carry a GateRunLocator (op/gate-run-locator.ts:12: forge kind, API base, repo, run, attempt and job details), which exists so a gated CI job can be started again.
Requirements
OpRunRecordrecords the commit sha the run built from and aRunOriginwhen it ran in CI.- Pending and resolved gate records carry the commit sha and the run id.
- A deploy record (
ReleaseRecordinreleases.jsonl) records the gate resolution that admitted it.approverexists already; add the gate id and the resolution time, and expose all three instatus.schema.json. - Older records without these fields still read; the read contract marks the fields optional with a floor version.
Moved: the join through the release digest (the old Releases section) to #4043.
Expected outcome
From any one of a commit, a run, a gate or a deploy record, the other three are one lookup away.
Audit fixes
The run's CI locator is RunOrigin, the shape deploy records already carry, so a run and its deploy record name the run the same way. GateRunLocator stays on pending gate facts for resuming a job, and maps onto RunOrigin like this: forge github and forgejo become github (the url names the host, as RunOrigin already documents), gitlab stays gitlab, repo and url carry over, and run is the runId. The API base, attempt and job fields stay on the locator only.
Acceptance
- Run, gate and deploy records carry the new fields, written by every runtime.
- The read-contract schemas and docs list them with the version they appear in.
- A test joins commit, run, gate and deploy record for a gated deploy.
- A test that a
GateRunLocatorand theRunOriginwritten for the same CI job name the same run. - epic: workspace read contracts for behold's default view (runs, waves, events, drift, change sets, metrics, alerts) #3990's CI-locator item is ticked or cross-referenced.
- The acceptance names each runtime that writes the fields: local, components, fountain, pr-plan and pr-apply.
Moved: the release-digest join box to #4043.
Activity
test: stub the CI commit in the wave-loop goldens (#4020)
migration: older release, gate, run and plan records read under the r…