Skip to content

fix: a cap of one read "at most 1 marks" - #36

Merged
sotashimozono merged 2 commits into
mainfrom
fix/the-cap-of-one-said-1-marks
Sep 9, 2026
Merged

sotashimozono merged 2 commits into
mainfrom
fix/the-cap-of-one-said-1-marks

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Found by a sweep over the twenty-three public names no probe round had touched and the twelve
usage patterns behind them. Everything else answered correctly; this is the only thing that did
not — and it is a @testset description, which is the text a reader sees when CI goes red.

at most 1 marks     →     at most 1 mark

One is the interesting cap: it is what a package sets when it means "the next mark is a
decision"
, so it is the description most likely to be read.

The assertion needed a helper

Collect discarded the description it was handed, so the tree it builds could not be asked what
the gate called itself. It keeps it now, and gate_descriptions reads it out — in a function
rather than inline, for the same reason gate_failed is one: an inline @testset here would be
counted as a behaviour of this file carrying no assertion of its own, which is exactly what that
count exists to catch. (It did, on the first attempt: 193 behaviours, 192 operating, 1 specified only.)

Checked against the plural restored: 1 failure with it, 0 without.

193 behaviours, 1251 assertions, green.

🤖 Generated with Claude Code

Found by a sweep over the twenty-three public names no probe round had touched, and the twelve
usage patterns behind them. Everything else answered correctly; this is the only thing that did
not, and it is a `@testset` description — user-facing text, which is what a reader sees when CI
goes red.

One is the interesting cap: it is what a package sets when it means "the next mark is a decision",
so it is the description most likely to be read.

The assertion needed a helper. `Collect` discarded the description it was handed, so the tree it
builds could not be asked what the gate called itself; it keeps it now, and `gate_descriptions`
reads it out. In a function rather than inline, for the same reason `gate_failed` is one — an
inline `@testset` here would be counted as a behaviour of this file carrying no assertion of its
own, which is exactly what the count is for.

Checked against the plural restored: 1 failure with it, 0 without.

193 behaviours, 1251 assertions, green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📚 Docs preview: https://qatlashub.github.io/ExperimentalAPI.jl/previews/PR36/

(updates on each push to this PR)

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…ents

Review catch. `gate_descriptions` went in above `gate_failed`, between that function and its
docstring — and the comment above it made a second separator.

Measured rather than assumed, because the failure is worse than misattribution:

    docstring and definition adjacent        docstring recorded under :f
    one blank line between them              NO DOCSTRING RECORDED
    one comment line between them            NO DOCSTRING RECORDED
    a comment and a blank line               NO DOCSTRING RECORDED

So `gate_failed` was not documenting the wrong thing — it had no docstring at all.

The helper moves below `gate_failed`, and the comment goes: `_descriptions` two lines down already
carries the reason descriptions are worth asserting on, and "in a function like its neighbour" is
visible from the neighbour.

Swept the repository for the same shape with the rule now known: one candidate, and it is the
closing quote of a multi-line string constant rather than a docstring. `src/` is clean because
`test_surface(ExperimentalAPI)` asserts every public name has a docstring, so a detachment there
goes red — this one was in a test file, where nothing was looking.

193 behaviours, green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit b7c942d into main Sep 9, 2026
14 checks passed
@sotashimozono
sotashimozono deleted the fix/the-cap-of-one-said-1-marks branch September 9, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant