Skip to content

Fix stale publish results after revision lookup errors - #152

Open
agocharbhatia wants to merge 1 commit into
smallest-inc:mainfrom
agocharbhatia:fix/publish-revision-lookup-errors
Open

agocharbhatia wants to merge 1 commit into
smallest-inc:mainfrom
agocharbhatia:fix/publish-revision-lookup-errors

Conversation

@agocharbhatia

Copy link
Copy Markdown

publish_and_wait ignores failures from its initial revision lookup. If publishing then returns 202 scanning, the next poll can return the previous published revision as the result of the new publish.

Propagate the lookup error before sending the publish request. A successful empty listing still permits a first publish. This addresses the lookup-error path left after #121.

The tradeoff is that a failed lookup now also blocks a publish that could have completed synchronously. edit_and_publish may already have staged its draft edit. The existing concurrent-publisher correlation limitation is unchanged.

Validation:

  • The same native SDK HTTP regression fails on the base and passes with the patch. Independent review reproduced it and checked nearby success, retry, conflict and timeout paths using in-memory HTTP.
  • 268 offline custom tests passed, one skipped and three live tests deselected. Full Ruff lint/format and wheel/sdist builds pass. Python 3.14 emitted compatibility warnings. Mypy reports three annotation errors in unchanged pydantic_utilities.py; the same errors appear on the base. No live service or WireMock suite was run.

@crim-app

crim-app Bot commented Nov 3, 2026

Copy link
Copy Markdown

crim doesn't review pull requests automatically here.

Comment crim review on this pull request whenever you want a review.

This branch has not been deployed

No deployments
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