Skip to content

test(gateway): give the RPC exporter fixture normalized descriptors - #165597

Merged
steipete merged 2 commits into
mainfrom
fix/rpc-exporter-fixture-descriptor-types
Oct 5, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/rpc-exporter-fixture-descriptor-types

Conversation

@steipete

@steipete steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: the hosted core test-types stripe (check-test-types-core-*) fails on main and on every pull request with test/gateway-rpc-exporters.test.ts(110,9): error TS2322: Type 'GatewayMethodDescriptorInput[]' is not assignable to type 'GatewayMethodDescriptor[]' since 3e7f2d8 landed.

User Impact

No runtime change. Pull requests stop failing on an inherited type error in a test fixture.

Why This Change Was Made

3e7f2d8 registered descriptors in the RPC exporter fixture by assigning the helper's GatewayMethodDescriptorInput[] directly to the registry's GatewayMethodDescriptor[]. The registry normalizes inputs itself (normalizeDescriptor, which defaults profileAccess to "required" for plugin-owned methods); the fixture bypasses that step, so it has to supply the normalized shape. Applying the same default in the fixture is the smallest change that keeps the test's intent.

Evidence

3e7f2d8 assigned createGatewayMethodDescriptorsFromHandlers() output
(GatewayMethodDescriptorInput[]) to registry.gatewayMethodDescriptors
(GatewayMethodDescriptor[]), so the hosted core test-types stripe fails with
TS2322 on main and on every PR. Apply the registry's default profile access
for plugin-owned methods in the fixture.
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete enabled auto-merge (squash) October 5, 2026 13:46
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 5, 2026
@clawsweeper

clawsweeper Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 5, 2026, 9:50 AM ET / 13:50 UTC.

ClawSweeper review

What this changes

The PR gives the Gateway RPC exporter test fixture complete method descriptors by explicitly requiring an authenticated profile.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still contains the fixture type mismatch, and this focused correction matches the registry’s existing default. No introduced correctness defect was found.

Priority: P2
Reviewed head: d1a8024806bceff20df92c5b63f69682c45ba6d8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported fixture repair with no actionable finding; execution validation was not independently observed.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER classification exempts this test-fixture repair from external-contributor runtime proof; no production behavior or stored-data contract changes. Promised Rig validation remains unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER classification exempts this test-fixture repair from external-contributor runtime proof; no production behavior or stored-data contract changes. Promised Rig validation remains unverified.
Evidence reviewed 6 items Verified introduced change: The pinned introduction delta adds an explicit required profile to the existing fixture descriptors. It changes no production implementation, dependencies, workflow, or persisted state.
Existing normalization contract: The handler conversion helper returns inputs with optional profileAccess; normalizeDescriptor defaults non-core owners to required. The plugin registry stores complete GatewayMethodDescriptor values, and existing registry tests verify this default.
Still necessary on fetched main: Fetched main retains the direct assignment of GatewayMethodDescriptorInput[] to the complete descriptor array without supplying profileAccess.
Findings None None.
Security None None.

How this fits together

Gateway method descriptors connect registered handlers to dispatch and access policy. This integration fixture sends real Gateway requests and checks their Prometheus metrics and OpenTelemetry exports.

