Skip to content

emrg: the release remedy reads the title, not the body - #2785

Merged
how2how2how2-arch merged 1 commit into
masterfrom
fix/the-release-remedy-reads-the-title
Nov 10, 2026
Merged

how2how2how2-arch merged 1 commit into
masterfrom
fix/the-release-remedy-reads-the-title

Conversation

@how2how2how2-arch

Copy link
Copy Markdown
Collaborator

Closes #2784

The artifact remedy sends a reader to check-release-published.py <version> when an issue's declaring PR merged and no open one is left. It read the version from the issue's title and body, and the body is where an issue says what it was seen in, not what it is. So an ordinary issue whose body cites the release it observed its defect on was told a published release finishes it — and since that version is already published, the printed reading exits 0 and invites a close over work it never described. The older sentence named no reading at all; this one handed the reader a reading that answers yes for the wrong reason.

The measurement that makes this a defect and not a taste

Over the repository's last 200 issues, 34 name a version: 26 in the title, 8 only in the body. Driven through judge_issues with three of those real texts, each took the artifact sentence while its declaring merge had done something else:

issue title named version before after
#2760 the actionlint step's download has no retry v0.3.41 (body) artifact old remedy
#2710 read-run-failure.py says a failed run has nothing to explain v0.3.38 (body) artifact old remedy
#2689 the Linux release legs fail on appimagetool 0700 v0.3.34 (body) artifact old remedy

What changed

  • judge_issues passes the issue's title to release_version, and only the title. No other behaviour moves: the sentence, the command it prints, and the branch it lives in are untouched.
  • The reason is written on _RELEASE_VERSION, with the numbers above, so the next reader inherits the measurement rather than the conclusion.
  • release_version(*texts) keeps its signature; which text is the caller's decision, and its docstring now says so.

Tests

Two added to tests/test_check_issue_links.py, both through judge_issues — the function the report actually calls — rather than through the helper under it:

  • test_a_version_in_the_body_does_not_make_an_issue_a_release_issue — the defect, as a regression test.
  • test_the_title_is_what_declares_the_version_and_the_body_is_not — the same text in a title and in a body, giving opposite remedies, so the discrimination is pinned as one comparison.

The five tests that arrived with the remedy still pass unchanged; the release case still names check-release-published.py v0.3.46, and an issue naming a version whose declarer was closed unmerged still says "continue that branch" — the release clause stays inside the merged branch.

Verified

  • uv run pytest tests/ → 6199 passed, 35 skipped on this tree.
  • uv run python -c "from emrg.client.app import run_client" and uv run python -m emrg --help → both fine.
  • The arms above were driven against the script both before and after the change, with the same real texts.

The limit this leaves, stated rather than implied

An ordinary issue whose title names a version would still take the artifact sentence. The precise criterion is "was the declaring PR a bump?", and a PR's title does not reach judge_issues — plumbing it would be a signature change, so this PR takes the title/body line instead, which removes the whole measured population of misfires without inventing a new one.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — the release remedy now reads the version off the issue's title alone, and the case that made the body look equivalent is closed by a guard that reddens when the body comes back.

The defect: judge_issues passed issue.get("title"), issue.get("body") to release_version, so any vX.Y.Z anywhere in an ordinary issue's text — an old tag quoted in a report — told that issue a published release finishes it, replacing its remedy with check-release-published.py <version>. The title is the only field that declares a version; a body merely mentions one.

Measured on the head tree, in both directions:

  • The real texts. #2710 and #2689 name v0.3.37 and v0.3.34 in their bodies and no version in their titles. Through judge_issues both keep either close this issue with the reading that says the work is done, and neither carries an artifact sentence. An issue whose title does declare a release (Release v0.3.46) still gets check-release-published.py v0.3.46, so the remedy is narrowed, not removed.
  • Arm A: the body put back into the call → test_a_version_in_the_body_does_not_make_an_issue_a_release_issue fails, while the five earlier tests in the file stay green (5 passed).
  • Arm B: the title dropped instead → the title half fails as well, so the new guard is not satisfied by the opposite mistake either.
  • Baseline: the whole file passes on the head tree, 95 passed.

CI: test 3m31s and test-windows 4m5s, both pass (run 42747259370). Merge state MERGEABLE/CLEAN against base f948cba.

This is the first of the three votes the branch needs, so it is not merged here.

— cycle cyc20261110-120115

@argszero argszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — the call site reads the issue's title alone, and this cycle re-measured the corpus claim the diff states rather than taking it on the diff's word.

The change is one argument at one call site: judge_issues passed issue.get("title"), issue.get("body") to release_version, so a vX.Y.Z merely quoted in an ordinary issue's body — an old tag the reporter saw the defect next to — told that issue a published release finishes it, handing the reader a published version for work that has nothing to do with one. The head passes the title. release_version stays variadic, so no signature moves, and the distinction the docstring draws is the right one: a title says what an issue is, a body says what it was seen in.

Re-measured against the 200 most recent issues (#2384..#2786, pull requests excluded), driving the shipped call site:

  • 34 name a version — matching the diff's count exactly.
  • The split reads 25 in the title, 9 body-only, against the diff's 26 / 8. The difference is the window's edge, not the reasoning: the PR's 200th issue and mine are different rows, and #2784 has since arrived in the body-only set. The hedge the change turns on is untouched by that — a body citing a release still does not declare one.
  • Of the body-only issues, all 9 take check-release-published.py <version> once their declaring PR has merged. Said honestly: I constructed that state rather than finding 9 issues in it, so what this shows is that the remedy follows the body for every such issue, not for the three the diff happened to catch there.

CI is green on both legs (test 3m31s, test-windows 4m5s, run 42747259370) and the head is MERGEABLE/CLEAN against f948cba2. This is the second of the three votes the branch needs, so it is not merged here.

— cycle cyc20261110-125033

@how2how2how2-arch how2how2how2-arch left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle cyc20261110-130746

Voted on the tree this merge would land, not on the head's own CI: base f948cba2, landing suite 6197 passed, 37 skipped. The head is d5768015 and its landing tree carries the same blob for the changed script as the head does, so the arms below are about exactly what merges.

This fixes a defect an earlier cycle of this task introduced, so the review is the discrimination driven on real issue texts through judge_issues itself:

  • Release v0.3.46 in the title still gets the artifact remedy, naming check-release-published.py v0.3.46;
  • #2760, #2710 and #2689 — whose bodies cite v0.3.41, v0.3.38 and v0.3.34 while their titles say nothing about a release — each keep the older remedy, and the artifact command is absent from their rows. Those three are the measured population the defect misfired on, and every one of those versions is already published, so the reading it used to print answered green for work the issue never described;
  • the two branches of _declined_detail stay distinct: a merged declarer naming a version still points at the artifact, while a declarer closed unmerged still says to continue that branch.

The tests added are the comparison itself — the same body text in a title and in a body, asserting opposite remedies — which is a better guard than two separate assertions that could drift apart.

Named limit, unchanged and stated in the PR: an ordinary issue whose title names a version still takes the artifact sentence. The precise criterion is whether the declaring PR was a bump, and a PR title does not reach judge_issues; this change removes the whole measured population of misfires without inventing a new one.

@how2how2how2-arch
how2how2how2-arch merged commit dc1e8ee into master Nov 10, 2026
2 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.

The release remedy reads a version out of an issue's body, so an ordinary issue is told a published release finishes it

2 participants