Repository navigation
refactor(test): share SDK export fixture JSON writes - #189799
Conversation
|
🦞👀 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. What this changesThis PR replaces the SDK export tests’ local JSON writer with the existing shared writeJsonFile helper. Example: Create a fixture containing packages/plugin-sdk/package.json with {"exports":{}}.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-authored refactor consolidates equivalent fixture writes without weakening coverage, and no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe test fixture supplies synthetic SDK inventories and manifests to the export synchronization CLI, then checks generated exports, declaration aliases, package contents, and idempotence. flowchart LR
A[Synthetic SDK inventory] --> B[Shared JSON writer]
B --> C[Temporary repository]
C --> D[SDK synchronization CLI]
D --> E[Generated manifests and aliases]
E --> F[Registration and packing assertions]
Technical reviewBest possible solution: Use the existing shared writer while retaining the registration CLI and package-boundary assertions. Do we have a high-confidence way to reproduce the issue? There is no reported runtime bug; source inspection confirms the duplicated writer and equivalent shared implementation. Is this the best way to solve the issue? This is the smallest complete consolidation: reuse the existing owner, remove the duplicate implementation, and preserve every assertion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 603106d1a96a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 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 31, 2026, 6:11 PM ET / 22:11 UTC. |
|
Merged via squash.
|
…ed-backup-search-exports-20261101 * commit 'cde4bfe4f10ce470ded7264c68d9a72ae03594cc': fix(ci): keep backup and chat search internals private (#189894) fix(codex): recover unused native threads without dropping history (#189900) fix(oc-path): use last duplicate JSON key to match runtime parsing (#189855) perf(test): parse the Mantis resolver workflow once (#189801) fix(agents): revert default hard context admission (#189891) refactor(test): use canonical tracked temp paths (#189800) chore(ui): refresh control ui locales (#189898) improve: show gateway commit and build time on About refactor(test): share SDK export fixture JSON writes (#189799) fix: restore Files navigation from unavailable previews (#189879) refactor(test): share raw ratchet fixture writes (#189798) fix(ai): honor Model Studio compatible-mode output limits (#189870) fix: hold queued messages through inline edits (#189869) perf(test): reuse the baseline fixture Node resolver (#189790) test(qa): correlate handoff replies by run identity (#189885) fix(ui): normalize canonical Unicode in local search comparisons (#189874) fix(ui): explain unsupported browsers without module scripts (#189883) # Conflicts: # ui/src/pages/chat/components/chat-search-highlight.browser.test.ts
The SDK export registration tests duplicated the canonical pretty-JSON writer at ten call sites. Use the existing
writeJsonFilehelper for those fixture writes.Owner:
test/helpers/temp-repo.tsretains recursive parent creation, two-space formatting, the final newline, and a void return. Real CLI drift/repair/idempotence, npm packing, private Unicode entry names, stale facade rejection, and generated export assertions stay in place.Validation: complete owner passes 4 tests under Node and Bun; original owner passes 4 under Node. Temporary original/candidate probes pass on both runtimes for serialized values and final newline, overwrite modes, void returns, and blocked-parent errors. Removing the shared writer's final newline produces one expected failure. Relevant test types, targeted lint, formatting, and
git diff --checkpass.LOC after formatting: tooling/production 0; tests/support 0. This consolidates ownership; no subprocess, elapsed-time, billed-minute, or native Windows saving is claimed.
Independent source review: scoped clean, confidence 0.99. Required hosted and native landing gates remain authoritative.