FE-1092: Dev scripting and fixture curation cleanup#268
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019f0404-52b3-749d-9ec9-2126a549ceea Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019f0404-52b3-749d-9ec9-2126a549ceea Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019f0404-52b3-749d-9ec9-2126a549ceea Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019f0404-52b3-749d-9ec9-2126a549ceea Co-authored-by: Amp <amp@ampcode.com>
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview Fixtures adopt Reviewed by Cursor Bugbot for commit 5274f37. Bugbot is set up for automated code reviews on this repo. Configure here. |
| } | ||
|
|
||
| function parsePositiveInteger(value: string, flag: string): number { | ||
| if (!/^[1-9]\d*$/u.test(value)) { |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Ensure that the regex used to compare with user supplied input is safe from regular expression denial of service.
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by regex_dos.
You can view more details about this finding in the Semgrep AppSec Platform.
There was a problem hiding this comment.
Pull request overview
Refactors Brunch’s local dev workflow and fixture catalog: replaces the old BRUNCH_DEV/dev.* RPC harness with an explicit npm run dev launcher + CLI subcommands, standardizes seed fixtures around name/variant (with base.json as the canonical variant), and cleans up stale wiring (PI_SOURCE alias, dev RPC docs/tests, workbench seed sets).
Changes:
- Introduces a new dev launcher (
scripts/dev.ts→src/dev/dev-cli.ts) with explicit subcommands (rpc,mutate,export) and--dev-toolsgating. - Reworks seed fixture discovery/CLI and fixture directory layout to
/.fixtures/seeds/<name>/<variant>.json(plus derived workbenches). - Removes the gated
dev.graph.mutateGraphRPC method family and updates docs/tests to the new curation seam.
Reviewed changes
Copilot reviewed 83 out of 90 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Removes PI_SOURCE Vite alias wiring. |
| src/treedocs.yaml | Updates tree inventory for renamed/removed dev + RPC files and new snapshots. |
| src/session/tests/workspace-overview-context.test.ts | Updates seed fixture path resolution to name/variant. |
| src/rpc/README.md | Documents removal of dev.* RPC and points curation to dev CLI. |
| src/rpc/handlers.ts | Drops dev RPC registry option; uses public registry only. |
| src/rpc/tests/handlers.test.ts | Removes dev RPC coverage and asserts dev methods stay absent. |
| src/probes/ship-gate-composition-proof.ts | Updates default seed refs to new name/variant scheme. |
| src/probes/project-graph-review-cycle-proof.ts | Renames seed options to seedName/seedVariant and updates fixture loading. |
| src/probes/fixture-curation-loop.ts | Renames seed options to seedName/seedVariant and updates fixture loading. |
| src/probes/tests/ship-gate-composition-proof.test.ts | Updates expected seed refs. |
| src/probes/tests/project-graph-review-cycle-proof.test.ts | Updates report shape expectations for seed naming. |
| src/probes/tests/fixture-curation-loop.test.ts | Updates report shape expectations for seed naming. |
| src/graph/validate-fixture.ts | Updates CLI docs/usage to name/variant. |
| src/graph/seed-fixtures.ts | Reworks seed ref parsing, listing, and derived workbench paths; updates CLI semantics. |
| src/graph/export-fixtures.ts | Extracts a workspace-based helper for exporting fixtures. |
| src/graph/tests/support/fixture-reads.ts | Updates fixture ref shape and error messages to name/variant. |
| src/graph/tests/spec-ownership.test.ts | Updates test header wording. |
| src/graph/tests/seed-fixtures.test.ts | Updates tests for new seed ref shape and derived workbench behavior. |
| src/graph/tests/mutate-graph-edge-schema.test.ts | Switches dev-mutate schema source from RPC registry to src/dev/graph-curation. |
| src/dev/workspace-rpc.ts | Deletes the old one-shot workspace RPC helper script. |
| src/dev/tier-2-harness.ts | Switches dev toggles from BRUNCH_DEV env to debugMirror/developerTools options. |
| src/dev/README.md | Re-documents dev directory ownership and the new launcher/call patterns. |
| src/dev/pi-source-alias.ts | Deletes PI_SOURCE alias implementation. |
| src/dev/index.ts | Exposes dev CLI + curation seam exports; removes workspaceRpc re-export. |
| src/dev/graph-curation.ts | Extracts dev graph mutation parsing/apply helpers (in-process seam). |
| src/dev/brunch-dev.ts | Deletes BRUNCH_DEV helper. |
| src/dev/tests/tier-2-harness.test.ts | Updates assertions to new debug mirror + developer tools gating. |
| src/dev/tests/pi-source-alias.test.ts | Deletes PI_SOURCE alias tests. |
| src/dev/tests/graph-curation.test.ts | Adds tests for the new in-process curation seam. |
| src/dev/tests/faux-harness.test.ts | Updates introspection option shape (queryTools). |
| src/dev/tests/dev-cli.test.ts | Adds tests for the new dev CLI flow and seed→workbench derivation. |
| src/build-info.ts | Adds centralized build-info resolution used by TUI/version + runtime dev detection. |
| src/app/pi-settings.ts | Removes audited getter for getThemeSetting. |
| src/app/pi-extensions.ts | Reworks introspection options to gate query tools separately from debug cache. |
| src/app/brunch.ts | Adds --dev-tools plumbing and new launch options; removes dev RPC enablement. |
| src/app/brunch-tui.ts | Adds developerTools/debugMirror controls and updated introspection threading. |
| src/app/tests/brunch.test.ts | Updates rpc-mode registry expectation to exclude dev methods. |
| src/app/tests/brunch-tui.test.ts | Updates tests for debug mirroring defaults and developerTools gating. |
| src/agents/contexts/spec/tests/spec-context.test.ts | Updates fixture loading to name/variant. |
| src/agents/contexts/graph/tests/related-nodes.test.ts | Updates fixture ref shape to name/variant. |
| src/agents/contexts/graph/tests/node-neighborhood.test.ts | Updates fixture ref shape to name/variant. |
| src/agents/contexts/graph/tests/graph-slice.test.ts | Renames kind snapshot fixture and updates snapshot reference. |
| src/agents/contexts/graph/snapshots/graph-overview-kind-coverage-matrix.md | Adds/renames snapshot for the kind-coverage fixture. |
| src/.pi/extensions/tests/dev-mode-introspection.test.ts | Updates introspection option shape (queryTools). |
| src/.pi/extensions/tests/brunch-data-context.test.ts | Updates fixture loading to name/variant. |
| src/.pi/extensions/tests/agent-runtime-system-prompts.test.ts | Updates introspection option shape (queryTools). |
| src/.pi/components/brunch-version.ts | Switches version/dev marker logic to shared build-info. |
| scripts/dev.ts | Adds a top-level script entry for the dev launcher. |
| package.json | Points npm run dev to the new launcher; adds dev:raw; adds @clack/prompts. |
| package-lock.json | Locks @clack/prompts and transitive deps. |
| docs/testing/seeded-dev-rpc.md | Rewrites seeded dev workflow docs around launcher + explicit mutate/export seams. |
| docs/README.md | Updates testing guide description. |
| docs/praxis/manual-testing.md | Updates manual testing flow to new seed refs and launcher commands. |
| docs/architecture/poc-live-ship-runbook.md | Updates runbook commands to new seed refs and launcher usage. |
| .fixtures/workbenches/live-graph-observer/README.md | Removes obsolete workbench README. |
| .fixtures/seeds/yamlbase/README.md | Updates validate command to new seed ref. |
| .fixtures/seeds/workspace-spread/README.md | Removes obsolete seed-set README (replaced by split families). |
| .fixtures/seeds/workspace-beta-commitments/base.json | Renames spec slug to match new family naming. |
| .fixtures/seeds/workspace-alpha-grounding/base.json | Renames spec slug to match new family naming. |
| .fixtures/seeds/README.md | Documents new name/variant seed ref contract and updated catalog. |
| .fixtures/seeds/rd-loop/README.md | Renames canonical fixture to base.json and updates validate command. |
| .fixtures/seeds/rd-loop/base.json | Adds canonical rd-loop base fixture. |
| .fixtures/seeds/kind-coverage-matrix/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/kind-band-spread/README.md | Removes obsolete seed-set README. |
| .fixtures/seeds/fable/README.md | Renames canonical fixture to base.json and updates validate command. |
| .fixtures/seeds/edge-spread/README.md | Removes obsolete seed-set README. |
| .fixtures/seeds/edge-hub-neighborhood/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/edge-category-directions/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/dumpchat/README.md | Renames canonical fixture to base.json and updates validate command. |
| .fixtures/seeds/dumpchat/base.json | Adds canonical dumpchat base fixture. |
| .fixtures/seeds/cook-resilient-pipeline/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/cook-port/README.md | Updates loader/validate docs to new cook family layout. |
| .fixtures/seeds/cook-port/_port-script.ts | Writes cook fixtures into sibling cook-*/base.json dirs. |
| .fixtures/seeds/cook-parallel-utils/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/cook-layered-todo/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/brunch-self/README.md | Updates README references for new base fixture naming. |
| .fixtures/seeds/brunch-self/base.json | Adds canonical brunch-self base fixture. |
| .fixtures/seeds/bilal-port/README.md | Updates Bilal port layout docs to sibling bilal-*/base.json outputs. |
| .fixtures/seeds/bilal-port/_port-script.ts | Writes Bilal fixtures into sibling family dirs and updates README generation. |
| .fixtures/seeds/bilal-port-variants/README.md | Removes obsolete variant set README. |
| .fixtures/seeds/bilal-macro-view/grounded-intent.json | Updates grounded-intent variant spec header to new naming. |
| .fixtures/seeds/bilal-macro-view/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/bilal-macro-view/_variant-script.ts | Updates variant script to read/write new filenames and spec header. |
| .fixtures/seeds/bilal-explorer-ui/base.json | Renames spec slug to match family name. |
| .fixtures/seeds/bilal-code-health/base.json | Renames spec slug to match family name. |
| .fixtures/README.md | Updates fixtures tree and recommended seeding commands to new scheme. |
Comments suppressed due to low confidence (1)
docs/testing/seeded-dev-rpc.md:144
- This troubleshooting command uses the placeholder
<name/variant>but seed refs are<name>/<variant>.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cwd: { type: 'string' }, | ||
| mode: { type: 'string', default: 'tui' }, | ||
| 'open-web': { type: 'boolean', default: false }, | ||
| 'dev-tools': { type: 'boolean', default: false }, | ||
| }, |
| ' npm run dev', | ||
| ' npm run dev -- --seed <name>/<variant> --reset [--open-web] [--dev-tools]', | ||
| ' npm run dev -- --workspace <dir> [--mode tui|print|rpc] [--open-web] [--dev-tools]', | ||
| ' npm run dev -- --workspace <dir> --seed <name/variant> --reset [--open-web] [--dev-tools]', |
| - With no args, it prompts for a workbench, whether to start from current state or a reset seed, and whether to open the web sidecar. | ||
| - TUI is the default mode. | ||
| - Seeding is always explicit: the launcher only seeds when `--seed <name/variant> --reset` is present or chosen in the prompt flow. | ||
| - `rpc`, `mutate`, and `export` are explicit subcommands for scripted reads, graph curation, and fixture export. | ||
| - `npm run dev:raw -- ...` remains the escape hatch to the underlying app entrypoint. |

What this does
Cleans up the local development tools and sample graph data used for testing Brunch. It gives the dev launcher a clearer command shape, standardizes seed fixtures around
base.json, and removes stale workbench/RPC wiring.Why it matters
Developers get a simpler way to run seeded local scenarios, and the sample data is easier to maintain and reuse across tests and probes.