Skip to content

fix(translator): type the pending Responses tool-call id as a string (api-typecheck base-red) - #16624

Merged
diegosouzapw merged 2 commits into
release/v3.8.52from
fix/release-v3.8.52-basereds-api-typecheck-20261014
Oct 15, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.52from
fix/release-v3.8.52-basereds-api-typecheck-20261014

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

⚠️ base-red inherited: #15306

Summary

check:api-typecheck has been red on release/v3.8.52 since #16539 landed (ab1abecf26): open-sse/translator/request/openai-responses.ts(374,74) TS2345 — Argument of type 'unknown' is not assignable to parameter of type 'string'. normalizeRoleBasedToolCalls() returns JsonRecord[], so toolCall.id is typed unknown even though the helper already guarantees a non-empty string id. This coerces it with toString() at the single push site into pendingCallIds: string[]. No behavior change.

The gate fails on the pure tip (2c06e3c0cb) and on every PR targeting the release, including #16420's current head.

Validation (hermetic env, isolated worktree on the tip)

  • RED: node scripts/check/check-api-typecheck.mjs → FAIL — 1 new/regressed TypeScript error(s) … openai-responses.ts TS2345 (baseline 0, live 1)
  • GREEN: same gate after the change → OK — 256 pre-existing error(s), all within frozen baseline
  • 373 unit tests across the 20 files that exercise openaiResponsesToOpenAIRequest, run with the exact test:unit:ci preamble: 373 pass
  • ESLint and Prettier clean on the file

Refs #15306

check:api-typecheck on release/v3.8.52 fails since #16539 with
open-sse/translator/request/openai-responses.ts(374,74) TS2345: the role-based
tool calls are JsonRecord[], so toolCall.id is unknown and cannot be pushed into
pendingCallIds: string[]. normalizeRoleBasedToolCalls() already guarantees a
non-empty string id, so coerce it with toString() at the push site.

RED: node scripts/check/check-api-typecheck.mjs -> FAIL (baseline 0, live 1)
GREEN: same gate -> OK, 256 pre-existing errors within the frozen baseline;
373 translator unit tests pass under the test:unit:ci preamble.
diegosouzapw pushed a commit that referenced this pull request Oct 14, 2026
Base-red repair for release/v3.8.52 (#15306): undici 8 guarded dispatcher bridge, executeTargetAttempt type extraction (file-size), c8 incremental coverage merge, hosted webpack build fallback, and realignment of the unit/e2e fixtures the release contracts had outgrown. Locally validated on the merged head: 13 of the 14 unit assertions red on the pure tip pass, check:mutation-test-coverage and check:file-size (executeTargetAttempt) pass; the remaining reds on this head are release-tip base-reds (API typecheck #16624, four other file-size overages, count_tokens and model-test route fixtures).

Refs #15306
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Added three regression scenarios in 7208d4f3138143c4fb0c5757e1654651f4173ef1, preserving the original production fix:

  • normalized string IDs and FIFO pairing of id-less tool outputs;
  • rejection of non-string/blank IDs and malformed function names;
  • explicit tool results claiming their ID before the next id-less result.

Validation:

  • focused translator tests: 14/14 PASS, no skipped or cancelled tests;
  • formatting, scoped ESLint, and normal commit hooks: PASS;
  • PR Test Policy: PASS;
  • API Route Typecheck: PASS on combined candidate 0898014753a3643a810b7c8a11531d8202f2129e, parents 88c1e3342b44978a72ce75beb0cc509cc83a93d2 + 7208d4f3138143c4fb0c5757e1654651f4173ef1. The gate reports 256 pre-existing diagnostics within its unchanged baseline; this is not a claim of zero TypeScript errors.

The same local API gate on pure base 88c1e3342b reproduced exactly one new TS2345 diagnostic in open-sse/translator/request/openai-responses.ts (257 total). A redundant local candidate compilation was intentionally interrupted after hosted verification; its result is not counted as PASS.

This resolves the scoped missing-test/typecheck work. Full merge admission remains HOLD pending the other required checks and the release-base repairs. No baseline widening, timeout changes, administrative bypass, or merge was performed.

@diegosouzapw
diegosouzapw merged commit fb5f487 into release/v3.8.52 Oct 15, 2026
39 of 51 checks passed
diegosouzapw added a commit that referenced this pull request Oct 16, 2026
…heck (base-red #15306)

⚠️ base-red inherited: #15306

After #16624 landed, api-typecheck still failed on the tip with nine new TS2339s (`strict: false` does not narrow `if (!parsed.ok)` on the IntegerParam / CopilotAutoResolution unions, plus `Transformer.cancel` on sseOutputSink).

## Proof
- `node scripts/check/check-api-typecheck.mjs` → OK, 255 pre-existing, no new regressions
- `tests/unit/mgmt-list-params-validation.test.ts` → 19/19

Does not widen `config/quality/api-typecheck-baseline.json`.

Thanks @diegosouzapw.
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.52-basereds-api-typecheck-20261014 branch October 18, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant