Skip to content

feat: deeper JavaScript intelligence for the consolidated 0.1.4 release - #10

Merged
akosidencio merged 1 commit into
mainfrom
feat/v0.1.4-javascript-intelligence
Nov 16, 2026
Merged

akosidencio merged 1 commit into
mainfrom
feat/v0.1.4-javascript-intelligence

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Consolidated 0.1.4 work: the internal 0.1.3 static-accuracy changes (already on main, never released) plus deeper JavaScript analysis. One upgrade path from 0.1.2; no 0.1.3 release. The Cargo version is still 0.1.2: the bump is a separate, unapproved step.

What changes

JavaScript only (TypeScript output is identical to main):

  • Callable values get source-located facts: exports.f = function () {}, F.prototype.m = …, members of module.exports = {…} and const x = {…}, class expressions such as module.exports = class App {}.
  • Object tables: obj.m() resolves when the object does not escape, is not written elsewhere and defines m once.
  • Prototype tables: x.m() for const x = new F() with a static F.prototype (evidence.dispatch = "static_declaration").
  • Alias origins: const v = obj.m resolves to the implementation; the chain keeps the local declaration.
  • CommonJS: exports = module.exports = f, const p = module.exports = {…}; member-only vs value-replacing dynamic reasons; factory(module) is dynamic.
  • Package entry points: package.json main for directory imports (including require("..")), self-reference through exact exports subpaths with require/import/default. Read as data only, never through symlinks or outside the repo.

Fixes found on the way:

  • An export overwritten through another module's require() binding (require('./svc').validate = other) was still confirmed for other importers. Now withheld (member_reassigned).
  • A class extending require() of a package was a dynamic superclass; now external, as for an ES import.

Syntax IR 3 → 4: the first repogi index after upgrading from 0.1.2 or a 0.1.3 build reparses once. No SQLite migration; .repogi/memory.db untouched.

Evidence

  • Labeled fixtures: 318 resolved / 137 must-stay-unconfirmed labels across instance-dispatch, commonjs, javascript-intelligence (new); no false confirmed edge. Three commonjs labels moved to resolved as an intended change (recorded under corrections).
  • TypeScript 6.0.3 oracle on the pinned repositories (0.1.2 → 0.1.4):
Repository Oracle disagreements Call recall (fixed model)
RealWorld 0 → 0 0.09 → 0.37
Chart.js 1 → 0 0.41 → 0.64
Express 1,000 → 240 0.24 → 0.88
Koa 497 → 2 0.02 → 0.52

All remaining disagreements are classified in docs/STATIC_ANALYSIS_ACCURACY.md; none names a wrong declaration. No resolved edge of 0.1.2 or 0.1.3 is lost; TypeScript-file edges are identical to 0.1.3.

  • Upgrade from the published 0.1.2 asset and from a 0.1.3 build with an approved memory: read-only commands don't migrate, memory.db is byte-identical through upgrade and downgrade, the memory verifies current, and the upgraded graph equals a fresh index. The MCP tool list (all 9 atlas_* tools) is byte-identical to 0.1.2.
  • Cost: cold-index CPU +5–14% vs 0.1.3; peak RSS up to +4%; index up to +3%.

Checks run locally

cargo fmt --check, clippy -D warnings (1.98.0), cargo test --workspace --locked -- --test-threads=1 (318 passed), release build, prepare_source.py, dependency notices for all four targets, release smoke test, agent harness validation (both suites) and its 36 tests.

Not passing locally: test_wget_fallback (installer test; fails on unmodified 0.1.2 in the same sandbox, installers untouched). Not run locally: macOS. Packaging can't be checked here (local glibc 2.39 is above the 2.34 floor).

Agent outcomes

No live agent runs have been authorized, so this PR claims nothing about task success, tokens, time or cost. It adds the nodekit-v1 CommonJS suite (5 tasks; reference solutions pass, no-ops fail); ledgerlite-v1 is unchanged.

Before release

Approve the 0.1.4 version bump, green hosted CI (Linux + macOS), release-workflow packaging, and the publishing decision.

Give JavaScript callable values source-located declarations: function-
valued assignments (exports.f = function () {}, F.prototype.m = ...),
members of module.exports = {...} and const x = {...}, and class
expressions in top-level slots. TypeScript output is unchanged.

Resolve members of static object tables, prototype methods of
const x = new F() receivers (evidence.dispatch = static_declaration),
and alias origins (const v = obj.m). Objects and constructors that
escape, are written elsewhere or define a member twice stay unconfirmed.

Understand exports = module.exports = f and const p = module.exports =
{...}; split dynamic CommonJS reasons into member-only and value-
replacing ones; treat module passed as a value as dynamic. Withhold an
export that another module overwrites through its require() binding,
which earlier builds confirmed.

Resolve directory imports through package.json main (including
require("..")) and a package's own name through exact exports subpaths
with require/import/default conditions. package.json is read as data,
never through symlinks or outside the repository.

Classify a class extending require() of a package as external, as for
an ES import. Syntax IR goes to 4: indexes from 0.1.2 or the internal
0.1.3 build reparse once; memory stores are untouched.

Add the javascript-intelligence labeled fixture, adversarial bounds,
the nodekit-v1 CommonJS agent task suite, a binary-independent recall
metric and alias-origin checks in the oracle evaluation, and the 0.1.4
release notes draft.
@akosidencio
akosidencio merged commit 37b3fcd into main Nov 16, 2026
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