Skip to content

RAL-180: the digest tells a locally gated project's merges from its gate, observed - #267

Merged
Castor-o7 merged 2 commits into
mainfrom
ral-180-digest-gates
Nov 14, 2026
Merged

Castor-o7 merged 2 commits into
mainfrom
ral-180-digest-gates

Conversation

@Castor-o7

Copy link
Copy Markdown
Owner

RAL-180, on the watchman's terms of 2026-11-14.

The cause: the digest's RAL-102 section takes each merge's repository from the story's current evidence. dsm-record-merges records every DiscoSim car, often while the story is claimed (in parts, claimed again, or merged before its closing submit). Claimed rows carry no evidence, so the line read "no repository in the evidence", five times a train. The live service (475bd94) also predates RAL-161's part_evidence fallback.

(a) Repository fallback: a merge whose story has no evidence takes its repository from its prefix's project in the projects list. The line says "(its repository from the projects list [declared])".

(b) rally digest --gate <PREFIX>=<logs dir>,<checkout>[,running=<window>] (repeatable): that project's merges are read from the gate's <tip>.log and <tip>.ok files and the checkout's git, never from GitHub. One line per tip names the stories it holds. Every line is [observed] and says what was read. Paths are given as written (~/…).

  • green: the earliest tip that holds the merge, has its .ok, has a log naming the tip with no failure, and is on origin/main. Condition 1: a red or running tip beside it can't turn a landed, gated merge red.
  • green at T, but T isn't on origin/main: condition 2, said as its own line. Urgent.
  • RED at T: no green tip holds the merge, and the newest tip that does failed, or has had no .ok past the running limit. Urgent.
  • gate running: within the limit (2h by default, set in the flag). Checked again each pass.
  • no gate log: none of the newest 200 logs holds the merge. Urgent.
  • can't be told yet: the merge isn't fetched in the checkout. Told once and retried, given up after 2h.

--gate is kept in the pid file's settings, so rally digest --restart --gate … adds it to the running loop. It needs no projects.json change and no service restart, because the digest loop is the CLI.

Tests:

  • gate_check, on throwaway repos with fake gate directories:
    • the flag;
    • green on main;
    • a red train rebuilt green plus a stacked train gating on top, which stays green;
    • green but not on main;
    • no log, red, running, then past the limit;
    • not fetched.
  • digest: one line per tip, and each verdict's exact words, urgency and what's kept; the repo fallback.
  • digest_loop: --gate in the args, and old pid files still read.

Dry run on Murph's real files: 8 recent DSM merges (DSM-211, 218, 226 and 229) read through the library against ~/.local/state/dsm-gates and ~/Documents/GitHub/Discoteque. All 8 came back green at a tip on origin/main, about 0.43 s each.

fmt, clippy -D warnings, and cargo test --locked --no-fail-fast all pass locally. Queued behind #266.

🤖 Generated with Claude Code

…ate, observed

Every DiscoSim landing showed in the digest's RAL-102 section as "the base's CI couldn't be checked:
no repository in the evidence", five lines a train. The cause: a merge takes its repository from the
story's current evidence, and a story claimed when its merge is recorded (in parts, claimed again,
merged before its closing submit, as dsm-record-merges records each car) has none.

- A merge whose story has no evidence takes its repository from its prefix's project in the
  projects list, and its line says so [declared].
- `rally digest --gate <PREFIX>=<logs>,<checkout>[,running=<window>]` tells each of that project's
  merges from the gate's <tip>.log and <tip>.ok and the checkout's git, never GitHub, one line a
  tip, each saying what was read [observed]: green at the earliest green tip holding it that is on
  origin/main (a red or running tip beside it can't turn it red); green but not on main; red;
  running (2h by default); no gate log; or can't be told yet (not fetched). Paths as given. Kept in
  the pid file's settings, so `--restart --gate …` adds it to the running loop.

No projects.json change and no service restart: the digest loop is the CLI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Castor-o7
Castor-o7 merged commit 30b67a4 into main Nov 14, 2026
5 checks passed
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.

1 participant