René's URL Explorer Experiment


Title: Go checker: finite indexed-access constraint loses its explicit bound depending on prior file checking · Issue #65508 · microsoft/TypeScript · GitHub

Open Graph Title: Go checker: finite indexed-access constraint loses its explicit bound depending on prior file checking · Issue #65508 · microsoft/TypeScript

X Title: Go checker: finite indexed-access constraint loses its explicit bound depending on prior file checking · Issue #65508 · microsoft/TypeScript

Description: Note🤖 GPT-6.1 Sol responding on behalf of BleedingDev 🔎 Search Terms "base constraint" "cache", "TS2339" "order" "constraint", "constraint" "history", "indexed access" "order" "constraint". Related broad experiments: #65064 and #65367. I...

Open Graph Description: Note🤖 GPT-6.1 Sol responding on behalf of BleedingDev 🔎 Search Terms "base constraint" "cache", "TS2339" "order" "constraint", "constraint" "history", "indexed access" "order" "constraint". Related...

X Description: Note🤖 GPT-6.1 Sol responding on behalf of BleedingDev 🔎 Search Terms "base constraint" "cache", "TS2339" "order" "constraint", "constraint&quo...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/65508

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Go checker: finite indexed-access constraint loses its explicit bound depending on prior file checking","articleBody":"> [!NOTE]\n> 🤖 **GPT-6.1 Sol responding on behalf of BleedingDev**\n\n### 🔎 Search Terms\n\n`\"base constraint\" \"cache\"`, `\"TS2339\" \"order\" \"constraint\"`, `\"constraint\" \"history\"`, `\"indexed access\" \"order\" \"constraint\"`.\n\nRelated broad experiments: #65064 and #65367. I have not verified whether either draft fixes this specific regression.\n\n### 🕗 Version & Regression Information\n\nReproduced in the Go compiler at **`3e9236361fa97a9e6c685f4833ac457ae2d8c50a`**, the `7.1.0-beta` reference pinned by tsrs `0.21.0`. A hosted test checked that the reference checkout HEAD matched that pin and its tracked sources were unchanged, then used a Go build overlay to add the test.\n\nI have not established the first affected commit or tested current nightly. This report is about the exact pinned native Go compiler, not an assertion about every current version.\n\nThe same sequential retained-checker test also reproduces in the Rust port. Its maintainers' triage found CLI parity rather than a tsrs-specific defect: https://github.com/oxc-project/tsrs/issues/996.\n\n### ⏯ Playground Link\n\nThis requires a native Go checker history, so no JavaScript Playground result is claimed. Exact test source and hosted logs are linked below; the sample has no dependencies.\n\n### 💻 Code\n\n```ts\n// a.ts\nconst f: typeof victim = \u003cU extends Box>(x: U, y: { b: string }) => x.b;\n\n// b.ts\ninterface Box { a: Box; b: string }\nfunction victim\u003cT extends Box>(\n  x: T,\n  y: T[\"a\"][\"a\"][\"a\"][\"a\"][\"a\"][\"a\"][\"a\"][\"a\"][\"a\"][\"a\"]\n): string {\n  return x.b;\n}\n```\n\n```json\n{\"compilerOptions\":{\"strict\":true,\"noEmit\":true,\"target\":\"es2020\",\"types\":[]},\"files\":[\"a.ts\",\"b.ts\"]}\n```\n\n### 🙁 Actual behavior\n\nWith a fresh program and one retained checker per history, individual sequential `GetSemanticDiagnostics(ctx, file)` calls give:\n\n| Checked files, in order | Pinned Go result |\n|---|---|\n| `a.ts → b.ts` | TS2339 on `b` in `return x.b` (offsets 156–157) |\n| `b.ts → a.ts` | No diagnostics |\n| `b.ts` alone, with only `b.ts` configured as a root | No diagnostics |\n\nChanging the return to `x.b + y.b` gives two false TS2339 errors in `a → b` and none in the other histories.\n\n**All controls passed in the same run:**\n\n- Replace only `b.ts`'s `x.b` with `x.missing`: TS2339 on `missing` in every history, offsets 156–163.\n- A lone function taking the same ten-level `U[\"a\"]…` chain and returning `y.b: string`: no diagnostics.\n- Change that lone function's return annotation to `number`: TS2322 at the `return` keyword, offsets 134–140.\n- `function cycle\u003cT extends T>(x: T) { return x; }`: TS2313 on the constraint `T`, offsets 25–26; terminates.\n\nThis is not a race-dependent repro: each history deliberately uses one checker, sequential file requests, and a fresh program/pool. There is no global/semantic diagnostic request before those visits.\n\n### 🙂 Expected behavior\n\nNo diagnostic for the positive fixture in any history. `T extends Box` explicitly guarantees `x.b: string`. `Box[\"a\"]` remains `Box`, so the finite projected chain also retains `b: string`.\n\nThe negative controls must retain their real errors; replacing constraint loss with `any` would not be a valid correction.\n\n### Additional information about the issue\n\n**Direct hosted evidence:** [run 43651919628](https://github.com/BleedingDev/tsrs/actions/runs/43651919628), research commit [`9b5aabd1b2a510f9347f48bb713166af93c38366`](https://github.com/BleedingDev/tsrs/commit/9b5aabd1b2a510f9347f48bb713166af93c38366).\n\n- [Exact Go integration test](https://github.com/BleedingDev/tsrs/blob/9b5aabd1b2a510f9347f48bb713166af93c38366/tools/oracle/base-constraint-history/history_test.go)\n- [Overlay runner](https://github.com/BleedingDev/tsrs/blob/9b5aabd1b2a510f9347f48bb713166af93c38366/tools/oracle/base-constraint-history/run.mjs)\n- [Shared fixtures](https://github.com/BleedingDev/tsrs/tree/9b5aabd1b2a510f9347f48bb713166af93c38366/crates/tsrs_compiler/testdata/base_constraint_history)\n\nWith that research checkout and verified `ts-ref` at the pin, the command is `node tools/oracle/base-constraint-history/run.mjs`. It runs `go test -overlay … ./internal/compiler -run '^TestBaseConstraintHistory$' -count=1 -v` inside `ts-ref/tsc`. The run is intentionally red on the two positive `a → b` cases, not an accepted fix. Artifact `14136950058` retains raw Go/Rust logs and both source revisions.\n\nThe repository's [archived investigation](https://github.com/oxc-project/tsrs/blob/38931a58019107ba31581791e26a7aa414c9e015/notes/determinism-base-constraint-depth.md) already describes this counterexample. The suspected first wrong decision is turning a recursion-context cutoff into a permanent per-type `noConstraintType` answer. Indexed-access recursion identity is unwrapped to its object; the ten-level chain can reach the explicit type parameter at the heuristic cutoff. Exact resolution-cycle detection is separate and must remain intact.\n\nWe do not have a sound small cache-only patch. Simply skipping one cache write can leave dependent cached results poisoned; canonical cold recomputation can introduce a false property error for the lone-chain control. A correction needs to distinguish incomplete computation from proven absence while preserving termination for truly expanding/circular constraints.\n\nSeparately, our application intermittently emits TanStack TS2536 errors with this compiler family. **This minimal regression does not prove that it caused that application failure.** No diagnostic suppression, production checking-order change, or workaround is proposed here.\n\n\n### Follow-up: current main and existing order-independence draft\n\nA second [hosted native run](https://github.com/BleedingDev/tsrs/actions/runs/43652972419), research commit `e975f674c7bee03df914f498718c6be9eeeb245f`, used the same fixtures, retained checker, file histories, and diagnostic assertions. Only construction was adapted to the newer ParseConfigHost/cancellable NewProgram APIs.\n\n- **Current main `6bdcb54d23f41bc7098c1f3488ac599c75b852ca`:** reproduces the original false TS2339 for both positive `a → b` cases. Other histories and all controls pass.\n- **Draft #65064 at `bf061ab866a8b8ecd13238247f2601a052dc6e2a`:** the original `return x.b` fixture passes every history, but `return x.b + y.b` emits false TS2339 on `y.b` in **all three histories**. The lone finite-chain function also emits false TS2339 on `y.b`; the wrong-return control emits TS2339 instead of the required TS2322. Missing-property and exact-cycle controls pass.\n\nThese results do not establish a generally sound correction in that draft. No production adoption is proposed. Raw artifacts: main `14136339720`, draft `14136703255`.\n\n\n### Narrow candidate validated for this regression\n\n[Run 43655580941](https://github.com/BleedingDev/tsrs/actions/runs/43655580941), research head `b2655bf774ecd6ae51cea37615a81d92c07a3825`, validates a [small source patch](https://github.com/BleedingDev/tsrs/blob/b2655bf774ecd6ae51cea37615a81d92c07a3825/tools/oracle/base-constraint-history/indexed-access-identity.patch) on main `6bdcb54d23f41bc7098c1f3488ac599c75b852ca`. It changes only `getResolvedBaseConstraint`'s stack identity for an indexed access whose existing mapped-type normalization resolves to a type parameter: use that normalized parameter's **type** identity, not its symbol. Shared relation/inference identities and matchers, non-parameter targets, cache policy, exact cycles and depth bounds are untouched.\n\nThe candidate passed nineteen history/control cases, existing native checker/compiler packages and full `TestLocal` compiler conformance. Unmodified main retains three false-positive histories (original pair, pair returning both properties, mapped-object variant). Research-only observation additionally confirmed that direct and mapped twenty-access controls still reach the repeated-identity cutoff at depth 10; the observer is excluded from the compiler patch and ordinary/full-suite builds. Three-round independent review approved the final narrow candidate after rejecting an earlier inconsistent shared-helper version.\n\nThis is **not** a general proof of cache soundness, generative-recursion coverage, or the separate live TS2536 cause. It is not a released fix or an upstream PR. The tests and exact source patch are retained for human review.\n","author":{"url":"https://github.com/BleedingDev","@type":"Person","name":"BleedingDev"},"datePublished":"2026-11-14T23:16:42Z","url":"https://github.com/microsoft/TypeScript/issues/65508"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b09a8977-c506-54f9-e976-df24aab9d7ed
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEB10:11EACE:818943:AEFD51:6B00E0FF
html-safe-nonce4340599262b75fd1b829c7b0db174e07e2eea90f11bb03539002df7dd9720296
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjEwOjExRUFDRTo4MTg5NDM6QUVGRDUxOjZCMDBFMEZGIiwidmlzaXRvcl9pZCI6IjQ3NzAyMjc3NTg2MzI1OTE2MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd43ba505c4a580fadcad354cb1782789133c49e901c9cd00546691e45be3471f
hovercard-subject-tagissue:6397291149
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/65508/issue_layout
twitter:imagehttps://opengraph.githubassets.com/44d8c500efc24c90cbd1fd8476798d81e44eefbcc839649feb48d6b698441934/microsoft/TypeScript/issues/65508
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/44d8c500efc24c90cbd1fd8476798d81e44eefbcc839649feb48d6b698441934/microsoft/TypeScript/issues/65508
og:image:altNote🤖 GPT-6.1 Sol responding on behalf of BleedingDev 🔎 Search Terms "base constraint" "cache", "TS2339" "order" "constraint", "constraint" "history", "indexed access" "order" "constraint". Related...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBleedingDev
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/65508#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F65508
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F65508
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/65508
Reloadhttps://github.com/microsoft/TypeScript/issues/65508
Reloadhttps://github.com/microsoft/TypeScript/issues/65508
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65508
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65508
Go checker: finite indexed-access constraint loses its explicit bound depending on prior file checkinghttps://github.com/microsoft/TypeScript/issues/65508#top
#65555https://github.com/microsoft/TypeScript/pull/65555
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Order DependenceErrors or types depend on the order of checker operations, e.g. LS / tsc discrepancieshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Order%20Dependence%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/BleedingDev
Petr Glaser (BleedingDev)https://github.com/BleedingDev
on Nov 14, 2026https://github.com/microsoft/TypeScript/issues/65508#issue-6397291149
#65064https://github.com/microsoft/TypeScript/pull/65064
#65367https://github.com/microsoft/TypeScript/pull/65367
oxc-project/tsrs#996https://github.com/oxc-project/tsrs/issues/996
run 43651919628https://github.com/BleedingDev/tsrs/actions/runs/43651919628
9b5aabd1b2a510f9347f48bb713166af93c38366https://github.com/BleedingDev/tsrs/commit/9b5aabd1b2a510f9347f48bb713166af93c38366
Exact Go integration testhttps://github.com/BleedingDev/tsrs/blob/9b5aabd1b2a510f9347f48bb713166af93c38366/tools/oracle/base-constraint-history/history_test.go
Overlay runnerhttps://github.com/BleedingDev/tsrs/blob/9b5aabd1b2a510f9347f48bb713166af93c38366/tools/oracle/base-constraint-history/run.mjs
Shared fixtureshttps://github.com/BleedingDev/tsrs/tree/9b5aabd1b2a510f9347f48bb713166af93c38366/crates/tsrs_compiler/testdata/base_constraint_history
archived investigationhttps://github.com/oxc-project/tsrs/blob/38931a58019107ba31581791e26a7aa414c9e015/notes/determinism-base-constraint-depth.md
hosted native runhttps://github.com/BleedingDev/tsrs/actions/runs/43652972419
[experiment] fully order independent type checking #65064https://github.com/microsoft/TypeScript/pull/65064
Run 43655580941https://github.com/BleedingDev/tsrs/actions/runs/43655580941
small source patchhttps://github.com/BleedingDev/tsrs/blob/b2655bf774ecd6ae51cea37615a81d92c07a3825/tools/oracle/base-constraint-history/indexed-access-identity.patch
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Order DependenceErrors or types depend on the order of checker operations, e.g. LS / tsc discrepancieshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Order%20Dependence%22
on Nov 17, 2026https://github.com/microsoft/TypeScript/issues/65508#event-36430212025
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Nov 17, 2026https://github.com/microsoft/TypeScript/issues/65508#event-36430224407
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/65508
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65508
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Order DependenceErrors or types depend on the order of checker operations, e.g. LS / tsc discrepancieshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Order%20Dependence%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.