@muggleai/works 5.25.0-staging.190 → 5.25.0-staging.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  "name": "muggleai",
10
10
  "source": "./plugin",
11
11
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
12
- "version": "5.25.0-staging.190"
12
+ "version": "5.25.0-staging.192"
13
13
  }
14
14
  ]
15
15
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.25.0-staging.190",
4
+ "version": "5.25.0-staging.192",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.190",
7
+ "@muggleai/works@5.25.0-staging.192",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.25.0-staging.190",
3
+ "version": "5.25.0-staging.192",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.25.0-staging.190",
5
+ "version": "5.25.0-staging.192",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.190",
7
+ "@muggleai/works@5.25.0-staging.192",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -35,10 +35,10 @@ Pre-filters are bash builtins only (`guardrail-lib.sh`), so an irrelevant event
35
35
  | Hook event | Wrapper | Strength | Condition | Preference | Effect |
36
36
  | :--------- | :------ | :------- | :-------- | :--------- | :----- |
37
37
  | `PostToolUse` (Bash) | `guardrail-pr-opened.sh` | advise | a `gh pr create`/`gh pr ready` just succeeded | `autoWatchPR` | start a `muggle-pr-followup` watcher on the new PR |
38
- | `PostToolUse` (Bash + muggle execute/replay/skill-emit MCP tools) | `guardrail-record-tests.sh` | record | a unit-test command passed, an E2E run happened (execute/replay call, or the muggle-test skill's own telemetry emit — which registers a clean SKIP verdict too), or an `echo "MUGGLE_E2E_SKIP: <reason>"` marker declared E2E un-runnable, or a walkthrough carrying the `build-pr-section` sentinel was posted / declared un-postable via `echo "MUGGLE_WALKTHROUGH_SKIP: <reason>"` | — | set `unitTestsGreen` / `e2eRun` / `e2eSkipped` / `walkthroughPosted` / `walkthroughSkipped` session state |
38
+ | `PostToolUse` (Bash + muggle execute/replay MCP tools) | `guardrail-record-tests.sh` | record | a unit-test command passed, an E2E run happened (execute/replay call), or an `echo "MUGGLE_E2E_SKIP: <reason>"` marker declared E2E un-runnable, or a walkthrough carrying the `build-pr-section` sentinel was posted / declared un-postable via `echo "MUGGLE_WALKTHROUGH_SKIP: <reason>"` | — | set `unitTestsGreen` / `e2eRun` / `e2eSkipped` / `walkthroughPosted` / `walkthroughSkipped` session state |
39
39
  | `PostToolUse` (Bash) | `guardrail-pr-terminal.sh` | advise | a PR just went terminal — a `gh pr merge`/`gh pr close` success line or the `TERMINAL pr=N` line the watch scripts print in a shell result (never bare `"state":"MERGED"` metadata). Not registered on `Monitor`: a Monitor call returns before its script prints anything, so its result never carries that line | — | record `terminalPending`, direct the post-merge handoff: finalize the watcher slot, tear down per `autoCleanup`, offer next options via AskUserQuestion |
40
40
  | `PostToolUse` (AskUserQuestion) | `guardrail-offer-ran.sh` | record | a next-options offer ran while a terminal PR was pending | — | clear `terminalPending` — the only exit for the post-merge Stop gate |
41
- | `PostToolUse` (Skill + muggle telemetry-skill-emit) | `guardrail-skill-stages.sh` | advise | a skill this plugin ships was invoked; its `SKILL.md` frontmatter may declare `mandatoryStages`. Registered on the skill's own MCP announcement too, so the declaration still lands if the Skill payload ever stops carrying a name | — | record `lastInvokedSkillName` + `mandatoryStages`, and name the declared files as required reading at the moment of use |
41
+ | `PostToolUse` (Skill + muggle telemetry-skill-emit) | `guardrail-skill-stages.sh` | advise | a skill this plugin ships was invoked; its `SKILL.md` frontmatter may declare `mandatoryStages`. Registered on the skill's own MCP announcement too, so the declaration still lands if the Skill payload ever stops carrying a name. A muggle-test announcement is also an E2E run (the clean SKIP verdict), recorded here alone: the state store drops a write that cannot take the session's lock in time, so a second writer for one emit could lose either record | — | record `lastInvokedSkillName` + `mandatoryStages` (and `e2eRun` for a muggle-test announcement), and name the declared files as required reading at the moment of use |
42
42
  | `PostToolUse` (Read) | `guardrail-record-stage-read.sh` | record | a markdown file under a `skills/` directory was opened | — | append to `stagesRead` — how the stage gate tells a stage that was read from one that was skipped |
43
43
  | `PostToolUse` (Bash + muggle telemetry-event-emit / user-feedback-create) | `guardrail-record-stage-signals.sh` | record | a Step 6f `pre-execution-classification` emit, debug-path evidence for a failed run (a `*-failure-classified\|resolved` emit or feedback naming it), or a `MUGGLE_STAGE_SKIP` / `MUGGLE_CLASSIFY_SKIP` / `MUGGLE_DEBUG_SKIP` marker | — | set `classifiedTestCaseIds` / `debuggedRuns` / the matching skip flag |
44
44
  | `PostToolUse` (Bash) | `guardrail-record-comment-replies.sh` | record | an unresolved-thread fetch named review threads still awaiting an answer (classified by the `<!-- muggle-do:bot -->` marker, never the author login), a threaded reply the provider **confirmed** answered comments in one, or a `MUGGLE_REPLY_SKIP` marker deferred them | — | claim each thread and cover the comments answered, in the per-PR ledger beside the muggle-do slot |
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  {
65
- "matcher": "mcp__.*muggle.*(execute|replay|telemetry_skill_emit)",
65
+ "matcher": "mcp__.*muggle.*(execute|replay)",
66
66
  "hooks": [
67
67
  {
68
68
  "type": "command",
@@ -78,7 +78,7 @@
78
78
  ]
79
79
  },
80
80
  {
81
- "matcher": "mcp__.*muggle.*(execute|replay|telemetry-skill-emit)",
81
+ "matcher": "mcp__.*muggle.*(execute|replay)",
82
82
  "hooks": [
83
83
  {
84
84
  "type": "command",
@@ -9,10 +9,9 @@ set -uo pipefail
9
9
  # Fires after every Bash call and every muggle execute/replay, so a keyword
10
10
  # pre-filter for test runners and the muggle E2E tool names keeps Node off the
11
11
  # hot path. Only a `test` command (npm/pnpm/yarn/jest/vitest/pytest/go/cargo),
12
- # a muggle execute/replay/test-generation event, a muggle-test skill telemetry
13
- # emit (registers a clean-SKIP verdict as an E2E run), a skip marker, or a PR
14
- # publish carrying a rendered walkthrough reaches guardrails.mjs, which then
15
- # inspects the output for pass/fail and updates state. Degrades to {}.
12
+ # a muggle execute/replay/test-generation event, a skip marker, or a PR publish
13
+ # carrying a rendered walkthrough reaches guardrails.mjs, which then inspects
14
+ # the output for pass/fail and updates state. Degrades to {}.
16
15
  #
17
16
  # Each arm reads only the field guardrails.mjs judges it by — the command, or the
18
17
  # tool's name. Against the whole payload, a jest config in a command's output or
@@ -33,7 +32,7 @@ GUARDRAIL_SUBCOMMAND="record-tests"
33
32
 
34
33
  guardrail_wants() {
35
34
  guardrail_fields_match command '(pnpm|npm|yarn)[[:space:]]+(run[[:space:]]+)?test|jest|vitest|pytest|go[[:space:]]+test|cargo[[:space:]]+test|MUGGLE_[A-Z0-9_]+_SKIP|gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]' \
36
- || guardrail_fields_match tool_name 'muggle.*(execute|test[-_]generation|replay)|muggle[-_]local[-_]telemetry[-_]skill[-_]emit'
35
+ || guardrail_fields_match tool_name 'muggle.*(execute|test[-_]generation|replay)'
37
36
  }
38
37
 
39
38
  if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
@@ -5,6 +5,8 @@ set -uo pipefail
5
5
  # and, when its SKILL.md declares `mandatoryStages`, returns those files as
6
6
  # required reading at the moment of use. The Stop gate
7
7
  # (guardrail-stage-gate.sh) blocks the turn end while any of them is unread.
8
+ # For a muggle-test skill telemetry emit it also records the E2E run, so the
9
+ # emit has one writer and no lost write to race for.
8
10
  #
9
11
  # Skill calls are rare, so the pre-filter is a file test rather than a keyword
10
12
  # scan: the invoked name is pulled out of the payload and Node runs only when it
@@ -1955,6 +1955,11 @@ function terminalGate() {
1955
1955
  const reason = decision.blockCount === 1 ? `Do not end the turn yet. PR ${pendingPrList} went terminal (merged/closed) but the post-merge handoff has not run. Finalize the watcher slot, tear down per autoCleanup, then offer next options to the user ${nextOptionsOfferMethod()} \u2014 release, queued work, deferred items. Only that offer clears this gate.` : `Post-merge handoff still owed for PR ${pendingPrList} (reminder ${decision.blockCount}/${MAX_PR_TERMINAL_BLOCKS}): finalize + tear down, then offer the next options ${nextOptionsOfferMethod()}.`;
1956
1956
  return blockStop(reason, host);
1957
1957
  }
1958
+ function startWalkthroughScanOnGateArming(stateBefore, committed) {
1959
+ if (isWalkthroughGateArmed(committed) && !isWalkthroughGateArmed(stateBefore)) {
1960
+ startBackgroundJob("scan-walkthroughs" /* ScanWalkthroughs */, [sessionId], input.cwd);
1961
+ }
1962
+ }
1958
1963
  function recordTests() {
1959
1964
  const cmd = input.tool_input?.command ?? "";
1960
1965
  const stateBefore = readState(sessionId);
@@ -1977,9 +1982,7 @@ function recordTests() {
1977
1982
  return failedRunId ? applyFailedRun(withWalkthroughSkip, failedRunId) : withWalkthroughSkip;
1978
1983
  };
1979
1984
  const next = commitState(sessionId, record) ?? record(readState(sessionId));
1980
- if (isWalkthroughGateArmed(next) && !isWalkthroughGateArmed(stateBefore)) {
1981
- startBackgroundJob("scan-walkthroughs" /* ScanWalkthroughs */, [sessionId], input.cwd);
1982
- }
1985
+ startWalkthroughScanOnGateArming(stateBefore, next);
1983
1986
  if (acceptedSkip) recordSkipReasonOnPrs(next, acceptedSkip);
1984
1987
  if (judgedSkip && !judgedSkip.accepted) {
1985
1988
  return envelope("PostToolUse", explainRejection(judgedSkip), host);
@@ -1999,8 +2002,16 @@ function skillStages() {
1999
2002
  const skillName = resolveSkillNameFromToolInput(input.tool_input);
2000
2003
  if (!skillName) return "{}";
2001
2004
  const stagePaths = resolveSkillStagePaths(skillName, resolvePluginSkillsRoot());
2002
- const invoke = (state) => applySkillInvocation(state, skillName, stagePaths);
2005
+ const emittedRun = {
2006
+ unitTestPassed: false,
2007
+ e2eRan: isE2ERun(input),
2008
+ e2eSkipped: false,
2009
+ e2eSkipCycleScoped: false
2010
+ };
2011
+ const stateBefore = readState(sessionId);
2012
+ const invoke = (state) => applyRecordedRun(applySkillInvocation(state, skillName, stagePaths), emittedRun);
2003
2013
  const next = commitState(sessionId, invoke) ?? invoke(readState(sessionId));
2014
+ startWalkthroughScanOnGateArming(stateBefore, next);
2004
2015
  const unread = unreadMandatoryStages(next);
2005
2016
  if (unread.length === 0) return "{}";
2006
2017
  const ctx = `The ${skillName} skill declares required reading: ${unread.map(stageLabel).join(", ")}. Read those files now, before working through the skill's steps \u2014 they carry mandatory steps SKILL.md only links to, and treating them as optional elaboration is how those steps get silently dropped. A Stop gate holds the turn open until they are opened.`;
@@ -8,7 +8,7 @@ Invoked by `/muggle-do` when the watcher forwards a PR's terminal state. On `mer
8
8
 
9
9
  ## Terminal record
10
10
 
11
- The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes the slot, so step 4 captures them first:
11
+ The facts [`next-step.md`](next-step.md) reports a finished PR from. Teardown deletes the slot, so step 4 captures them first; step 6 adds the teardown outcome:
12
12
 
13
13
  - `pr` — `<owner>/<repo>#<n>` and URL, from `prs.json`.
14
14
  - `state` — `merged` or `closed`, from `prs.json`.
@@ -16,6 +16,12 @@ The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes
16
16
  - `e2eFailing` — the title carries `[E2E FAILING]`: the PR shipped on a waived E2E verdict.
17
17
  - `escalatedReviewIds` — `result.md`'s `Escalated review ids`; empty on `none` or when `result.md` is absent.
18
18
  - `waivers` — `state.md`'s waiver and Blocker lines, verbatim.
19
+ - `teardown` — the note next-step prints, from this turn's teardown report: `cleaned up` when no row is `❌`, the first `❌` row's reason otherwise, `branch kept` when teardown did not run.
20
+ - `finishedAt` — ISO-8601, when step 6 ran.
21
+
22
+ ## Chat ledger
23
+
24
+ `~/.muggle-ai/muggle-do/chats/<session-id>.json` — a JSON array of the terminal record of every PR this chat finished. It sits outside the sessions directory, so teardown never deletes it, and [`next-step.md`](next-step.md) reads it to report PRs whose slots are gone. `<session-id>` is `$CLAUDE_CODE_SESSION_ID`; unset, the chat cannot name its ledger and none is written. Rewrite the whole file per [`session-state-writes.md`](../_shared/session-state-writes.md); a record whose `pr` is already listed replaces that entry.
19
25
 
20
26
  ## Procedure
21
27
 
@@ -24,7 +30,8 @@ The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes
24
30
  3. **Retire the cases the change replaced or removed (`merged` only).** Read the newest `e2eScope` recorded in the slot's `iterations/` ([`impact-analysis.md`](impact-analysis.md#output-state--e2escope)) — later cycles rescope, so the newest one describes what merged. Soft-delete each `retiredTestCases` entry with `muggle-remote-test-case-delete`, then each `retiredUseCases` entry with `muggle-remote-use-case-delete`, all in one message per kind. Before deleting a use case, confirm with `muggle-remote-test-case-list-by-use-case` that every test case under it is in the retired list: the delete cascades, so a test case added since scoping keeps the use case and its id is reported instead. An id already gone counts as deleted. On `closed` nothing is deleted — the change never landed, so the default branch still exercises those cases.
25
31
  4. **Capture the [terminal record](#terminal-record)** from the slot and the provider. This is the last read of `<slug>`'s slot: teardown may delete it next.
26
32
  5. **Teardown (`merged` only).** When the PR is `merged`, run [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) with `{worktreePath}` and `{branch}`. That file owns the teardown sequence **and its safety rules** — including skipping worktree-remove and local branch deletion when no worktree was used. This stage adds no teardown logic of its own. On `closed`, skip teardown — the branch and any worktree stay intact.
27
- 6. **Log while the slot exists.** When teardown's report marks `Session slot cleared` ✅, write nothing: the slot and its `followup.log` are gone, an append there fails or recreates the directory as a stray slot, and the retirement and teardown reports printed this turn are the record. Otherwise append a cleanup line to the session's `followup.log`, recording the case ids retired and whether teardown ran.
28
- 7. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action.
33
+ 6. **Record the PR in the [chat ledger](#chat-ledger).** Complete the terminal record with `teardown` and `finishedAt`, then write it to the ledger. The ledger is outside the slot, so this holds whether or not teardown cleared it.
34
+ 7. **Log while the slot exists.** When teardown's report marks `Session slot cleared` ✅, write nothing: the slot and its `followup.log` are gone, an append there fails or recreates the directory as a stray slot, and the retirement and teardown reports printed this turn are the record. Otherwise append a cleanup line to the session's `followup.log`, recording the case ids retired and whether teardown ran.
35
+ 8. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action.
29
36
 
30
- **Teardown never returns a question, and neither does retirement.** Each finishes with its report — every item done, skipped, or blocked-with-a-reason — so steps 6 and 7 always run. A teardown that appears to be waiting on the user has stalled mid-sequence; the stage is not complete until the report and the next-step suggestion are both printed.
37
+ **Teardown never returns a question, and neither does retirement.** Each finishes with its report — every item done, skipped, or blocked-with-a-reason — so steps 6, 7 and 8 always run. A teardown that appears to be waiting on the user has stalled mid-sequence; the stage is not complete until the report and the next-step suggestion are both printed.
@@ -6,11 +6,11 @@ Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advance
6
6
 
7
7
  - `slug` — the session.
8
8
  - `teardownRan` — whether [`cleanup.md`](cleanup.md) already ran teardown (true on `merged` + `autoCleanup: always`; false on `closed` or a skipped gate).
9
- - `terminalRecord` — `<slug>`'s [terminal record](cleanup.md#terminal-record), captured before teardown could delete its slot.
9
+ - `terminalRecord` — `<slug>`'s [terminal record](cleanup.md#terminal-record), captured before teardown could delete its slot and completed with its `teardown` note.
10
10
 
11
11
  ## This chat's work
12
12
 
13
- "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>` plus every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
13
+ "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>`, every PR in its [chat ledger](cleanup.md#chat-ledger) — PRs it finished, whose slots teardown may have deleted — and every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
14
14
 
15
15
  The sessions directory holds every chat's slots, so a selector drawn from the whole directory offers work this chat never touched. Report and follow-ups cover this chat only; other chats sit behind one explicit option.
16
16
 
@@ -25,7 +25,7 @@ Both appends target `<slug>`'s `followup.log` and are skipped once teardown's re
25
25
 
26
26
  ## Status block
27
27
 
28
- One line per slot of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
28
+ One line per PR of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
29
29
 
30
30
  ```
31
31
  This chat's work:
@@ -36,13 +36,14 @@ This chat's work:
36
36
  Left over: #145 shipped [E2E FAILING]; review 2210 on #142 escalated
37
37
  ```
38
38
 
39
- - **`<slug>`** is built from `terminalRecord`, never from the slot on disk — teardown may have deleted it. The teardown note comes from teardown's report printed this turn: `cleaned up` when no row is `❌`, the first `❌` row's reason otherwise, `branch kept` when `teardownRan` is false.
40
- - **Other terminal slots** (`merged`, `closed`) read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
39
+ - **`<slug>`** is built from `terminalRecord`, never from the slot on disk — teardown may have deleted it. Its teardown note is the record's `teardown`.
40
+ - **Finished PRs** — the ledger's other records, each line built from its record and its `teardown` note. A PR in the ledger is listed once, from the ledger, even while its slot is still on disk.
41
+ - **Other terminal slots** (`merged`, `closed`) not in the ledger read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
41
42
  - **Open slots** refresh live. Resolve the provider per [`detect-vcs.md`](../_shared/vcs/detect-vcs.md) and use its PR-metadata and unresolved-thread recipes ([`github.md`](../_shared/vcs/github.md), [`gitlab.md`](../_shared/vcs/gitlab.md)); CI per [`ci-rollup.md`](../_shared/vcs/common/ci-rollup.md). The watcher reads `live` when [`watch-heartbeat`](../muggle-pr-followup/state-schemas.md#watch-heartbeat) is fresh, `stopped` otherwise.
42
43
  - **Blocked** replaces `open` when `last_seen.json` carries `blocked`; the line names the pending act per [`blocked-reminder.md`](../muggle-pr-followup/output-templates/blocked-reminder.md).
43
- - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md` — for `<slug>`, the record's `waivers`, `e2eFailing` and `escalatedReviewIds`. `nothing` when empty.
44
+ - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md` — for `<slug>` and every ledger record, the record's `waivers`, `e2eFailing` and `escalatedReviewIds`. `nothing` when empty.
44
45
 
45
- No other chat's slot appears in the block.
46
+ No other chat's slot or ledger appears in the block.
46
47
 
47
48
  ## Selector
48
49
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "release": "5.18.0",
3
- "buildId": "run-190-1",
4
- "commitSha": "9bdfcbcec3b9d50374eb7a0129c568f48002e97a",
5
- "buildTime": "2026-10-24T07:33:10Z",
3
+ "buildId": "run-192-1",
4
+ "commitSha": "d5a825598bf9a2595279ea5795c620f4b6196cb5",
5
+ "buildTime": "2026-10-24T20:09:35Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@muggleai/works",
3
3
  "mcpName": "io.github.multiplex-ai/muggle",
4
- "version": "5.25.0-staging.190",
4
+ "version": "5.25.0-staging.192",
5
5
  "description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.25.0-staging.190",
4
+ "version": "5.25.0-staging.192",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.190",
7
+ "@muggleai/works@5.25.0-staging.192",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.25.0-staging.190",
3
+ "version": "5.25.0-staging.192",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.25.0-staging.190",
5
+ "version": "5.25.0-staging.192",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.190",
7
+ "@muggleai/works@5.25.0-staging.192",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -35,10 +35,10 @@ Pre-filters are bash builtins only (`guardrail-lib.sh`), so an irrelevant event
35
35
  | Hook event | Wrapper | Strength | Condition | Preference | Effect |
36
36
  | :--------- | :------ | :------- | :-------- | :--------- | :----- |
37
37
  | `PostToolUse` (Bash) | `guardrail-pr-opened.sh` | advise | a `gh pr create`/`gh pr ready` just succeeded | `autoWatchPR` | start a `muggle-pr-followup` watcher on the new PR |
38
- | `PostToolUse` (Bash + muggle execute/replay/skill-emit MCP tools) | `guardrail-record-tests.sh` | record | a unit-test command passed, an E2E run happened (execute/replay call, or the muggle-test skill's own telemetry emit — which registers a clean SKIP verdict too), or an `echo "MUGGLE_E2E_SKIP: <reason>"` marker declared E2E un-runnable, or a walkthrough carrying the `build-pr-section` sentinel was posted / declared un-postable via `echo "MUGGLE_WALKTHROUGH_SKIP: <reason>"` | — | set `unitTestsGreen` / `e2eRun` / `e2eSkipped` / `walkthroughPosted` / `walkthroughSkipped` session state |
38
+ | `PostToolUse` (Bash + muggle execute/replay MCP tools) | `guardrail-record-tests.sh` | record | a unit-test command passed, an E2E run happened (execute/replay call), or an `echo "MUGGLE_E2E_SKIP: <reason>"` marker declared E2E un-runnable, or a walkthrough carrying the `build-pr-section` sentinel was posted / declared un-postable via `echo "MUGGLE_WALKTHROUGH_SKIP: <reason>"` | — | set `unitTestsGreen` / `e2eRun` / `e2eSkipped` / `walkthroughPosted` / `walkthroughSkipped` session state |
39
39
  | `PostToolUse` (Bash) | `guardrail-pr-terminal.sh` | advise | a PR just went terminal — a `gh pr merge`/`gh pr close` success line or the `TERMINAL pr=N` line the watch scripts print in a shell result (never bare `"state":"MERGED"` metadata). Not registered on `Monitor`: a Monitor call returns before its script prints anything, so its result never carries that line | — | record `terminalPending`, direct the post-merge handoff: finalize the watcher slot, tear down per `autoCleanup`, offer next options via AskUserQuestion |
40
40
  | `PostToolUse` (AskUserQuestion) | `guardrail-offer-ran.sh` | record | a next-options offer ran while a terminal PR was pending | — | clear `terminalPending` — the only exit for the post-merge Stop gate |
41
- | `PostToolUse` (Skill + muggle telemetry-skill-emit) | `guardrail-skill-stages.sh` | advise | a skill this plugin ships was invoked; its `SKILL.md` frontmatter may declare `mandatoryStages`. Registered on the skill's own MCP announcement too, so the declaration still lands if the Skill payload ever stops carrying a name | — | record `lastInvokedSkillName` + `mandatoryStages`, and name the declared files as required reading at the moment of use |
41
+ | `PostToolUse` (Skill + muggle telemetry-skill-emit) | `guardrail-skill-stages.sh` | advise | a skill this plugin ships was invoked; its `SKILL.md` frontmatter may declare `mandatoryStages`. Registered on the skill's own MCP announcement too, so the declaration still lands if the Skill payload ever stops carrying a name. A muggle-test announcement is also an E2E run (the clean SKIP verdict), recorded here alone: the state store drops a write that cannot take the session's lock in time, so a second writer for one emit could lose either record | — | record `lastInvokedSkillName` + `mandatoryStages` (and `e2eRun` for a muggle-test announcement), and name the declared files as required reading at the moment of use |
42
42
  | `PostToolUse` (Read) | `guardrail-record-stage-read.sh` | record | a markdown file under a `skills/` directory was opened | — | append to `stagesRead` — how the stage gate tells a stage that was read from one that was skipped |
43
43
  | `PostToolUse` (Bash + muggle telemetry-event-emit / user-feedback-create) | `guardrail-record-stage-signals.sh` | record | a Step 6f `pre-execution-classification` emit, debug-path evidence for a failed run (a `*-failure-classified\|resolved` emit or feedback naming it), or a `MUGGLE_STAGE_SKIP` / `MUGGLE_CLASSIFY_SKIP` / `MUGGLE_DEBUG_SKIP` marker | — | set `classifiedTestCaseIds` / `debuggedRuns` / the matching skip flag |
44
44
  | `PostToolUse` (Bash) | `guardrail-record-comment-replies.sh` | record | an unresolved-thread fetch named review threads still awaiting an answer (classified by the `<!-- muggle-do:bot -->` marker, never the author login), a threaded reply the provider **confirmed** answered comments in one, or a `MUGGLE_REPLY_SKIP` marker deferred them | — | claim each thread and cover the comments answered, in the per-PR ledger beside the muggle-do slot |
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  {
65
- "matcher": "mcp__.*muggle.*(execute|replay|telemetry_skill_emit)",
65
+ "matcher": "mcp__.*muggle.*(execute|replay)",
66
66
  "hooks": [
67
67
  {
68
68
  "type": "command",
@@ -78,7 +78,7 @@
78
78
  ]
79
79
  },
80
80
  {
81
- "matcher": "mcp__.*muggle.*(execute|replay|telemetry-skill-emit)",
81
+ "matcher": "mcp__.*muggle.*(execute|replay)",
82
82
  "hooks": [
83
83
  {
84
84
  "type": "command",
@@ -9,10 +9,9 @@ set -uo pipefail
9
9
  # Fires after every Bash call and every muggle execute/replay, so a keyword
10
10
  # pre-filter for test runners and the muggle E2E tool names keeps Node off the
11
11
  # hot path. Only a `test` command (npm/pnpm/yarn/jest/vitest/pytest/go/cargo),
12
- # a muggle execute/replay/test-generation event, a muggle-test skill telemetry
13
- # emit (registers a clean-SKIP verdict as an E2E run), a skip marker, or a PR
14
- # publish carrying a rendered walkthrough reaches guardrails.mjs, which then
15
- # inspects the output for pass/fail and updates state. Degrades to {}.
12
+ # a muggle execute/replay/test-generation event, a skip marker, or a PR publish
13
+ # carrying a rendered walkthrough reaches guardrails.mjs, which then inspects
14
+ # the output for pass/fail and updates state. Degrades to {}.
16
15
  #
17
16
  # Each arm reads only the field guardrails.mjs judges it by — the command, or the
18
17
  # tool's name. Against the whole payload, a jest config in a command's output or
@@ -33,7 +32,7 @@ GUARDRAIL_SUBCOMMAND="record-tests"
33
32
 
34
33
  guardrail_wants() {
35
34
  guardrail_fields_match command '(pnpm|npm|yarn)[[:space:]]+(run[[:space:]]+)?test|jest|vitest|pytest|go[[:space:]]+test|cargo[[:space:]]+test|MUGGLE_[A-Z0-9_]+_SKIP|gh[[:space:]]+pr[[:space:]]+(comment|create|edit)|issues/comments/[0-9]' \
36
- || guardrail_fields_match tool_name 'muggle.*(execute|test[-_]generation|replay)|muggle[-_]local[-_]telemetry[-_]skill[-_]emit'
35
+ || guardrail_fields_match tool_name 'muggle.*(execute|test[-_]generation|replay)'
37
36
  }
38
37
 
39
38
  if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
@@ -5,6 +5,8 @@ set -uo pipefail
5
5
  # and, when its SKILL.md declares `mandatoryStages`, returns those files as
6
6
  # required reading at the moment of use. The Stop gate
7
7
  # (guardrail-stage-gate.sh) blocks the turn end while any of them is unread.
8
+ # For a muggle-test skill telemetry emit it also records the E2E run, so the
9
+ # emit has one writer and no lost write to race for.
8
10
  #
9
11
  # Skill calls are rare, so the pre-filter is a file test rather than a keyword
10
12
  # scan: the invoked name is pulled out of the payload and Node runs only when it
@@ -1955,6 +1955,11 @@ function terminalGate() {
1955
1955
  const reason = decision.blockCount === 1 ? `Do not end the turn yet. PR ${pendingPrList} went terminal (merged/closed) but the post-merge handoff has not run. Finalize the watcher slot, tear down per autoCleanup, then offer next options to the user ${nextOptionsOfferMethod()} \u2014 release, queued work, deferred items. Only that offer clears this gate.` : `Post-merge handoff still owed for PR ${pendingPrList} (reminder ${decision.blockCount}/${MAX_PR_TERMINAL_BLOCKS}): finalize + tear down, then offer the next options ${nextOptionsOfferMethod()}.`;
1956
1956
  return blockStop(reason, host);
1957
1957
  }
1958
+ function startWalkthroughScanOnGateArming(stateBefore, committed) {
1959
+ if (isWalkthroughGateArmed(committed) && !isWalkthroughGateArmed(stateBefore)) {
1960
+ startBackgroundJob("scan-walkthroughs" /* ScanWalkthroughs */, [sessionId], input.cwd);
1961
+ }
1962
+ }
1958
1963
  function recordTests() {
1959
1964
  const cmd = input.tool_input?.command ?? "";
1960
1965
  const stateBefore = readState(sessionId);
@@ -1977,9 +1982,7 @@ function recordTests() {
1977
1982
  return failedRunId ? applyFailedRun(withWalkthroughSkip, failedRunId) : withWalkthroughSkip;
1978
1983
  };
1979
1984
  const next = commitState(sessionId, record) ?? record(readState(sessionId));
1980
- if (isWalkthroughGateArmed(next) && !isWalkthroughGateArmed(stateBefore)) {
1981
- startBackgroundJob("scan-walkthroughs" /* ScanWalkthroughs */, [sessionId], input.cwd);
1982
- }
1985
+ startWalkthroughScanOnGateArming(stateBefore, next);
1983
1986
  if (acceptedSkip) recordSkipReasonOnPrs(next, acceptedSkip);
1984
1987
  if (judgedSkip && !judgedSkip.accepted) {
1985
1988
  return envelope("PostToolUse", explainRejection(judgedSkip), host);
@@ -1999,8 +2002,16 @@ function skillStages() {
1999
2002
  const skillName = resolveSkillNameFromToolInput(input.tool_input);
2000
2003
  if (!skillName) return "{}";
2001
2004
  const stagePaths = resolveSkillStagePaths(skillName, resolvePluginSkillsRoot());
2002
- const invoke = (state) => applySkillInvocation(state, skillName, stagePaths);
2005
+ const emittedRun = {
2006
+ unitTestPassed: false,
2007
+ e2eRan: isE2ERun(input),
2008
+ e2eSkipped: false,
2009
+ e2eSkipCycleScoped: false
2010
+ };
2011
+ const stateBefore = readState(sessionId);
2012
+ const invoke = (state) => applyRecordedRun(applySkillInvocation(state, skillName, stagePaths), emittedRun);
2003
2013
  const next = commitState(sessionId, invoke) ?? invoke(readState(sessionId));
2014
+ startWalkthroughScanOnGateArming(stateBefore, next);
2004
2015
  const unread = unreadMandatoryStages(next);
2005
2016
  if (unread.length === 0) return "{}";
2006
2017
  const ctx = `The ${skillName} skill declares required reading: ${unread.map(stageLabel).join(", ")}. Read those files now, before working through the skill's steps \u2014 they carry mandatory steps SKILL.md only links to, and treating them as optional elaboration is how those steps get silently dropped. A Stop gate holds the turn open until they are opened.`;
@@ -8,7 +8,7 @@ Invoked by `/muggle-do` when the watcher forwards a PR's terminal state. On `mer
8
8
 
9
9
  ## Terminal record
10
10
 
11
- The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes the slot, so step 4 captures them first:
11
+ The facts [`next-step.md`](next-step.md) reports a finished PR from. Teardown deletes the slot, so step 4 captures them first; step 6 adds the teardown outcome:
12
12
 
13
13
  - `pr` — `<owner>/<repo>#<n>` and URL, from `prs.json`.
14
14
  - `state` — `merged` or `closed`, from `prs.json`.
@@ -16,6 +16,12 @@ The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes
16
16
  - `e2eFailing` — the title carries `[E2E FAILING]`: the PR shipped on a waived E2E verdict.
17
17
  - `escalatedReviewIds` — `result.md`'s `Escalated review ids`; empty on `none` or when `result.md` is absent.
18
18
  - `waivers` — `state.md`'s waiver and Blocker lines, verbatim.
19
+ - `teardown` — the note next-step prints, from this turn's teardown report: `cleaned up` when no row is `❌`, the first `❌` row's reason otherwise, `branch kept` when teardown did not run.
20
+ - `finishedAt` — ISO-8601, when step 6 ran.
21
+
22
+ ## Chat ledger
23
+
24
+ `~/.muggle-ai/muggle-do/chats/<session-id>.json` — a JSON array of the terminal record of every PR this chat finished. It sits outside the sessions directory, so teardown never deletes it, and [`next-step.md`](next-step.md) reads it to report PRs whose slots are gone. `<session-id>` is `$CLAUDE_CODE_SESSION_ID`; unset, the chat cannot name its ledger and none is written. Rewrite the whole file per [`session-state-writes.md`](../_shared/session-state-writes.md); a record whose `pr` is already listed replaces that entry.
19
25
 
20
26
  ## Procedure
21
27
 
@@ -24,7 +30,8 @@ The facts [`next-step.md`](next-step.md) reports `<slug>` from. Teardown deletes
24
30
  3. **Retire the cases the change replaced or removed (`merged` only).** Read the newest `e2eScope` recorded in the slot's `iterations/` ([`impact-analysis.md`](impact-analysis.md#output-state--e2escope)) — later cycles rescope, so the newest one describes what merged. Soft-delete each `retiredTestCases` entry with `muggle-remote-test-case-delete`, then each `retiredUseCases` entry with `muggle-remote-use-case-delete`, all in one message per kind. Before deleting a use case, confirm with `muggle-remote-test-case-list-by-use-case` that every test case under it is in the retired list: the delete cascades, so a test case added since scoping keeps the use case and its id is reported instead. An id already gone counts as deleted. On `closed` nothing is deleted — the change never landed, so the default branch still exercises those cases.
25
31
  4. **Capture the [terminal record](#terminal-record)** from the slot and the provider. This is the last read of `<slug>`'s slot: teardown may delete it next.
26
32
  5. **Teardown (`merged` only).** When the PR is `merged`, run [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) with `{worktreePath}` and `{branch}`. That file owns the teardown sequence **and its safety rules** — including skipping worktree-remove and local branch deletion when no worktree was used. This stage adds no teardown logic of its own. On `closed`, skip teardown — the branch and any worktree stay intact.
27
- 6. **Log while the slot exists.** When teardown's report marks `Session slot cleared` ✅, write nothing: the slot and its `followup.log` are gone, an append there fails or recreates the directory as a stray slot, and the retirement and teardown reports printed this turn are the record. Otherwise append a cleanup line to the session's `followup.log`, recording the case ids retired and whether teardown ran.
28
- 7. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action.
33
+ 6. **Record the PR in the [chat ledger](#chat-ledger).** Complete the terminal record with `teardown` and `finishedAt`, then write it to the ledger. The ledger is outside the slot, so this holds whether or not teardown cleared it.
34
+ 7. **Log while the slot exists.** When teardown's report marks `Session slot cleared` ✅, write nothing: the slot and its `followup.log` are gone, an append there fails or recreates the directory as a stray slot, and the retirement and teardown reports printed this turn are the record. Otherwise append a cleanup line to the session's `followup.log`, recording the case ids retired and whether teardown ran.
35
+ 8. Suggest the next step per [`next-step.md`](next-step.md), passing whether teardown ran and the terminal record. This is the stage's last action.
29
36
 
30
- **Teardown never returns a question, and neither does retirement.** Each finishes with its report — every item done, skipped, or blocked-with-a-reason — so steps 6 and 7 always run. A teardown that appears to be waiting on the user has stalled mid-sequence; the stage is not complete until the report and the next-step suggestion are both printed.
37
+ **Teardown never returns a question, and neither does retirement.** Each finishes with its report — every item done, skipped, or blocked-with-a-reason — so steps 6, 7 and 8 always run. A teardown that appears to be waiting on the user has stalled mid-sequence; the stage is not complete until the report and the next-step suggestion are both printed.
@@ -6,11 +6,11 @@ Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advance
6
6
 
7
7
  - `slug` — the session.
8
8
  - `teardownRan` — whether [`cleanup.md`](cleanup.md) already ran teardown (true on `merged` + `autoCleanup: always`; false on `closed` or a skipped gate).
9
- - `terminalRecord` — `<slug>`'s [terminal record](cleanup.md#terminal-record), captured before teardown could delete its slot.
9
+ - `terminalRecord` — `<slug>`'s [terminal record](cleanup.md#terminal-record), captured before teardown could delete its slot and completed with its `teardown` note.
10
10
 
11
11
  ## This chat's work
12
12
 
13
- "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>` plus every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
13
+ "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>`, every PR in its [chat ledger](cleanup.md#chat-ledger) — PRs it finished, whose slots teardown may have deleted — and every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
14
14
 
15
15
  The sessions directory holds every chat's slots, so a selector drawn from the whole directory offers work this chat never touched. Report and follow-ups cover this chat only; other chats sit behind one explicit option.
16
16
 
@@ -25,7 +25,7 @@ Both appends target `<slug>`'s `followup.log` and are skipped once teardown's re
25
25
 
26
26
  ## Status block
27
27
 
28
- One line per slot of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
28
+ One line per PR of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
29
29
 
30
30
  ```
31
31
  This chat's work:
@@ -36,13 +36,14 @@ This chat's work:
36
36
  Left over: #145 shipped [E2E FAILING]; review 2210 on #142 escalated
37
37
  ```
38
38
 
39
- - **`<slug>`** is built from `terminalRecord`, never from the slot on disk — teardown may have deleted it. The teardown note comes from teardown's report printed this turn: `cleaned up` when no row is `❌`, the first `❌` row's reason otherwise, `branch kept` when `teardownRan` is false.
40
- - **Other terminal slots** (`merged`, `closed`) read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
39
+ - **`<slug>`** is built from `terminalRecord`, never from the slot on disk — teardown may have deleted it. Its teardown note is the record's `teardown`.
40
+ - **Finished PRs** — the ledger's other records, each line built from its record and its `teardown` note. A PR in the ledger is listed once, from the ledger, even while its slot is still on disk.
41
+ - **Other terminal slots** (`merged`, `closed`) not in the ledger read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
41
42
  - **Open slots** refresh live. Resolve the provider per [`detect-vcs.md`](../_shared/vcs/detect-vcs.md) and use its PR-metadata and unresolved-thread recipes ([`github.md`](../_shared/vcs/github.md), [`gitlab.md`](../_shared/vcs/gitlab.md)); CI per [`ci-rollup.md`](../_shared/vcs/common/ci-rollup.md). The watcher reads `live` when [`watch-heartbeat`](../muggle-pr-followup/state-schemas.md#watch-heartbeat) is fresh, `stopped` otherwise.
42
43
  - **Blocked** replaces `open` when `last_seen.json` carries `blocked`; the line names the pending act per [`blocked-reminder.md`](../muggle-pr-followup/output-templates/blocked-reminder.md).
43
- - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md` — for `<slug>`, the record's `waivers`, `e2eFailing` and `escalatedReviewIds`. `nothing` when empty.
44
+ - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md` — for `<slug>` and every ledger record, the record's `waivers`, `e2eFailing` and `escalatedReviewIds`. `nothing` when empty.
44
45
 
45
- No other chat's slot appears in the block.
46
+ No other chat's slot or ledger appears in the block.
46
47
 
47
48
  ## Selector
48
49