Skip to content

Fix the query-side defects the review found; one home for the rank constants - #143

Merged
handrews merged 1 commit into
mainfrom
claude/phylogenetics-code-review-55ca0c
Oct 22, 2026
Merged

handrews merged 1 commit into
mainfrom
claude/phylogenetics-code-review-55ca0c

Conversation

@handrews

Copy link
Copy Markdown
Owner

history overwrote its years argument with the span it measured, so the block's parameters reported a span nobody asked for and the blockId moved with the data; the parameters now carry the argument as given and the heading keeps the span found. statements took any kind, so a specimen with a source named fell through to the classification gap sentence; the kinds it selects by are STATEMENT_KINDS in the store, which refuses any other, as gap now refuses a kind outside COVERAGE_WORDS in place of the MCP wrapper's hand check; the spec carries both enums, the CLI their choices, and the dead claims.KINDS and the dead ranges keys of the coverage map go. The planner prompt offered a diagnosis kind and a diagnoses gap that never existed.

Plan validation now enforces enum, minItems and maxItems, so a one-element years or a bogus trees or gap kind is a plan error rather than an unpack message from inside a tool, and tools.call checks the span's shape for the MCP surface, which bypasses validation; execute catches only ValueError, so a KeyError or TypeError is the bug it is. The CLI plan command reports an unreadable file or bad YAML with exit 2 instead of a traceback.

descendants sorted by a sixteen-rank tuple that lacked variety, Parvclass, Subkingdom and every informal rank, so those rows sorted below species. phylohist/ranks.py holds the schema's rank enum in its order (a test keeps them equal), the species and genus groups, and the fold every comparison reads a rank through; it replaces the nine spellings of those tuples across both sides, the loader's numeric rank table (the genus-group order check gives the same verdict for every pair) and twenty-one hand-written lower-casings. Nothing about the rank semantics is decided here. Closure.name and rank delegate to the store, so the JSON schemes name a designated record as the words do, and the owner-path helper moves to Closure for the nine sites that spelled it inline.

No rendered string or row order that the tests or the eval questions pin changes; the derived files are untouched.

…nstants

`history` overwrote its `years` argument with the span it measured, so
the block's parameters reported a span nobody asked for and the blockId
moved with the data; the parameters now carry the argument as given and
the heading keeps the span found. `statements` took any `kind`, so a
`specimen` with a source named fell through to the classification gap
sentence; the kinds it selects by are `STATEMENT_KINDS` in the store,
which refuses any other, as `gap` now refuses a kind outside
`COVERAGE_WORDS` in place of the MCP wrapper's hand check; the spec
carries both enums, the CLI their choices, and the dead `claims.KINDS`
and the dead `ranges` keys of the coverage map go. The planner prompt
offered a `diagnosis` kind and a `diagnoses` gap that never existed.

Plan validation now enforces `enum`, `minItems` and `maxItems`, so a
one-element `years` or a bogus `trees` or gap `kind` is a plan error
rather than an unpack message from inside a tool, and `tools.call`
checks the span's shape for the MCP surface, which bypasses validation;
`execute` catches only `ValueError`, so a `KeyError` or `TypeError` is
the bug it is. The CLI `plan` command reports an unreadable file or bad
YAML with exit 2 instead of a traceback.

`descendants` sorted by a sixteen-rank tuple that lacked variety,
Parvclass, Subkingdom and every informal rank, so those rows sorted
below species. `phylohist/ranks.py` holds the schema's `rank` enum in
its order (a test keeps them equal), the species and genus groups, and
the fold every comparison reads a rank through; it replaces the nine
spellings of those tuples across both sides, the loader's numeric rank
table (the genus-group order check gives the same verdict for every
pair) and twenty-one hand-written lower-casings. Nothing about the
rank semantics is decided here. `Closure.name` and `rank` delegate to
the store, so the JSON schemes name a designated record as the words
do, and the owner-path helper moves to `Closure` for the nine sites
that spelled it inline.

No rendered string or row order that the tests or the eval questions
pin changes; the derived files are untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@handrews
handrews merged commit fc85396 into main Oct 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant