feat(api): POST /graphs/{slug}/re-migrate superuser endpoint (Phase 7 #59)#268
Merged
charlie83Gs merged 1 commit intomainfrom Apr 20, 2026
Merged
feat(api): POST /graphs/{slug}/re-migrate superuser endpoint (Phase 7 #59)#268charlie83Gs merged 1 commit intomainfrom
charlie83Gs merged 1 commit intomainfrom
Conversation
…59) The manual recovery path for stuck graphs — dispatches ``graph_migration_wf`` with the plugin's ``current_version`` as the target. Auto-dispatch at worker boot already handles regular version bumps; this endpoint exists for the "something went wrong" case: * Previous workflow crashed / was cancelled, leaving an ``in_flight`` audit row the auto-dispatch path now skips. * Graph sits at ``status='error'`` from a hop failure that's since been fixed in code. * Plugin was re-registered after being rolled back. Idempotency comes from the workflow itself — :meth:`find_hop` + ``mark_skipped`` short-circuit success/skipped audit rows on replay. This endpoint just provides the trigger. Guards: 404 on unknown graph, 409 when the plugin for the graph's ``graph_type_id`` isn't registered (fix the plugin, not the graph), 403 for non-superusers via ``SYSTEM_MANAGE_GRAPHS``. 4 integration tests cover happy-path dispatch payload, 404, 409, and 403 — dispatch is mocked since the in-worker behaviour is already covered by ``test_graph_migration_workflow.py`` in PR #267.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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.
Summary
Manual recovery path for stuck graphs — dispatches `graph_migration_wf`
(PR #267) with the plugin's `current_version` as the target.
Auto-dispatch at worker boot (#58) handles regular version bumps; this
endpoint exists for the "something went wrong" case:
audit row the auto-dispatch path now skips.
fixed in code.
Idempotency comes from the workflow itself — `find_hop` +
`mark_skipped` short-circuit success/skipped audit rows on replay.
This endpoint just provides the trigger.
Guards
Tests
4 integration tests cover happy-path dispatch payload, 404, 409, and
403. Dispatch is mocked since the in-worker behaviour of the workflow
itself is already covered by `test_graph_migration_workflow.py` in
PR #267.
Test plan
Related
dispatch time — but this PR only names the workflow by string, so
the two can merge in either order.
trigger surface.
🤖 Generated with Claude Code