mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
865dd7dd2b
* fix(ci): prime-radiant TS2307 — indirect the optional-wasm dynamic import
The Plugin package install-safety job fails to build prime-radiant with
'TS2307: Cannot find module prime-radiant-advanced-wasm' whenever that
optionalDependency isn't installed (the CI condition). The 3 call sites used a
static string literal (await import('prime-radiant-advanced-wasm')), which tsc
statically resolves at build time even though each is already wrapped in a
runtime try/catch fallback.
Route the specifier through a string-typed variable (const pkg: string = ...;
await import(pkg)) — the same idiom used for the optional better-sqlite3 import
in memory-initializer.ts — so tsc no longer requires the optional module's types
at build time. Runtime behavior is unchanged (the package still loads when
present, falls back to the mock/null path when absent).
Verified: with the optional dep ABSENT locally (the exact CI condition), the
plugin now builds clean (tsc, no TS2307).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* fix(ci): indirect optional-wasm imports in ruvector-upstream + teammate-plugin too
install-safety was red for MORE than prime-radiant — that plugin's TS2307 just
masked the same anti-pattern in sibling plugins (surfaced once prime-radiant was
fixed): ruvector-upstream's 8 @ruvector/* bridge imports and teammate-plugin's 2
@ruvnet/bmssp imports are all runtime-guarded (.catch / try-catch) optional deps,
but tsc statically resolves the string-literal specifier and fails TS2307 when
they aren't installed (the CI condition).
Route each through a widened specifier (import('pkg' as string)) so tsc no longer
resolves it at build time; runtime behavior unchanged (still loads when present,
falls back when absent). Verified: both plugins build clean (tsc, 0 TS2307) with
the optional deps ABSENT.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* fix(ci): register 3.25.x embedder env vars as precedence-audit escape hatches
The env-var-precedence audit (ADR-125/ADR-130) in the install-safety job flags 4
env vars introduced by the 3.25.x no-stub/wasm-embedder work as read without
CLI-flag precedence. They are env-only substrate toggles with no per-invocation
CLI surface (opt-in optional WASM embedder tier + a fail-closed 'no stubs' ops
flag), so register them in KNOWN_ESCAPE_HATCHES per the audit's Option B —
matching how the other opt-in/ops env vars are handled.
This was pre-existing on main since 3.25.1, masked behind the plugin TS2307
failures the earlier commits on this branch resolved.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3