Skip to content

fix: restore Gateway subscription test typecheck - #177111

Closed
steipete wants to merge 1 commit into
mainfrom
steipete/fix-subscription-test-types
Closed

steipete wants to merge 1 commit into
mainfrom
steipete/fix-subscription-test-types

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the Gateway test typecheck failing after the subscription preparation regression was added in #177038.

User Impact

There is no runtime behavior change. This restores the affected test typecheck while keeping the preparation-failure regression intact.

Why This Change Was Made

The regression supplied an obsolete load fixture property, removed from SubscriptionDeps in #176962. Remove that unused property instead of restoring a test-only production hook or weakening the type.

Evidence

The failure surfaced in PR #176777's check-test-types-core-2 job:

src/gateway/server-methods/control-ui.test.ts(485,7): error TS2353:
Object literal may only specify known properties, and 'load' does not exist in type 'SubscriptionDeps'.

The same job on the last scheduled main run passed at 4278e94e48b2, before #177038. Current main 99f5d0f8e4e0 reproduces the error locally. Recent main pushes run only the security workflow, so there is no completed same-job result for that newer main commit.

Validation:

  • OPENCLAW_TYPECHECKER=tsrs node scripts/run-tsgo-core-test-shards.mjs --ci-graphs-json '["core-test-gateway-methods"]': RED on 99f5d0f8e4e0 (the same TS2353, 5.2s); GREEN with this deletion (4.2s).
  • Existing preparation-failure regression through node scripts/run-vitest.mjs src/gateway/server-methods/control-ui.test.ts --maxWorkers=1 -t 'reports subscription preparation failures without rejecting the request': passed, 46ms test time / 175.44s Vitest / 201.02s wrapper with cold compilation; 45 unrelated cases filtered.
  • Targeted oxlint, formatting and git diff --check: passed.
  • Committed-branch Codex autoreview: scoped-clean; no actionable P0–P2 findings.
  • Exact-head CI at 9c2032c09f9a: green, including all nine Control UI e2e shards and the CI gate. The path-based plan skipped type jobs; the local RED/GREEN graph above is the direct typecheck proof.

Production delta: 0 lines; test delta: −1 line.

@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T07:55:23.635459Z 9c2032c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes an obsolete loader property from a Gateway subscription test fixture.

Example: Typecheck the Gateway subscription preparation-failure regression.

  • Before: The fixture supplies load: vi.fn(), producing TS2353 because SubscriptionDeps no longer accepts load.
  • After: The fixture matches SubscriptionDeps while retaining the acknowledgement, warning, and cleanup assertions.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, correct fixture repair supported by targeted typecheck evidence and successful exact-head CI; its implementation is already present on main.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored test-only correction changes no shipped behavior; supplied RED/GREEN typecheck results address the defect and the existing handler regression remains intact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: The Gateway test graph fails typechecking despite unchanged runtime subscription behavior.
Reason: The narrow correction preserves the regression and the intentional native-loader contract; main already carries it.

Merge readiness

✅ Ready for maintainer review

This PR is correct, but its exact fix already exists on main and its verified test merge adds no changes; the maintainer-authored keep-open guard leaves disposition to the maintainer.

Priority: P3
Reviewed head: 9c2032c09f9a94fef235096bc5701d4cb90e4204

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI subscription RPC passes session keys to the Gateway subscription owner, which prepares readers, acknowledges admission, and reports preparation failures.

flowchart LR
  A[Control UI subscription request] --> B[Gateway RPC handler]
  B --> C[Subscription owner]
  C --> D[Reader preparation]
  D --> E[Preparation failure]
  E --> F[Gateway warning and acknowledgement]
Loading

Technical review

Best possible solution:

Retain the identical repair already on main and let the maintainer retire this redundant PR.

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

The original excess-property failure is source-verifiable at the pinned introduction base and has supplied RED/GREEN typecheck evidence; fetched main already removes the offending property, and no tests were executed during this read-only review.

Is this the best way to solve the issue?

Deleting the unused property is the smallest complete fix: the preparation callback throws before loading, and no production hook, type weakening, or assertion change is needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8a796a17698d; fix evidence: commit 833bd279bd36, main fix timestamp 2026-10-19T07:46:20Z.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit de2700c adds src/gateway/server-methods/control-ui.test.ts:476 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: de2700c9946f; files: src/gateway/server-methods/control-ui.test.ts)

PR surface

Tests -1. Total -1 across 1 file. Added test files: 0.

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

Labels

Label changes:

  • add P3: This is a test-fixture type correction with no runtime change, and the same correction already exists on main.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a test-fixture type correction with no runtime change, and the same correction already exists on main.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 4:20 AM ET / 08:20 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Already fixed on main by 833bd27 (identical repair); the squash would produce the current main tree. Closing as superseded.

@steipete steipete closed this Oct 19, 2026
@RomneyDa
RomneyDa deleted the steipete/fix-subscription-test-types branch October 22, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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