fix(ci): bypass ruvllm forwarding in graph-trajectory smoke (#2312)

The graph-trajectory smoke's TEST 2 (post-task → reinforced-by edge)
forwards into @ruvector/ruvllm SonaCoordinator.recordTrajectory(), whose
first-call SONA adapt step allocates GB-scale and OOMs even at a 6 GB heap
(observed: 4 GB → 6 GB raise didn't help, heap climbed to 6063 MB before
SIGABRT). The graph-edge contract the smoke is asserting doesn't depend on
that path.

Add CLAUDE_FLOW_SKIP_RUVLLM_TRAJECTORY env-var guard in front of the
ruvllm.recordTrajectory call in intelligence.recordTrajectory. Default
behavior unchanged (env unset → forward as before). Set the env in the
v3-ci.yml graph-trajectory smoke step + drop NODE_OPTIONS back to 4 GB
so a future regression in the graph path itself can't hide under headroom.

The underlying allocation profile in @ruvector/ruvllm SonaCoordinator is
still the real follow-up — try/catch can't rescue this because JS heap
OOM aborts the process, so the guard has to live before the call.

Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
ruvnet committed 2026-06-08 11:08:49 -04:00
1 parent 87682a6e78
commit 6096499536
2 files changed
+35 -23

No files matched your search

+10 -6
View File
@@ -2322,13 +2322,17 @@ jobs:
pnpm install --frozen-lockfile
pnpm -r build
- name: Run trajectory graph edges smoke
# #2312 — TEST 2's post-task chain (intelligence.recordTrajectory →
# @ruvector/ruvllm SonaCoordinator) blows past the default 4 GB heap.
# Bump the runner ceiling to 6 GB so CI can complete; the underlying
# ruvllm allocation profile is tracked separately and will fix the
# cause, not the symptom.
# #2312 — TEST 2's post-task chain forwards into the @ruvector/ruvllm
# SonaCoordinator, whose first-call SONA adapt step allocates GB-scale
# and OOMs even at a 6 GB heap. The graph-edge contract this smoke is
# validating doesn't depend on that path, so we bypass it explicitly
# via the env-var guard added to intelligence.recordTrajectory. The
# underlying ruvllm allocation profile is still tracked as the real
# follow-up. Keep 4 GB heap so a future regression in the graph path
# itself can't silently absorb growth.
env:
NODE_OPTIONS: '--max-old-space-size=6144'
CLAUDE_FLOW_SKIP_RUVLLM_TRAJECTORY: '1'
NODE_OPTIONS: '--max-old-space-size=4096'
run: node scripts/smoke-trajectory-graph-edges.mjs
graph-plugin-adapter-smoke:
+25 -17
View File
@@ -1148,23 +1148,31 @@ export async function recordTrajectory(
}
}
// Forward trajectory to @ruvector/ruvllm SonaCoordinator if available
const ruvllmCoord = await loadRuvllmCoordinator();
if (ruvllmCoord) {
try {
const avgQuality = verdict === 'success' ? 1.0 : verdict === 'partial' ? 0.5 : 0.0;
ruvllmCoord.recordTrajectory({
steps: enrichedSteps.map(s => ({
state: s.content,
action: s.type,
reward: avgQuality,
embedding: s.embedding || []
})),
totalReward: avgQuality,
success: verdict === 'success'
});
} catch {
// ruvllm recording failed silently
// Forward trajectory to @ruvector/ruvllm SonaCoordinator if available.
// #2312 — set CLAUDE_FLOW_SKIP_RUVLLM_TRAJECTORY=1 to bypass this branch.
// The ruvllm SonaCoordinator's recordTrajectory currently allocates GB-scale
// during its first SONA adapt step, which OOMs CI smokes (heap 6 GB+). The
// env-var lets graph-edge smokes assert their contract without dragging in
// the heavy ML path; production keeps the default path. A try/catch can't
// rescue this because JS heap OOM aborts the process — guard before the call.
if (!process.env.CLAUDE_FLOW_SKIP_RUVLLM_TRAJECTORY) {
const ruvllmCoord = await loadRuvllmCoordinator();
if (ruvllmCoord) {
try {
const avgQuality = verdict === 'success' ? 1.0 : verdict === 'partial' ? 0.5 : 0.0;
ruvllmCoord.recordTrajectory({
steps: enrichedSteps.map(s => ({
state: s.content,
action: s.type,
reward: avgQuality,
embedding: s.embedding || []
})),
totalReward: avgQuality,
success: verdict === 'success'
});
} catch {
// ruvllm recording failed silently
}
}
}