From 2e99f2468dba5deeb8448a955b75a9d9ff785154 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sun, 25 Oct 2026 00:01:14 +0000 Subject: [PATCH] fix(plan-tune): shared accumulation JS as a quoted string, not a heredoc (heredoc pipe-deadlock guard) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- bin/gstack-developer-profile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/gstack-developer-profile b/bin/gstack-developer-profile index 807e8e02e..912236a96 100755 --- a/bin/gstack-developer-profile +++ b/bin/gstack-developer-profile @@ -414,7 +414,7 @@ do_gap() { # and about eight sessions pinned it at 1.0 (#2623). A row without a # session_id is its own session. # ----------------------------------------------------------------------- -ACCUMULATE_SIGNALS_JS=$(cat <<'JS' +ACCUMULATE_SIGNALS_JS=' function accumulateSignals(lines, QUESTIONS, SIGNAL_MAP, dims) { let cap = 0; for (const byChoice of Object.values(SIGNAL_MAP)) { @@ -442,7 +442,7 @@ function accumulateSignals(lines, QUESTIONS, SIGNAL_MAP, dims) { const deltas = (def && def.signal_key && SIGNAL_MAP[def.signal_key]?.[e.user_choice]) || []; if (deltas.length === 0) continue; signalEvents++; - const session = typeof e.session_id === 'string' && e.session_id ? e.session_id : 'row-' + count; + const session = typeof e.session_id === "string" && e.session_id ? e.session_id : "row-" + count; const sums = sessions.get(session) || {}; sessions.set(session, sums); for (const d of deltas) { @@ -462,8 +462,7 @@ function accumulateSignals(lines, QUESTIONS, SIGNAL_MAP, dims) { } return { cap, totals, contributing, rows, capped, count, signalEvents, skills, qids, days }; } -JS -) +' # ----------------------------------------------------------------------- # Derive: recompute inferred dimensions from question-events.jsonl