Skip to content

Drop the lost-lease note on resolution, and check the built archives - #17

Merged
PhiLily merged 3 commits into
mainfrom
fix/lost-lease-record
Aug 20, 2026
Merged

Drop the lost-lease note on resolution, and check the built archives#17
PhiLily merged 3 commits into
mainfrom
fix/lost-lease-record

Conversation

@PhiLily

@PhiLily PhiLily commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Two fixes and the release for them.

The reaper's note outlived what it described

The reaper records that a task's outcome was never observed. When the worker
holding that lease came back and reported success, the note stayed on the row,
so anything reading result.errors was handed an exception nobody raised on a
task that worked. A failure resolving the same way already dropped it, so one
row meant two different things depending on how it ended.

Both resolutions now write the errors the execution started with. A task that
is still LOST keeps the note, because it is the only thing on the row that says
why the result reads as FAILED.

The release gate could not see the archive

check_release.py read pyproject.toml, the changelog and the README, all of
which describe the source tree rather than what the build produced. A packaging
rule that stops shipping a migration leaves a distribution that imports and
passes its tests, then fails on somebody's upgrade against a column that is not
there.

--dist opens the wheel and the sdist and checks that each carries every
migration in the tree, the licence and the package modules. The release workflow
runs it after python -m build. The checks are now functions taking a
repository path, so they have tests of their own, and one of those applies the
gate to this tree on every run.

Documentation

production.md now says what it takes to reach a caller-visible FAILED to
SUCCESSFUL transition and how to stop seeing it: the lease has to lapse with
attempts spent, so raising LOCK_TIMEOUT until a merely slow worker is never
reclaimed removes it, at the cost of noticing a dead one later.

Checked

252 tests on SQLite and on PostgreSQL 16, and again under USE_TZ = False on a
non-UTC clock. Multi-process runs on both databases with hard worker kills and
SIGSTOP pauses: every task terminal, one completion signal each, and no raw
terminal row rewritten.

The reaper records that a task's outcome was never observed. When the
worker holding that lease came back and reported success, the note stayed
on the row, so anything reading result.errors was handed an exception
nobody raised on a task that worked. A failure resolving the same way
already dropped it, so one row meant two different things depending on
how it ended.

Both resolutions now write the errors the execution started with. A task
that is still LOST keeps the note, because it is the only thing on the
row that says why the result reads as failed.

Also documents what it takes to reach a caller-visible FAILED to
SUCCESSFUL transition and how to stop seeing it: the lease has to lapse
with attempts spent, so raising LOCK_TIMEOUT until a merely slow worker
is never reclaimed removes it, at the cost of noticing a dead one later.
check_release.py read pyproject, the changelog and the README, all of
which describe the tree rather than what the build produced. A packaging
rule that stops shipping a migration leaves a distribution that imports
and passes its tests, then fails on somebody's upgrade against a column
that is not there.

--dist opens the wheel and the sdist and checks that each carries every
migration in the source tree, along with the licence and the package
modules. The release workflow runs it after the build.

The checks are now functions taking a repository path, so they have tests
of their own. One of those applies the gate to this tree on every run,
which catches a version bumped in one file and not the other on the
commit that does it rather than at tag time.
@PhiLily
PhiLily merged commit be5a457 into main Aug 20, 2026
24 checks passed
@PhiLily
PhiLily deleted the fix/lost-lease-record branch August 20, 2026 15:44
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