Skip to content

Reuse shared paths and source offsets - #123

Merged
stef-k merged 10 commits into
mainfrom
feature/122-shared-analysis-context
Aug 29, 2026
Merged

Reuse shared paths and source offsets#123
stef-k merged 10 commits into
mainfrom
feature/122-shared-analysis-context

Conversation

@stef-k

@stef-k stef-k commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • establish one immutable invocation context with canonical root, one configuration document, and stable selected-file identities for all current and future guards
  • eliminate repeated path canonicalization/reporting reconstruction and source-prefix scans while preserving deterministic public behavior
  • add a fail-closed, non-CI Wayfarer benchmark harness plus focused path, immutability, mapping, and O(1) identity regressions
  • update usage documentation and changelog

Validation

  • fresh installed-wheel discovery: 318/318 passed
  • repository dogfood: expected REVIEW, --ci exit 0
  • independent review: READY FOR PR at e59393fdc1b8966caf0277241a34f0dd917498d2
  • git diff --check: passed
  • exact Wayfarer snapshot/config benchmark: all subprocesses exit 0, outputs byte-identical, target unchanged
Variant 0.3.0 median Candidate median Improvement
LOC-only 36.299s 3.108s 91.44%
Syntax-only 45.869s 10.210s 77.74%
Normal six-guard 56.357s 10.873s 80.71%

Profile totals fell from 88,195,622 calls / 82.002s to 36,334,800 / 18.528s. Repeated relative_or_absolute_path, legacy reporting_path, _byte_at_point, and bytes.index hotspots were eliminated. Final reporting_path_for lookup is O(1) and measured 0.034s cumulative across 46,680 calls.

Closes #122

@stef-k
stef-k merged commit c57e301 into main Aug 29, 2026
12 of 13 checks passed
@stef-k
stef-k deleted the feature/122-shared-analysis-context branch August 29, 2026 09:27
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.

Reduce full-scan time by reusing normalized paths and source offsets

1 participant