Skip to content

fix: source updates fail when building stream observer declarations - #184969

Closed
hannesrudolph wants to merge 1 commit into
mainfrom
fix/es2024-promise-types
Closed

hannesrudolph wants to merge 1 commit into
mainfrom
fix/es2024-promise-types

Conversation

@hannesrudolph

@hannesrudolph hannesrudolph commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

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

  • Reproduced the unmodified full-build failure (TS2550 on Promise.withResolvers) on upstream f1b5848819388c318e86b78c69453fa5a0bafa26; this one-line change passed the full build and UI/core typechecks, including core with both tsrs and tsgo.
  • Repeated validation on base e7e2592ba03 with this patch: pnpm build, pnpm tsgo:core, pnpm tsgo:ui, and git diff --check passed. The full build took about 3m 34s and included declaration generation and the Control UI build.
  • Formatter scope: JSON files are excluded by the repository's existing formatter configuration.
  • Manual source review: the sole change enables the missing standard-library declarations; supported Node versions already implement the API.
  • Auto Review was attempted but unavailable because subscription authentication failed and the configured fallback route is unsupported. No successful automated-review result is claimed.

No running gateway was modified during validation.

CI failure investigation

checks-node-compact-small-10 fails in test/scripts/test-projects-empty-native.test.ts because its synthetic checkout copies test/vitest but does not supply test/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-party also 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.

@clawsweeper

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

@hannesrudolph
hannesrudolph marked this pull request as ready for review October 26, 2026 19:58
@hannesrudolph
hannesrudolph enabled auto-merge (squash) October 26, 2026 20:01
@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. labels Oct 26, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR enables ES2024 library declarations while retaining the ES2023 JavaScript target.

Example: An operator builds a source update containing the shared stream observer.

  • Before: Package declaration generation fails with TS2550 because ES2023 declarations omit Promise.withResolvers.
  • After: ES2024 declarations recognize Promise.withResolvers, allowing the reported full build to complete.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported build repair with reported full-build validation; the remaining red CI gate requires maintainer handling.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the contributor proof gate; its body reports the actual full-build entry point failing before the patch and completing declaration generation afterward.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Source updates reject otherwise usable candidates because package declarations cannot compile the shared stream observer.
Reason: The maintainer-authored direction restores a necessary build path with one compiler-setting change and no runtime behavior change.

Regression provenance

Regression provenance — verified: source commit 058b0ea32a0c by Peter Steinberger; canonical PR #184797 (blame-to-merge-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
Reviewed head: b6748980975be9a6b0c9e86b555babdf0c6ed9d2

Before merge

None.

Findings

None.

Agent review details

How this fits together

Source-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]
Loading

Technical review

Best 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

  • Root TypeScript standard-library declarations changes intended behavior with a stated reason (7bf80dc: The provenance commit refreshed tooling and removed ScriptHost; it carried ES2023 forward rather than introducing that baseline, and a later build-repair PR explicitly allowed a separate ES2024 follow-up.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 058b0ea adds packages/llm-core/src/utils/observe-async-iterator.ts:42 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 058b0ea32a0c; files: packages/llm-core/src/utils/observe-async-iterator.ts)
  • cpojer: Raw commit 1f2f79a adds tsconfig.json:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1f2f79a7a7c1; files: tsconfig.json)

PR surface

Config 0. Total 0 across 1 file. Added test files: 0.

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

Labels

Label changes:

  • add P1: The current declaration-build failure prevents source-update candidates from completing their preflight build.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P1: The current declaration-build failure prevents source-update candidates from completing their preflight build.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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 26, 2026, 4:28 PM ET / 20:28 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 High-priority user-facing bug, regression, or broken workflow. 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