docs/plans/2026-05-18-clawpatch-valid-findings-fix.md
Fix every valid finding from .tmp/slate-v2/.clawpatch/reports/20260517T152655-41ac65.md, skip false positives with evidence, and revalidate with Clawpatch where the CLI can verify the result.
https://clawpatch.ai/.tmp/slate-v2/.clawpatch/reports/20260517T152655-41ac65.md.tmp/slate-v2/.clawpatch/findings/*.json.tmp/slate-v2fnd_sig-feat-config-7528cb5b98-803e5_f667febcaf: invalid. Bun runs bun build:packages as a package script in this repo shape.fnd_sig-feat-config-7528cb5b98-d0ed1_4b11b04171: invalid for the same Bun script premise.fnd_sig-feat-config-97ea478330-260ce_3dcd7e6956: add Turbo dependency build ordering.fnd_sig-feat-library-11f4ffa46a-14e0_d86e6f80e7: make delete command direction overrides authoritative.fnd_sig-feat-library-11f4ffa46a-628d_a21faa0720: preserve inherited leaf marks when adding marks at collapsed selections.fnd_sig-feat-library-1500b3b292-0556_baf4468d3c: restore selection-less insertText document-end fallback.fnd_sig-feat-library-1500b3b292-fce7_cb27429e5b: route insertSoftBreak through command middleware.fnd_sig-feat-library-1666dd96c4-4881_c0ca15e804: honor clipboard copy policies instead of treating all non-exclude boundaries as full model copy.fnd_sig-feat-library-1666dd96c4-5c6c_9ad91dd722: include normally indexed boundaries in large-range DOM coverage queries.fnd_sig-feat-library-1666dd96c4-6b51_632f2477be: sync native selection for ShadowRoot editors.fnd_sig-feat-library-1666dd96c4-700a_958eb511cb: recompute clipboard fragment attach after end-void expansion.fnd_sig-feat-library-1ad0792837-4126_f98b8e0f71: keep nested fragment insertion selection paths under the insertion ancestor.fnd_sig-feat-library-1ad0792837-4f94_0a007c2f8a: preserve explicit-at selection behavior in full-document text replacement.fnd_sig-feat-library-1cb6969464-5166_a44235f975: fully apply decoration source option changes.fnd_sig-feat-library-1cb6969464-878a_1156739a83: return real SSR snapshots when annotation/widget stores exist.fnd_sig-feat-library-1cb6969464-8ec1_369bb0b7b8: count all synced text operations, not unique paths.fnd_sig-feat-library-1df7d53a39-0f57_7b3750fb7a: add persistent soak to release proof; keep raw mobile proof in the dedicated raw-device lane.fnd_sig-feat-library-1df7d53a39-7e80_d46152f4d7: reject low persistent soak iteration thresholds by default.fnd_sig-feat-library-1eb3ef0dd3-5156_17851c1f19: run generator cleanup inside query middleware write guards.fnd_sig-feat-library-1eb3ef0dd3-5fa0_02e1296506: invalidate runtime indexes after transaction rollback restores children.clawpatch revalidate for fixed findings and record any false-positive or still-open results.packages/slate tests for editor command, mark, insertion, fragment, query, and runtime rollback behavior. Done: bun test ./packages/slate/test/primitive-method-runtime-contract.ts ./packages/slate/test/snapshot-contract.ts ./packages/slate/test/query-extension-contract.ts ./packages/slate/test/state-tx-public-api-contract.ts ... passed.packages/slate-dom tests for coverage, clipboard, focus, and DOM text sync. Done: included ./packages/slate-dom/test/dom-coverage.ts and ./packages/slate-dom/test/clipboard-boundary.test.ts; passed../packages/slate-browser/test/core/scenario.test.ts; passed.bun typecheck:packages: passed.bun lint:fix: passed.bun lint: passed with one pre-existing packages/slate-react/src/components/slate.tsx hook warning and no errors.bun test: passed.bun test:vitest: passed.bun check: passed.clawpatch revalidate --finding fnd_sig-feat-library-1666dd96c4-4881_c0ca15e804 --json: outcome fixed.clawpatch status --json: openFindings: 0.clawpatch was installed from the published npm package (0.2.0) because it was not present on PATH.fix --finding is explicit and clean-worktree-gated by default. After the first applied fix, subsequent fixes were blocked by the first Clawpatch edit itself. For the fix pass, .clawpatch/config.json was temporarily set to requireCleanWorktreeForFix: false, then restored to true.npm run typecheck, npm run lint, and npm run test validation.fnd_sig-feat-library-1666dd96c4-4881_c0ca15e804 because the provider stream/auth failed before completion; no files were changed for that finding. Continue manually from the report and revalidate with Clawpatch after direct patches.false-positive with Clawpatch triage. All valid findings were marked fixed with Clawpatch triage after bun check.Fresh Clawpatch review run 20260518T023214-469527 found three open slate-react findings under feature feat_library_1fd6f4c229:
fnd_sig-feat-library-1fd6f4c229-ba19_84c65afa29: collapsed projection slices inside text are dropped.fnd_sig-feat-library-1fd6f4c229-0200_75cb9399be: onBeforeInput is typed as a React event but routed through native InputEvent.fnd_sig-feat-library-1fd6f4c229-3086_837d3573b9: renderElement coverage assertion treats missing browser process as development.Execution target:
clawpatch fix --finding ... --json for each open finding, sequentially.slate-react Vitest rows for projections, editable behavior, and surface contracts.bun --filter slate-react typecheck, bun lint:fix, and bun check.slate-react changeset if user-visible package behavior changes.Result:
fnd_sig-feat-library-1fd6f4c229-ba19_84c65afa29: fixed. Current HEAD already includes zero-length projection boundaries and the focused collapsed-projection regression.fnd_sig-feat-library-1fd6f4c229-0200_75cb9399be: fixed. Current HEAD already keeps React onBeforeInput on the React path and native beforeinput on onDOMBeforeInput, with regression coverage.fnd_sig-feat-library-1fd6f4c229-3086_837d3573b9: fixed in this slice. isSlateReactDevelopmentEnvironment now treats missing process.env.NODE_ENV as production-safe, with regression coverage.packages/slate-react/test/surface-contract.tsx..clawpatch/config.json to requireCleanWorktreeForFix: true..changeset/slate-react-browser-dev-guard.md.Verification:
bun --filter slate-react test:vitest -- projections-and-selection-contract editable-behavior dom-coverage-boundary-contract surface-contract: 4 files, 65 tests passed.bun --filter slate-react typecheck: passed.bun lint:fix: passed, no fixes applied.bun check: passed with the existing packages/slate-react/src/components/slate.tsx hook warning only.clawpatch revalidate --finding fnd_sig-feat-library-1fd6f4c229-ba19_84c65afa29 --json: fixed.clawpatch revalidate --finding fnd_sig-feat-library-1fd6f4c229-0200_75cb9399be --json: fixed.clawpatch revalidate --finding fnd_sig-feat-library-1fd6f4c229-3086_837d3573b9 --json: fixed.clawpatch status --json: openFindings: 0.Source review:
clawpatch review --json --limit 5020260518T033126-00862f.tmp/slate-v2/.clawpatch/reports/20260518T033126-00862f.mdExecution target:
.tmp/slate-v2/.clawpatch/config.json git.requireCleanWorktreeForFix to false so later Clawpatch fixes are not blocked by earlier Clawpatch edits.clawpatch fix --finding <id> --json in controlled chunks.requireCleanWorktreeForFix: true before handoff.bun lint:fix and bun check if source edits survive review.clawpatch status --json.Result:
20260518T033126-00862f..tmp/slate-v2: findings: 95, openFindings: 0, activeLocks: 0.clawpatch report --status open --json: returned no items..tmp/slate-v2/.clawpatch/config.json to "requireCleanWorktreeForFix": true.Final same-turn verification:
npm run typecheck: passed across packages, site, and root.npm run lint: passed with one existing warning in packages/slate-react/src/components/slate.tsx and no errors.npm run test: passed; Bun package tests 1022 pass, 95 skip, 0 fail; slate-react Vitest 34 files, 304 tests passed.Source state before review:
clawpatch status --json: findings: 95, openFindings: 0, activeLocks: 0, lockFiles: 0..tmp/slate-v2/.clawpatch/config.json: "requireCleanWorktreeForFix": true.Execution target:
clawpatch review --json --limit 50 in .tmp/slate-v2.clawpatch status --json.active goal state pending until this review batch is closed.Result:
clawpatch review --json --limit 50: run 20260519T143737-1f263b..tmp/slate-v2/.clawpatch/reports/20260519T143737-1f263b.md.31 features and produced 12 new open findings.clawpatch status --json: findings: 107, openFindings: 12, activeLocks: 0, lockFiles: 0.Open findings:
fnd_sig-feat-release-a235aa99b1-4903_035655915a: site typecheck omits --noEmit.fnd_sig-feat-test-suite-cb681e102d-7_cccedbe3b1: slate-browser aggregate test runs selection browser suite twice.fnd_sig-feat-ui-flow-6a27e982ce-f94c_532ec95c63: inline void shell child order can differ between SSR and Mac client render.fnd_sig-feat-ui-flow-6feb103d8d-ae72_f0494f2e0b: placeholder as type accepts void HTML elements that cannot render children.fnd_sig-feat-ui-flow-7e14dc4c24-2e7d_8a458c669b: shelled segment preview/coverage can go stale after hidden content changes.fnd_sig-feat-ui-flow-b96511949d-48f1_601dca3f51: deferred selector callback can flush after unsubscribe.fnd_sig-feat-ui-flow-b96511949d-b05d_5266b77c35: mount-time editor commits can happen before Slate subscribes.fnd_sig-feat-ui-flow-cfa3a8c90a-ae9f_505553d0bf: default selection scrolling misses scroll containers outside a shadow root.fnd_sig-feat-ui-flow-cfa3a8c90a-b4c0_f3acc7896c: documented zIndex workaround is emitted as ignored zindex DOM attribute.fnd_sig-feat-ui-flow-d9b2f7f1a2-c714_b31cf1ed14: bound text can stay stale when skipped React render is not DOM-synced.fnd_sig-feat-ui-flow-e1e5bc9333-e201_2053767467: SlateElement does not rebind DOM maps when its path changes.fnd_sig-feat-ui-flow-f991203b7d-e62d_fdbe54b63d: domSyncReason is attached when domSync is false and suppressed when true.Source report:
.tmp/slate-v2/.clawpatch/reports/20260519T143737-1f263b.mdValidity pass:
Execution target:
.tmp/slate-v2/.clawpatch/config.json git.requireCleanWorktreeForFix to false so multiple Clawpatch fixes can run in one dirty working tree.clawpatch fix --finding <id> --json for the 12 valid findings.requireCleanWorktreeForFix: true before handoff.clawpatch status --json.Result:
20260519T143737-1f263b.fnd_sig-feat-ui-flow-f991203b7d-e62d_fdbe54b63d false-positive: domSyncReason is intentionally emitted only when DOM sync is disabled; inverting it broke the existing rendering-strategy DOM sync contract.slate-react so the fixed source paths are reflected in packages/slate-react/dist/index.js./Users/zbeyens/git/slate-v2/.clawpatch/config.json to "requireCleanWorktreeForFix": true./Users/zbeyens/git/slate-v2/.changeset/slate-react-clawpatch-ui-flow-fixes.md.clawpatch report --status open --json: findings: 0.clawpatch status --json: openFindings: 0, activeLocks: 0, lockFiles: 0.Revalidation:
fnd_sig-feat-ui-flow-6a27e982ce-f94c_532ec95c63: fixed after rebuilding slate-react dist.fnd_sig-feat-ui-flow-6feb103d8d-ae72_f0494f2e0b: fixed.fnd_sig-feat-ui-flow-7e14dc4c24-2e7d_8a458c669b: fixed.Final verification:
npm run typecheck: passed.npm run lint:fix: passed, no fixes applied.npm run lint: passed.npm run test: passed (bun test: 1022 pass, 95 skip, 0 fail; slate-react Vitest: 35 files, 312 tests passed).Source state before review:
openFindings: 0./Users/zbeyens/git/slate-v2/.clawpatch/config.json: "requireCleanWorktreeForFix": true.Command:
clawpatch review --jsonResult:
20260519T174319-47a168./Users/zbeyens/git/slate-v2/.clawpatch/reports/20260519T174319-47a168.md.0 features and produced 0 new findings.clawpatch report --status open --json: findings: 0.clawpatch status --json: findings: 107, openFindings: 0, activeLocks: 0, lockFiles: 0.Note:
--limit, but Clawpatch had no pending review features to process.Requested state:
/Users/zbeyens/git/slate-v2.Current filesystem state:
/Users/zbeyens/git/slate-v2 no longer contains the full Slate v2 checkout or prior Clawpatch project state..clawpatch/features/feat_ui-flow_6feb103d8d.json and .clawpatch/runs/20260520T083030-e09d29.json.clawpatch status --json: failed with error: not initialized; run clawpatch init..clawpatch/features/*.json: 1, not the expected 92.20260520T083030-e09d29 already reviewed feat_ui-flow_6feb103d8d and completed with findingIds: [].Result:
/Users/zbeyens/git/slate-v2 filesystem state without restoring the full checkout or Clawpatch state.