Deploy pipeline must build the Rust crates into the deployed tree #2455

Closed
opened 2026-10-04 15:33:12 +01:00 by conductor · 2 comments
Owner

CLOSED — the deployed runtime now takes the Rust cores BY DEFAULT, proven on a real staged tree.

Fix (commit e80ba65, contract BUILDER-2026-10-08T13:01:13Z-0cb00d walked draft→closed):

  • scripts/deploy_rust_build.py — builds all 11 crates CI builds (evidence_provenance, rune_spine, memory_scoring, capability_scoring, token_counting, scaffold_core, memory_storage, memory_retrieval, cognition_core, route_risk_flags, construction_interface) INTO the staged deployment tree, in-tree target/release — exactly where the Python loaders look by default (CC_RUST_LIB/CS_RUST_LIB/etc. env pins remain the override, defaults now resolve to real binaries).
  • FFI smoke per crate, BEFORE the symlink flips: every crate gets CDLL-load + loader entry-symbol resolution (dlsym is an FFI operation; proves the ELF links and exports). token_counting additionally gets a REAL FFI call — tc_estimate_tokens({"text": ...}) -> {"ok": true, "value": 4} — through the exact loader convention (argtypes c_char_p, restype c_void_p, tc_free_string).
  • deploy_stage.py wiring: the Rust phase runs after staged-verify, BEFORE the TUI canary and promotion. A revision whose cores don't build or smoke never becomes current. RUNE_DEPLOY_SKIP_RUST=1 is the documented emergency bypass (ships fallbacks and says so).
  • Live proof: run against a real staged tree — 11/11 crates built (491KB–758KB cdylibs), 11/11 FFI-smoked, bare exit 0.
  • Toolchain law carried: rustup PATH-first (system rustc is broken on this host), CARGO_TARGET_DIR unset for in-tree targets.

The strangler's hardening/speed point now materializes in production: the deployed runtime loads the Rust cores by default instead of silently running Python fallbacks.

CLOSED — the deployed runtime now takes the Rust cores BY DEFAULT, proven on a real staged tree. Fix (commit e80ba65, contract BUILDER-2026-10-08T13:01:13Z-0cb00d walked draft→closed): - **scripts/deploy_rust_build.py** — builds all 11 crates CI builds (evidence_provenance, rune_spine, memory_scoring, capability_scoring, token_counting, scaffold_core, memory_storage, memory_retrieval, cognition_core, route_risk_flags, construction_interface) INTO the staged deployment tree, in-tree target/release — exactly where the Python loaders look by default (CC_RUST_LIB/CS_RUST_LIB/etc. env pins remain the override, defaults now resolve to real binaries). - **FFI smoke per crate, BEFORE the symlink flips**: every crate gets CDLL-load + loader entry-symbol resolution (dlsym is an FFI operation; proves the ELF links and exports). token_counting additionally gets a REAL FFI call — tc_estimate_tokens({"text": ...}) -> {"ok": true, "value": 4} — through the exact loader convention (argtypes c_char_p, restype c_void_p, tc_free_string). - **deploy_stage.py wiring**: the Rust phase runs after staged-verify, BEFORE the TUI canary and promotion. A revision whose cores don't build or smoke never becomes current. RUNE_DEPLOY_SKIP_RUST=1 is the documented emergency bypass (ships fallbacks and says so). - **Live proof**: run against a real staged tree — 11/11 crates built (491KB–758KB cdylibs), 11/11 FFI-smoked, bare exit 0. - **Toolchain law carried**: rustup PATH-first (system rustc is broken on this host), CARGO_TARGET_DIR unset for in-tree targets. The strangler's hardening/speed point now materializes in production: the deployed runtime loads the Rust cores by default instead of silently running Python fallbacks.
conductor added the infrastructurefeature labels 2026-10-04 15:33:12 +01:00

⚠️ Priority gate: this issue has no priority. Assign exactly one of P0 — critical (spine/correctness/blocks), P1 — high (material value or real defect), P2 — medium (quality/consolidation), P3 — low (measurement/deferred). An issue without a priority is not filed.

⚠️ **Priority gate:** this issue has no priority. Assign exactly one of **P0 — critical** (spine/correctness/blocks), **P1 — high** (material value or real defect), **P2 — medium** (quality/consolidation), **P3 — low** (measurement/deferred). An issue without a priority is not filed.

⚠️ Priority gate: this issue has no priority. Assign exactly one of P0 — critical (spine/correctness/blocks), P1 — high (material value or real defect), P2 — medium (quality/consolidation), P3 — low (measurement/deferred). An issue without a priority is not filed.

⚠️ **Priority gate:** this issue has no priority. Assign exactly one of **P0 — critical** (spine/correctness/blocks), **P1 — high** (material value or real defect), **P2 — medium** (quality/consolidation), **P3 — low** (measurement/deferred). An issue without a priority is not filed.
gitea-actions Bot added the bugcustodiangovernancegrowthidentitylifememoryperception labels 2026-10-04 15:33:17 +01:00
conductor added the P1 — high label 2026-10-05 19:05:29 +01:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#2455