Skip to content

Add conditional requeue and repin and a versions search - #5

Merged
hugobessa merged 2 commits into
mainfrom
feat/move-notifications-safely
Nov 12, 2026
Merged

hugobessa merged 2 commits into
mainfrom
feat/move-notifications-safely

Conversation

@hugobessa

Copy link
Copy Markdown
Contributor

What changed

Conditional requeue and repin and a notification versions search, matching vintasend-ts-api alpha12. openapi.yaml is unchanged and byte-identical to the TS sibling.

  • /capabilities reports repin.expectedVersion, requeue.expectedVersion, requeue.templateVersion and versions.filter, negotiated from the configured service.
  • Requeue and repin bodies accept expectedVersion (and templateVersion on requeue); refusals carry details.reason (CHANGED, UNSUPPORTED, ...).
  • The versions search route, refused with 409 on a backend that cannot hold the primary's tokens.
  • With a replica selected, versions listed from it move the notification on the primary (vintasend 3.8.0 replicates tokens).

Downstream impact

The dashboard reads these through the existing contract. Needs vintasend 3.8.0 (pin moves at release).

Breaking?

Additive, except the requeue response, which now returns the notification after its send (SENT, FAILED or PENDING_SEND) instead of always PENDING_SEND.

Checks

pytest (355 passed), ruff, mypy, against the local vintasend 3.8.0 tree.

🤖 Generated with Claude Code

Requeue takes templateVersion, expectedVersion and send; repin takes
expectedVersion. POST /api/v1/notifications/versions lists ids and version
tokens for a composable filter. Refusals carry details.reason, /capabilities
reports the four action keys, and an option the configured service cannot
take is a 409 UNSUPPORTED. openapi.yaml matches vintasend-ts-api
1.0.0-alpha12. Needs vintasend 3.8.0.
With the API reading a replica, a version listed there moves the
notification on the primary, and a replica keeping tokens of its own
reports versions.filter false. The README explains replica reads.
@hugobessa
hugobessa merged commit c45d8f4 into main Nov 12, 2026
0 of 5 checks passed
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