Repository navigation
refactor: finish export shadow hazard renames - #121471
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
3f8cc88 to
809f6eb
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 3:50 AM ET / 07:50 UTC. ClawSweeper reviewWhat this changesRenames internal approval and daemon helpers, directs pending-node work to its wake-helper owner, and preserves the public Plugin SDK approval-builder export as an alias. Merge readinessNo blocking findings: this protected maintainer PR still completes three distinct internal naming and import-boundary cleanups not present on main. Merge after the remaining exact-head checks complete successfully. Priority: P3 Review scores
Verification
How this fits togetherGateway pending-work handlers enqueue work and wake reconnecting nodes; daemon code resolves service-owned paths; the Plugin SDK exposes portable approval controls to plugins. The PR clarifies these ownership boundaries without changing their external behavior. flowchart LR
A[Gateway request] --> B[Pending work handler]
B --> C[Wake helper module]
D[Approval request] --> E[Button presentation builder]
E --> F[Plugin SDK compatibility export]
G[Service environment] --> H[Daemon home resolver]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests 0, Generated 0, Other -16. Total -10 across 13 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the direct owner imports and daemon-specific naming, retain the SDK alias through the next major release, and merge once exact-head checks are green. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving internal refactor, not a reported runtime failure. Is this the best way to solve the issue? Yes: direct imports from the wake owner, distinct daemon naming, and a retained public SDK alias remove ambiguity without changing gateway methods or plugin callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f6298bf84d96. 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)
|
809f6eb to
dfa3d57
Compare
|
Merged via squash.
|
* refactor(gateway): distinguish pending node handlers * refactor(approvals): distinguish button presentation builder * refactor(daemon): distinguish service home resolver
What Problem This Solves
Several internal exports still used the same names for distinct behaviors, leaving ambiguous grep/navigation targets and preserving two entries in the export-name-collision debt baseline. The original work order covered six hazards; while this branch was validating, #121388 landed the queue, configured-binding, node-handler/file, and ACP resolver portions on
main.Why This Change Was Made
This PR finishes the remaining owner-specific names without changing behavior, gateway method strings, config keys, tool names, or the shipped Plugin SDK export name:
resolveQueueSettingsCore: already satisfied by refactor: eliminate wrapper export shadowing hazards #121388 on currentmain.main.nodes.wake.ts.resolveAcpSessionKey: already satisfied by refactor: eliminate wrapper export shadowing hazards #121388 on currentmain.buildApprovalButtonPresentation;openclaw/plugin-sdk/approval-reply-runtimekeepsbuildApprovalPresentationas the shipped compatibility alias with a removal-intent comment.resolveDaemonHomeDir, with its service-environment ownership documented;src/utils.tsremains untouched.The collision baseline shrinks from 233 to 231 on this PR base. Production LOC is +28/-22 (net +6): four formatting lines make the now-direct wake import explicit, and two required contract comments document the SDK compatibility and daemon home ownership. Tests are +3/-3; generated baselines are +6/-22.
AI-assisted: yes (Codex).
User Impact
No user-visible behavior changes. Internal names now identify one behavior each, the pending-node import cycle is removed, daemon service paths cannot be confused with runtime home resolution, and existing Plugin SDK consumers retain their current approval builder export.
Evidence
node scripts/run-vitest.mjs src/gateway/server-methods/nodes.pending-work.test.ts src/gateway/server-methods/nodes.test.ts src/gateway/server-import-boundary.test.ts— 3 files, 27 tests passed.node scripts/run-vitest.mjs src/infra/exec-approval-reply.test.ts src/infra/approval-presentation.test.ts— 2 files, 49 tests passed.node scripts/run-vitest.mjs src/daemon/service-env.test.ts src/daemon/restart-logs.test.ts src/daemon/inspect.test.ts src/daemon/launchd.test.ts src/daemon/systemd.test.ts— 5 files, 425 passed, 5 skipped.src/infrafilter was host-contention dominated; the exact touched infra files passed cleanly above.pnpm lint:tmp:export-name-collisions— passed; baseline 233 → 231 on the current PR base (the original worktree began at 244 before overlapping main cleanups landed).pnpm plugin-sdk:api:checkandpnpm plugin-sdk:surface:check— passed; 4,847 public exports remain unchanged.pnpm check:import-cycles—0 runtime value cycle(s).pnpm build— passed in 11m33s; no[INEFFECTIVE_DYNAMIC_IMPORT]warning.node scripts/check-changed.mjs— passed via the repository-approved local fallback after Blacksmith/Daytona/Azure were unavailable and the raw AWS fallback lacked hydrated workspace dependencies.pnpm format <touched paths>andgit diff --check— passed.