Skip to content

pool: show --cells lists the held index's cells with installs and dims - #1149

Merged
santoshkumarradha merged 4 commits into
santos/devfrom
pool/show-cells
Sep 18, 2026
Merged

santoshkumarradha merged 4 commits into
santos/devfrom
pool/show-cells

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What

codeaf pool show --cells lists the held index's cells, one per line, under a cells: header after the metric lines: the metric, the role and model the cell is addressed by, the dims it spells in the order the metric declares them, the measurement (mean for a gaussian metric, share for a bernoulli one, from the document's kind), sd where it is non-zero, n, and installs where the cell carries them. A metric with no cells says none. The order is the index's own — never a sort by a number.

--json --cells adds a cells array of {metric, role, model, dims, mean, sd, n, installs} beside the existing summary; without the flag neither the words nor the object change.

internal/pool/index: Cell now carries Installs (the count the floor reads; zero where the cell spells none) instead of dropping it after the floor check.

A flag rather than a fourth verb: the cells are what show shows, read one layer deeper, so they ride show's own answer and its --json.

Manual: one sentence on the flag in the pool section of running-from-the-terminal.

Testing

On the Spark host, fresh clone of pool/show-cells at bd687f2cc, log ~/src/trees/check-bd687f2cc.log:

go test ./cmd/codeaf ./internal/pool/... -count=1      → ok (cmd/codeaf 87.9s, index, judge, outbox, poolcfg, pull, record, tally)
go test ./internal/guard ./internal/namelaw -count=1   → ok

New tests: TestPoolShowCellsListsEachCellWithItsInstallsAndItsDims, TestPoolShowCellsSaysNoneForAMetricWithNoCells, TestACellCarriesTheInstallsItSpells.

🤖 Generated with Claude Code

santoshkumarradha and others added 4 commits September 17, 2026 23:49
Failing first: a document with two metrics and three cells, one split by
its source, should read under --cells as one line per cell under a
'cells:' header — metric, role, model, the dims the cell spells, the
measurement, its rows, the installs behind it — in the index's own order,
carry the same cells as a --json array beside the summary, and move
neither answer when the flag is absent. A metric with no cells says none.
The implementation follows.

Co-Authored-By: codeaf <[email protected]>
show printed the held document as counts and one line per metric, and a
person who wanted what a cell is — which model, which role, what stood
behind it — had to parse doc.json. show now takes --cells: a 'cells:'
header after the metric lines, one line per cell — metric, role, model,
the dims it spells in the order the metric declares them, the
measurement (a share for a graded metric, said by the kind the document
spells), its rows, and the installs behind it where the document
carries them — in the index's own order, a property of the document,
never a sort by a number. A metric with no cells says none. --json
--cells carries the same cells as an array beside the summary; without
the flag neither answer moves.

The installs a cell spells were read for the floor and dropped: they
are now carried on index.Cell, zero where the cell spells none — the
shape the seed carries — so a reader can say what stood behind the
measurement.

Co-Authored-By: codeaf <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit a5c44f3 into santos/dev Sep 18, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the pool/show-cells branch September 18, 2026 03:53
AbirAbbas added a commit that referenced this pull request Sep 18, 2026