Repository navigation
refactor(extensions): use native owners in test fixtures - #178390
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 changes before merge. What this changesThis PR removes private test hooks and forwarding methods across Feishu, memory indexing, and IRC reconnect fixtures. Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored PR open: the native-owner cleanup is useful, but two fixture defects block validation. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherBundled extension tests exercise Feishu transport, memory database and transcript owners, and IRC reconnect scheduling; the refactor replaces test-specific seams with those existing owners. flowchart TD
A[Extension fixtures] --> B[Feishu client module]
A --> C[Memory database owner]
A --> D[Transcript event owner]
A --> E[IRC reconnect owner]
B --> F[SDK transport]
C --> G[Database workers]
D --> G
E --> H[Native clock]
Technical reviewBest possible solution: Complete the native-owner cleanup using supported test surfaces and receiver-safe database interception. Do we have a high-confidence way to reproduce the issue? Source inspection establishes both fixture violations, and exact-head annotations confirm the extension-import failure; no target code or tests were run during this review. Is this the best way to solve the issue? Removing forwarding methods and test-only hooks follows existing ownership boundaries, provided the replacement fixtures also respect SDK imports and typed lint. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0784da52a55c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -34, Tests -16. Total -50 across 17 files. Added test files: 0. View PR surface stats
Review metrics
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 20, 2026, 8:13 AM ET / 12:13 UTC. |
|
Both findings on the original head are resolved in6aa797053123cc7fd1fad339a7795709c7441ffd.
The corresponding boundary and typed-lint jobs118627315920 and118628718461 passed. Full exact-head CI39422453988 succeeded, and the PR landed as3ecfdb717de626397c46e9f3567b45b05b9ac055. |
Use native Feishu module isolation, ordinary-memory database facts and transcript subscriptions, and the IRC reconnect clock instead of private test-only seams and forwarding methods. Keep proxy protections, database publication/recovery, independent subscribers and reconnect policy. Exercise faults at the native database boundary and settle actual SDK writes before retry-clock assertions. Standalone session memory is unchanged. Focused proof and fresh review passed; final exact-head CI39422453988 succeeded. All116 check runs were enumerated; the only cancellations were superseded metadata jobs with successful same-head replacements. Earlier owned boundary and typed-lint failures are repaired. PR openclaw#178390; 34 net production and10 fixture lines removed. No production guard or public contract change.
What Problem This Solves
Bundled extension tests still depend on production-only reset, forwarding, and clock-injection seams rather than the native module and database owners.
User Impact
No user-visible change or migration. Feishu proxy preparation and delivery authority, ordinary memory indexing and recovery, and IRC reconnect policy remain unchanged. Standalone session memory is untouched.
Why This Change Was Made
Remove the private Feishu proxy reset export and isolate client fixtures at the module boundary. Read ordinary memory's published database facts and metadata operations directly, retaining the existing async-context database selection; subscribe to transcript updates through the existing SDK owner. Fixtures now seed real metadata, observe native transcript subscriptions, and inject failures at the database method boundary. Use the native IRC clock rather than a callback supplied only by tests.
This is the extension area of a wider native-owner cleanup split: 17 paths, 34 net production lines and 10 net fixture lines removed (44 overall). The class hierarchy, database operations, proxy caches, and reconnect algorithm are not redesigned. No public SDK, protocol, config, CLI, dependency or persisted shape changes.
Best-effort tradeoffs accepted
No production guard or unlikely failure fallback is removed. Only private test plumbing and forwarding methods disappear. Keep Feishu proxy incident protections, current-authority effect checks, durable delivery settlement, database publication/recovery and cache bounds, independent transcript subscriptions, and the IRC stable-connection threshold. No timeout, retry, skip, assertion, baseline or suppression weakening.
Evidence
Targeted Feishu, ordinary-memory, and IRC graph typechecks passed. Formatting, official syntax-only lint, line caps, and runtime/static cycle checks passed (zero cycles). Fresh independent P0–P2 review of the complete current-base composition found no actionable issues. The smallest-cut review preserves the existing owners and introduces no replacement abstraction.
Initial-head focused serial proof passed all 128 selected behavior cases: 43 Feishu cases (client, read authority, and registered outbound delivery), 71 ordinary-memory cases (startup catch-up, scheduling, reindex recovery, FTS fallback, and cache eviction), and 14 IRC cases (three reconnect-clock and 11 full monitor cases). All 14 suppression checks also passed. Each group completed native teardown with zero exit status. No excluded cases are counted as passes.
Repair proof passed the extension-test import boundary (4,849 files), all five changed metadata-fault cases, and 21 scheduling/startup siblings. One scheduling retry case initially failed because its real SDK I/O had not settled before the fake-clock advance; after adding the existing manager-idle wait, that unchanged case passed in 7.348s. The final selected replay took 232.610s including cold preparation (91% of runner time was transformation); name-filter exclusions are not counted as passes or newly added skips. Fresh targeted memory types, formatting, five-file line caps, all 14 suppression checks, and static cycles (zero) passed. Fresh independent P0–P2 repair review found no actionable issues. This is not a claim to have rerun all 128 cases on the repair; exact-head CI supplies broad proof.
Ordinary extension typed lint has an explicit local gap: its broad artifact preparation exceeds this campaign's local proof budget. Syntax-only lint is not typed lint; exact-head hosted CI supplies that gate and broad proof. Real SDK/loopback tests are not live Feishu service proof; no live credentials were used.
CI repair
Initial hosted CI found two owned fixture problems. The extension-test boundary rejected direct core transcript-emitter imports; scheduling now awaits persisted identities and publication through the existing SDK. The one synthetic non-corpus artifact case captures the actual listener through a native pass-through SDK subscription and proves its path-filtering boundary; persisted append, sibling/restarted subscription, and archive cases retain native emission proof. No SDK export or checker exception is added.
Typed lint also found three unbound prototype-method captures in metadata fault fixtures. One-shot throwing spies now use their native call-through default. The cache-insertion spy restores the original method before calling it on the same database receiver. All original fault, call-count, persistence, cache, timing, and recovery assertions remain.
Focused repair execution caught one additional fixture-ordering error: advancing fake time did not settle the real SDK worker I/O performed inside the intentionally failing sync. The fixture now awaits its existing manager-idle boundary before advancing to the unchanged retry deadline. No retry, deadline, or expected result changes.