flowchart LR
  A[Synthetic RPC handler] --> B[Test method descriptors]
  B --> C[Gateway method registry]
  D[Authenticated test request] --> C
  C --> E[RPC dispatch]
  E --> F[Telemetry exporters]
  F --> G[Integration assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 1 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 1 +1

Review metrics

None.

Technical review

Best possible solution:

Keep the existing exporter integration coverage with a correctly typed fixture that follows the production descriptor default.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the type mismatch: the helper returns descriptors with optional profileAccess, while the assigned array requires it. Compilation and runtime tests were not executed in this read-only review.

Is this the best way to solve the issue?

Yes, explicitly completing this synthetic plugin descriptor is a narrow repair that preserves the integration assertions and production normalization contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9251c970d840.

Labels

Label changes:

  • add P2: This repairs a bounded test-fixture type error without changing user-facing runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER classification exempts this test-fixture repair from external-contributor runtime proof; no production behavior or stored-data contract changes. Promised Rig validation remains unverified.

Label justifications:

  • P2: This repairs a bounded test-fixture type error without changing user-facing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER classification exempts this test-fixture repair from external-contributor runtime proof; no production behavior or stored-data contract changes. Promised Rig validation remains unverified.

Evidence

What I checked:

  • Verified introduced change: The pinned introduction delta adds an explicit required profile to the existing fixture descriptors. It changes no production implementation, dependencies, workflow, or persisted state. (test/gateway-rpc-exporters.test.ts:116, d1a8024806bc)
  • Existing normalization contract: The handler conversion helper returns inputs with optional profileAccess; normalizeDescriptor defaults non-core owners to required. The plugin registry stores complete GatewayMethodDescriptor values, and existing registry tests verify this default. (src/gateway/methods/registry.ts:35, d1a8024806bc)
  • Still necessary on fetched main: Fetched main retains the direct assignment of GatewayMethodDescriptorInput[] to the complete descriptor array without supplying profileAccess. (test/gateway-rpc-exporters.test.ts:110, 9251c970d840)
  • Relevant merged-source history: The inspected commit patch added the fixture’s descriptor assignment. Feature-history logs also identify Peter Steinberger’s earlier work on exporter method labels, RPC measurements, and completed event-loop windows, supporting routing beyond authorship of this proposed patch. (test/gateway-rpc-exporters.test.ts:110, 3e7f2d88803e)
  • Discussion and validation scope: The captured body reports TS2322 in the hosted core test-type stripe and promises subsequent Rig results; no human proof comment was returned by the live comment read. The supplied repository state identifies the author as MEMBER, although the live endpoint reports CONTRIBUTOR; the supplied trusted-author classification is retained. Tests were not executed during this read-only review. (d1a8024806bc)
  • Inspection limits and cleanliness: The complete applicable root and test AGENTS.md files were read. No maintainer-notes directory exists. Some deeper history/blame and latest-release blob reads failed because required objects could not be retrieved; available current-main source and the relevant commit patch were inspected successfully. No shipped-fix claim is made. The introduction diff check passed and final git status remained clean. (test/AGENTS.md:1, d1a8024806bc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit b9f2ea6 into main Oct 5, 2026
67 checks passed
@steipete
steipete deleted the fix/rpc-exporter-fixture-descriptor-types branch October 5, 2026 14:11
steipete added a commit that referenced this pull request Oct 5, 2026
Repair Windows qualification fixtures by launching the long-path compiler from its existing short working directory, reopening snapshots through the SQLite filesystem owner, and authoring platform-valid plugin-loader file URLs. Preserve cache, alias, native-failure, retirement, and version checks; production code is unchanged.

At the exact reviewed public head, native Windows Node 24.21 and fork Bun each pass all three full files: 53 tests passed and 3 existing skips, including all 13 originally failing tests. Controlled frozen-source A/B changes 40 pass / 13 fail / 3 skip to 53 pass / 3 skip on each runtime. Local Node and fork runs also pass 53 / 3; P2 scoped review is clean.

Land through the native inherited-CI exception for run 37317222636 attempt 1: an untouched Gateway RPC exporter fixture type failure reproduced on clean main, with one collateral cancelled lint job whose actual lint step passed. Main fixed that separate error in #165597. Retain the historical red/cancelled conclusions and the independently reproduced local Knip findings; no CI rerun or unrelated repair is included.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…penclaw#165597)

* test(gateway): give the RPC exporter fixture normalized descriptors

385cceb assigned createGatewayMethodDescriptorsFromHandlers() output
(GatewayMethodDescriptorInput[]) to registry.gatewayMethodDescriptors
(GatewayMethodDescriptor[]), so the hosted core test-types stripe fails with
TS2322 on main and on every PR. Apply the registry's default profile access
for plugin-owned methods in the fixture.

* test(gateway): assign the fixture profile access without a map spread
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…w#165577)

Repair Windows qualification fixtures by launching the long-path compiler from its existing short working directory, reopening snapshots through the SQLite filesystem owner, and authoring platform-valid plugin-loader file URLs. Preserve cache, alias, native-failure, retirement, and version checks; production code is unchanged.

At the exact reviewed public head, native Windows Node 24.21 and fork Bun each pass all three full files: 53 tests passed and 3 existing skips, including all 13 originally failing tests. Controlled frozen-source A/B changes 40 pass / 13 fail / 3 skip to 53 pass / 3 skip on each runtime. Local Node and fork runs also pass 53 / 3; P2 scoped review is clean.

Land through the native inherited-CI exception for run 37317222636 attempt 1: an untouched Gateway RPC exporter fixture type failure reproduced on clean main, with one collateral cancelled lint job whose actual lint step passed. Main fixed that separate error in openclaw#165597. Retain the historical red/cancelled conclusions and the independently reproduced local Knip findings; no CI rerun or unrelated repair is included.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant