Repository navigation
refactor: deslop channel owners, runtime frames and public-boundary tests - #184382
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. |
8258006 to
17fe5e5
Compare
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. |
Security-sensitive guard clearedCurrent revision: This PR no longer changes files in the maintainer security-review tier. Separate CODEOWNERS requirements still apply to security policy and enforcement files. |
|
Codex review: blocked before merge. What this changesThis PR consolidates private helpers and types into their existing consumers and removes the final local Responses replay assertion. Example: Responses history contains dangling tool call call_1 with repairToolUseResultPairing=false.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this maintainer-directed consolidation has value, but deleting device-auth helpers leaves active test callers broken, and two folds exceed the assertion-safety ratchet. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherCLI, Gateway, plugin, and UI callers use the consolidated owners to prepare provider requests, authorize operations, and read or update existing storage. flowchart LR
A[CLI and UI] --> B[Gateway and plugin owners]
B --> C[Replay repair]
C --> D[Provider transports]
D --> E[Model providers]
B --> F[Storage owners]
F --> G[Existing databases]
Technical reviewBest possible solution: Complete the consolidation without stale callers, unbudgeted assertions, or changes to existing storage and authorization contracts. Do we have a high-confidence way to reproduce the issue? The missing helper exports are directly visible in source and confirmed by exact-head CI failure traces; no target code was executed during this review. Is this the best way to solve the issue? Consolidating sole-consumer implementations into existing owners is appropriate, and the replay tradeoff is explicitly accepted, but the cutover must include every consumer and preserve required static checks. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2499f2be3e88. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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 26, 2026, 4:36 AM ET / 08:36 UTC. |
28982fb to
042d881
Compare
40a8b51 to
cc3df45
Compare
6dd66b9 to
1aee3e9
Compare
|
Merged via squash.
|
…ests (openclaw#184382) * refactor: deslop channel owners, private frames and public-boundary tests * refactor(matrix): remove redundant context assertions * refactor: replace withdrawn slices with independent owner folds * refactor(discord): preserve typed boundaries in folded Client owners * refactor: withdraw catalog type cleanup after CI replay * refactor: withdraw feedback type cleanup after CI replay * style(security): format preserved public audit cases
What Problem This Solves
Private forwarding modules, copied input/result frames and test-only seams obscure the production owners. This stack removes those internal surfaces without changing user-facing features, public SDK/protocol/config/CLI contracts, lazy loading, authorization, durability or ordinary concurrency. The standalone Phase E session-memory backend and its machinery/tests are untouched.
The conflict-rebased repair against 503bc1b removes 539 net whole-diff lines (2,193 deletions minus 1,654 additions), across 87 paths. The cuts are independent, not a migration of one widely imported helper. The exact published head is recorded below.
Repair head: 1aee3e9; scoped production net385 (excluding tests, fixtures, test support and declarations). All replay/repair commits are signed. Latest conflict refresh: native audit types1.98s, typed lint7.91s, public audit/suppression cases61.19s and format/diff-check pass. Source caps pass16.17s; runtime cycles0/24.14s and Madge cycles0/25.88s. Graph refresh results accompany exact-head preparation.
Final conflict-refresh source caps pass (20.87s); runtime cycles0 (27.03s), Madge cycles0 (30.30s). All38 withdrawn paths are byte-identical to the rebased main snapshot. The working tree is clean and no half-applied operation remains.
Cuts
Public-boundary tests and device-auth fixtures
Exercise existing public TLS, plugin, tool-search and lifecycle operations instead of private seams. Device-auth fixtures await the real storage APIs; token/scope/role/origin/timestamp assertions stay. Keep hosted process/E2E fixtures and remove only obsolete support/mock allowances.
Best-effort tradeoffs accepted: none. No kept assertion, retry, timeout or skip is weakened.
Channel and Browser owners
Absorb once-called Google Chat setup, Bedrock, Zalo, Browser, Teams, Telegram, Matrix and Signal preparation/result frames into existing consumers. Keep media and connection ordering, bounded queues, polling/history policy, trust wrapping, authority, errors, receipts and public declarations. Browser eviction still reverses CDP order and stably sorts by recorded last-use; download capture retains its 250ms grace and navigation checks. CDP/Chrome identity, Matrix current-room and Telegram topic expressions remain exact.
Best-effort tradeoffs accepted: plain owner-created records are stable during synchronous expression construction; exotic mutating getters are not supported. No guard is removed or effect moved across await.
Discord Client
The existing Client owns command deployment/comparison and entity caching directly, replacing three sole-consumer modules and async forwarding. Keep command hashes, cross-application checks, REST payloads/errors, TTL30s, cache cap5000, sweep30s and event invalidation order. All cache/deployment contracts now exercise public Client operations. The capacity and sweep tests observe work/resource effects, not a private size getter.
The hosted assertion ratchet exposed five undocumented moved casts. Three object assertions now use existing canonical object-coercion SDK helpers with the same truthy-object/array predicate and object identity. The private cache key/type invariant is documented; the existing API-list invariant comment sits at its assertion operator. Three orphan donor baseline rows shrink; no allowance or suppression is added.
Best-effort tradeoffs accepted: cache Map allocation happens in Client field initialization, with no IO or timer; eliminating async forwarding can settle a completion one continuation earlier while retaining awaited effect order. Reassignment of internal child-client fields is not a supported contract.
Feishu menu and QA-Lab packets
The registered Feishu menu handler absorbs its sole launcher and private card builder. Full card assertions move to that public handler before the donor test disappears. QA-Lab Matrix/Mantis expressions stay at their existing consumers. Remove exactly two orphan Feishu mock-export baseline rows. The feedback expression cleanup was subsequently withdrawn under rule8 below.
Best-effort tradeoffs accepted: removal of an async forwarding frame may complete one continuation earlier; card fields, dispatch ordering, error handling and all guards remain.
Provider and Copilot expressions
Inline private Anthropic fallback, MiniMax endpoint, xAI scoped-config, Copilot replay-exclusion and pool-key frames. Preserve snapshot-to-4x-to-modern fallback order, regional endpoint/cache keys, auth/cancellation, all six replay exclusions and artifact/credential/cache scope. Copilot mode is captured once; the explicit PoolKey contract stays.
Best-effort tradeoffs accepted: synchronous internal DTO fields are stable; no exotic mutating-getter contract. No fallback, policy or validation is removed.
Workboard and Slack
Prepare Workboard filters in the existing facet callback and co-locate metadata normalization with its payload boundary. Keep its snapshot/time sample, tolerant-input guards and explicit result contract. Inline Slack's payload builder into its sole delivery owner; retain shared payload types, the no-copy branch and real send/Enterprise/reconciliation/blocks coverage. Remove only the obsolete whole-builder mock identity test.
Best-effort tradeoffs accepted: none; no-copy behavior, fields and ordering remain.
Memory Doctor and retained private inputs
Move the provider diagnostic into its sole Doctor consumer and exercise it through that public check, not the standalone memory backend. Derive private inputs from the exact owner that supplies the same lexical parameter object for OTel, Browser native manifest and ClickClack identity. Retain runtime bodies, explicit helper returns and all guards. The Codex archive type cleanup was subsequently withdrawn under rule8 below.
Best-effort tradeoffs accepted: none.
Evidence
After the6dd66b98 repair push GitHub reported CONFLICTING. Rebase onto fresh main503bc1bd retained main's compact synchronous audit cases from #184682, removed only the obsolete private credential mock, and kept the configured-web-search public case. Main's deleted cases and our previous identifier-coupled source-import assertion were not resurrected. Range-diff shows the other five replayed commits patch-identical. All38 earlier restoration paths plus archive and feedback were revalidated byte-identical to this new main; main's usage-cache and removed diagnostic behavior remain. Package and lock inputs are unchanged, so the existing frozen install is reused. Fresh complete-candidate independent P0-P2 review is scoped-clean with no findings (confidence0.98). The new exact-head hosted CI and security checks remain pending; no prior failed CI is relabelled green.
Constituent focused suites, targeted native types/lint/format, complete typed-AST/import/comment comparisons and independent P0-P2 reviews passed in the source worktree. The latest seven-file slice passed all 165 primary focused cases, prompt-prefix stability, 14 suppression cases, native types and lint; runtime and Madge cycles are zero. Discord's original and public-migrated suites each passed 28 cases before/after folding; Feishu's assertions were likewise migrated before deleting its donor. Exact native postimages match signed source6a0074f for all 21 retained refill files (the remaining six are donor deletions/baseline).
Native assembled targeted types pass (3.56s); all36 public Client/menu cases pass (90.21s), wrapper/suppression17 cases pass (16.18s), source caps pass and both runtime/Madge cycles are zero. Fresh assembled independent review is scoped-clean P0-P2, no actionable findings (confidence0.94). Native typed lint reports unresolved imported-type diagnostics in Anthropic/Browser/Copilot and previously retained OTel/Matrix/Memory/Slack owners; these are an explicit local proof gap, not green or inherited-CI proof. Constituent source-worktree lint passed. No cast, suppression or configuration weakening was added.
Old exact40a8 CI40323991125 had six failed leaves plus aggregate: Gateway recreation/deletion, isolated usage, QA coverage catalog, Bun metadata fixture, UI initial page.goto and MCP foreign-process authorization. QA catalog and duplicate CachedFileType failures reproduce identically on pristine a44; the Gateway second deletion case matches scheduled main, but its first timeout does not. The remaining timing failures were inconclusive, not called inherited.
Under Rule8, all 38 changed files reachable from the unknown failing fixtures/process selections were withdrawn, with exact inventory inverse. Their full restored postimages match main4ca891 and remained identical on fetched3d409f. The old snapshot is parked at deslop/z25-parked-ci-reach-582-20261015; only those38 withdrawals are parked work, not the retained63 paths. Refill eligibility includes explicit fixture/plugin/build selectors, not merely absence from a finite import graph. Unresolved/computed-import limitations remain recorded; no universal graph completeness claim.
GitHub reported CONFLICTING, so the candidate was rebased onto46dc8ad. The sole conflict was the device-pairing worker test: preserve main's simplified cases/assertions and reapply only the public async storage migration. All38 withdrawal postimages were rechecked against that new base; main had independently removed the diagnostic orphan export in #184686, and its deletion remains. The provider-runtime withdrawal initially triggered the commit-time growth check against the smaller old PR head; the reviewed repair was preserved, reapplied at a real interactive-rebase stop, and checked against the actual new main base without changing a baseline or suppression. That line-cap check passes all76 changed source paths. Dependency inputs are unchanged.
Earlier MCP-stress/UI withdrawals remain withdrawn. No old timeout is claimed fixed by a passing replay. No broad local suite, build, E2E or whole-graph typecheck was run. Hosted CI and Security Review on the repaired exact head are the broad landing gates; every failure still needs individual attribution. No CI reruns for green.
Latest owned repair and prior-head CI attribution
At cc3df45, run40338024903 completed with exactly two failed leaves plus its aggregate. The Client assertion-safety failure (job121625670875) was ours: repaired in aa69642. Final focused proof passes targeted Client types2.62s, typed lint2.91s, assertion ratchet17.87s,28 public deployment/cache cases plus14 suppression cases17.80s, runtime cycles0/11.72s and Madge cycles0/16.13s. Fresh incremental independent P0-P2 review is scoped-clean with no findings (confidence0.99); full stack review remains applicable to unchanged cuts.
UI job121625670204 failed the unchanged model-provider removal warning case, expecting
Authentication refresh failed.in an empty toast. Its actual776-module runtime/setup/runner/catalog closure and conservative15304-module type-inclusive closure each reach zero changed files at base/head. Under campaign rule8 this is inherited by construction, not a claimed matching-main reproduction or fixed toast defect. The current main-flake registry and last six completed schedules were checked;78 cached failure logs have no matching signature. No UI hunk or kept assertion was dropped. The old aggregate follows those two leaves; old PR-context failure has a passing same-head successor after a body-heading-only fix.Best-effort tradeoffs accepted for this repair: none; no guard, supported input, object identity or meaningful assertion changes. The new head's hosted CI and Security Review remain pending broad proof; no prior-head success is claimed.
Latest rule8 withdrawal
At aa69642, exact CI40342373536 completed with one failed leaf (121641259353) plus its downstream aggregate; every other selected leaf and all six Security High checks passed. The unchanged Codex catalog first-page case expected delivery to remain pending but observed it settled. Its complete11,728-module runtime/setup/importActual closure reaches exactly one changed file,
extensions/codex/src/session-catalog-archive.ts, through a static test-fixture import. That six-line hunk was erased types only, but a reachable changed file is not source-disjoint under rule8.The current main-flake registry and latest six completed scheduled main runs were checked;73 cached failed-job logs contain no matching signature. One serial isolated comparison passed on exact head (81.82s) and with every reachable changed source restored to base (24.59s). This is inconclusive, not a fixed failure or inherited-main proof. Restore only that archive file, retaining the other88 changed paths. Its complete bytes also match freshly fetched main496f32be. The parked snapshot
deslop/z25-parked-ci-reach-633-20261015preserves the dropped six-line hunk; only that hunk is parked work, not the retained cuts.Post-withdrawal targeted archive/test types2.06s, typed lint8.64s,14suppression cases7.22s and formatting/diff-check pass. Fresh independent incremental P0-P2 review is scoped-clean with no findings (confidence0.98). The runtime import graph is unchanged, so earlier zero-cycle proof applies to the same graph. Auto-merge was retired through native recovery before replacing the head. New exact-head CI and Security Review remain required; no CI rerun or exception is claimed for the old Codex failure.
Subsequent iMessage withdrawal and source-disjoint UI failure
Run40347500296 attempt1 completed its full job set with exactly two failed leaves (121659278222 and121659275375) and downstream openclaw/ci-gate121673034077. Both PostgreSQL shards that were still running subsequently passed. No CI rerun was requested. The single reviewed repair was leased-pushed as6dd66b98; GitHub's exact-head CI and security checks are new pending proof, not cleared by these prior-head results.
Exact429 CI40347500296 reported an iMessage rich-link final request-count mismatch in job121659278222: the expected send occurred, followed by an extra chats.list request. No missing delivery or root cause is claimed. Complete finite test/setup/importActual source closure (11,611 modules at base/head), sharedStateStore worker closure (11,161 each) and conditional iMessageChatDb worker closure (240 each) reach exactly one changed file: src/channels/feedback-reflection.ts through the direct channel-inbound SDK reexport. The three-line hunk was erased types only, but rule8 applies at file reach.
One serial focused comparison passed on exact429 (41.96s) and with every reached changed file restored (25.47s). This is inconclusive, not a fix. Only that feedback file is withdrawn; it is byte-identical to46dc8ad and freshly fetched main5f1d487. The three-line hunk is retained on deslop/z25-parked-ci-reach-637-20261015; no park PR. Post-withdrawal types2.30s, typed lint7.27s and19unchanged feedback/worker/suppression cases50.47s pass. Fresh incremental P0-P2 review is scoped-clean, no findings (confidence0.99); runtime graph and previous zero-cycle proof are unchanged. Best-effort tradeoffs accepted: none; the cleanup is withheld for inconclusive attribution.
The same run's UI job121659275375 reported three chat-details-session cases expecting lazy CI/subagent hosts not to be null. Their separate fresh1,559-module runtime/setup/runner/compiler/locale graph reaches none of the PR's changed files, including the now-withdrawn feedback file. The actual lazy PR, CI automation and live-subagent renderers are included; a test-discovery glob is not an import of Workboard views. Under rule8 this leaf is source-disjoint/inherited by construction, so it adds no withdrawal. This is not a matching-main reproduction or diagnosis of the missing hosts. Registry and the latest six completed scheduled-main runs were checked using73cached failed logs/84failure-file records, with no exact signature match. No kept assertion, timeout, retry or skip is changed. Current-head CI and security clearance remain the landing gates.
Best-effort tradeoffs accepted: none. No runtime guard, public contract, kept test, timeout, retry or skip changed.