fix(sync-gbrain): dream pack-capability WARN anchors to the graph phase

Fixes #2341. classifyDreamOutcome matched the bare phrase "does not declare
this phase", but gbrain's only emitters are the CONTENT phases
(extract_atoms, synthesize_concepts) — which the default base packs
legitimately skip while resolve_symbol_edges still runs. Every base-pack
brain therefore got the pack-capability WARN with its wrong, costly
remediation ("switch schema packs"), masking real graph problems. The match
now anchors to the graph phase (resolve_symbol_edges/extract_code_symbols);
a base-pack run with a built graph is clean, and a resolved-0 run gets the
honest 0-edge diagnosis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-16 11:01:51 -07:00
co-authored by Claude Fable 5
parent 0f6e471ae8
commit 87c2583ff1
2 changed files with 40 additions and 6 deletions
+8 -1
View File
@@ -1561,7 +1561,14 @@ export function parseResolvedEdges(out: string): number | null {
export function classifyDreamOutcome(out: string): string | null {
// The active schema pack doesn't declare the code-symbol extraction phase, so
// no symbols are extracted and resolve_symbol_edges has nothing to match.
if (/does not declare this phase/i.test(out)) {
// #2341: anchor the match to a GRAPH phase. The bare phrase false-positived
// on every base-pack brain — gbrain's only emitters of "active pack does not
// declare this phase" are the CONTENT phases (extract_atoms,
// synthesize_concepts), which base packs legitimately skip while
// resolve_symbol_edges still runs and builds the graph. Matching the bare
// phrase sent users pack-churning ("switch schema packs") for nothing and
// masked real graph bugs behind a wrong diagnosis.
if (/(resolve_symbol_edges|extract_code_symbols)[^\n]*does not declare/i.test(out)) {
return (
"dream ran, but this source's schema pack does not extract code symbols, " +
"so the call graph stays empty. Switch this source to a code-aware schema " +