Repository navigation
fix: repair runtime hygiene checks after recent refactors - #174482
Conversation
Keep Discord processing at its live owner while replacing namespace spies with the named module spy and deleting the preflight re-export used only by tests. Preserve every assertion and exercise all importers of the changed helper. Expose existing memory CLI registration through the public runtime barrel for the PostgreSQL core test, retaining the plugin boundary. Add shipped cli-parent-lifetime.mjs to both focused guard commands. Causes: d49ea0f (#174322), 8955750 (#174374), and 75d827b (#174268). No runtime policy or timeout changes. Proof: 165 focused tests passed with --maxWorkers=1 (444.35s), 12 plugin boundary tests passed (19.14s) after the old-import negative control, core/extension/test types, source contracts, focused guard, and P2 review. Remaining independent audit finding: ORIGINAL_REVISION in an unchanged Gateway fixture. Standalone package types report unchanged memory-core connection/tableHasColumn errors; canonical source/type lanes 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 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 repairs Discord test imports, exposes existing memory CLI registration through the plugin runtime barrel, and restores focused guard coverage. Example: Run the focused boundary checks after cli-parent-lifetime.mjs was shipped.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs concrete source-contract regressions still present on current main, with no actionable correctness or security finding. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRepository checks inspect source imports, exports, and shipped entry points; Discord test fixtures and the PostgreSQL memory test exercise existing production owners. flowchart TD
A[Repository checks] --> B[Focused guard aliases]
B --> C[Shipped root modules]
A --> D[Plugin import boundary]
D --> E[Memory runtime barrel]
E --> F[Existing memory CLI]
G[Discord fixtures] --> H[Existing preflight and processor]
Technical reviewBest possible solution: Land the focused contract repairs through the existing CI gate while retaining the current runtime owners and lazy memory-manager boundary. Do we have a high-confidence way to reproduce the issue? Current source establishes the omitted root executable and disallowed private test import; the body records corresponding failures and a negative control, but this read-only review ran no target code. Is this the best way to solve the issue? The patch fixes the owning import/export and package-script contracts without weakening assertions or changing Discord policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 75a6e08f156c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -1, Tests 0, Config 0. Total -1 across 6 files. 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, 1:42 PM ET / 17:42 UTC. |
The lazy registry cutover in 6f281b1 (#174420) retained all transcript read handlers, but moved their namespace access behind Promise.all. Dependency analysis then reported the live transcriptReadOperations table as unused. Select the named read and write tables inside their dynamic import continuations before joining them. Preserve lazy concurrent loading, all 18 read and six write handlers, and the read-then-write merge order. Do not delete the live export or add a Knip ignore. The real registry registers all 18 pre-cutover read operation names both before and after. Core types, lint, formatting, and P2 review pass. Production and script unused-export scans are clean; the full-tree scan retains only the pre-existing Discord findings covered by #174482.
…74482) Keep Discord processing at its live owner while replacing namespace spies with the named module spy and deleting the preflight re-export used only by tests. Preserve every assertion and exercise all importers of the changed helper. Expose existing memory CLI registration through the public runtime barrel for the PostgreSQL core test, retaining the plugin boundary. Add shipped cli-parent-lifetime.mjs to both focused guard commands. Causes: b5c5a99 (openclaw#174322), 9409878 (openclaw#174374), and 963fbbd (openclaw#174268). No runtime policy or timeout changes. Proof: 165 focused tests passed with --maxWorkers=1 (444.35s), 12 plugin boundary tests passed (19.14s) after the old-import negative control, core/extension/test types, source contracts, focused guard, and P2 review. Remaining independent audit finding: ORIGINAL_REVISION in an unchanged Gateway fixture. Standalone package types report unchanged memory-core connection/tableHasColumn errors; canonical source/type lanes pass.
…aw#174498) The lazy registry cutover in 250fe51 (openclaw#174420) retained all transcript read handlers, but moved their namespace access behind Promise.all. Dependency analysis then reported the live transcriptReadOperations table as unused. Select the named read and write tables inside their dynamic import continuations before joining them. Preserve lazy concurrent loading, all 18 read and six write handlers, and the read-then-write merge order. Do not delete the live export or add a Knip ignore. The real registry registers all 18 pre-cutover read operation names both before and after. Core types, lint, formatting, and P2 review pass. Production and script unused-export scans are clean; the full-tree scan retains only the pre-existing Discord findings covered by openclaw#174482.
What Problem This Solves
Fixes three main-branch hygiene regressions: Discord namespace export findings, a core test importing a private plugin path, and a shipped root module missing from the focused guard commands.
User Impact
No runtime policy changes. Existing Discord filtering and message processing stay with their current owners; the guard commands now also inspect the shipped CLI parent-lifetime module.
Why This Change Was Made
#174322 introduced namespace spies that made the Discord process export appear unused and retained a test-only preflight re-export. Keep the live processor, use its named module spy, and import the preflight helper from its actual owner. All assertions remain, and every importer of the changed test helper is covered.
#174374 intended public memory CLI proof but imported
memory-core/cli.js, a private path under the core/plugin contract. Export the existing registration throughruntime-api.jsand use that public barrel. Runtime sidecar isolation remains checked.#174268 shipped
cli-parent-lifetime.mjswithout adding it to either focused guard command. Add the module to both commands; preserve the existing dynamic root-inventory assertion unchanged.The concurrently open #174462 changes PostgreSQL scenarios in the same test file but leaves its private CLI import unchanged; this repair supplies that narrow boundary correction.
Evidence
memory-public.postgres.test.ts(10.45s). Restored candidate passes all 12 boundary tests (19.14s).--maxWorkers=1(444.35s including worker artifact preparation): Discord preflight and every changed-helper importer, memory CLI/owner, guard runner, and sidecar isolation.pnpm buildpasses (948.46s including checkout-ownership wait, declarations, plugin distributions and UI build).The dependency/export audits clear both assigned Discord findings but report one unrelated unused export,
ORIGINAL_REVISION, in unchangedsrc/gateway/worker-environments/transcript-commit.fixture.test-support.ts. The standalone package-boundary compiler also reports ten errors in unchanged memory-core files (EngineConnection/DatabaseSync and missing tableHasColumn); canonical source and test type lanes pass. These checks are not represented as green.The three requested job-log fetches were attempted once: two HTTP/2 stream cancellations and one GitHub quota response. No workflow dispatch, rerun, re-push for green, ignored finding, baseline increase or timeout change.