Repository navigation
refactor(test): reuse canonical secret fixture cleanup - #189492
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR delegates temporary secret-file directory creation and cleanup to the existing withTempDir helper. Example: An ACP option test supplies token content "tok_file\n".
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused, behavior-preserving simplification with no actionable correctness or security findings; CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe test-support fixture receives synthetic credentials and a callback, writes optional files, returns the callback result, and removes the temporary directory. flowchart TD
A[CLI option tests] --> B[Secret file fixture]
B --> C[Shared temporary directory helper]
C --> D[Write optional credential files]
D --> E[Await test callback]
E --> F[Remove temporary directory]
Technical reviewBest possible solution: Use withTempDir as the sole directory lifecycle owner while preserving the fixture's credential-writing contract. Do we have a high-confidence way to reproduce the issue? There is no reported runtime bug to reproduce; source inspection confirms the duplicated lifecycle and equivalent shared helper. Is this the best way to solve the issue? The diff is the smallest complete simplification: it removes duplicate lifecycle ownership without adding machinery or changing consumer contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7caee827c5be. Provenance checked
TestingProof path: unit tests only. 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: No label 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 31, 2026, 11:17 AM ET / 15:17 UTC. |
|
Merged via squash.
|
…restoration-ci-189390-20261127 * commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) fix(agents): skip the bootstrap ritual in one-shot runs (#206477) fix(test): preserve stack coordinates in redacted failure reports (#152384) fix(gateway): return consistent unavailable response guidance (#191933) fix: preserve emphasis in Markdown table row labels (#205349) fix(nextcloud-talk): keep webhook spool helpers private (#206470) perf(plugins): overlay native receipts once per visible root (#206464) fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129) perf(config): retain one snapshot for unchanged validation results (#206465) refactor(test): reuse canonical secret fixture cleanup (#189492) refactor(subagents): own descendant Stop cancellation (#206444) refactor(subagents): keep announce cleanup action type private (#206407) ...
What Problem This Solves
The secret-file test fixture duplicates the canonical asynchronous temporary-directory lifecycle, leaving another cleanup owner to maintain.
User Impact
No runtime change. CLI credential-file option tests retain their real file setup, callback results and cleanup behavior through the shared fixture owner.
Why This Change Was Made
Delegate directory creation, callback awaiting and final removal to withTempDir. Preserve the prefix, token-before-password writes, empty-versus-absent handling and original failure precedence. Production/tooling LOC: 0; test support: -3.
Evidence