Repository navigation
test(tooling): reuse mobile release ref lifecycle fixtures - #134367
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 2:49 PM ET / 18:49 UTC. ClawSweeper reviewWhat this changesThis PR replaces repeated temporary Git-repository setup in mobile release-reference tests with one auto-cleaned fixture lifecycle while retaining the iOS, Android, CLI, and path-with-spaces checks. Merge readinessKeep open for maintainer handling: the test-only refactor is coherent and no introduced correctness or security defect was found, while member authorship and the protected Priority: P3 Review scores
Verification
How this fits togetheriOS and Android release lanes call a shared script to record immutable Git references for mobile builds. The changed test creates a local bare remote and checkout to verify that script, then delegates temporary-root cleanup to the shared test helper. flowchart LR
A[Mobile release lanes] --> B[Release reference script]
B --> C[Git remote references]
D[Lifecycle test fixture] --> B
D --> E[Temporary-root cleanup]
Decision needed
Why: The patch is a protected maintainer item; the supplied review context does not expose the newest bot comment required by repository policy before landing. Before merge
Agent review detailsSecurityNone. PR surfaceTests -32. Total -32 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the single lifecycle fixture and shared cleanup owner while preserving the direct iOS idempotence, Android conflict, and CLI-resolution assertions. Do we have a high-confidence way to reproduce the issue? Yes. On the base version, a Git setup failure after Is this the best way to solve the issue? Yes. Reusing the existing tracker is the narrow maintainable repair because it records ownership at allocation rather than adding another local cleanup mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 40f11b0ac96c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
I read both current ClawSweeper comments, including the full 18:23 UTC review. The earlier comment is only acknowledgement; the current review has no concrete Rank-up moves or code findings. That resolves its P1 request to inspect the latest comment, and maintainer landing review is complete. All 37 resulting mobile/iOS/Android gate tests pass (39 before consolidation), with all 15 original assertion sites retained. The injected first-Git-setup failure reproduced per-test fixture retention before and showed cleanup before wrapper teardown after; both probes restored exact source bytes and joined their processes. Full changed checks, Codex autoreview, exact-head CI and Workflow Sanity pass. Production +0/-0; tests +81/-113. Proceeding through native landing gates. |
|
Merged via squash.
|
What problem does this PR solve?
Three mobile release-ref tests repeatedly create the same real Git history. Their fixture allocates a temporary directory before the caller obtains its cleanup callback, so a Git setup failure leaves that directory until the test process exits.
Why this approach?
Use one real lifecycle to record and resolve an iOS ref, reject an Android SHA mismatch, and resolve the original iOS SHA through the CLI after HEAD advances. Register temporary roots with the canonical cleanup tracker immediately on allocation. Remove two repeated repositories and one redundant record operation: 20 Git process starts.
User impact
Test-only change; production +0/-0, tests +81/-113. All 15 assertion sites remain. The five cases retain numeric validation, immutable refs, idempotence, real CLI output and paths containing spaces.
Evidence
Focused mobile and iOS/Android caller tests pass: 39 before, 37 after because three fixture cases become one. Full changed-file checks and Codex autoreview pass.
A temporary fault at the first Git setup call produces the same exit-97 failure on both versions. Before: its directory still exists after per-test cleanup. After: the cleanup hook already removed it. The runner later removes the baseline process directory, so this proves earlier cleanup, not a persistent leak. Both probes restored exact source bytes and verified child-process shutdown.
node scripts/run-vitest.mjs test/scripts/mobile-release-ref.test.ts test/scripts/android-release-fastlane-gates.test.ts test/scripts/ios-release-fastlane-gates.test.ts