Repository navigation
test(pr): initialize alias fixture dependencies once and preserve links - #149638
Conversation
…k helper idempotent
|
🦞👀 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 15, 2026, 11:37 PM ET / September 16, 2026, 03:37 UTC. ClawSweeper reviewWhat this changesThe PR removes duplicate dependency setup from the PR-command test fixture and preserves existing package links when setup repeats. Merge readiness✅ Ready for maintainer review This maintainer-requested follow-up remains useful: current main tolerates repeated setup but still recreates dependency links and initializes the alias fixture twice. No actionable correctness or security defect was found in the introduced patch. Priority: P3 Review scores
Verification
How this fits togetherPR-command fixtures create temporary Git checkouts with installed dependencies to test command delegation. They let the tests verify arguments, working directories, and trust-anchor refusals before native PR operations execute. flowchart LR
A[Temporary Git checkouts] --> B[Dependency setup]
C[Installed packages] --> B
B --> D{Link already exists}
D -->|Yes| E[Preserve link]
D -->|No| F[Create package link]
E --> G[Alias delegation checks]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep dependency initialization in the existing fixture owner, preserve established links, and retain the executable delegation and refusal checks. Do we have a high-confidence way to reproduce the issue? Not applicable to a remaining runtime bug: main already prevents the historical EEXIST failure, while source inspection confirms redundant initialization and link replacement remain. Is this the best way to solve the issue? Yes. The patch consolidates setup without weakening assertions or changing dependency targets, and retains the existing regression coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8432c139340a. 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.
|
…k helper idempotent (openclaw#149638)
landed for prior shard failures) Co-Authored-By: Claude <[email protected]>
What Problem This Solves
The alias fixture still initializes dependencies twice, and its helper deletes and recreates every link on repeated setup. This is a maintainer-requested follow-up to the fixture regressions reintroduced by overlapping squash merges.
Refs #149475, #149481, #149488, #149520, #149558.
User Impact
No user-visible runtime change. This is an internal test-fixture repair; production code, update behavior, configuration, and dependencies are unchanged.
Why This Change Was Made
Initialize the alias fixture once and preserve existing dependency links on repeated setup. Main now creates the directory recursively but deletes and recreates every dependency link. This change skips existing entries, retaining installed third-party package targets and the Windows junction branch. The existing repeat-initialization regression from #149558 remains unchanged.
Scope: production +0/-0; tests and test support +6/-6.
Evidence
Exact-head CI run 35051979002: green for
37f7e0d77a044bb5e4105ec5592142f1a38c2e0e. Native hosted CI/Testbox preparation passed without changing the head.Published ClawSweeper review: exact head verified; no findings and no before-merge or rank-up actions.
Original baseline: the full
pr-wrappers.test.tsrun reported 12 failed / 80 passed, all twelve alias cases failing at duplicate directory creation.The repeat-initialization regression failed against the original helper with
EEXIST.Initial repair: the full wrapper file passed 93/93;
node scripts/check-changed.mjs, diff checks, and independent Codex branch review through P1 passed.Rebased candidate
37f7e0d77a044bb5e4105ec5592142f1a38c2e0e:node scripts/run-vitest.mjs test/scripts/pr-wrappers.test.tspassed 93/93;node scripts/check-changed.mjs --stagedandgit diff --checkpassed. Fresh Codex review of the resolved patch was scoped-clean through P1.The requested full
test/scripts/run recorded 4,925 passing cases before interruption after an unrelated temp-directory cleanup failure. Its log line was:The maintainer authorized one rerun of
node scripts/run-vitest.mjs test/scripts/ci-git-owner.test.tsand proceeding with this unrelated pre-existing teardown flake documented. The original 30-second-timeout case passed on that rerun in 42.519 seconds. The one-time rerun finished with 122 passed, 32 skipped, 5 failed. Three release-ancestry cases reported the sameENOTEMPTY, Directory not emptyteardown signature (local log lines 5–15). Two publisher cases reported a separatefixture deadline exceededassertion:verify_publication cancel at ^ls-tree(45.622 s; line 446) andordinary stale-lease 125 permits the exact deletion rebuild(47.609 s; line 529). None references the alias fixture helper. These historical failures belong to the pre-rebase candidate and are recorded separately from current candidate proof. The maintainer explicitly authorized proceeding unless the rerun failed in the alias helper. No exclusions, timeout changes, or further retries were made.