Skip to content

feat: add owned semantic export API - #417

Open
aaaaaandrew wants to merge 1 commit into
PHPantom-dev:mainfrom
aaaaaandrew:feat/semantic-export-api
Open

feat: add owned semantic export API#417
aaaaaandrew wants to merge 1 commit into
PHPantom-dev:mainfrom
aaaaaandrew:feat/semantic-export-api

Conversation

@aaaaaandrew

Copy link
Copy Markdown

Summary

  • add an opt-in semantic-export API for caller-supplied PHP documents, with owned declarations, occurrences, calls, byte ranges, and diagnostics
  • resolve every document in one shared headless backend and provide deterministic batch and streaming output
  • add an independent offline-stubs feature so offline consumers can build without triggering a stub download
  • keep editor builds unchanged unless the export feature is enabled; the cold-start completion benchmark measured 1.811 ms on main and 1.766 ms with this patch

The generated-corpus export benchmark processed 24,000 documents / 146 MB of source in 1.50–1.56 seconds at the default cache window, with peak RSS holding between 476.7 and 478.3 MiB.

Closes #328

Test plan

  • cargo test
  • cargo clippy --features semantic-export --all-targets -- -D warnings
  • cargo fmt -- --check
  • cargo test --no-default-features --features semantic-export semantic_export::tests
  • offline exporter tests with semantic-export,offline-stubs and network access disabled
  • cargo build --release --features semantic-export,offline-stubs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Closes PHPantom-dev#328

Co-authored-by: OpenAI Codex <codex@openai.com>
@aaaaaandrew
aaaaaandrew force-pushed the feat/semantic-export-api branch from e9b86d0 to e52449e Compare August 31, 2026 15:15
@aaaaaandrew

Copy link
Copy Markdown
Author

CI update: the previous benchmark ran from a stale, conflicting base and compared against newer main results. I’ve rebased onto current main; the PR is mergeable and local exporter tests/clippy pass. The replacement CI run is awaiting maintainer approval. All non-benchmark jobs passed previously.

@AJenbo

AJenbo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The benchmark often fails because of permission issues, but thanks for looking in to it.

@AJenbo AJenbo added this to the Sprint 7 milestone Sep 8, 2026
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.

Expose an owned headless semantic export API

3 participants