Skip to content

feat: batch source span resolution - #76

Merged
Iktahana merged 1 commit into
mainfrom
agent/source-span-batch
Aug 13, 2026
Merged

Iktahana merged 1 commit into
mainfrom
agent/source-span-batch

Conversation

@Iktahana

Copy link
Copy Markdown
Contributor

Summary

  • add Rust-backed resolveMdiSourceSpans(source, spans) with one parse/projection per batch
  • keep singular resolution as a convenience wrapper with identical mapping semantics
  • cover repeated identical text and every searchable block family, including footnotes
  • expose the batched JSON/WASM boundary in Node and browsers and document it in English, Japanese, and Traditional Chinese

Why

PR #75 established the source-span inverse mapping contract, but repeated singular calls reparsed a full document. This follow-up provides the batch path needed by diagnostics and decoration consumers while preserving input order and all validation/coverage/relation rules.

Validation

  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test
  • Rust llvm-cov thresholds: lines 96.94%, functions 93.33%, regions 95.54%
  • pnpm typecheck
  • pnpm build (including docs)
  • pnpm --filter @illusions-lab/mdi test (83 tests)
  • pnpm test:browser (packed Chromium, Firefox, WebKit)
  • publishable-package contract tests
  • pnpm test:coverage

Release safety

The earlier main CI run was cancelled after the performance gap was identified, and its release workflow skipped. This PR must pass PR and post-merge main CI before automatic publication.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Iktahana
Iktahana marked this pull request as ready for review August 13, 2026 07:13
@Iktahana
Iktahana merged commit 1c20250 into main Aug 13, 2026
22 checks passed
@Iktahana
Iktahana deleted the agent/source-span-batch branch August 13, 2026 07:29
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