Repository navigation
fix(testbox): retain comparison base for native capsule sync - #154796
Conversation
Bind the private capsule main ref to its captured comparison base so native Blacksmith can select committed and dirty source without falling back to a full sync. Preserve detached source HEAD, source policy and receiver authority. Extend the existing real sender/receiver fixture. Remote proof: expected pre-fix failure, 346 passing wrapper tests, all changed-file checks, native targeted sync and exact receiver hashes. Managed P2 review is clean.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 8:12 AM ET / 12:12 UTC. ClawSweeper reviewWhat this changesThe PR preserves the captured comparison base in Testbox’s temporary source checkout so native sync can transfer changed files without falling back to a full upload. Merge readiness✅ Ready for maintainer review Keep open: the fix remains necessary on pinned main, and the reviewed patch has no actionable correctness findings. Its scope is confined to developer source transport. Priority: P2 Review scores
Verification
How this fits togetherThe Crabbox wrapper packages local source for remote Testbox execution. Native transport uploads that package, and a separate receiver verifies and installs the selected source before running the requested command. flowchart LR
A[Local source and comparison base] --> B[Freeze selected source]
B --> C[Temporary checkout with main ref]
C --> D[Native targeted sync]
D --> E[Receiver verifies source bundle]
E --> F[Run requested command]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +41, Other +3. Total +44 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the captured base available to native transport while preserving detached source identity and independent receiver verification. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the current constructor creates detached HEAD without the literal main ref used by the comparison command. The extended real-Git fixture targets that failure; this review did not execute it. Is this the best way to solve the issue? Yes. Adding the ref in the existing capsule constructor supplies the missing transport metadata without changing source-selection policy or introducing another synchronization owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8df13399d71d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Bind the private capsule main ref to its captured comparison base so native Blacksmith can select committed and dirty source without falling back to a full sync. Preserve detached source HEAD, source policy and receiver authority. Extend the existing real sender/receiver fixture. Remote proof: expected pre-fix failure, 346 passing wrapper tests, all changed-file checks, native targeted sync and exact receiver hashes. Managed P2 review is clean.
What Problem This Solves
Fixes Testbox source runs falling back to a full upload because native sync cannot resolve the capsule's comparison branch.
User Impact
Developer tooling only: source-capsule runs can use Blacksmith's targeted sync path. No product behavior or configuration changes.
Why This Change Was Made
The private transport checkout retains detached source HEAD and now exposes its captured comparison base as
main, which native Blacksmith uses for its diff. Committed changes remain in the delta; source selection, exclusions, the original index, and receiver verification keep their existing ownership.Evidence
git diff --name-only --no-renames main(4.23 seconds wall).pnpm test test/scripts/crabbox-wrapper.test.ts --maxWorkers=1: 346 passed, one Windows-only case skipped; 143.97 seconds test duration, 145.09 seconds wall. This extends the existing fixture rather than adding another test. Its real Git/process boundary protects transport and receiver behavior that helper-only tests cannot prove.a23434887cf5(merge checkout7351e35589b8). In the wrapper-file job,test/scripts/crabbox-wrapper.test.tspassed 346 cases with the same one Windows-only skip: 167.54 seconds for the one-file Vitest invocation and 168.55 seconds including its test wrapper. The extended Blacksmith transport fixture took 1.566 seconds for shallow history and 7.420 seconds for full history.git diff --checkand fresh managed P2 review passed.