Repository navigation
fix: source updates fail when building stream observer declarations - #184969
hannesrudolph wants to merge 1 commit into
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: needs maintainer review before merge. What this changesThis PR enables ES2024 library declarations while retaining the ES2023 JavaScript target. Example: An operator builds a source update containing the shared stream observer.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this PR provides a minimal fix for a current source-build regression, with no introduced correctness or security defect found. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSource-update preflight invokes the full build, whose workspace-package declaration generator inherits standard-library types from the root TypeScript configuration. flowchart LR
A[Source update] --> B[Preflight build]
B --> C[Package declaration generator]
D[Root TypeScript libraries] --> C
E[Shared stream observer] --> C
C --> F[Build artifacts]
Technical reviewBest possible solution: Align the shared declaration configuration with ES2024 APIs already used by supported runtimes while preserving the existing JavaScript target. Do we have a high-confidence way to reproduce the issue? The current source exposes the exact ES2023-versus-Promise.withResolvers mismatch, and the PR records a failing full build before the fix; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete configuration repair: it fixes the shared declaration owner rather than replacing each valid ES2024 API call with another local workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f5a6ea0c393. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceConfig 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
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, 4:28 PM ET / 20:28 UTC. |
Related: #184797
What Problem This Solves
Fixes source updates failing their preflight build after the shared stream observer began using
Promise.withResolvers().User Impact
Operators can build source updates instead of having the updater retain the previous working installation.
Why This Change Was Made
Use ES2024 library declarations for the API already available in supported Node versions. This changes one compiler setting and keeps the existing ES2023 JavaScript target.
Evidence
TS2550onPromise.withResolvers) on upstreamf1b5848819388c318e86b78c69453fa5a0bafa26; this one-line change passed the full build and UI/core typechecks, including core with both tsrs and tsgo.e7e2592ba03with this patch:pnpm build,pnpm tsgo:core,pnpm tsgo:ui, andgit diff --checkpassed. The full build took about 3m 34s and included declaration generation and the Control UI build.No running gateway was modified during validation.
CI failure investigation
checks-node-compact-small-10fails intest/scripts/test-projects-empty-native.test.tsbecause its synthetic checkout copiestest/vitestbut does not supplytest/helpers/postgres-pool-roots.ts, which the shared Vitest config imports. Failed job.The focused test reproduces the same missing-helper error with both the original ES2023 setting and this ES2024 change: 17 failed, 5 passed in each run. The fixture, shared config, and helper have identical Git blob IDs on the tested main baseline (
8970b227) and the CI merge (3e6a4b64). This establishes an inherited fixture failure; the passing local build/typecheck results above remain valid. The failed CI result is retained as such.android-test-third-partyalso reports one native Compose timeout:ChatComposerLayoutTest.modelSelectionPinsNamedDefaultAndKeepsAdmittedEffectOwned(1,000 ms; 3,762 tests completed, one failed). Failed Android job. The complete Android source tree and Mermaid source/dependency inputs are unchanged between the CI baseline and merge. Gradle lists the root TypeScript config as an input to Mermaid asset generation; rebuilding that exact target with ES2023 and ES2024 produced five byte-identical asset files. The compiler-setting change therefore does not change the native test code or generated assets. The Android timeout was not replayed locally.