Repository navigation
test(remote): close the last SSH recovery finding and its coverage gaps (upstream PR 68) - #323
Conversation
SPDX-License-Identifier: AGPL-3.0-or-later Codecov reports 18 uncovered changed lines on PR #68 at 94.59% patch coverage, and one review finding is still open: a zero exit that omits a required output wedged the stage. Production change (src/pipeline/remote_session.jl): - A zero exit that omits a required output is now retired: the attempt is cleaned up and its journal archived as `*.missing-outputs-<uuid>`. An explicit rerun then launches a fresh attempt. `replay` cannot do this, because it cannot make a file appear that the command never wrote. - If the host refuses the cleanup, the journal stays, so the remote attempt keeps its owner, and the next run retries the retirement. - This is the existing `expire-succeeded` transition of the Agda protocol model (succeeded 0 n to removed 0 n). No new transition is needed. Tests: - Retirement and fresh relaunch, and the refused retirement that keeps the journal until a later run retires the same attempt. - A durable cancel request stops the old attempt of the same stage before a new one launches. - Receipt recovery replays the remote log before cleanup removes it, and cleans up the retained attempt. - The fetch's own missing-output error, a refused sweep, both superseded-journal branches with a stateful ControlMaster transport that records open, request and close events, phylogeny's local and remote log branch, and the single-quote escaping in verify_remote_sizes. - The refusing transport uses `get(ENV, "PATH", "")`, and the owned-transport cases require `ProcessFailedException`. Measured with Julia 1.12.5, `--code-coverage=user --compiled-modules=no`, `test/runtests.jl test_remote_stages.jl test_phylogeny.jl`: 426 pass, 0 fail. Every instrumented line this branch adds to remote_session.jl (295), phylogeny.jl (7) and remote_exec.jl (1) is covered. 14 planted faults in those lines are all caught. Linux only: these regressions use flock/setsid and are skipped elsewhere. Co-authored-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7ZoTPXfxg1C85rVNx78
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |



Change and reason
JoshuaJewell/MetaManifold-WebUI#68 has two open items at head
5115109:remote_session.jl(12),phylogeny.jl(5) andremote_exec.jl(1).replaycannot fix this, because it cannot make a file appear that the command never wrote.Production change (
src/pipeline/remote_session.jl, one branch):*.missing-outputs-<uuid>. An explicit rerun then launches a fresh attempt.expire-succeededtransition of the Agda protocol model (succeeded 0 n ↦ removed 0 n). No new transition is needed. Please confirm that this reading of the model is the intended one.Tests (three files):
verify_remote_sizes.This work starts from an earlier patch that was never run (
notes/0004-pr68-ssh-recovery-coverage.patchin MetaManifold-Evidence). I ran it, and added three things it lacked: the refused-retirement test, the same-stage cancel test, and the log-replay assertion.This pull request targets the branch of upstream PR 68. A merge here updates that pull request.
Validation
Julia 1.12.5, R 4.3.3, Linux, from the repository root.
Coverage, with the same flags as CI:
Result: 426 pass, 0 fail. Every instrumented line that this branch adds since upstream
89be534is covered:remote_session.jl295 of 295,phylogeny.jl7 of 7,remote_exec.jl1 of 1.Planted faults. I ran 14 deliberate corruptions of the changed lines, one at a time. The suite caught 12 at once. Two survived: a skipped cancel on a durable cancel request, and a skipped log replay on receipt recovery. I added a test for each, and each test now fails with its fault in place. Result: 14 of 14 caught.
Baseline. At
5115109, three existing "cancel kills the process group" assertions fail in my sandbox, with and without this change. The cause is the sandbox: its PID 1 is slow to reap killed processes, sokill -0on the group still succeeds for a moment. Inside a private PID namespace (unshare --pid --fork --mount-proc) all tests pass. The upstream CI passed these tests at5115109.Not run:
test/remote_ssh.jl(needs a real SSH server), the Agda audit (no Agda in my sandbox; the model is unchanged), the full suite, and the frontend tests. No workflow runs on this pull request, becauseci.ymlon this branch starts only for pull requests intomain. The upstream CI and Codecov run after the merge.Scope
notes/pr68-ssh-recovery-review.mdin MetaManifold-Evidence.flock,setsid). The suite skips them elsewhere.Contribution checks
5115109) and contains no merges from fork main.Generated by Claude Code