Repository navigation
Pin MCP, CLI and Trash behavior before the async migration (M01-04d slice 4, PR 0) - #52
Merged
Merged
Conversation
…lice 4, PR 0) Tests only; no Release-build change. Pins what PRs 1a-4 must preserve: - --mcp over a real subprocess (both builds): one reply per request, in order, exact keys, -32601 for an unknown method, no reply for invalid, empty or notification lines, exit 0 at EOF; 50 requests then EOF. - --cli bench stays usable (exit 64 for an unknown scan). - Test-hooks build: the MCP approval runs on the main thread (probe); replies stay ordered behind a slow approval; baseline run-loop fingerprint (sync loop: ticks 0, mode nil) that PR 1a flips on purpose; trash-files --yes / no-TTY / piped yes / piped no; moved-but-unrecorded output; uninstall quit refusal issues no executor approval. - MCP move_to_trash partial failure reply shape. - Package: cancelling a real-disk run mid-batch leaves the rest on disk. Test hooks (TestHooks.swift, AppEngine running/quit overrides) exist only under MACCLEANER_TEST_HOOKS; check-no-test-hooks.sh now checks their names.
…-04d slice 4) - Hooks-only probe answer (MACCLEANER_TEST_APPROVAL_ANSWER=yes): an approved --mcp confirm replies only after the file is in the isolated Trash, asked once on the main thread, and a queued ping replies second. - The child home/Trash gate uses the destructive children's own environment and fails closed when the account home is unknown. - No process-global SIGPIPE change (F_SETNOSIGPIPE on the parent's pipe). - Unused APP_RUNNING/APP_QUIT env hooks removed; a pre-existing Trash-log lock is restored.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 0 of M01-04d slice 4 (remove the three blocking async/sync bridges in 6 PRs: 0 → 1a → 1b → 2 → 3 → 4). Tests only; no Release-build behavior change. It pins what the later PRs must preserve. User approval: SAFETY-CRITICAL APPROVED for PR 0 (tests + test-hooks-only probe + hooks-only
AppEnginerunning/quit overrides).Pinned
Both builds (read-only children):
--mcpover a real subprocess: one reply per request in order (initialize, ping, tools/list, disk_status, unknown method), exact keys,-32601for an unknown method, no reply for invalid/empty/notification lines, exit 0 at EOF--cli bench nosuchscan→ exit 64, message, empty stdoutmove_to_trashpartial-failure reply shapeTest-hooks build (behind the isolated-Trash and child-home gates):
ticks=0 mode=nil) — PR 1a flips it on purposetrash-files:--yesexit 0; no TTY / piped yes / piped no → exit 2, nothing moveduninstall_appquit refusal: "did not quit", app untouched, asked once, no executor approval issuedPackage: cancelling a real-disk run mid-batch leaves the remaining item on disk (
.skipped(.cancelled)).Test hooks
TestHooks.swiftis wholly inside#if MACCLEANER_TEST_HOOKS; one call in the existing hooks block ofEntry.main;AppEngine.isRunning/quitoverrides under the same#if.check-no-test-hooks.shnow also checks the new names;stringson the Release binary: 0 hits forMACCLEANER_TEST_.Negative control (not committed)
With
--mcpunderdispatchMain()the probe still reportedmain=1 ticks=0 mode=niland nothing failed: PR 0 cannot telldispatchMainapart (the loop blocks inreadLine). PR 1a must flip the fingerprint and repeat this control so it fails.Checks (local)
check-approval-sites.shpass;check-no-test-hooks.shpass (Release) and--expect-hookspassmc-reviewer: approve; both should-fix items (reply-after-move not pinned; bridge results) and the nits addressed🤖 Generated with Claude Code