Repository navigation
refactor: trust prepared runtime and channel facts - #174559
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 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 removes redundant copying and validation of prepared runtime facts and consolidates existing cleanup paths. Example: Resolve the registered channel alias "a" repeatedly after publishing the alpha plugin.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored cleanup open. No concrete introduced defect was found; the documented best-effort tradeoffs are accepted, while corrective-head CI remains incomplete. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway, channel, cron, and worker adapters consume prepared configuration and runtime facts, then route messages, execute queued operations, and publish committed results. flowchart TD
A[External requests] --> B[Schema and admission owners]
B --> C[Prepared runtime facts]
C --> D[Channel and ACP adapters]
C --> E[Cron and worker queues]
D --> F[Transport and persistence owners]
E --> F
Technical reviewBest possible solution: Retain the simpler existing owners and accepted best-effort behavior, with corrective-head validation completed before landing. Do we have a high-confidence way to reproduce the issue? This PR is an intentional refactor; no failing user scenario is claimed or reproduced, and no target code was executed during review. Is this the best way to solve the issue? The change follows the existing ownership contracts: validation stays at public boundaries, mutation stays with producers, and the maintainer explicitly accepts the removed defensive guarantees. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d401ad3409e4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -155, Tests -73, Docs 0, Other -1. Total -229 across 80 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 3:34 PM ET / 19:34 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Exact-head landing evidence for CI run 38955054455 completed successfully. Every paginated check run was enumerated: no failed, cancelled, queued, or running check remains; selected Node suites, MCP lifetime proof, types, lint, architecture, ratchets, UI boundary suites, PostgreSQL conformance, and security checks passed. Scope-unselected jobs are skipped and CodeQL is neutral. Combined commit statuses First-head failures were not rerun: the MCP copied-host fixture was repaired once with existing linked frozen-graph mode and fresh independent review; the three PostgreSQL assertion failures matched scheduled main run 38948575054 exactly. Neither failure recurs on this corrective head. No inherited-red exception is needed for the current run. Local runtime/types/cycles are not claimed; the body records the unavailable fresh-main dependency installation and narrow parse-only checks. Coordinator rule 10 applies to the landing transport only. Two native Production delta: 155 net lines removed. Phase E remains untouched. |
Main d25d32d (#173712) added an Enterprise session-reader consumer after the original audit base. The first PR merge build failed with MISSING_EXPORT/TS2305 because the hygiene commit removed its helper. Restore factoryGitHubRequestDigest exactly as on main and rebase for the named build failure, preserving request binding and authorization checks. The current export scan also finds three helpers used only by their own modules: sessionGitHubRepositoryUrl, copyProgressDraftLineMetadata and cloneBoardSnapshot. Make them private; keep all implementations intact. The progress snapshot consumer was retired deliberately in #174559. Proof: CI artifact build passes (377.09s); 39 Enterprise consumer tests pass (95.55s, --maxWorkers=1). Four visibility suites pass (347.37s, --maxWorkers=1); export scan passes with zero findings (202.10s). Fresh P2 review is scoped-clean. Additional local type, lint and importer proof is recorded in the PR.
* fix(ci): restore dependency and runtime hygiene checks Owner refactors left unused exports and moved deprecated outbound test calls into a scanned shared helper. Use the supported durable send API while keeping the prior queue default, result arrays, and error behavior. Remove dead helpers, internalize local implementations, and keep catalog discovery with its owner. Keep the public quota type for declaration emission and check the marker at its producer. Receipt tests use the canonical file reader with unchanged byte assertions. The client credential API is intentionally staged by #174294; model its entry until cutover instead of deleting the unactivated owner. No Knip ignores or credential implementation changes. Proof: deadcode dependencies/exports/unused-files and deprecated API guards pass; core/scripts/UI and affected test types, declaration emission, targeted lint/boundary lint/format, and P2 review pass. Focused quota/Doctor tests pass (53.0s wall), as do 49 completion tests (160.21s wall), using maxWorkers=1. Remaining importer proof and inherited architecture findings are recorded in the PR. The full architecture command reaches four unchanged legacy sentinel references from #174489; no baseline or assertion is weakened. * fix(ci): preserve live GitHub digest and localize unused helpers Main d25d32d (#173712) added an Enterprise session-reader consumer after the original audit base. The first PR merge build failed with MISSING_EXPORT/TS2305 because the hygiene commit removed its helper. Restore factoryGitHubRequestDigest exactly as on main and rebase for the named build failure, preserving request binding and authorization checks. The current export scan also finds three helpers used only by their own modules: sessionGitHubRepositoryUrl, copyProgressDraftLineMetadata and cloneBoardSnapshot. Make them private; keep all implementations intact. The progress snapshot consumer was retired deliberately in #174559. Proof: CI artifact build passes (377.09s); 39 Enterprise consumer tests pass (95.55s, --maxWorkers=1). Four visibility suites pass (347.37s, --maxWorkers=1); export scan passes with zero findings (202.10s). Fresh P2 review is scoped-clean. Additional local type, lint and importer proof is recorded in the PR. * chore(ci): leave UI helper cleanup to focused peer fix READY PR #174625 now covers the exact openNewSessionPlusMenu deletion. Restore this file to the base version so this branch contains only the remaining hygiene repairs. No UI code or assertions differ from main. The duplicate guard verified the peer's diff and fresh OPEN/non-draft state. P2 review of this scope reduction is clean; existing runtime, export, type and owner-test proof remains valid for the retained changes. * chore(ci): defer parser fixture cleanup to existing PR The final duplicate guard found READY PR #174631 with the exact observeJsonParse deletion. Restore the fixture to the base version so this PR no longer overlaps that active cleanup. Its importing tests and assertions are unchanged and had already passed locally. Fresh P2 review is clean. Retained runtime changes keep their completed build, focused test, type, lint and declaration proof.
* refactor: trust prepared runtime and channel facts * test: retain compiled graph for MCP lifetime fixture
* fix(ci): restore dependency and runtime hygiene checks Owner refactors left unused exports and moved deprecated outbound test calls into a scanned shared helper. Use the supported durable send API while keeping the prior queue default, result arrays, and error behavior. Remove dead helpers, internalize local implementations, and keep catalog discovery with its owner. Keep the public quota type for declaration emission and check the marker at its producer. Receipt tests use the canonical file reader with unchanged byte assertions. The client credential API is intentionally staged by openclaw#174294; model its entry until cutover instead of deleting the unactivated owner. No Knip ignores or credential implementation changes. Proof: deadcode dependencies/exports/unused-files and deprecated API guards pass; core/scripts/UI and affected test types, declaration emission, targeted lint/boundary lint/format, and P2 review pass. Focused quota/Doctor tests pass (53.0s wall), as do 49 completion tests (160.21s wall), using maxWorkers=1. Remaining importer proof and inherited architecture findings are recorded in the PR. The full architecture command reaches four unchanged legacy sentinel references from openclaw#174489; no baseline or assertion is weakened. * fix(ci): preserve live GitHub digest and localize unused helpers Main faa7f43 (openclaw#173712) added an Enterprise session-reader consumer after the original audit base. The first PR merge build failed with MISSING_EXPORT/TS2305 because the hygiene commit removed its helper. Restore factoryGitHubRequestDigest exactly as on main and rebase for the named build failure, preserving request binding and authorization checks. The current export scan also finds three helpers used only by their own modules: sessionGitHubRepositoryUrl, copyProgressDraftLineMetadata and cloneBoardSnapshot. Make them private; keep all implementations intact. The progress snapshot consumer was retired deliberately in openclaw#174559. Proof: CI artifact build passes (377.09s); 39 Enterprise consumer tests pass (95.55s, --maxWorkers=1). Four visibility suites pass (347.37s, --maxWorkers=1); export scan passes with zero findings (202.10s). Fresh P2 review is scoped-clean. Additional local type, lint and importer proof is recorded in the PR. * chore(ci): leave UI helper cleanup to focused peer fix READY PR openclaw#174625 now covers the exact openNewSessionPlusMenu deletion. Restore this file to the base version so this branch contains only the remaining hygiene repairs. No UI code or assertions differ from main. The duplicate guard verified the peer's diff and fresh OPEN/non-draft state. P2 review of this scope reduction is clean; existing runtime, export, type and owner-test proof remains valid for the retained changes. * chore(ci): defer parser fixture cleanup to existing PR The final duplicate guard found READY PR openclaw#174631 with the exact observeJsonParse deletion. Restore the fixture to the base version so this PR no longer overlaps that active cleanup. Its importing tests and assertions are unchanged and had already passed locally. Fresh P2 review is clean. Retained runtime changes keep their completed build, focused test, type, lint and declaration proof.
What Problem This Solves
Simplifies runtime and channel plumbing that repeatedly copies or checks already prepared internal facts.
User Impact
No intended feature, CLI, configuration, persisted-data, or protocol change. External validation, live effect authority, FIFO ordering, resource bounds, durability, and write settlement remain.
Why This Change Was Made
Recover the runtime/channel area of an earlier cleanup as an independently attributable slice. Reuse the plugin registry's published snapshot, consolidate ACP cached-handle cleanup, consume prepared hook configuration, and remove redundant request/result clones and checks. Cron configuration snapshots follow serialized command arrival rather than maintaining a second version-ordering mechanism. Keep the cron authority clone that normalizes wire prototypes before CAS comparison.
Production delta: 155 net lines removed. Synthetic caller-mutation and delayed-preview tests are removed only with the unsupported mechanism they pinned; ordinary transcript, fault/idempotency, replacement, final-delivery, and cleanup coverage remains.
Best-effort tradeoffs accepted
Evidence
git diff --check: pass.dispose-entered. Use the existing linked, frozen invocation graph, as native module-loader proof already does. Lifetime assertions, modes, deadlines, process-tree joins, and cleanup are unchanged; independent copied-host relocation coverage remains unchanged. The one-line repair has fresh scoped-clean P2 review, formatting, lint, and diff checks. Exact corrective-head CI is required before landing.lint-suppressions.test.ts --maxWorkers=1wrapper was attempted in isolated state and stopped before test execution because this fresh sparse worktree has no dependency installation (exit 2). This is a prerequisite gap, not a passing test or a product failure.First-head CI attribution
Run 38951811373, head
ce6ba18056dc22e8f4623a007428bd6cb6d28745, completed with only these component failures; all other selected suites, lint, types, architecture, and ratchets passed:checks-node-changed-compact-large-14/ 117145768049PostgreSQL conformance/ 117145765005matrix-roots.postgres.test.tsport/resume/rollback cases resolvephase: preflightinstead of rejecting on scheduled main run 38948575054, head24f9be0a7c945c70ad216399cfab085147e2f698. Exact test names and assertion signatures match; no PostgreSQL test or schema is modified here.openclaw/ci-gateNo Actions rerun was requested. The corrective source push requires new exact-head CI. Any remaining inherited-only red will use the authorized native exception/failure table; tooling bootstrap has failed twice before dispatch on stale installed dependencies, so coordinator rule 10 permits the SHA-guarded fallback only after the exact-head gates qualify.