Repository navigation
test(apple): resolve credential fixture roots before SQLite open - #174584
Conversation
The new native credential suite passed a raw macOS TMPDIR path to an owner that requires a resolved client root. SQLite's no-follow open rejects the /var alias with SQLITE_CANTOPEN_SYMLINK, before any credential operation. Resolve only the newly created fixture root and retain its existing cleanup. Production path guards, credential operations and all assertions are unchanged. The unchanged current-main suite reproduced all 13 hourly issues through /var and passed all 10 tests through the same physical /private/var root. The patched suite passes all 10 through the original aliased TMPDIR under an OS sandbox (1.508s tests, 3.755s process). Package build and format pass; strict lint retains the same two baseline findings. No app was launched, no operator credentials were accessed, and no CI rerun was requested. The fixture and preparatory adapter were introduced by 4706053 (#174294); the PR explicitly enables no production credential consumers. Independent P2 review of the tracked test patch was scoped-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 SummaryThis 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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR resolves the temporary credential-test root with realpath before passing it to the SQLite owner. Example: The credential suite creates its fixture beneath /var/tmp.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete macOS test-fixture failure without weakening production path checks or changing assertions; no actionable code findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Swift credential tests supply temporary roots to the native credential owner, which opens client/credentials.sqlite and exercises identity, token, custody, and path-safety contracts. flowchart LR
A[Swift credential tests] --> B[Temporary fixture root]
B --> C[Resolve existing root]
C --> D[Native credential owner]
D --> E[SQLite no-follow open]
E --> F[Credential assertions]
Technical reviewBest possible solution: Resolve the newly created fixture root once and retain the production no-follow guard and existing security assertions. Do we have a high-confidence way to reproduce the issue? The raw TMPDIR fixture reaches SQLITE_OPEN_NOFOLLOW unchanged on main; the author reports the same binary failing through /var and passing through /private/var, but this read-only review ran no tests. Is this the best way to solve the issue? The repair belongs in the fixture producer and follows the existing native realpath pattern without relaxing the credential owner's security contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8d264497042e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +3. Total +3 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 16, 2026, 3:34 PM ET / 19:34 UTC. |
…nclaw#174584) The new native credential suite passed a raw macOS TMPDIR path to an owner that requires a resolved client root. SQLite's no-follow open rejects the /var alias with SQLITE_CANTOPEN_SYMLINK, before any credential operation. Resolve only the newly created fixture root and retain its existing cleanup. Production path guards, credential operations and all assertions are unchanged. The unchanged current-main suite reproduced all 13 hourly issues through /var and passed all 10 tests through the same physical /private/var root. The patched suite passes all 10 through the original aliased TMPDIR under an OS sandbox (1.508s tests, 3.755s process). Package build and format pass; strict lint retains the same two baseline findings. No app was launched, no operator credentials were accessed, and no CI rerun was requested. The fixture and preparatory adapter were introduced by a67871a (openclaw#174294); the PR explicitly enables no production credential consumers. Independent P2 review of the tracked test patch was scoped-clean.
What Problem This Solves
The new native credential tests (OpenClawClientCredentialStoreTests) pass a raw macOS temporary-directory alias to a SQLite owner that requires a resolved client root. SQLITE_OPEN_NOFOLLOW correctly rejects /var/... because it aliases /private/var/..., so credential creation fails before any operation. This reproduced all 13 issues from main hourly 38948575054.
Why This Change Was Made
Resolve only the newly created test root with realpath. Cleanup, every original assertion, and the production no-follow guard stay unchanged. PR #174294 introduced the fixture and enables no production credential readers or writers, so this change is test-only. Real app storage lives under the user Library directory, not a /var alias.
Evidence