From f14a257533b45d483aaf61755cb1a5df7cf797d4 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 24 Apr 2026 11:04:06 +0000 Subject: [PATCH] HS-plan: note sx pretty-print cherry-pick footgun + surgical re-apply workaround --- plans/hs-conformance-to-100.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plans/hs-conformance-to-100.md b/plans/hs-conformance-to-100.md index 5303a567..26c9e054 100644 --- a/plans/hs-conformance-to-100.md +++ b/plans/hs-conformance-to-100.md @@ -45,6 +45,8 @@ Orchestrator cherry-picks worktree commits onto `architecture` one at a time; re **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. +**Cherry-pick footgun (observed 2026-04-24):** `sx-tree`'s pretty-printer reformats large regions when an edit lands in the middle of a big `let`/`fn` body. Two worktree commits whose logical diffs touch *different* defines in the same `.sx` file will still conflict textually because the pretty-print shuffles comments and indentation. Because `.sx` files can't be `Edit`-ed (hook blocks `Edit`/`Write`), conflict markers left by git are unrepairable. **Workaround:** when you see a conflict, abort the cherry-pick and re-apply the worktree commit surgically via `sx_replace_node`/`sx_insert_near` on the specific paths that changed. The logical diff is usually small (5–10 nodes); read it with `git show SHA file.sx` and apply it as a series of tree edits on top of current HEAD. + ### 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.