refactor(core): extract loomweave-llm crate (remove outbound HTTP from the plugin-host/SEI crate)#76
Conversation
…→Plainweave refs Adds/normalizes the 'not-for-X' Banner naming this member's specific misuse (deconfliction-first, not security/compliance); fixes hardcoded Charter→Plainweave prose. Re-vendored kit; build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pure-leaf crate holding the LLM + embedding providers, copied from loomweave-core. Consumers are flipped and core's copies removed in the next commit (PRD-0001, clarion-141e9c08c8). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
loomweave-core no longer links reqwest/async-trait/fs2. The two provider modules now live in the pure-leaf loomweave-llm crate; cli and mcp repoint their provider imports. Behavior-preserving lift-and-shift; no per-provider split (clarion-4328c5c757 remains separate). PRD-0001, clarion-141e9c08c8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Standing trust-surface gate for PRD-0001: fails CI if reqwest re-enters loomweave-core's dependency tree. Uses 'cargo tree --prefix none' so the anchor matches an indented dependency (a bare '^reqwest' against the tree output never matches and would pass vacuously); captures the tree first under 'set -euo pipefail' so a cargo-tree error fails the gate rather than being swallowed by the pipe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14ca42f59a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async-trait.workspace = true | ||
| blake3.workspace = true | ||
| loomweave-core = { path = "../loomweave-core", version = "1.3.1" } | ||
| loomweave-llm = { path = "../loomweave-llm", version = "1.3.1" } |
There was a problem hiding this comment.
Publish loomweave-llm before dependent crates
On a tagged release, this new versioned dependency has to resolve from crates.io after Cargo strips the local path, but I checked the publish-crates job in .github/workflows/release.yml:512-519 and it publishes core/scanner/analysis/storage/federation/plugin-rust/mcp/cli without ever publishing loomweave-llm. The first release containing this split will therefore fail when publishing loomweave-mcp (and then loomweave-cli); add publish loomweave-llm before the dependent crates in that workflow.
Useful? React with 👍 / 👎.
…zon; PDR-0005 - PDR-0005: accept loomweave-llm extraction complete (all 6 PRD-0001 criteria met). - roadmap: Now horizon turns over (extraction shipped → Shipped since); reconcile drift (graph-correctness cluster shrank; promote ADR-054 Rust roots to in-flight; per-provider split clarion-4328c5c757 unblocked). - metrics: trust-surface guardrail yes→no MET (CI-enforced); CI floor green on b346328 + conformance-drift CI-blind-spot caveat (clarion-72e1c1a07d). - vision: grant Last-reviewed stamped 2026-06-26 (re-confirmed unchanged). - current-state: rewritten as next resume brief; PRD-0001 marked SHIPPED. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Extracts the LLM + embedding providers out of
loomweave-coreinto a new pure-leaf crateloomweave-llm, so the plugin-supervisor + SEI crate no longer links an outbound HTTP client (reqwest).Behavior-preserving lift-and-shift. The two provider modules (
llm_provider.rs,embedding_provider.rs) move verbatim (incl. their#[cfg(test)]modules — git records them as R100 renames);loomweave-coredropsreqwest/async-trait/fs2;loomweave-cliandloomweave-mcprepoint their provider importsloomweave_core::…→loomweave_llm::…. No provider behavior changes; no per-provider split (that is the downstream bet clarion-4328c5c757).PRD-0001 / PDR-0003. Tracker: clarion-141e9c08c8 (head of the critical path → unblocks clarion-4328c5c757).
Why
loomweave-coreis two crates wearing one coat: it forks sandboxed plugin subprocesses and mints stable entity identity (SEI), yet also carried ~3,660 LOC of outbound model HTTP and pulledreqwestinto the dependency tree for every dependent. The crate that runs untrusted forked children and mints identity tokens should not also open network sockets to a model provider.Trust-surface invariant (now enforced)
cargo tree -p loomweave-core --edges normalresolves noreqwest. A new CI gate inverify.ymlfails the build ifreqwestre-entersloomweave-core's tree — a per-crate bancargo-deny's[bans]cannot express (reqweststays legitimate inloomweave-federation/loomweave-cli). The gate usescargo tree --prefix none(a bare^reqwestagainst the tree output never matches an indented dep and would pass vacuously) and captures the tree underset -euo pipefailso acargo treeerror fails the gate rather than being swallowed.Acceptance (PRD-0001, all 6 verified locally)
reqwest; both provider modules live inloomweave-llm. ✅yes → noflip + CI assertion. ✅-D warnings, build, nextest (1948 passed / 2 skipped under CI-equiv), doc-D warnings, deny, ruff, ruff-format, mypy --strict, pytest (220 passed), + all 3 e2e scripts. ✅entity_id.rsuntouched; no SEI/identity code moved. ✅RecordingProvider/RecordingEmbeddingProviderreplay tests pass unchanged. ✅Notes
wardline_taint_fact_conformance_oraclevendored golden has drifted from the~/wardlineauthority — confirmed failing on pristinemain; this branch touches neither input. Filed as clarion-72e1c1a07d (CI stays green via the oracle's skip-clean when the sibling repo is absent).🤖 Generated with Claude Code