HS-plan: document parallel-worktree protocol

This commit is contained in:
2026-04-24 09:44:53 +00:00
parent 3b5f16088b
commit 9da43877e8

View File

@@ -32,6 +32,19 @@ The test fixtures live in `spec/tests/test-hyperscript-behavioral.sx`, generated
Each cluster below is one commit. Order is rough — a loop agent may skip ahead if a predecessor is blocked. **Status:** `pending` / `in-progress` / `done (+N)` / `blocked (<reason>)`.
### Parallel-worktree mode
When fanning out multiple clusters at once (Agent with `isolation: "worktree"`), each worktree agent:
1. Works on a fresh copy of the repo — no contention on the mutable tree.
2. Picks **one** cluster, runs the full loop (read, baseline, fix, sync WASM, verify smoke 0-195 + target suite, commit on the worktree's branch).
3. Leaves its branch + commit SHA for the orchestrator. **Does not push**, does not update `plans/hs-conformance-to-100.md` or the scoreboard — those updates happen in the orchestrator's cherry-pick commit so the ledger stays linear.
4. Scope inside the worktree is unchanged (`lib/hyperscript/**`, `shared/static/wasm/sx/hs-*`, `tests/hs-run-filtered.js`, `tests/playwright/generate-sx-tests.py` + its regen output `spec/tests/test-hyperscript-behavioral.sx`). Do **not** edit the plan or the scoreboard inside the worktree — that's the orchestrator's job.
Orchestrator cherry-picks worktree commits onto `architecture` one at a time; resolves conflicts as they arrive (most will be trivial since each cluster lives in its own parser/compiler branch or in a different mock).
**Good candidates to parallelise:** clusters that touch disjoint surfaces — e.g. 26 (resize observer) and 27 (intersection observer) edit the same mock file but different class stubs; 25 (parenthesised commands) is parser-only; 30 (logAll config) is bootstrap/integration-only. Avoid fanning out clusters that all rewrite the same dispatch spot (`emit-set`, `parse-expr`) in the same commit.
### Bucket A: runtime fixes, single-file (low risk, high yield)
1. **[done (+4)] fetch JSON unwrap** — `hs-upstream-fetch` 4 tests (`can do a simple fetch w/ json` + 3 variants) got `{:__host_handle N}`. Root: `hs-fetch` in `runtime.sx` returns raw host Response object instead of parsing JSON body. Fix: when format is `"json"`, unwrap via `host-get "_json"` and `json-parse`. Expected: +4.