Wave 7 chunk B: remove the embeddings machinery — the ladder collapses
The owner's wave-7 ruling: embeddings die entirely (git history is the
stash); clustering is birth-session derived (chunk A, 950ddfd), labels
are session names, and the prober's graph tools replace injection.
- settings: GraphSettings collapses to { enabled } — embedding,
embeddingModel, clustering, labeling all die. Migration story: stale
record keys are UNREAD and dropped by the sanitizer's reconstruction;
the next graph-section PUT (replace-whole) persists the collapsed
shape. The settings-panel GraphSection renders one master row.
- deleted: src/server/embeddings.ts (adapters, resolveEmbeddingPortFor,
embedNewNodes, embeddingPort, embeddingModelCatalog), the
GET /api/models/embeddings route, scripts/embed-graph.ts, tests for
all three, and the /api/models/embeddings picker surfaces in the UI.
- prices: EMBEDDING_PRICES overlay + callCost fallback die. cost-summary:
the embedding stage fold dies — back to three stages (extraction/
audit/naming) per the owner ruling; historical stages.embedding spend
in old run records is simply not displayed.
- ports: EmbeddingPort/EmbeddingResult/EmbeddingTask die. The embeddings
LEDGER surface (readEmbeddings/writeEmbeddings + EmbeddingsLedger +
EMBEDDINGS_FILE + graph-deletion's vector pruning) STAYS — inert data,
kept only so graph-context.ts compiles until Teacher's pass removes
it; the seam dies in the follow-up interlude.
- chat-handler (approved cross-lane unwiring, wave-6 precedent): the
extraction pipeline's embedder becomes a documented no-op (nothing
embedded, nothing spent, ledger untouched) until Teacher's pass
removes the phase; the graph-context injection dispatch gate, the
graphContext deps wiring, the setContextRespawn seam, and
turn-service's triggerGraphContext are gone — injection is dead
code pending Teacher's file deletions.
- scripts: backfill-graph/import-notes pass the same no-op embedder;
replay-layout derives clusters from birthSessionPartition (the same
partition the real settle uses) instead of the embeddings ledger.
- settings-body: parseGraphSettingsBody reads the master switch only —
old-shape keys in a body are ignored, not rejected; bad shapes 400.
- next.config: the @huggingface tracing-exclusion guards die with the
last reference.
Cross-lane flags: extraction.ts/graph-context.ts keep stale embed
comments + the embed phase until Teacher's full pass (their parallel
interlude owns those files — zero overlap kept by design);
semantic-clusters.ts + its test stay one more round (extraction.test.ts,
Teacher's file, still imports it — they delete it with the namer cases);
ChatSettings.graphContextTokens + the graph-context-control UI stay
until Teacher+UI.
Gates: tsc clean, eslint clean, 885/885 tests, build compiles.
Live-verified on the port-3004 dev tree: PUT /api/settings/graph with
dead keys collapses on write, bad shapes 400, GET reads {enabled: true},
/api/models/embeddings 404s.
This commit is contained in:
@@ -201,13 +201,10 @@ export function resolveSettings(record: UserSettings | null): EffectiveSettings
|
||||
},
|
||||
},
|
||||
graph: {
|
||||
// Wave 7 collapse (owner ruling 2026-09-23): the master switch ONLY —
|
||||
// the embedding/clustering/labeling rungs and the BYOK embeddingModel
|
||||
// are gone (stale record keys are simply never read here).
|
||||
enabled: graph.enabled ?? FACTORY_SETTINGS.graph.enabled,
|
||||
embedding: graph.embedding ?? FACTORY_SETTINGS.graph.embedding,
|
||||
clustering: graph.clustering ?? FACTORY_SETTINGS.graph.clustering,
|
||||
labeling: graph.labeling ?? FACTORY_SETTINGS.graph.labeling,
|
||||
// BYOK (wave 6): null is the factory floor and a VALID resolved
|
||||
// value — ?? only fills the absent case, null passes through.
|
||||
embeddingModel: graph.embeddingModel ?? FACTORY_SETTINGS.graph.embeddingModel,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -216,23 +213,13 @@ export function resolveSettings(record: UserSettings | null): EffectiveSettings
|
||||
|
||||
/**
|
||||
* The WRITE channel gate (extraction + its auditor): dies with the master
|
||||
* switch. Used by the chat-handler's post-turn trigger; deeper pipeline
|
||||
* consumers (embedder, clustering, labeling — later waves) gate on the
|
||||
* deeper rungs the same way.
|
||||
* switch. Used by the chat-handler's post-turn trigger. (Wave 7: the master
|
||||
* switch is the ONLY graph setting left — the section collapsed.)
|
||||
*/
|
||||
export function extractionEnabled(graph: Required<GraphSettings>): boolean {
|
||||
return graph.enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* The READ channel gate (graph-context injection): needs the master switch
|
||||
* AND the embedding rung — injection is a vector query, so a graph without
|
||||
* embeddings has nothing to inject.
|
||||
*/
|
||||
export function graphContextEnabled(graph: Required<GraphSettings>): boolean {
|
||||
return graph.enabled && graph.embedding;
|
||||
}
|
||||
|
||||
/**
|
||||
* The PROBER GRAPH TOOLS gate (wave 7, owner ruling 2026-09-23): the
|
||||
* toggle is an agent-capability switch (it gates tool registration), but
|
||||
@@ -246,3 +233,5 @@ export function graphToolsEnabled(effective: {
|
||||
}): boolean {
|
||||
return effective.graph.enabled && (effective.agent.graphTools.enabled ?? true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user