mercury-agent 0.23.2 → 0.24.1
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.
- package/container/Dockerfile +1 -1
- package/container/Dockerfile.base +1 -1
- package/container/agent-package.json +1 -1
- package/docs/configuration.md +60 -0
- package/docs/container-lifecycle.md +27 -15
- package/docs/extensions.md +36 -0
- package/docs/goals/rehearsal-bench/roadmap.md +1 -1
- package/docs/goals/release-gate/roadmap.md +8 -8
- package/docs/goals/whatsapp-bot-hardening/open-threads.md +18 -0
- package/docs/goals/whatsapp-bot-hardening/roadmap.md +1 -1
- package/docs/graceful-shutdown.md +21 -5
- package/docs/pending-verification.md +195 -4
- package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/decisions.md +1 -0
- package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/plan.md +2 -2
- package/docs/plans/archive/2026-09-15-bugs-0915/sessions/S1.md +56 -0
- package/docs/plans/archive/2026-09-15-bugs-0915/sessions/S2.md +51 -0
- package/docs/plans/archive/2026-09-15-bugs-0915/sessions/S3.md +60 -0
- package/docs/plans/archive/2026-09-15-bugs-0915/sessions/S4.md +46 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/briefs/S1.md +60 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/briefs/S2.md +60 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/briefs/S3.md +58 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/briefs/S4.md +58 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/decisions.md +8 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/plan.md +102 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/sessions/S1.md +29 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/sessions/S2.md +29 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/sessions/S3.md +30 -0
- package/docs/plans/archive/2026-09-22-p0-bugs-0922/sessions/S4.md +32 -0
- package/docs/plans/bench-patterns-0915/briefs/S10.md +72 -0
- package/docs/plans/bench-patterns-0915/briefs/S11.md +95 -0
- package/docs/plans/bench-patterns-0915/briefs/S12.md +87 -0
- package/docs/plans/bench-patterns-0915/briefs/S9.md +81 -0
- package/docs/plans/bench-patterns-0915/decisions.md +7 -1
- package/docs/plans/bench-patterns-0915/plan.md +92 -8
- package/docs/plans/bench-patterns-0915/sessions/S10.md +40 -0
- package/docs/plans/bench-patterns-0915/sessions/S11.md +53 -0
- package/docs/plans/bench-patterns-0915/sessions/S12.md +44 -0
- package/docs/plans/bench-patterns-0915/sessions/S4.md +29 -0
- package/docs/plans/bench-patterns-0915/sessions/S5.md +30 -0
- package/docs/plans/bench-patterns-0915/sessions/S6.md +46 -0
- package/docs/plans/bench-patterns-0915/sessions/S7.md +30 -0
- package/docs/plans/bench-patterns-0915/sessions/S8.md +30 -0
- package/docs/plans/bench-patterns-0915/sessions/S9.md +2 -0
- package/docs/plans/flat-0916/briefs/S1.md +55 -0
- package/docs/plans/flat-0916/briefs/S2.md +55 -0
- package/docs/plans/flat-0916/decisions.md +8 -0
- package/docs/plans/flat-0916/plan.md +88 -0
- package/docs/plans/p0-plan-0922/briefs/S1.md +60 -0
- package/docs/plans/p0-plan-0922/briefs/S2.md +54 -0
- package/docs/plans/p0-plan-0922/briefs/S3.md +58 -0
- package/docs/plans/p0-plan-0922/briefs/S4.md +54 -0
- package/docs/plans/p0-plan-0922/briefs/S5.md +79 -0
- package/docs/plans/p0-plan-0922/briefs/S6.md +77 -0
- package/docs/plans/p0-plan-0922/briefs/S7.md +79 -0
- package/docs/plans/p0-plan-0922/briefs/S8.md +69 -0
- package/docs/plans/p0-plan-0922/decisions.md +9 -0
- package/docs/plans/p0-plan-0922/plan.md +215 -0
- package/docs/plans/p0-plan-0922/sessions/S1.md +22 -0
- package/docs/plans/p0-plan-0922/sessions/S2.md +22 -0
- package/docs/plans/p0-plan-0922/sessions/S3.md +22 -0
- package/docs/plans/p0-plan-0922/sessions/S4.md +22 -0
- package/docs/plans/p0-plan-0922/sessions/S5.md +44 -0
- package/docs/plans/p0-plan-0922/sessions/S6.md +60 -0
- package/docs/plans/p0-plan-0922/sessions/S7.md +69 -0
- package/docs/plans/sensitive-bugs-0922/briefs/S1.md +63 -0
- package/docs/plans/sensitive-bugs-0922/briefs/S2.md +62 -0
- package/docs/plans/sensitive-bugs-0922/briefs/S3.md +61 -0
- package/docs/plans/sensitive-bugs-0922/briefs/S4.md +61 -0
- package/docs/plans/sensitive-bugs-0922/briefs/S5.md +62 -0
- package/docs/plans/sensitive-bugs-0922/decisions.md +9 -0
- package/docs/plans/sensitive-bugs-0922/plan.md +147 -0
- package/docs/release-gate.md +1 -1
- package/docs/smoke-fixtures.md +9 -0
- package/examples/extensions/feed-watch/fixtures.ts +210 -0
- package/examples/extensions/feed-watch/index.ts +140 -9
- package/examples/extensions/office-365-mail/README.md +132 -0
- package/examples/extensions/office-365-mail/index.ts +170 -0
- package/examples/extensions/office-365-mail/lib/graph.ts +1031 -0
- package/examples/extensions/office-365-mail/scripts/login.ts +252 -0
- package/examples/extensions/office-365-mail/skill/SKILL.md +94 -0
- package/examples/profiles/football-reporter/AGENTS.md +15 -2
- package/examples/profiles/football-reporter/config.yaml +5 -1
- package/examples/profiles/tel-aviv-flat-search/AGENTS.md +5 -1
- package/package.json +16 -12
- package/resources/pi-extensions/subagent/index.ts +38 -42
- package/resources/pi-extensions/subagent/outcome.ts +28 -0
- package/src/adapters/whatsapp-thread.ts +12 -0
- package/src/agent/container-entry.ts +40 -7
- package/src/agent/container-env.ts +26 -0
- package/src/agent/container-error.ts +28 -0
- package/src/agent/container-runner.ts +50 -14
- package/src/audit/ledger-queries.ts +35 -3
- package/src/bridges/slack.ts +4 -1
- package/src/bridges/teams.ts +55 -15
- package/src/bridges/telegram.ts +3 -1
- package/src/cli/mercury.ts +46 -0
- package/src/cli/mrctl-http.ts +25 -0
- package/src/cli/mrctl.ts +13 -14
- package/src/config.ts +70 -34
- package/src/core/api.ts +51 -29
- package/src/core/boot-reconcile.ts +168 -0
- package/src/core/chat-run-journal.ts +383 -0
- package/src/core/debounce.ts +97 -1
- package/src/core/handler.ts +292 -44
- package/src/core/instance-lock.ts +159 -0
- package/src/core/operator-alerts.ts +80 -10
- package/src/core/pending-ingress.ts +298 -0
- package/src/core/routes/dashboard.ts +28 -6
- package/src/core/routes/media.ts +22 -0
- package/src/core/routes/shadow.ts +28 -3
- package/src/core/runtime.ts +139 -4
- package/src/core/simulate-ingress.ts +5 -2
- package/src/core/space-queue.ts +38 -9
- package/src/core/storage-cleanup.ts +16 -8
- package/src/core/system-messages.ts +50 -0
- package/src/core/task-scheduler.ts +150 -14
- package/src/dashboard/index.html +2 -0
- package/src/main.ts +121 -2
- package/src/ops/shadow-service.ts +113 -1
- package/src/ops/shadow-snapshot.ts +126 -0
- package/src/preflight/checks/roundtrip.ts +50 -39
- package/src/smoke/cli.ts +24 -4
- package/src/storage/db.ts +621 -90
- package/src/types.ts +20 -3
- /package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/briefs/S1.md +0 -0
- /package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/briefs/S2.md +0 -0
- /package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/briefs/S3.md +0 -0
- /package/docs/plans/{bugs-0915 → archive/2026-09-15-bugs-0915}/briefs/S4.md +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Brief S12 — inventories as files, each with a closure test
|
|
2
|
+
|
|
3
|
+
**Plan**: docs/plans/bench-patterns-0915/plan.md **Session**: S12 **Round**: 1 **Kind**: feature
|
|
4
|
+
**Item slug**: inventories-as-files
|
|
5
|
+
|
|
6
|
+
> The only file this session reads from the plan. Self-contained: it never points at a sibling's brief. The `**Item slug**:` line is the key the execution commands grep for to detect that a brief is active — keep it exactly in that shape.
|
|
7
|
+
|
|
8
|
+
## Launch
|
|
9
|
+
|
|
10
|
+
/f-ops-plan work bench-patterns-0915 S12
|
|
11
|
+
|
|
12
|
+
## Run
|
|
13
|
+
|
|
14
|
+
/f-feature-dev inventories-as-files
|
|
15
|
+
|
|
16
|
+
## Scope notes
|
|
17
|
+
|
|
18
|
+
Follow the doc's eight-step sequence. Step 4 (run entries) comes before Step 6 (guard axes). Tests and docs only: no edit under `src/`, `examples/`, `resources/` or `scripts/`.
|
|
19
|
+
|
|
20
|
+
A `none` cell names an open bug doc, and a missing one is filed with `/f-bug-report`, never fixed. For Step 6, derive `sensitive-bugs-0922`'s state then (`bash .claude/scripts/plan-state.sh docs/plans/sensitive-bugs-0922`). Whichever of its fixes have landed change their cells.
|
|
21
|
+
|
|
22
|
+
If you land first, put this in "Siblings must know": every later sensitive-guard fix that archives its bug doc turns `tests/inventory-guard-axes.test.ts` red on purpose, and the fixer rewrites that cell.
|
|
23
|
+
|
|
24
|
+
The tests that are predicted but only copied from (`container-copy-list-closure`, `env-claims-declare-hostonly`, `no-module-eviction`, `release-gate-map`) are read-only patterns. The doc names them so their shape is copied, not edited.
|
|
25
|
+
|
|
26
|
+
**Deploy needs: none** (tests, `CLAUDE.md`, docs).
|
|
27
|
+
|
|
28
|
+
## Owned surfaces (predicted)
|
|
29
|
+
|
|
30
|
+
- tests/container-copy-list-closure.test.ts
|
|
31
|
+
- tests/env-claims-declare-hostonly.test.ts
|
|
32
|
+
- tests/helpers
|
|
33
|
+
- tests/helpers/inventory.ts
|
|
34
|
+
- tests/helpers/source-scan.ts
|
|
35
|
+
- tests/inventories/guard-axes.ts
|
|
36
|
+
- tests/inventories/host-limits.ts
|
|
37
|
+
- tests/inventories/pi-spawns.ts
|
|
38
|
+
- tests/inventories/run-entries.ts
|
|
39
|
+
- tests/inventory-guard-axes.test.ts
|
|
40
|
+
- tests/inventory-host-limits.test.ts
|
|
41
|
+
- tests/inventory-pi-spawns.test.ts
|
|
42
|
+
- tests/inventory-run-entries.test.ts
|
|
43
|
+
- tests/no-module-eviction.test.ts
|
|
44
|
+
- tests/release-gate-map.test.ts
|
|
45
|
+
- tests/source-scan.test.ts
|
|
46
|
+
- CLAUDE.md
|
|
47
|
+
- docs/archive/permissions-and-config/2026-09-22-sensitive-guard-one-read.md
|
|
48
|
+
- docs/backlog/feed-watch-triaged-roundup.md
|
|
49
|
+
- docs/bugs/*.md
|
|
50
|
+
|
|
51
|
+
## Do not touch
|
|
52
|
+
|
|
53
|
+
- src/cli/mercury.ts, src/config.ts, src/ops/shadow-root.ts, src/ops/shadow-service.ts, src/ops/shadow-snapshot.ts, tests/shadow-*.test.ts, docs/configuration.md, docs/live-testing.md (owned by S9 this plan)
|
|
54
|
+
- examples/extensions/feed-watch/fixtures.ts, examples/extensions/feed-watch/index.ts, tests/feed-watch-fixtures.test.ts, tests/fixtures/feed-watch/shadow/ (owned by S10 this plan)
|
|
55
|
+
- package.json, scripts/ (every file), tests/check-ratchets.test.ts, tests/check-sync-calls.test.ts (owned by S11 this plan)
|
|
56
|
+
- `CLAUDE.md`: S11 also adds one Gotchas line. Rewrite only the `pi`-spawn gotcha, and rebase over theirs.
|
|
57
|
+
- Files plans `p0-plan-0922` (S6–S8: `src/core/runtime.ts`, `src/main.ts`, `src/storage/db.ts`, …) and `sensitive-bugs-0922` are changing are read, never edited. Your inventories read `src/config.ts` and `src/core/runtime.ts`: a `limit`-shaped key or a new run entry those plans add lands as a red test for whoever lands second. That is the gate working.
|
|
58
|
+
- Not ours (avishai tsabari, last 14 d): `tests/container-copy-list-closure.test.ts`, which you copy from and do not edit. The lane is cleared by Q13 (ours). Re-check with `/f-ops-plan next bench-patterns-0915`.
|
|
59
|
+
|
|
60
|
+
## Edges
|
|
61
|
+
|
|
62
|
+
- start-after: none (satisfied — `next` launched you)
|
|
63
|
+
- merge-after: none. S6 → S8 (merge-after) is satisfied because S6 has landed. It was the planning pair; this session is the implementation.
|
|
64
|
+
|
|
65
|
+
## Overlap verdicts
|
|
66
|
+
|
|
67
|
+
none
|
|
68
|
+
|
|
69
|
+
> The command's preflight overlap check treats a hit whose branch AND every shared file match a verdict line as answered (c), prints one `PLAN-PASSED(overlap): …` line, and carries it into the final report. Any other hit prompts as usual. The merge-time check is never waived.
|
|
70
|
+
|
|
71
|
+
## Decisions answered
|
|
72
|
+
|
|
73
|
+
- Q13: ours (owner, 2026-09-23).
|
|
74
|
+
|
|
75
|
+
## Ledger rules
|
|
76
|
+
|
|
77
|
+
- `docs/ROADMAP.md`: never edit. Your command writes `docs/pending-updates/inventories-as-files.md` as usual.
|
|
78
|
+
- `docs/pending-verification.md`: append only under `## Plan bench-patterns-0915 / S12`.
|
|
79
|
+
- Any goal's `decisions.md`: never edit; put decisions in your log's "Siblings must know".
|
|
80
|
+
|
|
81
|
+
## Environment
|
|
82
|
+
|
|
83
|
+
- Read `CLAUDE.md` → Worktree Setup and Gotchas before opening the worktree. Nothing from them is copied here. Run `bun install` once in the fresh worktree. The check gate is `bun run check`: every link runs to completion, so read every line. Lint is proven only by `~/check-mercury.sh check <worktree>` in WSL (CLAUDE.local.md).
|
|
84
|
+
|
|
85
|
+
## Report
|
|
86
|
+
|
|
87
|
+
Your command's final report is appended to `docs/plans/bench-patterns-0915/sessions/S12.md` by its report step (path resolved through `.claude/scripts/resolve-docs-root.sh docs/plans/probe.md`). `work` verifies the append.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Brief S9 — the shadow gets a model credential of its own (M1.3c)
|
|
2
|
+
|
|
3
|
+
**Plan**: docs/plans/bench-patterns-0915/plan.md **Session**: S9 **Round**: 1 **Kind**: feature
|
|
4
|
+
**Item slug**: shadow-own-credential
|
|
5
|
+
|
|
6
|
+
> The only file this session reads from the plan. Self-contained: it never points at a sibling's brief. The `**Item slug**:` line is the key the execution commands grep for to detect that a brief is active — keep it exactly in that shape.
|
|
7
|
+
|
|
8
|
+
## Launch
|
|
9
|
+
|
|
10
|
+
/f-ops-plan work bench-patterns-0915 S9
|
|
11
|
+
|
|
12
|
+
## Run
|
|
13
|
+
|
|
14
|
+
/f-feature-dev shadow-own-credential
|
|
15
|
+
|
|
16
|
+
## Scope notes
|
|
17
|
+
|
|
18
|
+
Follow the doc's Implementation Sequence, Steps 0–7. **Step 0 is a hard stop before any code** (owner decision Q8): print the probe exactly as the doc gives it, ask the owner to run it on the box, and wait. The probe uses `auth login` into `~/mercury-shadow/auth.json` from a scratch directory, then confirms the live bot answers and its next rotation has no 400. You never run `auth login` yourself, never read a token, and never print a fingerprint. If the owner reports that live broke: stop, report `Outcome: blocked` with `Blocked-on: Step 0 — option B`, and write nothing under `src/`.
|
|
19
|
+
|
|
20
|
+
Option C (API key) is rejected by the owner at every stage. The Non-Negotiable Rules are the contract, in particular the rule that deleting shape (a) and adding the gate land in one change.
|
|
21
|
+
|
|
22
|
+
**Deploy needs: restart**, plus one `mercury shadow login` (or Step 0's file) and a fresh `shadow snapshot`, because every existing snapshot is refused by design. Say so in the report's `Deploy needs:` line. Gap-check before the restart (CLAUDE.local.md Gotchas: nothing running, cron gap).
|
|
23
|
+
|
|
24
|
+
## Owned surfaces (predicted)
|
|
25
|
+
|
|
26
|
+
- src/cli/mercury.ts
|
|
27
|
+
- src/config.ts
|
|
28
|
+
- src/ops/shadow-root.ts
|
|
29
|
+
- src/ops/shadow-service.ts
|
|
30
|
+
- src/ops/shadow-snapshot.ts
|
|
31
|
+
- tests/shadow-login.test.ts
|
|
32
|
+
- tests/shadow-mode.test.ts
|
|
33
|
+
- tests/shadow-root.test.ts
|
|
34
|
+
- tests/shadow-service-cli.test.ts
|
|
35
|
+
- tests/shadow-service.test.ts
|
|
36
|
+
- tests/shadow-snapshot.test.ts
|
|
37
|
+
- docs/configuration.md
|
|
38
|
+
- docs/live-testing.md
|
|
39
|
+
- docs/pending-verification.md
|
|
40
|
+
|
|
41
|
+
## Do not touch
|
|
42
|
+
|
|
43
|
+
- examples/extensions/feed-watch/fixtures.ts, examples/extensions/feed-watch/index.ts, tests/feed-watch-fixtures.test.ts, tests/fixtures/feed-watch/shadow/ (owned by S10 this plan)
|
|
44
|
+
- package.json, scripts/ (every file), tests/check-ratchets.test.ts, tests/check-sync-calls.test.ts (owned by S11 this plan)
|
|
45
|
+
- tests/helpers/, tests/inventories/, tests/inventory-*.test.ts, tests/source-scan.test.ts, tests/container-copy-list-closure.test.ts, tests/env-claims-declare-hostonly.test.ts, tests/no-module-eviction.test.ts, tests/release-gate-map.test.ts (owned by S12 this plan)
|
|
46
|
+
- src/storage/pi-auth.ts: read-only for this item (the doc says so).
|
|
47
|
+
- `docs/goals/rehearsal-bench/decisions.md` and `roadmap.md`: D-016's extension to the model credential stays in the spec until archive. Put it in your log's "Siblings must know".
|
|
48
|
+
- Not ours (avishai tsabari, last 14 d): `src/ops/shadow-root.ts`, `src/ops/shadow-service.ts`, `src/config.ts`, `src/cli/mercury.ts`, `tests/shadow-root.test.ts`, `tests/shadow-service.test.ts`. The lane is cleared by Q11 (ours). Re-check with `/f-ops-plan next bench-patterns-0915`.
|
|
49
|
+
- Plan `p0-plan-0922` S6 also changes `src/config.ts`. You launch only after it has landed (the start-after edge), so rebase onto it and do not re-do its hunks.
|
|
50
|
+
|
|
51
|
+
## Edges
|
|
52
|
+
|
|
53
|
+
- start-after: `p0-plan-0922/S6` (file: src/config.ts) (satisfied — `next` launched you)
|
|
54
|
+
- merge-after: none
|
|
55
|
+
|
|
56
|
+
## Overlap verdicts
|
|
57
|
+
|
|
58
|
+
none
|
|
59
|
+
|
|
60
|
+
> The command's preflight overlap check treats a hit whose branch AND every shared file match a verdict line as answered (c), prints one `PLAN-PASSED(overlap): …` line, and carries it into the final report. Any other hit prompts as usual. The merge-time check is never waived.
|
|
61
|
+
|
|
62
|
+
## Decisions answered
|
|
63
|
+
|
|
64
|
+
- Q1: yes. The bench order is M1.3c → M1.7 → M2.4 (owner, 2026-09-23). The goal roadmap's order line is the owner's edit, not yours.
|
|
65
|
+
- Q2: option A (a second OAuth login). The spec settles it, and the API key is rejected (owner, 2026-09-23).
|
|
66
|
+
- Q8: Step 0 is your first in-session stop, not a launch gate (owner, 2026-09-24).
|
|
67
|
+
- Q11: ours. Avishai Tsabari is a co-owner, not a lane (owner, 2026-09-23).
|
|
68
|
+
|
|
69
|
+
## Ledger rules
|
|
70
|
+
|
|
71
|
+
- `docs/ROADMAP.md`: never edit. Your command writes `docs/pending-updates/shadow-own-credential.md` as usual.
|
|
72
|
+
- `docs/pending-verification.md`: append only under `## Plan bench-patterns-0915 / S9`.
|
|
73
|
+
- Any goal's `decisions.md`: never edit; put decisions in your log's "Siblings must know".
|
|
74
|
+
|
|
75
|
+
## Environment
|
|
76
|
+
|
|
77
|
+
- Read `CLAUDE.md` → Worktree Setup and Gotchas before opening the worktree, and `CLAUDE.local.md` Gotchas for the box steps (WSL `PATH`, bare `bun`, gap check). Nothing from them is copied here. Run `bun install` once in the fresh worktree. The check gate is `bun run check`: every link runs to completion, so read every line.
|
|
78
|
+
|
|
79
|
+
## Report
|
|
80
|
+
|
|
81
|
+
Your command's final report is appended to `docs/plans/bench-patterns-0915/sessions/S9.md` by its report step (path resolved through `.claude/scripts/resolve-docs-root.sh docs/plans/probe.md`). `work` verifies the append.
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
| ID | Blocks | Question | Options | Answer | Answered |
|
|
6
6
|
|----|--------|----------|---------|--------|----------|
|
|
7
|
-
| Q1 | — (the implementation sessions of S4/S5, added at `--rebuild`; retargeted 2026-09-15 — a planning session does not depend on execution order) | Bench order: do M1.3c `shadow-own-credential` and M1.7 `shadow-feed-fixtures` cut in front of M1.4 `shadow diff` and M1.5 `longview file target` on the rehearsal-bench roadmap? (`docs/goals/rehearsal-bench/roadmap.md` § *Order* already says M1.3c → M1.7 → M2.4; only the *Execution order since 2026-09-03* line at the top of the file is stale.) | yes — rewrite the top order line M1.3c → M1.7 → M2.4 / no — plan them but land after M1.4–M1.5 / other | | |
|
|
7
|
+
| Q1 | — (the implementation sessions of S4/S5, added at `--rebuild`; retargeted 2026-09-15 — a planning session does not depend on execution order) | Bench order: do M1.3c `shadow-own-credential` and M1.7 `shadow-feed-fixtures` cut in front of M1.4 `shadow diff` and M1.5 `longview file target` on the rehearsal-bench roadmap? (`docs/goals/rehearsal-bench/roadmap.md` § *Order* already says M1.3c → M1.7 → M2.4; only the *Execution order since 2026-09-03* line at the top of the file is stale.) | yes — rewrite the top order line M1.3c → M1.7 → M2.4 / no — plan them but land after M1.4–M1.5 / other | yes — rewrite the top order line M1.3c → M1.7 → M2.4 (the goal roadmap edit is the owner's; no implementation session touches it) | 2026-09-23 (owner, at the `--rebuild`) |
|
|
8
8
|
| Q2 | S4 | Does the shadow get its own model credential as a second OAuth login on the same Anthropic account (`mercury auth login` against the shadow root — the roadmap's assumption) or as an API key in the shadow's env? | oauth-login / api-key / decide in the spec | decide in the spec — the Architecture's credential section presents both and recommends one; D-016 already assumes oauth-login | 2026-09-15 (owner, via the adversarial review: "apply all the fixes") |
|
|
9
9
|
| Q3 | S6 | `sensitive-guard-one-read` is a read-only audit, not a feature. Run it as this plan's `/f-feature-planning` session (its "architecture" is the axis × site × test table and the list of bugs to file), or outside the plan as `/f-refactor-audit src/core/runtime.ts` with the same brief? | planning-session / refactor-audit | planning-session — `refactor-audit` writes `docs/refactor/audits/`, which `plan-state.sh` can never read as `landed`, so S8 (merge-after S6) and the whole Round 0 gate would hang | 2026-09-15 (owner, via the adversarial review) |
|
|
10
10
|
| Q4 | — (was S3; moved with it to plan `bugs-0915`) | Lane: does Avishai Tsabari own `src/bridges/` (2 files in 14d — `b9b5c94` reply-in-its-chat, 2026-09-03)? | ours / theirs / split: … | ours — co-owner, not a lane (re-asked as `bugs-0915` Q1) | 2026-09-15 (owner, via the adversarial review) |
|
|
11
11
|
| Q5 | — (was S3; moved to plan `bugs-0915`) | Lane: does Avishai Tsabari own `src/core/conversation.ts` (1 commit in 14d — `0f546a5` contextMode default, 2026-09-07)? | ours / theirs / split: … | ours (re-asked as `bugs-0915` Q2) | 2026-09-15 (owner, via the adversarial review) |
|
|
12
12
|
| Q6 | — (was S1; moved to plan `bugs-0915`) | Lane: does Avishai Tsabari own `src/main.ts` (5 commits in 14d, latest `2bbe68f` sandbox latches, 2026-09-11)? S1 adds one `idleTimeout` option to `Bun.serve` there. | ours / theirs / split: … | ours — `Me` has 10 commits on the file in the same window; and S1's fix no longer touches it (re-asked as `bugs-0915` Q3) | 2026-09-15 (owner, via the adversarial review) |
|
|
13
13
|
| Q7 | — (was S2; moved to plan `bugs-0915`) | Lane: does Avishai Tsabari own `tests/fixtures/release-gate/regression-map.json` (1 commit in 14d — `974f042` allowlist, 2026-09-14)? S2's post-mortem adds one allowlist entry. | ours / theirs / split: … | ours (re-asked as `bugs-0915` Q4) | 2026-09-15 (owner, via the adversarial review) |
|
|
14
|
+
| Q8 | S9 | **Step 0 of `shadow-own-credential` — the owner's probe, no code.** On the box, from a scratch directory `~/shadow-login-probe` whose `.env` holds only `MERCURY_AUTH_PATH=/home/guysaha/mercury-shadow/auth.json`, run `~/.bun/bin/bun run ~/mercury-src/src/cli/mercury.ts auth login` → anthropic. Then confirm the live bot answers a real message and its next `Rotated anthropic oauth refresh token` line has no 400 before it. Did the second login leave live alive? | alive — S9 may launch (option A) / live broke — ran `mercury auth login` from `~/whatsapp-bot`; S9 goes back to planning with option B (drop S9 at the next `--rebuild`) | not a launch gate — Step 0 is S9's first action and a hard stop inside the session: it asks the owner to run the probe and writes no code until the owner reports live alive; if live broke, S9 reports `Outcome: blocked` (`Blocked-on: Step 0 — option B`) | 2026-09-24 (owner, at the `--rebuild`) |
|
|
15
|
+
| Q9 | — (S11; answered) | `ratchet-shapes-the-summaries-named` Open Questions 1–5: OQ1 ratchet D2 at 17 (not a sweep first); OQ2 skip `src/bridges/` + `src/adapters/`; OQ3 zero-dependency lexer; OQ4 file the two candidate bugs before `/f-feature-dev` starts; OQ5 no suppression marker | accept all / per-OQ | accept all five recommendations | 2026-09-23 (owner, at the `--rebuild`) |
|
|
16
|
+
| Q10 | S11 | Per Q9/OQ4: have the two candidate bugs been filed with `/f-bug-report`? (a) `src/core/handler.ts:315` — the `denied` reply is an `await bridge.sendReply` outside any `try`; (b) `src/core/media.ts:233` — with no `content-length` the whole body is buffered by `arrayBuffer()` before the size check. Their fixes then lower S11's baselines instead of being hidden in them. | filed: `{slug-a}`, `{slug-b}` | not a launch gate — S11 runs `/f-bug-report` for both as its first step, before the worktree and before any detector; the two slugs go into its log's Siblings must know | 2026-09-24 (owner, at the `--rebuild`) |
|
|
17
|
+
| Q11 | — (S9; answered) | Lane: does avishai tsabari own `src/ops/shadow-*`, `src/config.ts`, `src/cli/mercury.ts`, `tests/shadow-{root,service}.test.ts` (6 files in 14d — `9e8268c` shadow live-project resolution, version bumps, `1812d41`)? | ours / theirs / split: … | ours — co-owner, not a lane (standing answer, as Q4–Q7) | 2026-09-23 (owner, at the `--rebuild`) |
|
|
18
|
+
| Q12 | — (S11; answered) | Lane: does avishai tsabari / dependabot own `package.json` (version bumps, dependency PRs #100 #111 in 14d)? | ours / theirs / split: … | ours | 2026-09-23 (owner, at the `--rebuild`) |
|
|
19
|
+
| Q13 | — (S12; answered) | Lane: does avishai tsabari own `tests/container-copy-list-closure.test.ts` (`53e9ca7`, 2026-09-14)? S12 copies its pattern and does not edit it. | ours / theirs / split: … | ours | 2026-09-23 (owner, at the `--rebuild`) |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Plan: bench-patterns-0915
|
|
2
2
|
|
|
3
3
|
**Status**: Active
|
|
4
|
-
**Created**: 2026-09-15 **Last updated**: 2026-09-
|
|
4
|
+
**Created**: 2026-09-15 **Last updated**: 2026-09-23 (rebuilt: `--add` the four implementation sessions S9–S12 after Round 0 landed in `d5ca1b0`; `--drop S6` refused — S6 was launched and has a log, and it is landed; earlier, 2026-09-15: `--drop S1 S2 S3` after the adversarial review — the bugs run as plan `bugs-0915`)
|
|
5
5
|
**Landing mode**: pr
|
|
6
6
|
**Max width**: 4
|
|
7
7
|
**Inputs**: bench-patterns-0915 shadow-simulate-stream-dies-at-bun-serve-10s-idle-timeout smoke-admin-fixture-promotes-the-bare-jid-so-the-run-resolves-it-as-member slack-and-teams-bridges-report-a-group-as-a-dm shadow-own-credential shadow-feed-fixtures sensitive-guard-one-read ratchet-shapes-the-summaries-named inventories-as-files
|
|
@@ -20,17 +20,23 @@
|
|
|
20
20
|
| S6 | plan | sensitive-guard-one-read | docs/ideas/sensitive-guard-one-read.md | /f-feature-planning sensitive-guard-one-read | 0 | Q3 |
|
|
21
21
|
| S7 | plan | ratchet-shapes-the-summaries-named | docs/ideas/ratchet-shapes-the-summaries-named.md | /f-feature-planning ratchet-shapes-the-summaries-named | 0 | — |
|
|
22
22
|
| S8 | plan | inventories-as-files | docs/ideas/inventories-as-files.md | /f-feature-planning inventories-as-files | 0 | — |
|
|
23
|
+
| S9 | feature | shadow-own-credential | docs/backlog/shadow-own-credential.md | /f-feature-dev shadow-own-credential | 1 | — |
|
|
24
|
+
| S10 | feature | shadow-feed-fixtures | docs/backlog/shadow-feed-fixtures.md | /f-feature-dev shadow-feed-fixtures | 1 | — |
|
|
25
|
+
| S11 | feature | ratchet-shapes-the-summaries-named | docs/backlog/ratchet-shapes-the-summaries-named.md | /f-feature-dev ratchet-shapes-the-summaries-named | 1 | — |
|
|
26
|
+
| S12 | feature | inventories-as-files | docs/backlog/inventories-as-files.md | /f-feature-dev inventories-as-files | 1 | — |
|
|
23
27
|
|
|
24
28
|
> Kind ∈ `feature` | `bug` | `refactor` | `plan` (a Round 0 planning session) | `story` (from `--goal`; runs `/f-feature-dev`).
|
|
25
29
|
> Needs = decision IDs from `decisions.md` that must be answered before this session may launch, or `—`.
|
|
26
30
|
> IDs are never renumbered; `--drop` moves a row to Deferred, `--add` takes the next unused ID. S1–S3 are in Deferred (moved to plan `bugs-0915`).
|
|
27
|
-
> Q1 (bench order) blocks no planning session — it is answered when the implementation sessions of S4/S5 are added at `--rebuild`; a planning session does not depend on execution order.
|
|
31
|
+
> Q1 (bench order) blocks no planning session — it is answered when the implementation sessions of S4/S5 are added at `--rebuild`; a planning session does not depend on execution order. Answered `yes` at the 2026-09-23 rebuild.
|
|
32
|
+
> S4–S8 rows are frozen (each has a session log) and copied unchanged, including their `docs/ideas/` Doc paths; the specs now live in `docs/backlog/`, which is the Doc of S9–S12. S6 stays: a launched session is never removed, and it is landed.
|
|
28
33
|
|
|
29
34
|
## Edges
|
|
30
35
|
|
|
31
36
|
| From | To | Kind | Basis |
|
|
32
37
|
|------|----|------|-------|
|
|
33
38
|
| S6 | S8 | merge-after | semantic: the guard-axes inventory S8 specifies is the table S6's read produces (user) |
|
|
39
|
+
| p0-plan-0922/S6 | S9 | start-after | file: src/config.ts (predicted by plan p0-plan-0922, S6 not landed) |
|
|
34
40
|
|
|
35
41
|
> Kind ∈ `start-after` (To may not launch until From is landed) | `merge-after` (To may launch now, may not land until From is landed).
|
|
36
42
|
> Basis starts with `file:` (inferred from the collision map) or `semantic:` (asked) — never mixed in one row.
|
|
@@ -55,19 +61,25 @@
|
|
|
55
61
|
> **One planning session at a time.** Every `/f-feature-planning` edits `docs/ROADMAP.md` (its Step 4.5) in the shared checkout with no lock — the rules allow two kind-`plan` sessions to be `running` together, this plan does not. Open the next only after the previous one has reported.
|
|
56
62
|
> **Do not open an implementation session until the Round 0 commit line has been run.** `plan-state.sh` derives a planning session `landed` the moment its Architecture predicts a surface (evidence outranks the log), which is Step 7 of `/f-feature-planning` — before its self-review and the owner's approval pause. Between those two points the session is still editing the shared checkout and `next` can no longer see it as running (`agentic-project-boilerplate` idea `ops-plan-landed-outranks-running`).
|
|
57
63
|
|
|
58
|
-
### Round 1
|
|
64
|
+
### Round 1 — width 4
|
|
59
65
|
|
|
60
66
|
| Session | Item | Predicted surfaces (count) |
|
|
61
67
|
|---------|------|----------------------------|
|
|
62
|
-
|
|
|
68
|
+
| S9 | shadow-own-credential (M1.3c) — waits for `p0-plan-0922/S6` (src/config.ts); Step 0 (the owner's probe, Q8) is its first in-session stop | 14 |
|
|
69
|
+
| S10 | shadow-feed-fixtures (M1.7) | 7 |
|
|
70
|
+
| S11 | ratchet-shapes-the-summaries-named — files the two OQ4 bugs as its first step (Q10) | 17 |
|
|
71
|
+
| S12 | inventories-as-files | 20 |
|
|
72
|
+
|
|
73
|
+
> No two of S9–S12 share a file, so all four sit in one round. Deploy classes differ: S9 and S10 are **restart** (host-only; S9 also needs one `mercury shadow login` and a fresh snapshot — every existing snapshot is refused by design; S10 is verified against the installed feed-watch snapshot), S11 and S12 are **none** (scripts/tests/docs only). Bundle the S9 + S10 restart into one gap.
|
|
74
|
+
> Q1 was answered `yes`: the rehearsal-bench roadmap's *Execution order since 2026-09-03* line (`docs/goals/rehearsal-bench/roadmap.md` L19) becomes M1.3c → M1.7 → M2.4. That goal file is not this plan's to edit and no implementation session may touch it (ledger rule) — the owner rewrites it, or it rides along with S9's archive.
|
|
63
75
|
|
|
64
76
|
## Collision map
|
|
65
77
|
|
|
66
|
-
> Whole files, predicted; `docs/` and infrastructure paths are excluded exactly as `overlap-check.sh` excludes them (
|
|
78
|
+
> Whole files, predicted; `docs/` and infrastructure paths are excluded exactly as `overlap-check.sh` excludes them (7 such paths ignored — `docs/configuration.md`, `docs/live-testing.md`, `docs/pending-verification.md`, `CLAUDE.md`, `docs/archive/permissions-and-config/2026-09-22-sensitive-guard-one-read.md`, `docs/backlog/feed-watch-triaged-roundup.md`, `docs/bugs/*.md`; `CLAUDE.md` is predicted by both S11 and S12 and `docs/pending-verification.md` by S9 and S10 — each adds its own lines, so land the second one with a rebase, not a collision).
|
|
67
79
|
|
|
68
80
|
| File | Sessions |
|
|
69
81
|
|------|----------|
|
|
70
|
-
| — | no
|
|
82
|
+
| — | no whole-file collision among S9–S12 (measured 2026-09-23). Cross-plan: `src/config.ts` S9 ↔ `p0-plan-0922/S6` → the start-after edge above |
|
|
71
83
|
|
|
72
84
|
## Predicted surfaces
|
|
73
85
|
|
|
@@ -81,13 +93,83 @@
|
|
|
81
93
|
|
|
82
94
|
### S8
|
|
83
95
|
|
|
96
|
+
### S9
|
|
97
|
+
|
|
98
|
+
- src/cli/mercury.ts
|
|
99
|
+
- src/config.ts
|
|
100
|
+
- src/ops/shadow-root.ts
|
|
101
|
+
- src/ops/shadow-service.ts
|
|
102
|
+
- src/ops/shadow-snapshot.ts
|
|
103
|
+
- tests/shadow-login.test.ts
|
|
104
|
+
- tests/shadow-mode.test.ts
|
|
105
|
+
- tests/shadow-root.test.ts
|
|
106
|
+
- tests/shadow-service-cli.test.ts
|
|
107
|
+
- tests/shadow-service.test.ts
|
|
108
|
+
- tests/shadow-snapshot.test.ts
|
|
109
|
+
- docs/configuration.md
|
|
110
|
+
- docs/live-testing.md
|
|
111
|
+
- docs/pending-verification.md
|
|
112
|
+
|
|
113
|
+
### S10
|
|
114
|
+
|
|
115
|
+
- examples/extensions/feed-watch/fixtures.ts
|
|
116
|
+
- examples/extensions/feed-watch/index.ts
|
|
117
|
+
- tests/feed-watch-fixtures.test.ts
|
|
118
|
+
- tests/fixtures/feed-watch/shadow/README.md
|
|
119
|
+
- tests/fixtures/feed-watch/shadow/feeds
|
|
120
|
+
- tests/fixtures/feed-watch/shadow/feeds/*
|
|
121
|
+
- docs/pending-verification.md
|
|
122
|
+
|
|
123
|
+
### S11
|
|
124
|
+
|
|
125
|
+
- package.json
|
|
126
|
+
- scripts/absent-allows-baseline.json
|
|
127
|
+
- scripts/bare-delivery-await-baseline.json
|
|
128
|
+
- scripts/check-absent-allows.ts
|
|
129
|
+
- scripts/check-bare-delivery-await.ts
|
|
130
|
+
- scripts/check-early-return-no-log.ts
|
|
131
|
+
- scripts/check-silent-catch.ts
|
|
132
|
+
- scripts/check-sync-calls.ts
|
|
133
|
+
- scripts/check-unbounded-race.ts
|
|
134
|
+
- scripts/check.ts
|
|
135
|
+
- scripts/early-return-no-log-baseline.json
|
|
136
|
+
- scripts/lib/ratchet.ts
|
|
137
|
+
- scripts/silent-catch-baseline.json
|
|
138
|
+
- scripts/unbounded-race-baseline.json
|
|
139
|
+
- tests/check-ratchets.test.ts
|
|
140
|
+
- tests/check-sync-calls.test.ts
|
|
141
|
+
- CLAUDE.md
|
|
142
|
+
|
|
143
|
+
### S12
|
|
144
|
+
|
|
145
|
+
- tests/container-copy-list-closure.test.ts
|
|
146
|
+
- tests/env-claims-declare-hostonly.test.ts
|
|
147
|
+
- tests/helpers
|
|
148
|
+
- tests/helpers/inventory.ts
|
|
149
|
+
- tests/helpers/source-scan.ts
|
|
150
|
+
- tests/inventories/guard-axes.ts
|
|
151
|
+
- tests/inventories/host-limits.ts
|
|
152
|
+
- tests/inventories/pi-spawns.ts
|
|
153
|
+
- tests/inventories/run-entries.ts
|
|
154
|
+
- tests/inventory-guard-axes.test.ts
|
|
155
|
+
- tests/inventory-host-limits.test.ts
|
|
156
|
+
- tests/inventory-pi-spawns.test.ts
|
|
157
|
+
- tests/inventory-run-entries.test.ts
|
|
158
|
+
- tests/no-module-eviction.test.ts
|
|
159
|
+
- tests/release-gate-map.test.ts
|
|
160
|
+
- tests/source-scan.test.ts
|
|
161
|
+
- CLAUDE.md
|
|
162
|
+
- docs/archive/permissions-and-config/2026-09-22-sensitive-guard-one-read.md
|
|
163
|
+
- docs/backlog/feed-watch-triaged-roundup.md
|
|
164
|
+
- docs/bugs/*.md
|
|
165
|
+
|
|
84
166
|
## Adjudicated overlaps
|
|
85
167
|
|
|
86
168
|
> Pre-answers for the execution commands' preflight overlap prompt. Scoped to exact branch + file pairs on branches that belong to NO active plan (a hand-opened worktree, another contributor). A branch of a sibling plan's session is never listed here — it becomes a cross-plan edge instead.
|
|
87
169
|
|
|
88
170
|
| Session | Branch (not in this plan) | Files | Verdict | Decided |
|
|
89
171
|
|---------|---------------------------|-------|---------|---------|
|
|
90
|
-
| — | no live worktrees at build time | — | — | — |
|
|
172
|
+
| — | no live worktrees at build time (re-measured at the 2026-09-23 rebuild: only the primary checkout) | — | — | — |
|
|
91
173
|
|
|
92
174
|
## Not ours
|
|
93
175
|
|
|
@@ -95,7 +177,9 @@
|
|
|
95
177
|
|
|
96
178
|
| File / area | Author | Basis |
|
|
97
179
|
|-------------|--------|-------|
|
|
98
|
-
|
|
|
180
|
+
| `src/ops/shadow-root.ts`, `src/ops/shadow-service.ts`, `src/config.ts`, `src/cli/mercury.ts`, `tests/shadow-root.test.ts`, `tests/shadow-service.test.ts` (S9) | avishai tsabari | 14 d to 2026-09-23 (`9e8268c` shadow live-project resolution, version bumps, `1812d41` office-365-mail); lane Q11 → ours |
|
|
181
|
+
| `package.json` (S11) | avishai tsabari / Avishai-Tsabari / dependabot[bot] | version bumps and dependency PRs (#100, #111); lane Q12 → ours |
|
|
182
|
+
| `tests/container-copy-list-closure.test.ts` (S12) | avishai tsabari / Avishai-Tsabari | `53e9ca7` mercury build stages the Dockerfile's COPY sources; S12 copies its pattern and does not edit it; lane Q13 → ours |
|
|
99
183
|
|
|
100
184
|
## Deferred
|
|
101
185
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## Launched — 2026-09-24T12:25Z
|
|
2
|
+
Branch: worktree-feature-shadow-feed-fixtures
|
|
3
|
+
|
|
4
|
+
## Report — 2026-09-24T15:47Z
|
|
5
|
+
Outcome: delivered
|
|
6
|
+
Delivered: —
|
|
7
|
+
Blocked-on: —
|
|
8
|
+
Deploy needs: restart
|
|
9
|
+
Files changed:
|
|
10
|
+
- docs/archive/rehearsal/2026-09-24-shadow-feed-fixtures.md
|
|
11
|
+
- docs/pending-updates/shadow-feed-fixtures.md
|
|
12
|
+
- docs/pending-verification.md
|
|
13
|
+
- examples/extensions/feed-watch/fixtures.ts
|
|
14
|
+
- examples/extensions/feed-watch/index.ts
|
|
15
|
+
- tests/feed-watch-fixtures.test.ts
|
|
16
|
+
- tests/fixtures/feed-watch/shadow/README.md
|
|
17
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Ffeeds.bbci.co.uk%2Fsport%2Ffootball%2Frss.xml
|
|
18
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Fwww.maccabi-tlv.co.il%2Ffeed
|
|
19
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Fwww.one.co.il%2Frss
|
|
20
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Fwww.theguardian.com%2Ffootball%2Frss
|
|
21
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Fwww.whoscored.com%2Frss
|
|
22
|
+
- tests/fixtures/feed-watch/shadow/feeds/rss%3Ahttps%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fchannel_id%3DUCWV3obpZVGgJ3j9FVhEjF2Q
|
|
23
|
+
- tests/fixtures/feed-watch/shadow/feeds/telegram%3ABeitarNews
|
|
24
|
+
- tests/fixtures/feed-watch/shadow/feeds/telegram%3Amanunitedisraell
|
|
25
|
+
Siblings must know:
|
|
26
|
+
- The spec's Open Question is not closed here: `docs/bugs/feed-watch-gnews-status-key-is-the-array-index.md` still reads Open although `expandSources` keys gnews by `gnewsSourceKey` — a verify-and-archive for whoever runs `/f-bug-fix` on it.
|
|
27
|
+
- `docs/pending-verification.md`: S10 appended its section at the end, after the pi 0.87.1 / Opus 5.5 section (rebased, nothing overwritten).
|
|
28
|
+
- M2.4 `harness-on-shadow`: a MATCHED fixture cannot be rerun on the same snapshot (the carried `buffer:` fingerprint collapse); dropped fixtures can. Fresh snapshot per rehearsal.
|
|
29
|
+
- Squash commit 759d04e is on local `dev` only — not pushed (owner approval pending).
|
|
30
|
+
--- final report (verbatim) ---
|
|
31
|
+
~~~
|
|
32
|
+
S10 shadow-feed-fixtures — delivered to local dev as 759d04e (not pushed).
|
|
33
|
+
- New examples/extensions/feed-watch/fixtures.ts; index.ts wires it into buildDeps.fetchFeed and the poll job (shadow === true only).
|
|
34
|
+
- tests/feed-watch-fixtures.test.ts (34 tests; three guards negative-tested red); 8 checked-in fixtures + README under tests/fixtures/feed-watch/shadow/.
|
|
35
|
+
- docs/pending-verification.md: S10 section with 2 MANUAL-VERIFY lines and pointers to the 8 unlocked lines.
|
|
36
|
+
- Spec archived to docs/archive/rehearsal/2026-09-24-shadow-feed-fixtures.md; docs/pending-updates/shadow-feed-fixtures.md written; ARCHITECTURE.md unchanged.
|
|
37
|
+
- bun run check: all 12 links passed after the rebase onto dev. Code review: 2 findings, fixed. QA: 32/34 pass, 2 deferred to the box.
|
|
38
|
+
- Deviation: a matched fixture is not new on a same-snapshot rerun (buffer fingerprint collapse); pinned by tests and documented.
|
|
39
|
+
- Deploy: restart (host-only extension code), verified against ~/whatsapp-bot/.mercury/extensions/feed-watch/.
|
|
40
|
+
~~~
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
## Launched — 2026-09-24T12:27Z
|
|
2
|
+
Branch: worktree-feature-ratchet-shapes-the-summaries-named
|
|
3
|
+
|
|
4
|
+
## Report — 2026-09-24T16:00Z
|
|
5
|
+
Outcome: delivered
|
|
6
|
+
Delivered: —
|
|
7
|
+
Blocked-on: —
|
|
8
|
+
Deploy needs: none
|
|
9
|
+
Files changed:
|
|
10
|
+
- CLAUDE.md
|
|
11
|
+
- docs/archive/dev-tooling/2026-09-24-ratchet-shapes-the-summaries-named.md
|
|
12
|
+
- docs/ideas/old-ratchets-onto-the-shared-lexer.md
|
|
13
|
+
- docs/pending-updates/ratchet-shapes-the-summaries-named.md
|
|
14
|
+
- package.json
|
|
15
|
+
- scripts/absent-allows-baseline.json
|
|
16
|
+
- scripts/bare-delivery-await-baseline.json
|
|
17
|
+
- scripts/check-absent-allows.ts
|
|
18
|
+
- scripts/check-bare-delivery-await.ts
|
|
19
|
+
- scripts/check-early-return-no-log.ts
|
|
20
|
+
- scripts/check-unbounded-race.ts
|
|
21
|
+
- scripts/check.ts
|
|
22
|
+
- scripts/early-return-no-log-baseline.json
|
|
23
|
+
- scripts/lib/ratchet.ts
|
|
24
|
+
- scripts/unbounded-race-baseline.json
|
|
25
|
+
- tests/check-ratchets.test.ts
|
|
26
|
+
Siblings must know:
|
|
27
|
+
- Two bugs filed (owner Q9/OQ4, Q10), never fixed here: `denied-reply-send-is-unguarded` (src/core/handler.ts:315, minor) and `media-download-buffers-before-size-check-without-content-length` (src/core/media.ts:233, moderate). Whoever fixes one must lower `scripts/bare-delivery-await-baseline.json` / `scripts/absent-allows-baseline.json` in the same commit, or the gate reports a stale baseline.
|
|
28
|
+
- Four new links in `bun run check` / the pre-push hook: check:early-return-no-log, check:bare-delivery-await, check:absent-allows, check:unbounded-race. Any session adding one of the four shapes under src/ or examples/ will go red; a fix that removes one will go red as stale until the baseline row is lowered.
|
|
29
|
+
- CLAUDE.md: one Gotchas line appended at the end of the list (S12 also edits CLAUDE.md; rebase over it).
|
|
30
|
+
- package.json `lint` / `lint:fix` gained five `scripts/` paths right after `scripts/check-sync-calls.ts`.
|
|
31
|
+
--- final report (verbatim) ---
|
|
32
|
+
~~~
|
|
33
|
+
S11 — ratchet-shapes-the-summaries-named: implemented, archived, squash-merged into local dev as c5975b3. NOT pushed (owner rule: push waits for approval).
|
|
34
|
+
|
|
35
|
+
What shipped:
|
|
36
|
+
- scripts/lib/ratchet.ts — zero-dependency masking lexer (comments, strings, templates, regex bodies blanked at the same length), brace-depth block walker (try/catch/finally/fn/other), scanRoots / diffBaseline / formatReport / runGate.
|
|
37
|
+
- Four gates, each a pure `text -> Hit[]` detector plus an exported `gate` spec:
|
|
38
|
+
A check-early-return-no-log baseline 0
|
|
39
|
+
B check-bare-delivery-await baseline 1 (src/core/handler.ts:315; bridges/adapters skipped)
|
|
40
|
+
C check-absent-allows baseline 9 (C1 5 + C2 4)
|
|
41
|
+
D check-unbounded-race baseline 17 (D1 0 + D2 17)
|
|
42
|
+
The measurement on the branch was identical to the planning table, before and after the rebase over S10 and the scheduler ledger.
|
|
43
|
+
- tests/check-ratchets.test.ts — 58 tests: lexer hard cases; each post-mortem's pre-fix code (9739fa0, 00ffdc0^, 1794a25^, bb3ca14^, a24eb6d) counts > 0, its fix counts 0, comment/string plants count 0; wired-gate plant test over a copy of the real handler. Every rule clause negative-tested; two probes found a vacuous clause and dead code, both closed.
|
|
44
|
+
- Wiring: package.json check:* x4 and lint/lint:fix x5 paths; scripts/check.ts LINKS x4; one CLAUDE.md Gotchas line.
|
|
45
|
+
- check-silent-catch.ts / check-sync-calls.ts byte-identical.
|
|
46
|
+
|
|
47
|
+
Gates: `bun run check` and `~/check-mercury.sh check` all 16 links PASS on the rebased branch — 5986 pass / 9 skip / 0 fail, lint Checked 552 files. QA 24/24, 0 deferred. Code review: 5 findings, all fixed (try/finally not a guard; walker ternary + type-literal return; D1 `new` prefix; per-match slice; bug (b) overclaimed an event-loop stall — corrected on dev as 2d54d0d).
|
|
48
|
+
|
|
49
|
+
Bugs filed first, not fixed: docs/bugs/denied-reply-send-is-unguarded.md, docs/bugs/media-download-buffers-before-size-check-without-content-length.md.
|
|
50
|
+
Follow-up idea: docs/ideas/old-ratchets-onto-the-shared-lexer.md.
|
|
51
|
+
Spec archived: docs/archive/dev-tooling/2026-09-24-ratchet-shapes-the-summaries-named.md. docs/pending-updates/ratchet-shapes-the-summaries-named.md written — /f-doc-sync applies the ROADMAP change. ARCHITECTURE.md: not updated (dev tooling only).
|
|
52
|
+
Deploy needs: none (scripts/ and tests/ are not in the image and not run by the service).
|
|
53
|
+
~~~
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## Launched — 2026-09-24T12:30Z
|
|
2
|
+
Branch: worktree-feature-inventories-as-files
|
|
3
|
+
|
|
4
|
+
## Report — 2026-09-24T16:06Z
|
|
5
|
+
Outcome: delivered
|
|
6
|
+
Delivered: —
|
|
7
|
+
Blocked-on: —
|
|
8
|
+
Deploy needs: none
|
|
9
|
+
Files changed:
|
|
10
|
+
- CLAUDE.md
|
|
11
|
+
- docs/archive/dev-tooling/2026-09-24-inventories-as-files.md
|
|
12
|
+
- docs/backlog/feed-watch-triaged-roundup.md
|
|
13
|
+
- docs/bugs/url-bridges-drop-over-limit-attachments-without-a-note.md
|
|
14
|
+
- docs/pending-updates/inventories-as-files.md
|
|
15
|
+
- tests/helpers/inventory.ts
|
|
16
|
+
- tests/helpers/source-scan.ts
|
|
17
|
+
- tests/inventories/guard-axes.ts
|
|
18
|
+
- tests/inventories/host-limits.ts
|
|
19
|
+
- tests/inventories/pi-spawns.ts
|
|
20
|
+
- tests/inventories/run-entries.ts
|
|
21
|
+
- tests/inventory-guard-axes.test.ts
|
|
22
|
+
- tests/inventory-host-limits.test.ts
|
|
23
|
+
- tests/inventory-pi-spawns.test.ts
|
|
24
|
+
- tests/inventory-run-entries.test.ts
|
|
25
|
+
- tests/source-scan.test.ts
|
|
26
|
+
Siblings must know:
|
|
27
|
+
- Every later sensitive-guard fix (plan sensitive-bugs-0922 S1–S5) that archives its bug doc turns `tests/inventory-guard-axes.test.ts` red ON PURPOSE; the fixer rewrites that cell to cite the test the fix added.
|
|
28
|
+
- New bug `url-bridges-drop-over-limit-attachments-without-a-note` is the `none` reader of `mediaMaxSizeMb` and `maxDiskMb` in `tests/inventories/host-limits.ts`; its fix turns that test red the same way. `src/bridges/` is owned by plan bugs-0915.
|
|
29
|
+
- A new `pi` spawn (feed-watch-triaged-roundup's `triage.ts`), a new occurrence of handleRawInput/executePrompt/runTask/replyWithRetry, a new limit-shaped key in src/config.ts, or a new guard-function call is red until it has a row in `tests/inventories/`.
|
|
30
|
+
- Local `dev` @ a0ac9cc, not pushed (CLAUDE.local.md: push waits for owner approval).
|
|
31
|
+
--- final report (verbatim) ---
|
|
32
|
+
~~~
|
|
33
|
+
S12 inventories-as-files — delivered to local dev as a0ac9cc (squash), not pushed.
|
|
34
|
+
|
|
35
|
+
Four inventories under tests/inventories/ (pi-spawns 4 rows, run-entries 12 rows / 7 calls,
|
|
36
|
+
host-limits 22 keys, guard-axes 5 legs x 12 axes), each with a both-directions closure test on a
|
|
37
|
+
fail-closed lexer (tests/helpers/source-scan.ts, tests/helpers/inventory.ts, tests/source-scan.test.ts).
|
|
38
|
+
Every inventory negative-tested (remove a row → red naming file:line; plant a site → red), all reverted.
|
|
39
|
+
Bug filed: docs/bugs/url-bridges-drop-over-limit-attachments-without-a-note.md (moderate).
|
|
40
|
+
CLAUDE.md pi-spawn gotcha now points at the test; feed-watch-triaged-roundup gate row updated.
|
|
41
|
+
Gate after rebase on dev: 16/16 links, 6044 pass / 9 skip / 0 fail; WSL mirror check 12/12 (pre-rebase).
|
|
42
|
+
Spec archived: docs/archive/dev-tooling/2026-09-24-inventories-as-files.md; docs/pending-updates/inventories-as-files.md written.
|
|
43
|
+
Deploy: none (tests + docs).
|
|
44
|
+
~~~
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## Launched — 2026-09-23T11:30Z
|
|
2
|
+
Branch: —
|
|
3
|
+
|
|
4
|
+
## Report — 2026-09-23T13:05Z
|
|
5
|
+
Outcome: delivered
|
|
6
|
+
Delivered: —
|
|
7
|
+
Blocked-on: —
|
|
8
|
+
Deploy needs: none
|
|
9
|
+
Files changed:
|
|
10
|
+
- docs/backlog/shadow-own-credential.md
|
|
11
|
+
- docs/ideas/shadow-own-credential.md (deleted — promoted)
|
|
12
|
+
- docs/ROADMAP.md (Inbox row → Next #17)
|
|
13
|
+
Siblings must know:
|
|
14
|
+
- The spec predicts 14 surfaces, including src/cli/mercury.ts, src/config.ts, src/ops/shadow-{root,service,snapshot}.ts and six tests; --rebuild must re-cut the implementation session against them.
|
|
15
|
+
- Q2 is settled: a second OAuth login (option A). A shared file + lock is the documented fallback only if Step 0 fails. An API key is rejected by the owner outright.
|
|
16
|
+
- Step 0 of the implementation is an owner-run probe with no code (a second login must leave live alive); the implementation session must stop at it and not code past it.
|
|
17
|
+
- After deploy, every existing snapshot is refused (snapshot-shares-credential); take a fresh one.
|
|
18
|
+
- Separate item to file (owner, 2026-09-23): the extension-state refresh tokens (tradestation, office-365-mail) that snapshots copy through state.db. Not yet known to be a bug; to be investigated thoroughly first. Not filed here: a planning session writes only its own doc.
|
|
19
|
+
--- final report (verbatim) ---
|
|
20
|
+
~~~
|
|
21
|
+
/f-feature-planning shadow-own-credential — Goal approved, Architecture approved (2026-09-23).
|
|
22
|
+
Idea promoted to docs/backlog/shadow-own-credential.md; ROADMAP Next #17.
|
|
23
|
+
Design: shadow-own credential at ~/mercury-shadow/auth.json via `mercury shadow login`; snapshot no longer
|
|
24
|
+
copies auth.json and blanks the two env carriers; `shadow up` loses the shape-(a) copy and gains five
|
|
25
|
+
refusals (snapshot-shares-credential, credential-absent, credential-unreadable, credential-shared,
|
|
26
|
+
live-credential-unknown); loadConfig refuses a shadow auth path outside the root. Host-only → restart.
|
|
27
|
+
Next step: /f-ops-plan bench-patterns-0915 --rebuild, then /f-feature-dev shadow-own-credential
|
|
28
|
+
(Step 0 is an owner probe before any code).
|
|
29
|
+
~~~
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
## Launched — 2026-09-23T11:40Z
|
|
2
|
+
Branch: —
|
|
3
|
+
|
|
4
|
+
## Report — 2026-09-23T13:36Z
|
|
5
|
+
Outcome: delivered
|
|
6
|
+
Delivered: —
|
|
7
|
+
Blocked-on: —
|
|
8
|
+
Deploy needs: none
|
|
9
|
+
Files changed:
|
|
10
|
+
- docs/backlog/shadow-feed-fixtures.md
|
|
11
|
+
- docs/ideas/shadow-feed-fixtures.md (deleted — promoted)
|
|
12
|
+
- docs/ROADMAP.md (Inbox row → Next #18)
|
|
13
|
+
Siblings must know:
|
|
14
|
+
- The spec predicts 7 surfaces, all inside examples/extensions/feed-watch/ (new fixtures.ts, index.ts), tests/feed-watch-fixtures.test.ts, tests/fixtures/feed-watch/shadow/ and docs/pending-verification.md. It touches no src/ file, so it does not collide with shadow-own-credential (S4) or with bugs-0915's files; --rebuild must still re-cut the implementation session against these surfaces.
|
|
15
|
+
- `--reset-feed-state` is dropped: an empty `seen` map triggers the silent seed tick. Novelty comes from a per-process `{{nonce}}` token, so no state is deleted and nothing in src/ops/ changes.
|
|
16
|
+
- Only 8 of the 11 feed-shaped pending lines are unlocked (L1574, L1575, L1598, L1621, L1623, L1640, L1641, L1718); L1691, L1698 and L1535 are not fixture-drivable.
|
|
17
|
+
- M1.3c is not a build dependency, but it sets two operating constraints: fixture rehearsals stay short and supervised until it ships (a matched fixture opens a model-calling verify run), and after it ships every fresh snapshot needs the fixtures copied in again.
|
|
18
|
+
- Stale doc to fix separately: docs/bugs/feed-watch-gnews-status-key-is-the-array-index.md reads Open against code that already keys gnews targets by content (spec Open Questions).
|
|
19
|
+
--- final report (verbatim) ---
|
|
20
|
+
~~~
|
|
21
|
+
/f-feature-planning shadow-feed-fixtures — Goal approved, Architecture approved (2026-09-23).
|
|
22
|
+
Idea promoted to docs/backlog/shadow-feed-fixtures.md; ROADMAP Next #18.
|
|
23
|
+
Design: in shadow mode only (ctx.config.shadow === true), feed-watch's buildDeps.fetchFeed looks up
|
|
24
|
+
<resolved dataDir>/fixtures/feeds/<encodeURIComponent(target key)> and answers fetchForTarget from the file
|
|
25
|
+
(200 + rendered body, or 503 for `dead`); parser, caps, matching, dedup, seen and the verify task stay the
|
|
26
|
+
real code. Tokens {{nonce}} (9 digits, per process), {{now}}, {{now_iso}}. Unknown file names warned once
|
|
27
|
+
with the valid keys. Nine checked-in fixtures + README under tests/fixtures/feed-watch/shadow/.
|
|
28
|
+
Host-only extension code → restart; verify against the installed copy.
|
|
29
|
+
Next step: /f-ops-plan bench-patterns-0915 --rebuild, then /f-feature-dev shadow-feed-fixtures.
|
|
30
|
+
~~~
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Report — 2026-09-22T20:22Z
|
|
2
|
+
Outcome: delivered
|
|
3
|
+
Delivered: local (uncommitted — shared checkout, no git write per brief; owner commits Round 0)
|
|
4
|
+
Blocked-on: —
|
|
5
|
+
Deploy needs: none
|
|
6
|
+
Files changed:
|
|
7
|
+
- docs/backlog/sensitive-guard-one-read.md
|
|
8
|
+
- docs/ideas/sensitive-guard-one-read.md (deleted — promoted)
|
|
9
|
+
- docs/ROADMAP.md (row 14 in Next + its Inbox row removed; rows 15-18 in the same file belong to p0-plan-0922 sessions)
|
|
10
|
+
- docs/bugs/sensitive-gate-is-checked-before-the-space-queue.md
|
|
11
|
+
- docs/bugs/sensitive-guard-replay-runs-with-the-yes-messages-reply-metadata.md
|
|
12
|
+
- docs/bugs/scheduled-run-skipped-by-sensitive-deny-has-no-reader.md
|
|
13
|
+
- docs/bugs/sensitive-guard-axis-coverage-gaps.md
|
|
14
|
+
- docs/bugs/sensitive-guard-replay-loses-the-dropped-attachment-note.md (one cross-link bullet)
|
|
15
|
+
- docs/plans/bench-patterns-0915/sessions/S6.md
|
|
16
|
+
Siblings must know:
|
|
17
|
+
- S8 (`inventories-as-files`): the guard inventory input is `docs/backlog/sensitive-guard-one-read.md` § `### Legs × axes (the table S8 copies)`, with 5 legs (L1-L5) × 12 axes. Cells marked `none` are "construction, not test" until B4 closes them.
|
|
18
|
+
- `sensitive-opt-out-should-deny-not-block` (deferred in p0-plan-0922): plan it after B1. The capability broker (L4) and env injection (L5) are the legs an opt-out must also deny at.
|
|
19
|
+
--- final report (verbatim) ---
|
|
20
|
+
~~~
|
|
21
|
+
S6 — sensitive-guard-one-read — DELIVERED (read only; no src/ or tests/ edit)
|
|
22
|
+
|
|
23
|
+
Legs: executePrompt is the single container choke point (runtime.ts:3219),
|
|
24
|
+
two callers: handleRawInput (chat-sdk via handler.ts:249 — bridges,
|
|
25
|
+
simulate-ingress, shadow, smoke; cli via routes/chat.ts:314) and the scheduler
|
|
26
|
+
handler (cron poll + triggerTask: dashboard ▶, mrctl tasks run). The broker
|
|
27
|
+
(capability.ts:52) and the env injection (runtime.ts:3127) are downstream
|
|
28
|
+
enforcement points.
|
|
29
|
+
|
|
30
|
+
Axes: the idea's seven + replay-meta, check→use, relink (+ skip visibility,
|
|
31
|
+
manual trigger as leg-specific rows).
|
|
32
|
+
|
|
33
|
+
Bugs filed:
|
|
34
|
+
- B1 moderate sensitive-gate-is-checked-before-the-space-queue
|
|
35
|
+
- B2 moderate sensitive-guard-replay-runs-with-the-yes-messages-reply-metadata
|
|
36
|
+
- B3 minor scheduled-run-skipped-by-sensitive-deny-has-no-reader
|
|
37
|
+
- B4 minor sensitive-guard-axis-coverage-gaps (test-only + stale comments)
|
|
38
|
+
Open bug sensitive-guard-replay-loses-the-dropped-attachment-note not refiled;
|
|
39
|
+
cross-linked to B2 (one fix: store the blocked turn).
|
|
40
|
+
|
|
41
|
+
Recommended order at --rebuild: B2 + drop-note bug together, then B1, then B3;
|
|
42
|
+
B4 rides along. --drop S6.
|
|
43
|
+
|
|
44
|
+
Gate: bun run check — all 12 links passed; 5799 pass / 9 skip / 0 fail;
|
|
45
|
+
lint "Checked 538 files".
|
|
46
|
+
~~~
|