Skip to content

workspace: releases across several members, reconciled with the release train (#2554) #4037

Closed

Description

@lex00

Unblocked on 2026-11-15: #2554, #4028 and #4026 are closed. Tracked on #5105.

Sub-issue of INTENTIUS/behold#678. Phase 3. From the #678 audit. After #4028 and #4026.

Context

#4028 recommends that a release belongs to one member. A workspace with several members ships sets of member releases together, which is #2554's release train.

Requirements

  1. A release train is a set of member releases, each unchanged; its digest covers the member release digests.
  2. Gates can bind a train for an environment, with a change set per member.
  3. The lane shows a train as one row that expands to members.

Acceptance

Activity

  1. added
    enhancement
    area:lifecycle
    design
    area:workspace
    phase:3
    on Oct 16, 2026
  2. added
    parked
    and removed
    phase:3
    on Oct 17, 2026
  3. lex00 commented on Oct 17, 2026

    @lex00
    ContributorAuthor

    Parked. This waits on #2554 (release trains), which was deferred on 2026-09-30 pending #1939. It moves to the blocked row of INTENTIUS/behold#678 and out of that epic's exit criteria.

  4. lex00 commented on Nov 15, 2026

    @lex00
    ContributorAuthor

    Unparking. Everything this waited on is closed: #2554, #4028 and #4026. The epic it sat under, INTENTIUS/behold#678, is closed too, so it is now tracked on #5105.

    What exists since this was filed, to check before building:

    The first step is a scope comment here saying what is left after reading the code.

  5. added
    epic:estate-read
    and removed
    parked
    on Nov 15, 2026
  6. lex00 commented on Nov 15, 2026

    @lex00
    ContributorAuthor

    Scope, read against origin/main ab0b27c

    The premise holds. A train can be recorded, but it has no digest, and nothing promotes from one. The work left is requirement 1's digest and requirement 2's gate binding. Requirement 3's row belongs to behold. chant supplies the read for it.

    What already exists

    What is missing

    • A train has no digest, so neither a gate nor workspace: a release train across repositories, promoted through the control repo #5119 can name one. A workspace whose only members are not chant members records a train with no members.
    • Nothing reads a train in order to deploy it.
    • The workspace gate stand-in is wired only into the Op executor (op/local-executor.ts). The component driver, which decides release gates, never asks it. Its query and covers also carry no release digest, so a stand-in could not tell two releases with the same change set apart.
    • A promote has no way to plan its change set without deploying. A train therefore can't gather every member's change set under one approval before any member deploys.
    • Nothing records which train a promote came from, so a reader can't draw a train as one row.

    Contract (Done when)

    1. A train record carries trainDigest = computePlanDigest("release-train", { members: [{ member, releaseDigest }] sorted by member }). The same picks give the same digest. Env, actor, time, id and labels stay out of the hash. A line written before this change gets its digest computed on read. train list prints it, and an empty train is refused. Shown by a pure test, plus a test against a temp repo ledger.
    2. chant components promote --to <env> --release <r> --plan-only [--json] plans, stores and prints the release's change set for <env> (changeSet, empty, gates, releaseDigest) and deploys nothing. It writes no gate fact and no empty pass. Shown by a test of the handler branch.
    3. A release gate counts a workspace gate approval only when the cover names the same member, gate, change-set digest, environment and releaseDigest, and only when the member opts in at base. The component driver asks the stand-in when the promote runs under CHANT_WORKSPACE_GATE. An approval for another release does not pass. Shown by tests of workspaceGateStandsIn and of evaluateGate with a memory port.
    4. chant workspace train promote <env> [<train id|digest>] [--gate <name>] [--dry-run] [--json] promotes the newest train for <env>, or the one named, one member at a time in link order, producers first. Each member runs chant components promote --to <env> --release <its releaseDigest> under its own chant.
      • With --gate, every member first plans (--plan-only), and the gate records one pending fact whose covers list each member's release gates with that member's change set and release digest. The fact also names the train id and digest. Nothing deploys until the fact is approved with chant workspace run approve <name>. After the approval, the same command promotes every member. A member whose plan has moved since the approval stops at its own gate.
      • Without --gate, each member's own release gates apply, and the train stops at the first member that is gated or fails.
      • The command writes a workspace run record citing train: { id, digest }, with one step per member.
      • Shown by a test with two linked members and a fake member runner over a temp repo ledger. Before the approval nothing deploys, and the pending fact covers both members. After the approval both promote, producer first. A failed first member stops the second.
    5. chant workspace train list <env> --json gives each train its digest and the workspace runs that promoted it, with each member's step status. This is the read behold needs for a train row that expands to members.
    6. The workspace train CLI page documents the digest, train promote and --gate. It replaces the "workspace: workspace Ops, the workspace pipeline and release trains (after #1939) #2554 updated" acceptance box, since workspace: workspace Ops, the workspace pipeline and release trains (after #1939) #2554 is closed. The components promote page documents --plan-only.

    Left to #5119 and others

    • workspace: a release train across repositories, promoted through the control repo #5119 adds repo members, read through each repository's read contract at its pinned rev. It also adds the control repo's promote, which dispatches into each repository and waits for <product>-applied, and the --release deploy record on a member pipeline. That issue reuses trainDigest from item 1 and the cover shape from item 3. A promote across repositories keeps each member's own gate, so the workspace gate in item 4 stays within one repository.
    • The lane row itself (requirement 3) goes to a behold issue that reads item 5.
    • Rolling back a train, and a generated CI job for train promote, are not built here.
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:workspacedesignenhancementepic:estate-read

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions