Skip to content

feat: class-instance receivers, computed symbol keys and workspace packages (0.1.3) - #11

Merged
akosidencio merged 1 commit into
mainfrom
feat/v0.1.3-receiver-workspace-intelligence
Nov 16, 2026
Merged

akosidencio merged 1 commit into
mainfrom
feat/v0.1.3-receiver-workspace-intelligence

Conversation

@akosidencio

Copy link
Copy Markdown
Member

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 on C's prototype chain (rule constructed_instance_static_declaration, dispatch: static_declaration). This requires all of the following:

    • C is an indexed class reached through a local name, an import, require, an alias or ns.C.
    • x is never reassigned, written or passed to other code (helper(x) keeps the call unconfirmed). Writes and escapes through aliases (const y = x) count against x.
    • No constructor on the chain returns another object.
    • No class on the chain has dynamic or same-named own members, a modified prototype or a dynamic superclass.
  • Computed property keys. These are classified instead of making every member name possible:

    • well-known symbols such as Symbol.iterator, and registered Symbol.for("x") symbols;
    • const k = Symbol();
    • util.inspect.custom, when util is provably the Node.js built-in;
    • integer keys such as x[0].

    A shadowed Symbol, a util that isn't the built-in, and any other key stay dynamic. This is what unblocks Koa's Application. 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.json workspaces field and pnpm-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 >=).

    • Entry points follow exports or main.
    • TypeScript importers resolve only when every moduleResolution mode agrees on the file.
    • Duplicate names, undeclared or unsatisfied dependencies, symlinked or malformed members, unsupported patterns and dist/ entries are reported with specific rules and never guessed.
    • Glob matching is bounded. See 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-intelligence and fixtures/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 exports targets, ** 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:

    Repository 0.1.2 internal 0.1.4 0.1.3
    RealWorld 0.09 0.37 0.37
    Chart.js 0.41 0.64 0.64
    Express 0.24 0.88 0.88
    Koa 0.02 0.52 0.90

    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.m edges: 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:

    • read-only commands leave both databases byte-identical;
    • the memory stays byte-identical and verifies approved/current;
    • the upgraded graph equals a fresh index;
    • downgrades reproduce each old binary's own graph.
  • 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);
    • a release build;
    • a source-distribution build from dist/source-files.txt only;
    • license notices;
    • the release smoke test;
    • the investigation, knowledge, project-memory and durability evaluators;
    • offline validation of both agent-outcome suites.

    The installer test test_wget_fallback fails in the build sandbox, as it already did on v0.1.2. macOS, ARM64 and hosted CI have not run yet.

Not included

  • No version bump, tag or release.
  • No live agent-outcome runs: they are not authorized, so this PR makes no claim about agent task success, tokens, time or cost.

…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.
@akosidencio
akosidencio merged commit 2891f31 into main Nov 16, 2026
0 of 2 checks passed
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