fix(resolvers): question-log session_id becomes a substitution placeholder + stale-comment sweep

The question-log block bound $_SESSION_ID, a shell variable the
consolidated fence never sets — hook-less hosts logged empty session_id,
breaking /plan-tune per-session grouping. It now uses the same
substitute-from-the-skill-start-echoes contract as the telemetry block.
Also: retired the pre-Phase-2 stop-gate docstring, repointed the
gbrain-local-status cross-reference at the script's inline jq, dropped an
orphaned section comment, documented retro-metrics' suffix-only census.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-25 20:50:15 +00:00
co-authored by Claude Fable 5
parent 46d158c5ed
commit 49321ce71f
5 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -146,9 +146,9 @@ function gbrainConfigPath(env?: NodeJS.ProcessEnv): string {
* cwd's NEAREST-ANCESTOR project scope only (#2499 made project scope
* visible; the per-project scoping fixes the machine-wide bleed where ONE
* project's remote registration reclassified broken local engines as
* thin-client for EVERY cwd). Ancestor matching mirrors the
* GBRAIN_MCP_ENTRY_JQ resolution in
* scripts/resolvers/preamble/generate-brain-sync-block.ts: cwd == key or
* thin-client for EVERY cwd). Ancestor matching mirrors the inline jq
* resolution in bin/gstack-skill-start (the single bash copy of the #2499
* resolution, moved there in token-reduction Phase 1): cwd == key or
* cwd startswith key + separator, longest matching key that actually
* carries a gbrain entry wins (a nested project WITHOUT gbrain doesn't
* shadow its parent's registration).