Skip to content

Harden Linux Claude swap invocation proof - #2284

Merged
steipete merged 1 commit into
steipete:mainfrom
kiranmagic7:kiran/harden-linux-claude-swap-test-20260718
Jul 18, 2026
Merged

Harden Linux Claude swap invocation proof#2284
steipete merged 1 commit into
steipete:mainfrom
kiranmagic7:kiran/harden-linux-claude-swap-test-20260718

Conversation

@kiranmagic7

@kiranmagic7 kiranmagic7 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • port the hardened claude-swap invocation proof to the Linux test copy
  • verify the fake executable sees exactly one read-only list call by validating argv inside the script and using marker files for invocation/duplicate detection
  • keep the change scoped to the Linux CI test that failed on current main

Context

Current main CI run https://github.com/steipete/CodexBar/actions/runs/29632108080 failed in Linux x64 Swift Test (Linux only) with CLICardsClaudeSwapTests: the test expected the /tmp/.../arguments file to exist, but it was missing. The macOS/main test copy was already hardened in commit 7b63ab4; this applies the same proof shape to TestsLinux/CLICardsClaudeSwapTests.swift.

Tests

Not completed locally: swift test --filter CLICardsClaudeSwapTests stalled while downloading the Sparkle 2.9.3 SwiftPM binary artifact before tests executed. The touched target is Linux-only, so the green hosted Linux shards above are the execution proof for the failing shard.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 11:46 AM ET / 15:46 UTC.

Summary
The branch replaces the Linux Claude-swap test’s argument-file assertion with an in-script guard that accepts exactly one --list --json invocation and detects duplicate calls.

Reproducibility: no. high-confidence local reproduction was completed: the report supplies a specific current-main Linux CI failure and a clear affected test path, but the read-only inspection sandbox prevented executing or reading the checkout directly.

Review metrics: 2 noteworthy metrics.

  • Patch scope: 1 file affected; 13 added, 5 removed. The change is confined to the Linux Claude-swap test fixture, limiting regression surface.
  • Linux execution coverage: 2 Linux architectures passed. Both x64 and arm64 hosted shards exercised the exact proposed head.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No automated repair is needed: the PR has no actionable findings and is ready for normal maintainer review.

Security
Cleared: The diff only changes a test-local shell fixture and adds no dependency, workflow, secret, permission, download, or supply-chain surface.

Review details

Best possible solution:

Merge the focused Linux test-proof port after ordinary maintainer review, retaining the in-script argv and duplicate-invocation checks alongside the successful Linux shard coverage.

Do we have a high-confidence way to reproduce the issue?

No high-confidence local reproduction was completed: the report supplies a specific current-main Linux CI failure and a clear affected test path, but the read-only inspection sandbox prevented executing or reading the checkout directly.

Is this the best way to solve the issue?

Yes, based on the supplied diff and prior-pattern context: validating argv and duplicate invocation inside the fake executable avoids reliance on an externally written arguments file while preserving the test’s read-only-call contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2ccb4525687c.

Label changes

Label justifications:

  • P3: This is a focused CI-test reliability improvement with no direct user-facing runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Successful hosted Linux x64 and arm64 test shards on the exact head directly demonstrate the repaired Linux test path; the aggregate lint/build/test job also passed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Successful hosted Linux x64 and arm64 test shards on the exact head directly demonstrate the repaired Linux test path; the aggregate lint/build/test job also passed.
Evidence reviewed

What I checked:

  • Narrow test-only diff: The PR changes one Linux-only XCTest fixture, replacing five lines of argument-file capture with thirteen lines that validate the expected read-only argv and mark duplicate invocation. (TestsLinux/CLICardsClaudeSwapTests.swift:308, f832115ba2ec)
  • After-fix Linux execution proof: The PR body and follow-up comment report successful hosted build-linux-cli jobs on both Ubuntu x64 and Ubuntu arm64 for the exact head, plus a passing aggregate lint/build/test job. (TestsLinux/CLICardsClaudeSwapTests.swift:334, f832115ba2ec)
  • Established proof pattern: The contributor identifies commit 7b63ab4f as the existing hardened macOS/current-main test pattern and ports that proof shape only to the Linux copy; the repository policy favors focused CLI/test validation for this surface. (TestsLinux/CLICardsClaudeSwapTests.swift:308, 7b63ab4f)
  • Current review state: The PR is non-draft, cleanly mergeable, and all eight reported checks completed successfully; no maintainer review comments or prior ClawSweeper findings remain unresolved. (f832115ba2ec)

Likely related people:

  • steipete: The cited existing current-main hardening pattern and the affected Linux test suite are in the repository owner’s active codebase; direct git-history attribution could not be completed because the read-only command sandbox failed before execution. (role: likely follow-up owner; confidence: low; commits: 7b63ab4f; files: TestsLinux/CLICardsClaudeSwapTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-18T05:44:22.469Z sha f832115 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-18T15:05:09.539Z sha f832115 :: needs maintainer review before merge. :: none

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Hosted proof is now available on the same head f832115ba2ec9bec94a1c8c926183e6a2e2afe7a and I updated the PR body with the exact CI links:

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 18, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 18, 2026
@steipete
steipete merged commit 27c0e64 into steipete:main Jul 18, 2026
8 checks passed
@steipete

Copy link
Copy Markdown
Owner

Maintainer verification:

  • Reviewed the full test-only diff and compared it with maintainer commit 7b63ab4f; the Linux copy now has the same hardened proof as the macOS copy.
  • Confirmed the fake executable rejects wrong argument count/order, records duplicate invocation, and the test also requires successful output with two cards and no failures.
  • git diff --check origin/main...HEAD: passed.
  • swiftc -parse TestsLinux/CLICardsClaudeSwapTests.swift: passed.
  • swift test --filter CLICardsClaudeSwapTests: 22 tests in 2 platform copies passed; both read-only invocation tests passed.
  • /Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests "swift test --filter CLICardsClaudeSwapTests": clean, no accepted/actionable findings.
  • Exact head f832115ba2ec9bec94a1c8c926183e6a2e2afe7a: CI 8/8 passed, including Linux x64/arm64, both macOS shards, lint, and GitGuardian.
  • Merged with merge commit 27c0e64a856aaeb0dadfdec8173aa40cb7b1bec7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants