Repository navigation
feat: class-instance receivers, computed symbol keys and workspace packages (0.1.3) - #11
Merged
Conversation
…ckages for 0.1.3 Final development milestone of the consolidated 0.1.3 release (the next public release after 0.1.2; there are no 0.1.4 or 0.1.5 releases). - `const x = new C(); x.m()` resolves to the method on C's prototype chain (rule constructed_instance_static_declaration, JavaScript and TypeScript) when C is an indexed class and x does not escape, is not written, and no class on the chain returns another object, has dynamic or same-named own members, a modified prototype or a dynamic superclass. Aliases count. - Computed keys are classified: well-known and registered symbols, `const k = Symbol()`, `util.inspect.custom` for the Node.js built-in, and integer keys. Unknown keys stay dynamic. This unblocks Koa's Application. - Workspace packages from root `workspaces` and pnpm-workspace.yaml resolve by name when the importer declares a dependency the member satisfies; entries via exports/main; TypeScript importers need every moduleResolution mode to agree. Duplicates, undeclared dependencies, symlinked or malformed members and dist/ entries are reported, never guessed. Glob matching and escape analysis are bounded. - Syntax IR 5. Direct upgrade from published 0.1.2 and both internal builds verified; memory stays byte-identical. - Fixtures receiver-intelligence and workspace-packages (labels written before indexing), incremental and adversarial tests, docs/WORKSPACE_INTELLIGENCE.md, RELEASE_NOTES_0.1.4.md renamed to the consolidated RELEASE_NOTES_0.1.3.md. Against TypeScript 6.0.3: no resolved edge lost versus internal 0.1.4 or 0.1.2 on RealWorld, Chart.js, Express and Koa; Koa fixed-model call recall 0.52 -> 0.90 with all 532 new edges agreeing with the oracle. Mixin/delegate helpers are evaluated and deferred (both are npm packages). The version stays 0.1.2; the bump is prepared separately for owner approval.
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final development milestone of the consolidated 0.1.3 release, the next public release after 0.1.2. There are no 0.1.4 or 0.1.5 releases: the internal milestones merged in #9 and #10 ship as 0.1.3 together with this work. The Cargo version stays 0.1.2; the version bump is prepared separately and needs owner approval.
What changes
Class-instance receivers (JavaScript and TypeScript).
const x = new C(); x.m()resolves to the method onC's prototype chain (ruleconstructed_instance_static_declaration,dispatch: static_declaration). This requires all of the following:Cis an indexed class reached through a local name, an import,require, an alias orns.C.xis never reassigned, written or passed to other code (helper(x)keeps the call unconfirmed). Writes and escapes through aliases (const y = x) count againstx.Computed property keys. These are classified instead of making every member name possible:
Symbol.iterator, and registeredSymbol.for("x")symbols;const k = Symbol();util.inspect.custom, whenutilis provably the Node.js built-in;x[0].A shadowed
Symbol, autilthat isn't the built-in, and any other key stay dynamic. This is what unblocks Koa'sApplication. Strings with escapes, which were previously recorded by their raw text, are now treated as unknown.Workspace packages. Workspaces are read from the root
package.jsonworkspacesfield andpnpm-workspace.yaml; pnpm's root project is included. An import of a member by name resolves when the importer declares a dependency whose version selects the local member (workspace:,*, or the member's exact version, also behind^,~or>=).exportsormain.moduleResolutionmode agrees on the file.dist/entries are reported with specific rules and never guessed.docs/WORKSPACE_INTELLIGENCE.md.Helper composition (
mixin,delegate) was evaluated and deferred. In the pinned repositories both helpers come from npm packages, so their behavior can't be verified from indexed source.Syntax IR 4 → 5. Upgrading from any older index reparses once. Workspace declarations are part of the resolution fingerprint, so editing them rebinds without reparsing.
Evidence
New fixtures.
fixtures/receiver-intelligenceandfixtures/workspace-packages, with labels written before indexing. Across all five labeled fixtures: 491 resolved labels, 170 sites that must stay unconfirmed, 0 wrong confirmed edges, and no label corrections.Tests. New incremental-equals-fresh cases, including manifest-only edits (renaming a package, excluding a duplicate, changing a dependency range). New adversarial cases: symlinked and malformed members, unsupported glob and YAML syntax, 300 patterns, conflicting npm/pnpm declarations, traversal in names and
exportstargets,**patterns against a 200-directory path, and 4,000 constructed receivers in one file.Real repositories against TypeScript 6.0.3. The v0.1.2 and internal 0.1.4 baselines re-measured identically to the earlier report. Edge by edge, nothing resolved by internal 0.1.4 or 0.1.2 is lost or retargeted on RealWorld, Chart.js, Express or Koa.
Fixed-model call recall:
Koa gains 532 edges. All of them agree with the oracle, and TypeScript's implementation search finds no other in-corpus implementation for any of them.
Regression caught during evaluation. The first candidate lost 13 Chart.js
this.medges: a docs subclass extends a class from an undeclared workspace dependency, and it stopped being classified as a package superclass. That is fixed, with a regression test.Upgrade. Direct upgrade from the published v0.1.2 asset and from both internal builds was checked with an approved memory:
approved/current;Performance (5 interleaved runs, nothing else running). Against internal 0.1.4, cold-index CPU is within 1–2% on Koa, Express and RealWorld. Chart.js's median is 11% higher, but that is within its 22–24% run-to-run spread, so no difference is established either way. Peak memory is up 0.5–2%, the index is up to 2.6% larger, and query latency is unchanged.
Local checks (Linux x86_64). All of the following pass on toolchain 1.98.0:
cargo fmt --check;clippy -D warnings;cargo test --workspace --locked -- --test-threads=1(326 passed, 0 failed);dist/source-files.txtonly;The installer test
test_wget_fallbackfails in the build sandbox, as it already did on v0.1.2. macOS, ARM64 and hosted CI have not run yet.Not included