Repository navigation
fix(bin): merge claude busy hooks into settings.local.json instead of overwriting it - #3126
simonwarmup wants to merge 7 commits into
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "no-mistakes(document): docs: note clear'..." | Re-trigger Greptile |
|
Speaking as Kun's firstmate: Reviewed HEAD Class: corrective. VISION (per rule, inspected evidence):
Closes #3111 from body+code: author body and commit say Closes #3111; diff implements the issue's sanctioned merge/restore (not the rejected out-of-worktree First-time fork CI: after that full-diff review I approved workflow runs Not merging. Waiting on the author:
Not with the captain. Merge-eligible: NO. |
…n instead of replacing it bin/fm-spawn.sh wrote <worktree>/.claude/settings.local.json wholesale, so a project that commits that path (permissions, env, enabledPlugins, or its own other Claude Code hooks) had its content silently destroyed for the life of the task. The overwrite left the worktree dirty on a tracked file, which fm-teardown.sh's dirty check could not distinguish from real uncommitted work, so cleanup falsely refused after a clean merge and pointed the operator at --force. fm-control-lib.sh now owns installing and retiring firstmate's own hook entries by per-entry ownership (a hook-group whose command names fm-busy-event.sh), so a project's other top-level keys, other hook events, and co-located non-owned hooks on the same event all survive a spawn, respawn, or harness-switching relaunch. fm-teardown.sh restores a tracked settings file to HEAD instead of deleting it - but only when the file's sole working-tree difference from HEAD is firstmate's own hook entries, so a real edit still refuses teardown like any other uncommitted change - and keeps deleting the untracked case. Closes kunchenguid#3111.
…r claude settings merge/clear
…nmergeable files PR kunchenguid#3126's reviewer failed the merge design twice on two flaws, and both are replaced here as designs rather than patched: 1. Ownership was an unanchored substring match (a hook entry was firstmate's if its command text mentioned fm-busy-event.sh), so a project's own hook whose command merely mentions that name could be stripped by a relaunch, or hidden from teardown's restore comparison and silently discarded by the checkout. Ownership is now STRUCTURAL: fm-spawn records the exact hook-group entries it merges into a task worktree's .claude/settings.local.json in a private per-task state file, state/<id>.claude-settings-owned, and every later decision - a relaunch strip, a respawn replacement, teardown's restore-to-HEAD predicate - touches only entries deep-equal to one recorded there. No substring, pattern, or content heuristic remains anywhere in the path; the predicate strips the working-tree side only, and with no record nothing is provably firstmate's own, so nothing is stripped and the diff refuses like any other uncommitted change. A lookalike project hook is structurally incapable of matching, because matching now requires being the recorded entry, not resembling it. 2. Unparseable or non-object settings were overwritten (first silently, then with an internal backup no production path ever restored). There is now NO fallback write path at all: an existing file that is not a JSON object with an object (or absent) hooks key refuses the spawn loudly, with the original bytes untouched and no record written, and the backup file is deleted outright. Destroying content firstmate cannot prove it can merge is the exact bug of issue kunchenguid#3111, so the destroy path is removed rather than padded with recovery. The record also carries whether the settings file existed before firstmate's first install, so retiring wiring removes a file firstmate itself created once nothing else ever landed in it (an aborted relaunch leaves no trace), while a pre-existing file is only ever rewritten without firstmate's entries - and left byte-untouched when none are present. A respawn still fully replaces firstmate's own entries (they are keyed by a per-incarnation busy-generation token), now proven at unit, relaunch-transaction, and real fm-spawn levels. New tests pin both review scenarios end to end: an uncommitted project hook mentioning fm-busy-event.sh refuses teardown with its content preserved, and a malformed committed file fails the spawn with its bytes intact.
…e the record monotone Answers pre-push review findings F1-F9 on 9d07196; the three blocking ones: F1: the two spawn-level claude settings tests pushed the fixture project to origin's "main" while the fixture repo's initial branch follows the machine's init.defaultBranch. On a master-default machine (stock CI runners) that push minted a second, non-default branch, freshen_spawn_worktree_base reset the worktree to a master with no settings file, and the merge test failed while the refusal test SUCCEEDED spawning - the malformed file never arrived, so the headline refusal property was unverified on the platform CI runs on. The fixtures now push to the branch they are actually on, and the CI test jobs pin init.defaultBranch=master so the coverage cannot silently vanish with a runner-image change. Verified: fm-control, fm-control-relaunch, fm-busy-adapter-wiring, and fm-teardown pass under both init.defaultBranch=main and =master; the one fm-teardown herdr-preflight failure on this machine reproduces identically on the clean base 9ce69ac (environmental, not from this branch). F2: ownership was whole-entry deep equality, which claude's own rewrite of the settings file (a mid-task permission grant re-serializes it and may add sibling fields to an entry) silently and permanently broke: clear then left the entry while deleting the record, respawn accumulated, and teardown refused forever on firstmate's own hooks. The recorded identity is now the minted hook COMMAND STRING, per event: still exact full-string equality against a private per-task record - no substring, pattern, or heuristic - and still unforgeable because the command embeds the resolved state path, the task id, and the --gen token; but it is the one part of the entry no other writer has a reason to alter, so ownership survives entry rewrites. An entry is dropped only when every command in it is firstmate's own; a mixed entry keeps the project's commands. Pinned by a new regression that rewrites an installed entry (sibling field plus inner-hook field) and asserts the diff predicate, respawn replacement, and clear all still recognize it. F3: install wrote a fresh record BEFORE the settings file, so a failure between the two writes orphaned the superseded incarnation's still-installed entries permanently. The record is now MONOTONE: install writes the union of the old record's commands and the fresh incarnation's first and never narrows, so an interruption leaves a correct-or-over-broad record, and over-broad only ever names commands minted for this task. Pinned by a regression reproducing the exact crash-window state. Also from the review: - F4: a dirty teardown refusal whose only uncommitted path is a tracked .claude/settings.local.json with no ownership record (a task armed by a pre-record firstmate) now prints a note naming the file and the missing record; the predicate is not weakened and the refusal stands. - F5: fm-spawn probes mergeability before arming the busy contract, so a refused spawn leaves no armed busy records (asserted in the refusal test); a zero-byte settings file merges as the empty object instead of refusing over nothing; the refusal wording routes the project edit to the captain instead of telling firstmate to make it. - F6: the contract header no longer claims preexisted is carried unchanged across every re-install (9d07196's commit message overclaimed this): it is carried while the record lives, and a clear-then-install cycle re-derives it from file presence, which can only err toward keeping a file, never toward deleting a project's. - F7: the jq round-trip's number-literal and duplicate-key limits and the symlink-replacement behavior are stated in the contract header. - F8: harness-adapters no longer claims the claude settings path can never wrongly refuse teardown; it states the record-bounded truth. - F9: drift, crash-window, empty-file, and old-schema-record cases are now tested, and CI pins init.defaultBranch. The record schema key moves from entries to commands; a record without a commands object (none exists outside this unmerged branch) is refused loudly as unreadable rather than reinterpreted, so ownership is never guessed.
…pagate rm failures in clear
…gent-control.md coverage line
b23b8bb to
0faef34
Compare
|
Speaking as Kun's firstmate: Reviewed HEAD Workflow: the only Class: corrective. VISION (per rule, inspected evidence):
Attestation: CI: current-HEAD CI run First-time fork CI: already in flight for this HEAD as Closes #3111 from body+code: author body and commit say the PR closes #3111; inspected code implements the issue's sanctioned merge/restore (not the rejected out-of-worktree Not merging. Waiting on author:
Not with the captain. Merge-eligible: NO. |
|
Speaking as Kun's firstmate: Reviewed HEAD Class: corrective. VISION (per rule, inspected evidence):
Closes #3111 from body+code: author body and attestation intent say closes #3111; inspected diff implements the issue's merge/restore. Fetch why was not treated as proof. Attestation: First-time fork CI: after that full-diff review I approved workflow runs Not merging. Behavior portable serial 4 failed on |
Both failing behavior jobs on
|
| Failure | Root cause |
|---|---|
Behavior portable serial 4 — not ok - arm did not exit with HUP status (got 124) |
A bin/fm-watch.sh child survived TERM, so bin/fm-watch-arm.sh's unbounded wait blocked. |
Behavior tests (Herdr) — 20-minute action timeout |
Same defect. bin/fm-supervise-daemon.sh's cleanup() does the identical kill + unbounded wait on a bin/fm-watch.sh child, so the daemon never exited and the test's own unbounded wait hung. |
Why the child survived TERM
CI printed this immediately before the assertion:
bin/fm-watch.sh: trap: line 2: unexpected EOF while looking for matching `)'
not ok - arm did not exit with HUP status (got 124)
Two things follow. First, 124 is not timeout(1) — it is the test helper's own sentinel (tests/wake-helpers.sh:294, returned after an 8s budget), so arm simply never exited. Second, when a bash trap body fails to parse, bash reports the error and the trap does not run, so the process survives the signal. Reproduced on Linux/bash 5.2.21:
$ bash /tmp/t.sh # script containing: trap "echo x $(unclosed" TERM
/tmp/t.sh: trap: line 2: unexpected EOF while looking for matching `)'
SURVIVED-AFTER-TRAP
The message matches CI byte-for-byte, including line 2 (bash reports an unterminated construct one line past the trap string) and the bare trap label rather than exit trap.
The malformed trap string is not in the repo. Every trap in bin/fm-watch.sh's 18-file source closure is static and well-formed, and none contains a parenthesis. Repo-wide there are exactly four traps built from a variable (bin/fm-procevent-lavish.sh:238,246, bin/fm-inbox.sh:224,329); none is reachable in a process whose $0 is bin/fm-watch.sh, and the lavish one uses printf -v ... %q. This is bash misparsing a valid trap string when a signal lands mid-parse — the ) points at a pending $(/<( in parser state, and bin/fm-watch.sh uses both (e.g. done < <(fm_wake_queued_keys_locked check) at line 851). bin/fm-wake-lib.sh:797-806 already documents this hazard class for the same signal paths.
Then bin/fm-watch-arm.sh:461-472 does kill -TERM "$child"; wait "$child" with no bound, so arm blocked until the test gave up.
Herdr is the same defect, not a capacity problem
On main (10b93b2, job 98435369848) the whole real-Herdr family takes 6m39s and tests/fm-afk-inject-herdr-e2e.test.sh alone takes 59.9s for all four scenarios. On this run it started 10:19:13, Scenario A passed at 10:19:36, then 19m50s of total silence to the cap. Every step in Scenario B is bounded and fails loudly except stop_daemon (lines 295-302), whose wait "$DAEMON_PID" is unbounded. The daemon traps TERM at bin/fm-supervise-daemon.sh:1508, and cleanup() at 1491-1507 does kill "$WATCHER_PID"; wait "$WATCHER_PID" — the identical shape, on a bin/fm-watch.sh child. The job's teardown reaping a live herdr plus orphan bash processes is consistent with a daemon tree that never tore down.
Why it is not this branch
- Unreachable. This branch changes
bin/fm-control-lib.sh,bin/fm-spawn.sh,bin/fm-teardown.sh. Transitivesourceclosure of each failing entry point, intersected with those three:fm-supervise-daemon.sh(8) NONE,fm-afk-launch.sh(5) NONE,fm-watch.sh(18) NONE,fm-watch-arm.sh(2) NONE. Neither failing test file is touched. - Green on the parent. Same test passes on this branch's exact parent
10b93b2(run 33047664963, job 98435369890), with no trap diagnostic anywhere in that log. - Herdr was healthy in the same window. Green on main
10b93b2and on four other branches, including run 33062307560 at 10:16Z. - Timing-dependent. Not reproducible: 25/25 passes of the isolated arm-HUP test, 20/20 under 12-way CPU saturation, 0/400 on a synthetic signal-during-process-substitution harness. Whole file passes on macOS/bash 3.2 and Linux/bash 5.2.21 at the PR head.
- Both were green on this branch at
b23b8bbb, whose base predates main's supervision changes99c1a0d,5953e9b,10b93b2. The rebase onto those, not this diff, is what changed underneath these two jobs.
I also checked the one mechanism by which this branch touches shard 4 — it adds git config --global init.defaultBranch master to the portable shards. Pinning GIT_CONFIG_GLOBAL to that value and running the whole file leaves every arm test passing; the fixtures are branch-agnostic now (they push to HEAD:$(git rev-parse --abbrev-ref HEAD)). No shard membership changed either: the branch adds no test file and shard weights are static.
Ask
Could you re-run those two jobs on 0faef34? Both are timing-dependent and neither is reachable from this diff, so a re-run is the cheap discriminator.
Separately, the real fix is to bound both waits — bin/fm-watch-arm.sh:465-467 and bin/fm-supervise-daemon.sh:1496-1499 — escalating to KILL after a grace period so a child that ignores or fails to run its TERM trap cannot hang its parent forever. I deliberately did not commit that here: it touches files outside issue #3111's scope and unreachable from this PR, and it needs its own regression tests. Happy to raise it as a separate PR if you'd like it.
|
Speaking as Kun's firstmate: Re-verified HEAD Class: corrective. VISION (per rule, inspected evidence):
Closes #3111 from body+code: author body and attestation intent say closes #3111; inspected diff still implements the issue's merge/restore. Fetch Attestation: First-time fork CI: already approved on this HEAD (runs CI: still red. Behavior portable serial 4 ( Merge-eligible: NO. Waiting on green CI for those two jobs (or a separate fix of the pre-existing trap), not on a product rewrite of this PR. |
Follow-up: the identical commit passes both failing jobs on a clean runSince posting the diagnosis above I was able to run this project's full CI suite on All 12 jobs pass, including both that failed here:
Same commit, same suite, no code change between the two runs. That upgrades the earlier argument from "unreachable from this diff, with circumstantial support" to a direct demonstration, and it is consistent with the mechanism being an intermittent race that simply did not fire this time. So a re-run of the two failed jobs here should go green. That is still the only thing I am asking for on this PR. The underlying defect is real and worth fixing regardless — bounding the two waits at |
|
Speaking as Kun's firstmate: Re-verified HEAD Class: corrective. Would close #3111 (ready-for-pr). MERGEABLE; mergeState BLOCKED on this repo's still-red Behavior portable serial 4 / Behavior tests (Herdr) from run 33049657918. Author's diagnosis (pre-existing VISION.md per-rule:
Not merging. Waiting on green required checks on this HEAD in kunchenguid/firstmate (or a maintainer judgment that the pre-existing watch flake is waived). No auto-merge. |
Intent
Fix issue #3111 (#3111): bin/fm-spawn.sh destroyed a project's COMMITTED .claude/settings.local.json by writing its per-task claude busy hooks over the whole file, which (1) stranded teardown behind a false 'uncommitted changes' refusal on a tracked file, (2) stalled workers on permission prompts the repo had pre-answered, and (3) silently lost committed configuration. Required behavior: MERGE firstmate's hook entries into any existing settings file preserving every other top-level key (permissions, env, enabledPlugins) and every project hook; on teardown RESTORE a tracked settings file to HEAD rather than delete it (deletion stays for the untracked case); and a respawn/relaunch must FULLY REPLACE firstmate's own hook entries (keyed by a per-incarnation busy-generation token) rather than accumulate stale ones.
The upstream maintainer's required AI review check failed two earlier rounds on two design objections, both accepted as correct: ownership must be STRUCTURAL (no substring, pattern, or content heuristic may classify a hook as firstmate's - a project hook whose text merely mentions our marker must never be touched), and an unparseable/unmergeable settings file must REFUSE the spawn loudly with the original bytes untouched - deliberately NO fallback and NO backup-and-overwrite path.
A captain-approved adversarial pre-push review (findings F1-F9) then drove the current design, all deliberate decisions: (F2) the ownership identity is the minted hook COMMAND STRING, recorded per event in state/.claude-settings-owned as commands:{event:[command,...]} - exact FULL-string equality against that private per-task record, unforgeable because each minted command embeds the resolved state path, task id, and --gen token; chosen over whole-entry deep equality deliberately, because claude itself rewrites this file (a mid-task permission grant re-serializes it and may add sibling fields to an entry) and whole-entry equality silently and permanently lost ownership. A hook-group entry is dropped only when EVERY command in it is firstmate's; a mixed entry keeps the project's commands. (F3) the record is deliberately MONOTONE: install writes the union of old and fresh commands BEFORE the settings write and never narrows, so an interruption leaves a correct-or-over-broad record instead of orphaning a superseded incarnation's entries - the record legitimately may name commands not currently in the file. (F1) the two spawn-level tests previously pushed the fixture to origin 'main' while the fixture repo's initial branch follows the machine's init.defaultBranch, so on master-default machines (the project's CI runners) the committed file never reached the worktree and the refusal property was vacuously untested; fixtures now push to the branch they are actually on, and the CI test jobs deliberately pin init.defaultBranch=master as a recurrence guard. (F4) when a teardown dirty refusal fires and the ONLY dirty path is a tracked settings file with no ownership record, an additive note names the file and the missing record - the predicate is never weakened. (F5) fm-spawn probes mergeability BEFORE arming the busy contract so a refused spawn leaves no armed busy records; a zero-byte settings file is deliberately accepted and merged as the empty object with preexisted=true; the refusal message tells the operator to escalate to the captain because firstmate itself must never edit a project. (F6) preexisted deliberately does NOT survive a clear-then-install cycle; it is re-derived from file presence, which can only err toward keeping a file, and the header documents that honestly. (F7) the whole-document jq rewrite's number-literal/duplicate-key limits and symlink-to-regular-file replacement are documented accepted limitations - deliberately no jq version gate. An old-schema ownership record (entries without a commands object) deliberately refuses loudly rather than being reinterpreted; none exist outside this unmerged branch. With NO record, nothing is stripped or restored and the dirty refusal stands (fail-safe for tasks armed by a pre-record firstmate).
Known environment fact: tests/fm-teardown.test.sh's herdr-preflight-missing-adapter case fails on the dev machine identically at the clean base commit 9ce69ac - environmental, not caused by this branch; all 62 other teardown tests pass under both init.defaultBranch=main and =master, as do fm-control, fm-control-relaunch, and fm-busy-adapter-wiring in full.
PR requirements, explicitly requested: the PR is #3126 (already open for this branch; closes #3111). Its description MUST prominently and plainly call out that the ONLY workflow change is pinning git init.defaultBranch=master on the CI test jobs in .github/workflows/ci.yml, why (the fixture bug made the headline safety property unverifiable on the project's own runners), and that it adds NO new permissions, NO secrets, NO new triggers, and NO new actions - the maintainer triaged this PR as having no workflow changes, so the diff must be trivially explainable at a glance. The description must also state how this attempt differs from the four unmerged prior PRs (#2673, #2681, #888, #1627) and the open #1024/#1269: those regenerated or replaced the file wholesale or allowlisted content in the dirty check, while this one merges with record-based structural ownership, refuses unmergeable files, and restores tracked files at teardown.
Constraints: build on the existing branch commits (7073933..acf2723) - never drop or rewrite prior gate-fix commits; a concurrent PR for issue #3110 also touches bin/fm-teardown.sh (content_in_default and work_is_landed - different functions), and any rebase conflict there must keep BOTH sides, never discard theirs. Repo rules: bin scripts must pass bin/fm-lint.sh (pinned shellcheck + actionlint), tracked markdown is one sentence per line with plain dashes, tests are colocated in tests/ and assert behavior through executable interfaces (never grepping implementation source), and commits must not name any agent as co-author.
What Changed
bin/fm-control-lib.shgains a claude-settings ownership contract:fm_control_claude_settings_mergeable/_install/_clear/_only_owned_differmerge firstmate's busy hooks into.claude/settings.local.jsonvia jq, keyed by exact hook command-string equality against a per-task ownership record (state/<id>.claude-settings-owned, a monotone{version,preexisted,commands}document) rather than any content heuristic; an unparseable or non-object settings file is refused untouched.bin/fm-spawn.shprobes mergeability before arming the busy contract, installs hooks through the new merge contract instead ofcat >-clobbering the file, and retires the busy generation cleanly when a merge is refused;clear_relaunch_harness_wiringnow strips only firstmate's recorded entries on relaunch instead of deleting the whole file.bin/fm-teardown.shrestores a tracked, firstmate-owned-only-differing settings file toHEAD(viarestore_claude_settings_if_only_hooks_differ) before the dirty check runs and again during cleanup (teardown_reset_claude_settings), deletes only the untracked case as before, and adds an explanatory note when a dirty refusal's sole cause is an unrecorded settings difference; the<id>.claude-settings-ownedrecord is added to teardown's state-file cleanup list..github/workflows/ci.ymlpinsgit config --global init.defaultBranch masteron the three test-shard jobs so the fixture coverage for this behavior is exercised on the project's own runners;AGENTS.md,docs/agent-control.md, and.agents/skills/harness-adapters/SKILL.mdare updated to describe the new record and restore behavior, plus new/expanded tests intests/fm-control.test.sh,tests/fm-control-relaunch.test.sh,tests/fm-teardown.test.sh, andtests/fm-busy-adapter-wiring.test.sh.Risk Assessment
✅ Low: This fix round makes two small, surgical, well-targeted edits that exactly implement the previously-agreed fixes (retire the busy generation on claude settings install failure; propagate rm failures consistently in fm_control_claude_settings_clear), mirror existing code patterns, don't touch tests, and don't weaken any refusal or ownership invariant from the user intent.
Testing
Wrote two new targeted tests that reproduce the exact gaps the last review-fix commit closed (busy-gen retirement on post-arm claude-settings install failure in fm-spawn.sh, and rm-failure propagation on all four retirement branches of fm_control_claude_settings_clear), verified both fail against the pre-fix source and pass against the current target commit, and confirmed the full fm-control, fm-busy-adapter-wiring, and fm-control-relaunch suites (including the rl29 case the review explicitly called out) pass with no leftover artifacts in the working tree.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
AGENTS.md- merge conflict rebasing onto origin/mainbin/fm-teardown.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/fm-spawn.sh:2422- The claude branch arms the busy contract (fm-busy-event.sh arm, writing state/<id>.busy-gen and .busy-state) at line 2422, then calls fm_control_claude_settings_install at line 2467. The pre-arm probe at line 2414 (fm_control_claude_settings_mergeable) only validates the settings file's JSON shape, not the ownership record at $STATE_REAL/$ID.claude-settings-owned. If install fails for a reason the probe doesn't cover - a corrupt/old-schema ownership record (which fm_control_claude_settings_install explicitly refuses per the F5/old-schema design), a disk-full or permission failure on the atomic tmp-file writes, etc. - fm-spawn exits 1 at line 2470 with BUSY_GEN already armed. This contradicts the stated design guarantee that 'a refused spawn leaves no armed busy records behind' (F5 in the intent, and the comment at bin/fm-spawn.sh:2410-2413): the guarantee only actually holds for the mergeability-probe refusal case. Impact is limited (a later successful arm overwrites the stale busy-gen file), so this is a narrow, self-healing gap rather than data loss, but it's a real, reachable divergence from the explicitly claimed invariant.bin/fm-control-lib.sh:296- fm_control_claude_settings_clear has four exits: the '! -e path' branch, the 'preexisted==false and now-empty' branch, and the 'nothing stripped' branch each callrm -f -- "$record_path"and then hit an explicitreturn 0, so a failure to remove the record file (e.g. a permission or filesystem issue) is silently swallowed and the caller (clear_relaunch_harness_wiring in fm-spawn.sh) treats retirement as successful even though the record still exists on disk. Only the final 'stripped and rewritten' branch propagates rm's exit status (no explicit return after it), which is the one path tests/fm-control-relaunch.test.sh's test_wiring_removal_failure_refuses_before_replacement_arm actually exercises. The inconsistency is low-impact (a subsequent install() call unconditionally overwrites the record file viamv -f), but the three swallowing branches should propagate rm's exit status the same way the fourth does, for consistency and defense in depth.🔧 Fix: summary: retire busy gen on install failure; propagate rm failures in clear
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-control.test.sh (includes new test_claude_settings_clear_propagates_record_removal_failure)bash tests/fm-busy-adapter-wiring.test.sh (includes new test_claude_hooks_spawn_retires_busy_gen_when_install_fails_after_arm)bash tests/fm-control-relaunch.test.sh (rl29 test_wiring_removal_failure_refuses_before_replacement_arm)Regression check: temporarily reverted bin/fm-control-lib.sh and bin/fm-spawn.sh to pre-fix commit a4e8caf and confirmed both new tests fail, then restored via git checkout✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.