fix(catalog): preserve recurring outcomes as latest - #541
kstonekuan merged 3 commits into
Conversation
kstonekuan
left a comment
There was a problem hiding this comment.
One gap: removing the execution_id must be non-empty when supplied check passes all 150 tests.
Everything else is held well. Reverting the scoping fails 21, and ignoring execution_id fails its own case.
I checked the property the new fingerprint could have broken, since it now depends on catalog state at append time: CATALOG.md:114 promises concurrent duplicate appends converge. Two workers appending the same outcome at once still produce one row, and so does a sequential repeat. Your design holds it.
|
Thanks for the review. I removed the |
kstonekuan
left a comment
There was a problem hiding this comment.
I meant add a test, not delete the guard. My wording was ambiguous.
Without it, empty and whitespace ids become distinct scopes rather than an error:
None -> out
"" -> out.a8de770a92e6a396
" " -> out.c758dd61b918da88
So execution_id="" silently buys a unique execution identity, and "" and " " are different ones. Restore the check and give it a case.
|
@kstonekuan Sorry, I misunderstood the first comment. Restored the guard and added tests for empty and whitespace-only IDs. |
kstonekuan
left a comment
There was a problem hiding this comment.
LGTM, merging.
Guard restored and held, including whitespace-only: dropping .strip() fails its case on its own.
No apology needed, my first comment was ambiguous.
Full suite on the rebased result: 2054 passed / 8 skipped.
Fixes a catalog state bug where an outcome that occurred earlier could be deduplicated incorrectly when it happened again later.
For example:
The final error was previously treated as an old duplicate, so the catalog stayed
okand the episode remained in the dataset.The same problem happened in reverse when a successful result followed an earlier failure.
This change keeps consecutive identical retries idempotent, while recording a recurring outcome as a new catalog occurrence. It also adds an optional
execution_idfor retries that may arrive after other executions have already completed.The Parquet format and canonical episode identities remain unchanged.
Tests
Added coverage for:
Validation:
Closes #540.