Skip to content

backlog: recover #1245's amendment -- proxy framing, two closed connections, and the xfail test shape - #366

Merged
wshallwshall merged 1 commit into
mainfrom
claude/amend-1245-recover
Aug 13, 2026
Merged

backlog: recover #1245's amendment -- proxy framing, two closed connections, and the xfail test shape#366
wshallwshall merged 1 commit into
mainfrom
claude/amend-1245-recover

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

Recovers an amendment to #1245 that was written before its PR merged and did not land. Docs-only:
docs/BACKLOG.md, +13 lines, 0 deletions. Original commit e1adc1cb, cherry-picked onto current main.

Why this PR exists -- a race I caused

I pushed #1245 at tip e7c16805 and armed auto-merge immediately. The filing session was concurrently
amending the item on a peer review; #365 merged at 13:55:33Z on the old tip, and e1adc1cb never
reached the remote. Verified absent from main before opening this: xfail 0 hits, "second writer"
0 hits.

The lesson is mine, not theirs: arming on push means any subsequent amendment loses the race. For a
docs-only filing with nothing downstream waiting, the arm can wait for the author to say they are
finished.

What was lost, and why it is worth a second PR

The mechanism is a PROXY defect, and naming it that way points the fix somewhere else. The
docstring equates unclaimed-ness with must_change_password. That equivalence holds only while the
flag has ONE writer -- and admin_reset_password is a second. So the fix is "stop inferring
claimed-ness from a mutable flag", not "special-case the reset".

Two of the original bound's open connections are now read, and both hold -- store.py:7714-7729
persists the flag via a real UPDATE, and _other_enabled_admin_exists returns true for any enabled
administrator other than the excluded id with no expiry wait. The remaining unverified span is smaller
and named.

The confirming test must assert the CORRECT behaviour under @pytest.mark.xfail(strict=True). This
is the limb most worth recovering. A test written to assert what the code does today turns the bug
into expected behaviour
: the green then actively defends the defect, and whoever fixes it sees a red
and concludes they broke something. strict=True is load-bearing -- it reds when the test starts
passing, so the fix cannot land silently.

Verification

  • one commit, cherry-picked cleanly from e1adc1cb; docs-only, +13 -0
  • counts asserted before and after, per the filing session's own rule: 274 items, open 200,
    closed 74 -- unchanged in all three. An amendment adds no item and moves no status; a prose
    insertion that shifts the open count is the tell that a glyph was read as a banner.
  • parse_items: #1245 still OPEN with exactly one status banner
  • no glyph from the closed alphabet introduced into the item region

That count check is not ceremony here. The filing session hit exactly this: a no-entry glyph used as
emphasis inside an item body was read by parse_items as a status banner, flipping #1245 to
CLOSED -- a live defect filed as resolved, silently and semantically inverted. Their open count went
200 to 199 on a pure prose insertion, which is how they caught it.

… confirming test's shape

Peer review before push. Three changes, none of which move the verdict.

States the mechanism more precisely: the docstring equates unclaimed-ness with
must_change_password, so the flag is a PROXY for "never claimed" and the
equivalence holds only while it has one writer. admin_reset_password is a second
writer. The durable fix is to stop inferring claimed-ness from a mutable flag any
path may raise, not to special-case the reset.

Closes two connections the original bound left open, both of which hold:
set_password issues an UPDATE that persists the flag, and
_other_enabled_admin_exists returns true for any enabled ADMINISTRATOR other than
the excluded id with no expiry wait. Individually-verified links are not a
verified chain; the gaps between them are invisible exactly when every link holds.
What remains unread is now named rather than implied.

Records that the confirming test must assert the CORRECT behaviour under a strict
xfail, not reproduce the defect. A test asserting today's behaviour turns the bug
into expected behaviour, so the fix reads as a regression and the green defends
the defect. strict is load-bearing: it reds when the test starts passing, so the
fix cannot land silently. The reason string must name the mechanism, because the
line numbers will drift.
@wshallwshall
wshallwshall enabled auto-merge (squash) August 13, 2026 13:58
@wshallwshall
wshallwshall merged commit dbb6be2 into main Aug 13, 2026
33 of 34 checks passed
@wshallwshall
wshallwshall deleted the claude/amend-1245-recover branch August 13, 2026 14:00
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