Let the sweep leave what the append-only ledger holds - #328
Open
vladmesh wants to merge 1 commit into
Open
Conversation
The attempt ledger is append-only by a database rule, and the rule is deliberate — deleting from it is refused, and the fix that tried to was wrong. The synthetic test user is a fixture every run reuses, not residue of one, so it is deleted only while nothing references it. Deleting it unconditionally made the whole sweep raise, and a raising sweep is not a partial sweep: every phase after the database went unrun, and the residue those phases would have removed stayed on the stand.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by running the sweep on the stand after the previous fix:
ERROR: engineering_attempt_ledger is append-only.The ledger's immutability is a database rule and a deliberate one (
services/api/tests/service/test_engineering_attempt_ledger.pyasserts it). The previous commit tried to delete from it to clear the way for deleting the test user — the database was right to refuse.The test user is a fixture every run reuses rather than residue of one, so it is now deleted only while nothing references it. That matters because a failing database phase does not degrade the sweep, it raises: every later phase went unrun and left its residue behind.