Repository navigation
feat(server): move document extraction and context handoffs to Rust (step 18b) - #318
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves step 18b of
docs/bridge-to-rust.md(documents and context handoffs) out of the Node provider bridge into Rust and bumps the bridge protocol to version 15.tern-server-assets::document):DocumentText.tsanddocumentTextWorker.ts(docx,xlsx,pptx,odt,ods,odp,rtf,epub,ipynb) ontozip,quick-xml(withescape-html), andencoding_rs, preserving its 16 MB input limit, 15 s timeout, two-slot concurrency semaphore, failure cache, in-flight deduplication, and atomic.txtsidecar publish.tern-server-assets's dependency ontern-server-bridge.crates/server/tests/own_documents.rsgenerating all nine formats (+ invalid RTF), recording upstream's worker output viaTERN_RECORD=1intocrates/server/tests/fixtures/own-documents.json, and comparing in every test run and CI harness run.tern-server-threads::turns::handoff_budget):handoffBudget.ts,ContextHandoffService.ts(prepareProviderHandoff,prepareLegacyImport,makeLegacyImportSummarywithout upstream's product name), andContextHandoffDelivery.ts(deliverContextHandoffsoverSessionRuntime::context_windowandOperation::InjectHistory).handoff.rs,switch.rs,fork.rs,imported.rs, andstart.rsdirectly to Rust.14 -> 15):bridge/src/handoffs.ts,document.ensureText,handoffs.*,DocumentText.layerinbridge/src/host.ts, and__document-textinbridge/src/bin.ts.PROTOCOL_VERSIONfrom 14 to 15 inbridge/src/protocol.tsandcrates/server-bridge/src/lib.rs.docs/bridge-to-rust.md, updateddocs/server-orchestration.md,docs/crates.md, and regenerateddocs/crates.svg.Verification
cargo fmt --all -- --check./scripts/check-layers.py(53 crates, 0 allowed edges)cargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked(scratch HOME,TERN_KEYCHAIN=off)./scripts/check-bridge.sh&./scripts/bundle-bridge.sh&scripts/smoke-server.mjsTERN_KEYCHAIN=off):own_documents,own_switch,own_fresh,own_imports,own_attachments,own_forks— all 6 passed with 0 differences..docxto a scratchtern-serverand dispatched a Replay message with it attached; verified both pending and claimed.docx.txtsidecars matched extracted text.