Repository navigation
refactor: deslop provider, gateway and secrets fixtures - #184692
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 provider, Gateway, bootstrap, policy-registry, and secret-provider test inputs into shared fixtures. Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a coherent test-only simplification, with no actionable correctness or security findings; the existing CI gate remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTest suites construct configuration, environment, and authentication inputs, exercise production owners, and compare results against independently authored expectations. flowchart LR
A[Test scenarios] --> B[Shared input fixtures]
B --> C[Production owners]
C --> D[Observed results]
A --> E[Independent expectations]
D --> F[Assertions]
E --> F
Technical reviewBest possible solution: Retain the focused fixture consolidation and complete the existing current-head CI gate. Do we have a high-confidence way to reproduce the issue? This PR addresses repeated test setup rather than a product defect; the introduced diff directly establishes that duplication and its consolidation. Is this the best way to solve the issue? The change uses existing fixture owners where available and two small import-free constructors where needed, preserving allocation lifetimes and independent expectations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d777ae123962. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +29, Tests -131. Total -102 across 38 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, 10:25 AM ET / 14:25 UTC. |
|
Merged via squash.
|
What Problem This Solves
Six independent fixture families repeat provider envelopes, authentication environments, model results, requested bootstrap profiles, policy registries and vault manifest inputs. Reuse fitting existing owners and add only the two missing narrow passive owners. Every assertion, test case, registration and table remains; no scenario is merged or weakened.
102 net test/support lines removed across 38 paths; production net 0. Authorized 100+ residue under the campaign floor waiver, NOT LARGE. Whole-scope discovery remains open.
Raw provider input envelopes
Seven provider suites reuse the existing unchanged raw-input constructor. Explicit provider bodies, own-key order, absent fields, casts, spreads and freshness remain; malformed inputs stay local. Provenance: #183871, #145305, #173164, #172152, #174818, #173327 and #137071. Best-effort tradeoffs accepted: input-only .models projections allocate and discard a tiny root wrapper; no public or serialized contract changes.
Net 31 test/support lines. Broad assertion-chain calls 287 → 287; custom assertions 0 → 0; callback registrations 62 → 62; custom registration sites 0 → 0; tables 13 → 13.
Passive authentication environments
Repeated environment families move to the existing Gateway env owner. Direct singleton reads stay direct; fresh spreads stay fresh, including ordered fields, own undefined values and capture/restoration. Provenance: #149591, #177339, #148093, #148167 and #122178. Best-effort tradeoffs accepted: none; no environment policy, secret handling or real-state access changes.
Net 23 test/support lines. Broad assertion-chain calls 910 → 910; custom assertions 52 → 52; callback registrations 112 → 112; custom registration sites 11 → 11; tables 28 → 28.
Goal model result inputs
Successful model results use the existing Goal fixture owner, with explicit text/session inputs and fresh nested arrays/metadata at the original settlement points. Aborted results stay separate. Provenance: #181688/#131370. Best-effort tradeoffs accepted: the plain sessionId parameter is read as an argument immediately before allocation rather than midway through it; no getter or allocation observer exists at these sites.
Net 5 test/support lines. Broad assertion-chain calls 318 → 318; custom assertions 11 → 11; callback registrations 18 → 18; custom registration sites 5 → 5; tables 5 → 5.
Overbroad bootstrap inputs
Two security scenarios share only the exact overbroad requested-profile INPUT. Independent expected normalized profiles/grants stay authored locally, so production must still strip forbidden scope requests. Provenance: #72919/#182737. Best-effort tradeoffs accepted: one import-free input owner; no security guard, permission, issuance, approval or persistence change.
Net 6 test/support lines. Broad assertion-chain calls 461 → 461; custom assertions 0 → 0; callback registrations 62 → 62; custom registration sites 3 → 3; tables 5 → 5.
Sparse external policy registries
Two tests share an import-free sparse-registry constructor. Each getter reads its caller-owned current root on invocation and allocates fresh snapshot arrays. Existing importOriginal spreads keep real exports. Best-effort tradeoffs accepted: one passive owner; no captured root, transport import, registry behavior change or mock-isolation exception.
Net 6 test/support lines. Broad assertion-chain calls 12 → 12; custom assertions 0 → 0; callback registrations 5 → 5; custom registration sites 0 → 0; tables 0 → 0.
Vault manifest inputs
Seven manifest secretProviderIntegrations INPUT maps share the existing plugin-secret-provider fixture owner. Entrypoint and providerAlias remain explicit; each call creates a fresh map, vault record and args array at the original allocation point. Independent expected provider configs, trust-origin/disable checks, symlink/hardlink/path-mode scenarios and exec/security expectations remain local. Provenance: #82326, #117563 and #179129. Best-effort tradeoffs accepted: none; no production normalization, path validation, credentials, schema or secret-execution contract changes.
Net 31 test/support lines. Broad assertion-chain calls 49 → 49; custom assertions 0 → 0; callback registrations 15 → 15; custom registration sites 0 → 0; tables 9 → 9.
Best-effort tradeoffs accepted
Each cut names its construction tradeoff above. No production guard, security/authorization boundary, common-path durability, realistic concurrency, persisted shape, schema or public contract is removed. No performance claim.
Before publication, the entire seven-path role-helper proposal was withdrawn byte-exact to main because its shared rewind fixture is consumed by an actual protected session-memory backend test. None of that proposal remains in this PR. The standalone Phase E memory backend, factory, registry, expiry, federation and all its tests remain unchanged; protected/ambiguous shared owners are not carved up.
Configure remains byte-for-byte unchanged for open test-pruning PR #184682, whose inspected exact-head diff already moves that scenario onto the existing createPluginSecretProviderFixture owner. This PR preserves that fixture signature/behavior and centralizes only its seven other selected manifest inputs. No configure migration is credited here.
Evidence
Changed-source counts before=after: 2037 broad assertion-chain calls; 63 custom assertions; 274 callback registrations; 19 custom registration sites; 60 tables; 27 hooks; 13 mock targets; 10 hoists. Source sites are not expanded runtime cases. All scenarios, assertions, tables and registrations remain. Full source/Program inverses preserve input values/order/presence, singleton-versus-per-call allocation and fresh nested records/arrays/promises. Nonprovider assertions are raw-AST exact; raw-provider input assertions are exact after constructor expansion. No new skip, retry, timeout, cast, lint suppression or baseline/isolation exception.
Focused canonical Vitest, serial nice10/maxWorkers1 and isolated HOME/OpenClaw/XDG:
575 measured passing cases across 42 executed roots. Earlier six runtime groups reuse only unchanged KEPT source inputs; their original 41 roots include nine extra withdrawn/unchanged roots. All current original32 selected roots remain covered, and the additional account-authority root passed after this repair. The Codex Gateway root requires canonical runtime artifacts, so it is narrow-compiler-covered locally and its runtime proof is delegated to exact-head hosted CI, not to a forbidden local product build/E2E. Six prior narrow compiler graphs retain unchanged inputs; the new root-test-other compiler graph passes with the canonical ambient declarations and exclusions preserved. Current format/typed lint for the two new files, full mock-export/timeout/suppression/cycle gates and changed-lane classification passed. Earlier unchanged36-file format/lint/planning proof is reused explicitly. Runtime/Madge cycles remain zero.
Fresh isolated original37-path P0-P2 review scoped-clean, narrowed to byte-identical retained36 after withdrawing configure for collision. Fresh two-root import-only repair review also scoped-clean/findings[]. Native formatter then only reordered the new passive env import; exact new-import and all other Program ASTs preserved after removing that import. This mechanical ordering reuse is documented, not a byte-identical review claim. Author simplification confirmed the repair is only two canonical-owner imports: no compatibility re-export/alias, defaults, wrappers or test-only production seam.
CI repair attribution
The initial six-graph local selection missed these two out-of-scope root-test consumers; the repair explicitly includes both under orphan-cutover authority. The focused integration now passes all10 cases, and both files pass targeted root-test types. A temporary narrow compiler config initially omitted canonical UI ambient declarations; corrected only the ignored proof config, without tracked type/suppression changes. An initial format check sorted only the new passive import; no product/test failure was hidden. Fresh72hour collision census: 65 recent open PRs/82 bounded reads/max2; only overlap is this existing target PR, no other campaign owner. No hosted CI rerun or branch rebase. The repair push obtains new exact-head CI because source really changed; old-head failures are not passing proof. Hosted broad CI/security/job-wall evidence follows the repaired head.
Hosted CI on exact repaired head
Exact-head CI 40336832506 passed all planned suites. Summed job-wall time: 13768 seconds (overlapping jobs, not elapsed). Security 40336828253 successfully executed both Prepare and Enforce for this exact PR/head. Skipped later no-op40336831060 is not claimed as proof; cancelled advisory dispatch/context jobs are not runtime suites. Native submission enforces applicable checks and reviews. The former TS2305 in old-head job121614689897 was PR-caused and repaired by migrating two stale imports; no inherited-failure waiver, CI rerun, rebase or source repush for green. Narrow proof totals575passing cases/42executed roots, seven compiler selections, all preservation counts and explicit unchanged-input reuse retained above. Codex Gateway runtime was compiler-covered locally and delegated to this hosted exact-head gate.