Repository navigation
refactor: deslop provider, replay and metadata fixtures - #184647
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 consolidates repeated test fixtures for provider configuration, command registries, publication repositories, roles, transcript replay, database search, and reply dispatch. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed fixture consolidation preserves the inspected scenarios and assertions, with no actionable correctness or security findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTest-support factories supply synthetic configuration, credentials, repositories, transcripts, and dispatchers to existing suites, which exercise production owners against independent expectations. flowchart LR
A[Synthetic fixture inputs] --> B[Shared test support]
B --> C[Existing test suites]
C --> D[Production owners]
D --> E[Observed results]
E --> F[Independent assertions]
Technical reviewBest possible solution: Retain the focused fixture consolidation and let the existing exact-head CI gates finish. Do we have a high-confidence way to reproduce the issue? There is no reported runtime defect to reproduce; source comparison confirms repeated fixture construction. Is this the best way to solve the issue? The change reuses fitting support owners and two small pure factories while preserving construction lifetimes, nested freshness, and independent expected results. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c43488341717. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -100. Total -100 across 25 files. Added test files: 2. 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 26, 2026, 9:17 AM ET / 13:17 UTC. |
|
Merged via squash.
|
What Problem This Solves
Nine independent fixture families duplicate provider envelopes, metadata configuration, registries, repositories, replay events, roles and idle dispatchers. Reuse fitting test-support owners; add only two missing narrow pure owners. Every assertion, case, registration and table remains; no distinct scenario is merged or weakened.
100 net test/support lines removed across 25 paths, production net 0. Authorized 100+ residue under the campaign floor waiver, NOT LARGE; it does not count toward the LARGE target. Whole-scope discovery remains open. Phase E standalone session memory backend, factory, registry, expiry, federation and all its tests are untouched.
Raw provider config inputs
Twenty-one input-only config envelopes reuse existing configForProviders while leaving each provider literal authored at its call site. Its generic constraint now uses canonical raw schema input rather than falsely requiring materialized defaults; runtime body is unchanged after erased satisfies, and no duplicate helper/export is added. Six existing normalized direct-consumer modules are type-covered proportionally. All casts stay unchanged, and four variable/spread/invalid-document configs remain untouched. Existing owner provenance #174840. Best-effort tradeoffs accepted: .models projections allocate and discard one tiny root wrapper; no values, field order, defaults, identity, freshness or behavioral expectations change.
Net: 54 test/support lines. Broad assertion-chain calls 175 → 175; custom assertions 8 → 8; callback registrations 51 → 51; custom registration sites 5 → 5; tables/gates 5 → 5.
Discord native-command registries
Two command-routing suites reuse their existing channel registry owner. The exact nested registration/plugin/capabilities inputs and publication timing remain; each invocation allocates a fresh registry/plugin/callback family. Empty-registry setup remains distinct. Best-effort tradeoffs accepted: none; all command and authorization scenarios remain separate.
Net: 12 test/support lines. Broad assertion-chain calls 37 → 37; custom assertions 1 → 1; callback registrations 13 → 13; custom registration sites 0 → 0; tables/gates 3 → 3.
Publication repositories
The preparation and existing-PR fixtures share a pure repository constructor on their already imported requester-publication owner. Non-fork headRepo===baseRepo identity remains; fork overrides and fresh nested owners/permissions are exact. Construction stays after the original awaited Git setup. Provenance: #178298/#178318. Best-effort tradeoffs accepted: none; real Git, requester authority, durable receipts and all outcomes stay unchanged.
Net: 5 test/support lines. Broad assertion-chain calls 99 → 99; custom assertions 0 → 0; callback registrations 10 → 10; custom registration sites 0 → 0; tables/gates 5 → 5.
Admin/member role config
Profile merge and update-requester tests share an identical passive role config beside the Gateway role owner. The module-once users config and fresh per-linkedAdmins-call config keep their lifetimes, nested arrays and later local plugin-policy mutation. Provenance: #159889/#153508. Best-effort tradeoffs accepted: one fifteen-line type-only test owner; no production authorization/revocation/settlement changes.
Net: 3 test/support lines. Broad assertion-chain calls 127 → 127; custom assertions 8 → 8; callback registrations 10 → 10; custom registration sites 1 → 1; tables/gates 4 → 4.
Reset kept-tail replay
Both archive-reader and authenticated Gateway history tests share the same complete six-event input transcript on the existing pure archive fixture owner. Parent IDs, reset timestamp/reason, roles and content remain exact and recursively fresh. The archive case retains its 20KiB padding and 16-byte short-read checks; expected display projections remain independent. Provenance: #178143/#183250, existing owner #182979. Best-effort tradeoffs accepted: none; no reset, retention or transcript policy changes.
Net: 6 test/support lines. Broad assertion-chain calls 153 → 153; custom assertions 3 → 3; callback registrations 32 → 32; custom registration sites 0 → 0; tables/gates 5 → 5.
Generic engine search descriptor
Two generic PostgreSQL test fixtures reuse one fresh text/vector notes descriptor on their already imported engine-store support owner. Module-once construction points, exact field order, dimensions and arrays remain. DDL, IDs, versions, admission, transactions, durability and namespace behavior are untouched. These are generic installation/search tests, not the standalone session memory backend. Provenance: #173745/#173625. Best-effort tradeoffs accepted: none; this is not a schema or storage-behavior change.
Net: 7 test/support lines. Broad assertion-chain calls 25 → 25; custom assertions 1 → 1; callback registrations 5 → 5; custom registration sites 0 → 0; tables/gates 3 → 3.
Idle reply dispatchers
ACP and plugin-hook tests share one import-free dispatcher fixture beside the plugin consumer. Module-once contexts remain module-once; callbacks, per-method counts objects and resolved promises remain fresh. Caller-specific recordProcessed/markIdle spies and no-ops stay local. Best-effort tradeoffs accepted: one eleven-line pure test owner; no SDK export, hook or runtime seam.
Net: 3 test/support lines. Broad assertion-chain calls 74 → 74; custom assertions 0 → 0; callback registrations 15 → 15; custom registration sites 1 → 1; tables/gates 2 → 2.
OAuth credential inputs
The SDK metadata case reuses the unchanged OAuth credential factory with its explicit original accountId. Field presence/order and one Date.now()+60000 evaluation remain at the original construction point. Best-effort tradeoffs accepted: none; callback, CORS, cancellation, timeout and metadata expectations stay unchanged.
Net: 6 test/support lines. Broad assertion-chain calls 79 → 79; custom assertions 0 → 0; callback registrations 13 → 13; custom registration sites 0 → 0; tables/gates 1 → 1.
Metadata lifecycle config
Both lifecycle suites construct their exact module-once config through their existing already-imported auth fixture owner. Every nested object and array remains fresh per call; primary/model/allow literals remain independently authored, and native/different-config scenarios and all auth/currentness expectations remain separate. Provenance: #121057/#164103/#173585, existing owner #158050. Best-effort tradeoffs accepted: none; no runtime import edge, model defaults or behavior changes.
Net: 4 test/support lines. Broad assertion-chain calls 165 → 165; custom assertions 15 → 15; callback registrations 11 → 11; custom registration sites 3 → 3; tables/gates 5 → 5.
Best-effort tradeoffs accepted
Each cut names its tradeoffs above. No production guard, security/authorization boundary, common-path durability, realistic concurrency, persisted schema or public contract is removed. Tiny discarded raw-config root wrappers and two small pure test owners are construction tradeoffs only, not performance claims.
Evidence
Changed-file source census before = after: 934 broad assertion-chain calls, 36 custom assertions, 160 callback registrations, 10 custom registration sites, 33 tables/gates, 21 hooks, 6 mock targets and 3 hoists. These are source sites, not expanded runtime totals. Complete assertion/custom-assertion/registration/table AST arrays are exact; hook/hoist signatures and mock registration targets remain. The push extraction was dropped after changed closed-factory fingerprints failed mock-export policy; original push mocks stay byte-for-byte base, with no new isolation annotation/baseline exception or real-transport import. Per-packet full source/Program inverses, expanded ordered fixture ASTs and recursive freshness checks preserve construction semantics. No new skip, retry, timeout, cast or lint suppression.
Focused canonical Vitest ran serially at nice10/maxWorkers1 with isolated HOME/OpenClaw/XDG state:
295 passing cases across twenty-two focused runtime files. Eleven narrow compiler graphs and eight static gates passed: formatting, typed lint, mock exports, timeout ratchet, changed-lane dry-run, lint suppressions, runtime cycles and Madge. No new runtime/Madge cycle. The original proof passed all runtime/type groups, then failed local max-lines at the initial publication owner. Move the unchanged pure constructor to the existing requester owner already imported by both callers; no suppression, limit change or new import edge. The three affected publication roots and compiler graph passed again. Subsequently the mock-export gate rejected the push extraction; drop that slice and add metadata config. Retain eight unaffected runtime groups and nine compiler graphs; reprove methods and metadata roots/type graphs plus all static gates. Ordinary Vitest worker artifacts were prepared by the canonical runner; all selected local roots were prequalified as requiring no product runtime build. The two PostgreSQL conformance roots have targeted compiler proof and are hosted-runtime-only under the local service/build budget. No local broad build, E2E, whole-graph typecheck or paid/live call was run or claimed. Existing integration cases retain their owner/authority/transport composition and introduce no new boot, poller or timer. Hosted CI job-wall accounting follows completion.
Fresh isolated P0–P2 review is scoped-clean with no accepted/actionable findings. Author simplification inspected the complete diff, reused the canonical raw-input constructor rather than adding a same-body helper, and deferred a separate auth-env slice until its natural existing owner is available. Fresh 72-hour collision census: 76 recent open PRs, 93 bounded reads, maximum 2 in flight; no overlaps. No branch rebase or CI rerun solely to obtain green.
Hosted CI on exact head
Exact-head CI 40326699417 passed all planned suites. Summed job-wall time: 18776 seconds (overlapping jobs, not elapsed time). Security 40326688216 completed actual Prepare and Enforce steps successfully; cancelled duplicate/advisory attempts are not claimed as passing runtime proof. Native submission enforces applicable exact-head checks and reviews. No runtime suite was cancelled. All nine fixture cuts retain their recorded assertion/registration counts. The two PostgreSQL roots were compiler-covered locally and runtime-covered by hosted conformance.295 focused local cases passed. Initial local max-lines and closed-mock fingerprint failures were repaired/dropped as described above, without weaker expectations, suppression or baseline exception. No hosted CI rerun, source repush or branch rebase for green.