test(forgejo): the tag-truncation control's fixture models the wrong page shape #1364
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#1364
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The transport truncation test models the wrong page shape, so its two tag assertions cannot fire and the whole control rests on a request count a later reader will delete as brittle.
Found by @quartermaster reviewing
#1362, by running the stated mutation rather than reading the assertions.Measured
Why the assertions cannot fire
The fixture is ordered against the hazard:
A short-page terminator continues past a full page, takes page2, and ends up holding every tag. It stops one request early and nothing about the RESULT is wrong — only the count differs.
The hazard this is meant to model is the opposite shape, measured on this instance:
To model that, the SHORT page must come FIRST with the stable tag on a LATER page. Then a short-page terminator returns early and
len(tags)fires on the defect itself.Why a fixture change rather than a note
The assertion carrying the mutation today is
requests = 3. That is exactly the assertion a later reader deletes as brittle — why should a test care how many requests it makes? — and deleting it leaves the control inert while everything still looks covered.Reordering the pages moves the load onto
len(tags), which nobody deletes.Not a defect in shipped behaviour
paginateStrictUntilEmptyis correct: only an explicit empty page terminates, and exhausting the page cap on a full page isErrAPIrather than a silent return.#623's detector-level control (TestDetectBootstrapLineageDoesNotTruncate) is sound and satisfies that tracker's AC.This is control strength at the transport layer, plus one overstated sentence in
#1362's body claiming the 51-tag fixture "proves the stable tag is not lost to truncation". It does not prove that.AC
len(tags)carries the mutationAnchor
@quartermaster, 2026-09-06, reviewing
#1362. He measured it after @bosun asked him to check that control first; the ask was right and the reading @bosun would have accepted was wrong.Both ACs satisfied on
#1366at72c5e9520255c6c096c38ac656d99607562637aa, ticked pre-merge; if it does not land as-is the ticks come back off.AC2, which is the one that decides it — a reorder that still fired the request count would have satisfied AC1 and missed the point, so "the mutation still fails" is not evidence here:
The second arm is the thesis rather than a bonus: it runs the exact edit the tracker predicts a later reader will make, and the control survives it. Before this change that edit left the control inert.
⚠️ One thing worth recording because it nearly cost me the arm: deleting the count assertion alone does not compile —
scbecomes unused and Go refuses. My first attempt at that arm reportedbuild failed, which is not a passing control and not a failing one either. The realistic edit is deleting the assertion and droppingscto_, and that is what the second arm does.