Skip to content

Speed up Python entrypoint discovery and strengthen binding tests - #119

Merged
tob-scott-a merged 1 commit into
mainfrom
perf/graph-and-mutation-coverage
Oct 26, 2026
Merged

tob-scott-a merged 1 commit into
mainfrom
perf/graph-and-mutation-coverage

Conversation

@tob-scott-a

@tob-scott-a tob-scott-a commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Python entrypoint discovery built lexical scopes for files without decorated functions and scanned every file for replacement writes even when no local identity decorator needed proving. Select decorated functions with a cached Tree-sitter query and defer the replacement scan until an identity proof needs it, preserving binding evidence and source order.

On a fixed 143-file Python corpus, seven alternating A/B runs reduced median full Trailmark analysis time from 2.268s to 1.978s (12.8%), with identical complete graph output: 4,308 nodes, 12,996 edges, and all serialized metadata. Small fixture and TypeScript controls showed no material timing change; the gain is specific to Python decorator/entrypoint analysis.

Add regression cases for decorator bindings, source ordering, file edits, argument boundaries, Python imports, and PHP callable-reference context and dispatch. Focused mutation checks now kill 21 unchanged mutants that survived the latest main CI campaign. Add a reusable analysis benchmark and correct component test ordering for private helpers while retaining every fallback test.

Validation:

  • Full suite: 3,261 passed.
  • Ruff lint and formatting, ty, source-distribution smoke check, and whitespace checks passed.
  • Focused mutation campaign: clean and instrumented baselines passed; all 658 mutants evaluated, with 510 killed, 148 survivors, and no errors or timeouts. This uses two test files and is not a full-repository mutation score.
  • The complete repository mutation score has not been recomputed; the baseline is main's completed CI campaign. No mutation exemptions were added.

@tob-scott-a
tob-scott-a force-pushed the perf/graph-and-mutation-coverage branch from 5964a5e to 1eaa0ae Compare October 26, 2026 21:40
@tob-scott-a
tob-scott-a merged commit 026aae3 into main Oct 26, 2026
26 checks passed
@tob-scott-a
tob-scott-a deleted the perf/graph-and-mutation-coverage branch October 27, 2026 16:51
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