Skip to content

v0.1.3: static instance members, CommonJS and agent harness hardening - #9

Merged
akosidencio merged 2 commits into
mainfrom
feat/v0.1.3-analysis-accuracy
Nov 15, 2026
Merged

akosidencio merged 2 commits into
mainfrom
feat/v0.1.3-analysis-accuracy

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Summary

v0.1.3 static analysis accuracy, plus agent-outcome harness hardening. The Cargo version stays 0.1.2.

Instance members. this.m() and super.m() resolve inside methods of indexed classes to the declaration that the class hierarchy statically selects. The edge carries evidence.dispatch = "static_declaration" (retrieval confidence static_declaration). Overridden methods are reported as ambiguous. A site is withheld when any of these could redirect the call: fields, this.m = …, this[k] = …, prototype changes, member writes elsewhere, or dynamic, cyclic or deep superclasses.

CommonJS. Literal require() binds in files that Node.js loads as CommonJS (this reads package.json type). Export tables come from unconditional top-level module.exports and exports.name assignments. Conditional, computed or escaping exports stay unresolved. Packages and require(expr) are not followed. ES module imports of CommonJS resolve from JavaScript files.

Invalidation. A member write invalidates only that member. Identifiers in computed keys and destructuring defaults are reads, so res[parseEdge()] = true no longer invalidates parseEdge.

Compatibility. The syntax IR moves to version 3: the next repogi index reparses every file once. Upgrading and downgrading both reproduce a fresh index exactly. Read-only commands never migrate. .repogi/memory.db is untouched.

Harness. These fixes come before any live run:

  • Indeterminate sessions no longer count as failures.
  • Sessions with an unknown cost are charged their full cap in the budget check.
  • The agent's process group is killed on interrupt.
  • The harness checks the condition and the model before grading.
  • Grader material is denied to the agent.
  • The plan digest now covers the agent executable, the model, Node.js and the MCP schemas.
  • Adds draft plans, a STOP file and a duration limit.

Design, rules and limits are in docs/STATIC_ANALYSIS_ACCURACY.md.

Results

TypeScript 6.0.3 oracle, same pinned commits for v0.1.2 → this branch:

Repository Resolved JS edges checked Oracle disagreements Call recall estimate
RealWorld 361 → 361 0 → 0 0.64 → 0.64
Chart.js 2,646 → 3,763 1 → 0 0.54 → 0.84
Express 3,666 → 3,706 1,000 → 790 0.13 → 0.15
Koa 1,528 → 1,544 497 → 485 0.07 → 0.07
  • No regressions: compared edge by edge, no resolved v0.1.2 edge is lost on any of the four repositories.
  • Dispatch check: for each of the 1,015 new instance edges, TypeScript's implementation search finds no other implementation in the corpus.
  • Remaining disagreements: every one names the local const x = require(…) declaration, which is the reviewed, not-wrong class.
  • Performance: query latency is unchanged; index size and memory are up 1–10%. Chart.js cold indexing is +29% at the median, but the profiler attributes only ~15 ms of that to the binder.

Testing

On Rust 1.98.0 (the CI pin):

  • fmt --check and clippy -D warnings pass.
  • cargo test --workspace --locked -- --test-threads=1: 316 passed, 0 failed.
  • The release build, source manifest, license notices (4 targets), smoke test, harness tests (36) and grader validation pass.
  • The knowledge, project memory, investigation and durability evaluations are unchanged from v0.1.2.

New tests: crates/cli/tests/static_accuracy.rs, against hand-labeled fixtures/instance-dispatch and fixtures/commonjs. It checks the exact target line of each edge, incremental vs fresh indexing, and adversarial hierarchies. There are also IR unit tests.

Open before release

  • impact_cache::concurrent_runs_agree failed intermittently with an immediate database is locked: 2 of 59 local runs on this branch, 0 of 55 on v0.1.2. No SQLite or locking code changed here, and the cause is not identified.
  • Live agent-outcome runs need an authorized plan with the model and claude executable pinned. No live results exist.
  • macOS / hosted CI results.
  • test_wget_fallback (installer) fails in the local sandbox on v0.1.2 too; expected to pass in CI.

Exclude indeterminate sessions from success rates and count planned
blocks that never ran. Charge sessions with no reported cost their full
cap when checking the budget, and never start one that could exceed it.
Kill the agent's process group on interrupt. Require a connected Repogi
server (or none, for baseline) and the planned model before grading.
Deny web access and paths to grader material in both conditions. Pin
the agent executable, grader Node.js and Repogi MCP surface in the plan
digest, add draft plans, a STOP file and a total duration limit, and
record provenance in every result.
Resolve this.m() and super.m() inside methods of indexed classes to the
declaration the class hierarchy statically selects. Report overridden
methods as ambiguous and withhold sites where fields, this.m writes,
dynamic own members, prototype changes, untracked member writes or
dynamic superclasses could redirect the call. Such edges carry
evidence.dispatch = static_declaration.

Bind literal require() calls in files Node.js loads as CommonJS (using
package.json type) and build export tables from unconditional top-level
module.exports and exports.name assignments. Conditional, computed or
escaping exports stay unresolved; packages and require(expr) are not
followed. ES module imports of CommonJS resolve from JavaScript files.

A member write now invalidates only that member, and identifiers in
computed keys and destructuring defaults are reads. The syntax IR moves
to version 3, so the next index reparses every file once. Interrupted
impact builds of older IR versions are now cleaned up.

Adds hand-labeled instance-dispatch and CommonJS fixtures, an
implementation check to the JavaScript oracle evaluation, and
docs/STATIC_ANALYSIS_ACCURACY.md.
@akosidencio
akosidencio merged commit 83a07c0 into main Nov 15, 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