Skip to content

workspace: run, gate and release records carry the commit sha, the CI locator and the admitting gate #4020

Closed

Description

@lex00

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

  1. OpRunRecord records the commit sha the run built from and a RunOrigin when it ran in CI.
  2. Pending and resolved gate records carry the commit sha and the run id.
  3. A deploy record (ReleaseRecord in releases.jsonl) records the gate resolution that admitted it. approver exists already; add the gate id and the resolution time, and expose all three in status.schema.json.
  4. 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

Moved: the release-digest join box to #4043.

Activity

  1. added
    enhancement
    area:lifecycle
    area:workspace
    on Oct 16, 2026
  2. added
    phase:0
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lifecyclearea:workspaceenhancementphase:0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions