Repository navigation
fix(state): restore dependency checks for upgrade internals - #199847
Conversation
Keep state upgrade helpers private, move the unchanged Doctor subprocess boundary to its production owner, and include real dynamic plugin/preload entries in the dependency graph. Preserve upgrade and SQLite behavior; Node and Bun focused tests and real Gateway upgrade cases pass.
|
🦞👀 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 Summary: ✅ CompletedThis 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 makes state-upgrade internals private, moves the unchanged Doctor subprocess boundary into its own module, and registers dynamic analyzer entry points. Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR provides a focused repair for dependency-check failures, with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway startup owns state upgrades and invokes Doctor against a shadow copy; Knip separately checks source reachability and unused exports. flowchart TD
A[State upgrade modules] --> D[Knip analysis]
B[Historical plugin entries] --> D
C[Heap observer preload] --> D
D --> E[Dependency checks]
F[Gateway startup] --> A
A --> G[Shadow Doctor subprocess]
Technical reviewBest possible solution: Keep internal helpers private, share the unchanged Doctor subprocess boundary through its production module, and register the actual dynamic analyzer roots. Do we have a high-confidence way to reproduce the issue? Source inspection confirms the unnecessary exports and dynamically loaded roots described by the recorded analyzer failures; no target code or tests were executed during this review. Is this the best way to solve the issue? The patch uses existing production owners, removes unnecessary exports without suppressing findings, and preserves all changed test assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ea8cc3372de4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests -2, Other +4. Total +4 across 11 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 November 15, 2026, 6:55 PM ET / 23:55 UTC. |
|
Merged via squash auto-merge.
|
…#199847) Keep state upgrade helpers private, move the unchanged Doctor subprocess boundary to its production owner, and include real dynamic plugin/preload entries in the dependency graph. Preserve upgrade and SQLite behavior; Node and Bun focused tests and real Gateway upgrade cases pass.
What Problem This Solves
Fixes the hourly dependency check failing on state-upgrade internals and dynamically loaded fixture/preload entry points.
User Impact
No user-visible behavior change, schema change, migration, or new configuration. State upgrade and Doctor retain their existing behavior.
Why This Change Was Made
The state upgrade introduced in #198389 exposed internal helpers and left historical installed-plugin entries outside Knip's graph. Keep helpers private, exercise rebuild tests through the production entry point, and give the existing Doctor subprocess boundary its own production module. The Doctor implementation is unchanged and all callers migrate together.
Declare the real historical corpus plugin roots and the heap-rig soak preload as analyzer entry points. The preload omission is a newly identified main regression introduced by #199761 (
1e7f1f743c24f9b713ab78a75284c99b0ad05ca7), reproduced on the exact main parent; it is not dismissed as inherited noise. No ignores or fixture deletions are added. Production LOC is +2 from module imports; tests are -2 and analyzer configuration is +4.The independent member-welcome export regression from #198491 is owned by #199789 and is outside this patch.
Evidence
39b066a976970b080df4b107b8ba918e250d4f4e, two export-scan controls reproduced identical findings: nine production/six full-tree state exports plus three/two member-welcome exports. The candidate removes every state finding; only the separately owned member-welcome findings remain.pnpm check:changed --base 39b066a976970b080df4b107b8ba918e250d4f4ecompleted: every selected gate passes except the independently owned member-welcome dead exports, reproduced on the exact parent and introduced by feat(openclaw-id): name invited members from their email and ask who they are on first visit #198491 (cec47fd13f23df46069da1beb65ceaec6e66d04f). The final full scan reports zero state findings. The coordinator reports fix(ci): keep member welcome internals private #199789 is now merged on main; this candidate intentionally preserves its pinned base proof.The actual failed analyzer gates provide the red/green regression proof. Export scan wall times were 183.23/209.06 seconds for the two parent controls and 148.65 seconds for the candidate; CPU was 348.72/347.27/340.42 seconds. Unused-file scan wall/CPU was 130.85/285.11 seconds before and 178.02/325.09 seconds after. These are scanner measurements under varying shared-host load, not production performance claims. Maximum RSS is not allocation totals. The unchanged production operation does not warrant generating a large production-shaped database/workspace for this visibility/entry-graph repair.