Cost channel cull: the cluster-naming fold dies — two stages, two channels
Off UI's d651f93 flag (displayCostTotals already isolates the display to extraction + audit; the naming stage row and naming runs were filtered out client-side). This culls the server side of the same ruling. THE STANDING RULING, REVERSED BY ITS OWN PREMISE: NamingRunUsage / readNamingRuns / appendNamingUsage were kept at the wave-7 namer kill ONLY because cost-summary's HISTORICAL naming stage read them. With the fold culled, that premise dies — so the whole ledger read path goes too, following the wave-7 embeddings precedent chain: consumer-less ledger seams are deleted, and the on-disk naming-runs.jsonl stays INERT (real trees keep their historical spend bytes; they are simply not displayed anywhere — the same treatment as historical stages.embedding spend). - core/cost-summary.ts: two channels in (chat + notes front doors), two stages out; RecentRun.kind collapses to "extraction" (labels field gone); CostSummaryInput.naming gone; totalDollars = extraction + audit. - ports/store/contracts/config: appendNamingUsage + readNamingRuns ports, store impls + guards, the NamingRunUsage interface, and LEDGER_FILES.namingRuns die. graphRevision no longer counts the file (a smaller revision value is harmless — reads never compare). - components/graph-view.tsx (mechanical, flagged): the defensive .filter(run.kind !== "naming") guards a kind that no longer exists. - Tests: cost-summary's both-channels fold pins; the naming fixtures and the appendNamingUsage store pin die with the seams.
This commit is contained in:
@@ -298,6 +298,8 @@ function fmtRunCost(dollars: number | null): string {
|
||||
* titles / file names — so the core's naming fold (and its historical
|
||||
* spend) is deliberately not shown anywhere: the pill and the panel must
|
||||
* agree, and both read THIS, never GraphCostSummary.totalDollars.
|
||||
* (The core fold's naming stage was then culled outright — 2026-09-24 —
|
||||
* so the recent-runs list carries extraction runs only.)
|
||||
*/
|
||||
export function displayCostTotals(costs: Pick<GraphCostSummary, "stages">): {
|
||||
totalDollars: number;
|
||||
@@ -393,9 +395,7 @@ function GraphCostPanel({ costs }: { costs: GraphCostSummary }) {
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-2 flex flex-col gap-0.5 border-t pt-2">
|
||||
{costs.runs
|
||||
.filter((run) => run.kind !== "naming")
|
||||
.map((run) => (
|
||||
{costs.runs.map((run) => (
|
||||
<div key={run.startedAt} className="flex items-baseline justify-between gap-2 text-[11px]">
|
||||
<span className="min-w-0 flex-1 truncate text-muted-foreground">
|
||||
<span className="text-foreground/70">{timeAgo(run.startedAt)}</span>{" "}
|
||||
|
||||
Reference in New Issue
Block a user