From 4302376b2d6e9fd73b025590a3dfdd264931359d Mon Sep 17 00:00:00 2001 From: warren Date: Sun, 31 May 2026 10:04:27 +0000 Subject: [PATCH] chore(warren): seeds state --- .seeds/issues.jsonl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.seeds/issues.jsonl b/.seeds/issues.jsonl index 4d02cbf..5847136 100644 --- a/.seeds/issues.jsonl +++ b/.seeds/issues.jsonl @@ -298,7 +298,7 @@ {"id":"mulch-6871","title":"Add --content flag and accept it as a source for convention content","status":"closed","type":"task","priority":2,"plan_step_index":0,"description":"\nStep 1 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Add a `--content ` named flag and make `collectField` honor it as an additional source for the convention `content` field (positional still works, and an explicit `--content` flag should win for clarity). Rewrite the missing-required…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-27T15:02:05.758Z","updatedAt":"2026-05-27T15:08:29.708Z","plan_id":"pl-21a3","blocks":["mulch-ca83","mulch-4f80"],"closedAt":"2026-05-27T15:08:29.708Z"} {"id":"mulch-2f54","title":"Replace tautological missing-content error with a concrete retry example","status":"closed","type":"task","priority":2,"plan_step_index":1,"description":"\nStep 2 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Add a `--content ` named flag and make `collectField` honor it as an additional source for the convention `content` field (positional still works, and an explicit `--content` flag should win for clarity). Rewrite the missing-required…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-27T15:02:05.758Z","updatedAt":"2026-05-27T15:13:48.980Z","plan_id":"pl-21a3","blocks":["mulch-ca83","mulch-4f80"],"closedAt":"2026-05-27T15:13:48.980Z"} {"id":"mulch-ca83","title":"Add tests for --content flag and improved error message","status":"closed","type":"task","priority":2,"plan_step_index":2,"description":"\nStep 3 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Add a `--content ` named flag and make `collectField` honor it as an additional source for the convention `content` field (positional still works, and an explicit `--content` flag should win for clarity). Rewrite the missing-required…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-27T15:02:05.758Z","updatedAt":"2026-05-27T15:21:31.977Z","plan_id":"pl-21a3","blockedBy":["mulch-6871","mulch-2f54"],"blocks":["mulch-da82","mulch-4f80"],"closedAt":"2026-05-27T15:21:31.977Z"} -{"id":"mulch-da82","title":"Release: run /release per .claude/commands/release.md","status":"closed","type":"task","priority":2,"plan_step_index":3,"description":"\nStep 4 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Add a `--content ` named flag and make `collectField` honor it as an additional source for the convention `content` field (positional still works, and an explicit `--content` flag should win for clarity). Rewrite the missing-required…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-27T15:02:05.758Z","updatedAt":"2026-05-27T15:28:25.134Z","plan_id":"pl-21a3","blockedBy":["mulch-ca83"],"blocks":["mulch-4f80"],"closedAt":"2026-05-27T15:28:25.134Z"} +{"id":"mulch-da82","title":"Release: run /release per .claude/commands/release.md","status":"closed","type":"task","priority":2,"plan_step_index":3,"description":"\nStep 3 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Replace the hard-coded Usage string in `src/cli.ts`'s custom `formatHelp` with Commander's `helper.commandUsage(cmd)` so each subcommand's actual argument signature (including positionals) is rendered. This is a one-line change that fixes…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-27T15:02:05.758Z","updatedAt":"2026-05-31T10:04:18.678Z","plan_id":"pl-21a3","blockedBy":["mulch-ca83","mulch-3941","mulch-c901"],"blocks":["mulch-4f80"],"closedAt":"2026-05-27T15:28:25.134Z","labels":["bugwatch"]} {"id":"mulch-e7f6","title":"nightwatch patrol: 2026-05-28","status":"open","type":"task","priority":3,"createdAt":"2026-05-28T10:05:40.606Z","updatedAt":"2026-05-28T10:06:37.862Z","labels":["patrol","nightwatch"],"plan_id":"pl-7a81","blockedBy":["mulch-5b9c","mulch-2a17","mulch-1b36","mulch-a8cd","mulch-201a"]} {"id":"mulch-5b9c","title":"Validate --outcome-duration / --duration with strict regex parser","status":"closed","type":"task","priority":2,"plan_step_index":0,"description":"\nStep 1 of plan pl-7a81.\n\nParent seed: mulch-e7f6 — nightwatch patrol: 2026-05-28\nPlan template: refactor\nPlan approach: Targeted, isolated fixes. Each step touches a small set of files and lands as a single PR. Independent steps (parsing, error-coloring, JSON.parse hardening, update.ts JSON output) can ship in any order; the release step is last and blocked…\n\nRun `sd plan show pl-7a81` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-28T10:06:37.862Z","updatedAt":"2026-05-28T10:15:27.857Z","plan_id":"pl-7a81","blocks":["mulch-e7f6"],"closedAt":"2026-05-28T10:15:27.857Z"} {"id":"mulch-2a17","title":"Normalize fatal-error coloring across commands","status":"closed","type":"task","priority":2,"plan_step_index":1,"description":"\nStep 2 of plan pl-7a81.\n\nParent seed: mulch-e7f6 — nightwatch patrol: 2026-05-28\nPlan template: refactor\nPlan approach: Targeted, isolated fixes. Each step touches a small set of files and lands as a single PR. Independent steps (parsing, error-coloring, JSON.parse hardening, update.ts JSON output) can ship in any order; the release step is last and blocked…\n\nRun `sd plan show pl-7a81` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-28T10:06:37.862Z","updatedAt":"2026-05-28T10:24:27.279Z","plan_id":"pl-7a81","blocks":["mulch-e7f6"],"closedAt":"2026-05-28T10:24:27.279Z"} @@ -327,3 +327,5 @@ {"id":"mulch-6145","title":"T4: trim redundant git init/commits from beforeEach","status":"open","type":"task","priority":2,"createdAt":"2026-05-28T19:15:24.041Z","updatedAt":"2026-05-28T19:16:03.243Z","description":"GOAL: Stop paying for real `git init` + git config + commits in beforeEach for tests that do not actually assert git behavior. Real git subprocesses (3-5 per test) dominate several files.\n\nWorking dir: cd /Users/jayminwest/Projects/os-eco/mulch\nINDEPENDENT: no dependency on other Ts.\n\nHOTSPOTS (run real execFileSync('git', ...) in setup):\n- test/commands/sync.test.ts (9.15s/19 tests; initGitRepo + gitCommitAll per test)\n- test/commands/config.test.ts (worktree blocks)\n- test/commands/record.test.ts, test/commands/prime.test.ts\n- test/utils/active-work.test.ts, test/utils/worktree.test.ts\n\nMETHOD:\n- Introduce a small helper (e.g. test/helpers/git.ts withGitRepo(dir)) using `git init -q`, single `git config` for user.name/email, and only commit when the test needs commits.\n- Move git setup OUT of blanket beforeEach and INTO the specific describe/it blocks that assert git-dependent behavior. Tests that only touch .mulch/ files should not init a repo at all.\n- Where a git repo is genuinely required for every test in a file (e.g. sync), keep it but minimize subprocess count (skip extra commits/config not asserted).\n\nVERIFICATION (must exit 0; test count unchanged):\n bun run lint && bun run typecheck\n bun test test/commands/sync.test.ts test/commands/config.test.ts test/commands/record.test.ts test/commands/prime.test.ts test/utils/active-work.test.ts test/utils/worktree.test.ts\n bun run test:ci && bun run report:timing # record reductions\n\nACCEPTANCE:\n- No test loses coverage of git-dependent behavior.\n- Per-test git subprocess count reduced; sync/record/prime/active-work file times drop.\n\nPITFALLS:\n- getMulchDir()/worktree resolution depends on a real .git — keep git for tests that exercise worktree/sync semantics.\n- Do not share a single mutable repo across tests that commit; isolation matters. Per-test temp repos stay, just leaner.","blocks":["mulch-bee4"]} {"id":"mulch-f7bf","title":"T5: adaptive parallel shard runner (core-count agnostic)","status":"open","type":"task","priority":1,"createdAt":"2026-05-28T19:15:54.049Z","updatedAt":"2026-05-28T19:16:03.298Z","description":"GOAL: `bun test` runs all files sequentially in ONE process, so wall-clock = sum of file times. Add a runner that splits test files into N balanced shards and runs them as concurrent `bun test ` processes. Shard count MUST be derived from the runtime environment — never hardcoded to any developer machine spec.\n\nWorking dir: cd /Users/jayminwest/Projects/os-eco/mulch\nINDEPENDENT build (blocks T6).\n\nFILES TO ADD:\n- ADD scripts/test-parallel.ts (run via Bun):\n - Determine shard count: `MULCH_TEST_SHARDS` env > `--shards N` arg > Math.max(1, os.availableParallelism?.() ?? os.cpus().length). Cap to number of test files.\n - Discover test files (glob test/**/*.test.ts).\n - Weight files by historical timing parsed from junit.xml when present (reuse parseJUnit from scripts/report-test-timing.ts), else by file size; greedily bin-pack into shards for balance.\n - Spawn one `bun test ` per shard concurrently (Bun.spawn), stream/prefix output, await all, exit non-zero if ANY shard fails.\n - SEQUENTIAL FALLBACK: if resolved shards <= 1, exec a single plain `bun test` (identical behavior to today).\n- ADD package.json script: \"test:parallel\": \"bun run scripts/test-parallel.ts\".\n- ADD scripts/test-parallel.test.ts: unit-test the pure pieces (shard-count resolution precedence, bin-packing balance, sequential fallback) — pure functions, no real spawning.\n\nDESIGN CONSTRAINTS:\n- Core-count agnostic + cloud-safe: works on a 1-vCPU box (falls back to sequential), a 2-4 vCPU cloud dev box, and large CI runners with the SAME code. No machine-specific constants.\n- Tests already isolate via mkdtemp unique prefixes, so cross-shard temp-dir collisions are not a concern.\n- Deterministic file->shard assignment given the same inputs (stable sort) for reproducibility.\n\nVERIFICATION (must exit 0):\n bun run lint && bun run typecheck\n bun test scripts/test-parallel.test.ts\n MULCH_TEST_SHARDS=1 bun run test:parallel # sequential fallback, full suite green\n MULCH_TEST_SHARDS=4 bun run test:parallel # parallel, same pass/fail outcome + lower wall-clock\n\nACCEPTANCE:\n- Same overall pass/fail result as `bun test` at any shard count.\n- Wall-clock scales down with shard count; sequential fallback exactly mirrors plain `bun test`.\n\nPITFALLS:\n- Aggregate exit code: fail if ANY shard fails (do not mask with tail/pipe).\n- os.availableParallelism may be undefined on older runtimes — guard with cpus().length.\n- Coverage merge across shards is handled in T6, but design spawn args so per-shard `--coverage --coverage-reporter=lcov` with distinct outfiles is possible.","blocks":["mulch-d61d","mulch-bee4"]} {"id":"mulch-d61d","title":"T6: wire CI to sharded runner + coverage merge","status":"open","type":"task","priority":2,"createdAt":"2026-05-28T19:15:54.152Z","updatedAt":"2026-05-28T19:16:03.352Z","description":"GOAL: Use the T5 shard runner in CI with an EXPLICIT, deterministic shard matrix (not derived from runner core count, so behavior is reproducible across runner sizes), merge per-shard coverage, and keep the timing report.\n\nWorking dir: cd /Users/jayminwest/Projects/os-eco/mulch\nDEPENDS ON: T5 (runner must exist).\n\nFILES TO EDIT:\n- .github/workflows/ci.yml:\n - Replace the single test:ci step with a small matrix (e.g. shard: [1,2,3,4], total 4) OR a single job invoking `MULCH_TEST_SHARDS=4 bun run test:parallel` — choose whichever keeps coverage merge simplest; document the choice in the job.\n - Each shard runs `bun test --coverage --coverage-reporter=lcov --coverage-reporter=...` writing a shard-unique lcov path, plus --reporter=junit to a shard-unique junit file.\n - Add a merge step: combine shard lcov files into coverage/lcov.info (concatenate/merge) and shard junit files into junit.xml so existing check:coverage + report:timing + report:quality keep working unchanged.\n - Keep uploading coverage/lcov.info and junit.xml artifacts (VAL-CROSS-003) and appending report:timing to GITHUB_STEP_SUMMARY.\n\nVERIFICATION (must exit 0):\n bun run lint && bun run typecheck\n # Locally emulate: run the runner with coverage, merge, then:\n bun run check:coverage\n bun run report:timing\n ls -la coverage/lcov.info junit.xml\n\nACCEPTANCE:\n- CI wall-clock for tests drops vs the previous single sequential run.\n- Merged coverage feeds check:coverage with no budget regression; merged junit feeds report:timing.\n- Matrix is explicit/deterministic — independent of the physical runner's core count.\n\nPITFALLS:\n- lcov merge: same source files appear in multiple shards' reports only if executed there; merge must union records, not double-count lines (use a real lcov merge approach, not naive concat if it corrupts totals — verify check:coverage numbers are sane).\n- junit merge must keep total tests = sum across shards for report:timing accuracy.\n- Do not regress check:all ordering or artifact-upload steps.","blockedBy":["mulch-f7bf"],"blocks":["mulch-bee4"]} +{"id":"mulch-3941","title":"Render real Commander usage in custom formatHelp","status":"open","type":"task","priority":2,"plan_step_index":0,"description":"\nStep 1 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Replace the hard-coded Usage string in `src/cli.ts`'s custom `formatHelp` with Commander's `helper.commandUsage(cmd)` so each subcommand's actual argument signature (including positionals) is rendered. This is a one-line change that fixes…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-31T10:04:18.678Z","updatedAt":"2026-05-31T10:04:18.678Z","plan_id":"pl-21a3","labels":["bugwatch"],"blocks":["mulch-4f80","mulch-c901","mulch-da82"]} +{"id":"mulch-c901","title":"Add regression test for record --help showing positional args","status":"open","type":"task","priority":2,"plan_step_index":1,"description":"\nStep 2 of plan pl-21a3.\n\nParent seed: mulch-4f80 — Bug: ml record --type convention content parameter is undiscoverable\nPlan template: bug\nPlan approach: Replace the hard-coded Usage string in `src/cli.ts`'s custom `formatHelp` with Commander's `helper.commandUsage(cmd)` so each subcommand's actual argument signature (including positionals) is rendered. This is a one-line change that fixes…\n\nRun `sd plan show pl-21a3` for the full plan (context, alternatives, sibling steps, acceptance criteria).\n","createdAt":"2026-05-31T10:04:18.678Z","updatedAt":"2026-05-31T10:04:18.678Z","plan_id":"pl-21a3","labels":["bugwatch"],"blocks":["mulch-4f80","mulch-da82"],"blockedBy":["mulch-3941"]}