Skip to content

fix: repair runtime hygiene checks after recent refactors - #174482

Merged
steipete merged 1 commit into
mainfrom
ci/fix9-hygiene-20261016f
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
ci/fix9-hygiene-20261016f

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 through runtime-api.js and use that public barrel. Runtime sidecar isolation remains checked.

#174268 shipped cli-parent-lifetime.mjs without 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

  • The original guard fixture reproduced its missing root (1 failed, 14 passed). The corrected guard and sidecar tests pass, and the real focused guard command passes.
  • Restoring only the old private memory CLI import makes the boundary assertion fail on exactly memory-public.postgres.test.ts (10.45s). Restored candidate passes all 12 boundary tests (19.14s).
  • Ten focused files pass all 165 tests with --maxWorkers=1 (444.35s including worker artifact preparation): Discord preflight and every changed-helper importer, memory CLI/owner, guard runner, and sidecar isolation.
  • Core types (21.29s), extension production types (39.08s), extension-test/core-infra test graphs (86.18s), full source-contract checks (213.06s), core typed lint (53.76s), extension typed lint (459.40s including declaration preparation), formatting and P2 review pass. The full architecture check also passes (370.96s).
  • Full pnpm build passes (948.46s including checkout-ownership wait, declarations, plugin distributions and UI build).
  • PostgreSQL-dependent scenario execution is not claimed; its import/type contract is checked, and the CLI sibling tests execute locally.

The dependency/export audits clear both assigned Discord findings but report one unrelated unused export, ORIGINAL_REVISION, in unchanged src/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.

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.
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 16, 2026 17:25
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord extensions: memory-core Extension: memory-core labels Oct 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T17:29:18.198816Z 837a80d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Both guard aliases omit the module, violating the existing root-executable coverage assertion.
  • After: Both aliases include cli-parent-lifetime.mjs while retaining the coverage assertion.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair with preserved assertions and no identified defect; reported validation supports the source review.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored contract repair is outside the ordinary contributor proof gate; its body reports the focused guard execution and boundary negative control, without claiming live Discord or PostgreSQL behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Repository validation reports unused Discord exports, rejects a private plugin import, and fails shipped-root coverage.
Reason: The narrow maintainer-authored repair restores existing contracts and preserves runtime behavior.

Regression provenance

Possible 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
Reviewed head: 837a80de089d1573020efe08fa8951363582041a

Before merge

None.

Findings

None.

Agent review details

How this fits together

Repository 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]
Loading

Technical review

Best 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

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Verified introduced patch: The pinned introduction changes only test wiring, one removed private re-export, one additive runtime-barrel export, and the two guard aliases; Discord filtering and processing implementations remain intact. (837a80de089d)
  • Existing guard contract: The existing assertion discovers root executables dynamically and requires both focused guard aliases to cover them identically; the missing module is therefore a defined contract failure. (test/scripts/run-additional-boundary-checks.test.ts:247, 837a80de089d)
  • Plugin boundary repair: Repository guidance permits core tests to consume a bundled plugin's runtime-api barrel. The added export forwards the existing registration without changing its implementation, and manager acquisition remains behind the existing lazy sidecar. (extensions/memory-core/runtime-api.ts:2, 837a80de089d)
  • Current-main need: The fetched main revision retains the namespace spies, private CLI import, preflight helper re-export, and incomplete guard aliases. (75a6e08f156c)
  • Related work remains distinct: test(database): PostgreSQL search product-flow conformance #174462 expands PostgreSQL scenarios in the same test file but leaves the private CLI import unchanged, so it does not supersede this repair. (src/infra/database-engine/memory-public.postgres.test.ts:129, 44a9865276e3)
  • Validation and discussion: The complete PR body reports focused guard execution, a failing old-import negative control, passing boundary and sibling tests, and a successful build; it explicitly excludes PostgreSQL scenario execution. Exact-head checks still include running jobs and a pending aggregate gate, with no demonstrated diff-caused failure. (837a80de089d)

PR surface

Source -1, Tests 0, Config 0. Total -1 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 1 2 -1
Tests 3 10 10 0
Docs 0 0 0 0
Config 1 2 2 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 13 14 -1

Labels

Label changes:

  • add P2: Repairs defined repository-check failures with limited runtime impact.
  • add merge-risk: 🚨 compatibility: Adds an export to the plugin runtime barrel; the maintainer-authored direction explicitly approves this additive boundary repair, preserving existing registration and callers.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repairs defined repository-check failures with limited runtime impact.
  • merge-risk: 🚨 compatibility: Adds an export to the plugin runtime barrel; the maintainer-authored direction explicitly approves this additive boundary repair, preserving existing registration and callers.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 1:42 PM ET / 17:42 UTC.

@steipete
steipete merged commit 7d636d9 into main Oct 16, 2026
354 of 359 checks passed
@steipete
steipete deleted the ci/fix9-hygiene-20261016f branch October 16, 2026 17:45
steipete added a commit that referenced this pull request Oct 16, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord extensions: memory-core Extension: memory-core merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant