Repository navigation
test(gateway): give the RPC exporter fixture normalized descriptors - #165597
Conversation
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.
|
🦞👀 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: needs maintainer review before merge. Reviewed October 5, 2026, 9:50 AM ET / 13:50 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherGateway 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
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.
…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
…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.
What Problem This Solves
Fixes: the hosted core test-types stripe (
check-test-types-core-*) fails on main and on every pull request withtest/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'sGatewayMethodDescriptor[]. The registry normalizes inputs itself (normalizeDescriptor, which defaultsprofileAccessto"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