[codex] Harden alterations guides against 3.8.0 - #197
Conversation
Greptile Summary
Confidence Score: 4/5The documentation updates are mostly safe to merge once the release-behavior mismatches in the alteration endpoint docs are corrected. The reviewed changes are documentation-only and focused, but two endpoint details conflict with Elsa 3.8.0 behavior in ways that can mislead operators using retry results or alteration status authorization. features/alterations/applying-alterations/rest-api.md and features/alterations/alteration-plans/rest-api.md
What T-Rex did
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
features/alterations/applying-alterations/rest-api.md:108
**Retry results multiply** The shipped retry endpoint does not always return one result per targeted workflow instance. In `release/3.8.0`, it loops over each loaded workflow instance, then calls the alteration runner with the full requested `workflowInstanceIds` collection each time. With two workflow IDs and omitted `activityIds`, callers can receive four results, and incident activity IDs from one instance can be applied to the other instance. The docs should describe this release behavior or recommend one workflow instance ID per retry request when relying on incident-derived activity IDs.
### Issue 2 of 2
features/alterations/alteration-plans/rest-api.md:5
**Wrong read permission** The status endpoint on this page does not use `run:alterations`. In `release/3.8.0`, `GET /alterations/{id}` is guarded by `read:alterations`, while submit and dry-run use `run:alterations`. An operator following this note can grant only `run:alterations` and still get authorization failures when trying to inspect plan/job status.
Reviews (1): Last reviewed commit: "docs: harden alterations guides against ..." | Re-trigger Greptile |
| } | ||
| ``` | ||
|
|
||
| The response shape matches `/alterations/run` by returning one result per targeted workflow instance. |
There was a problem hiding this comment.
Retry results multiply The shipped retry endpoint does not always return one result per targeted workflow instance. In
release/3.8.0, it loops over each loaded workflow instance, then calls the alteration runner with the full requested workflowInstanceIds collection each time. With two workflow IDs and omitted activityIds, callers can receive four results, and incident activity IDs from one instance can be applied to the other instance. The docs should describe this release behavior or recommend one workflow instance ID per retry request when relying on incident-derived activity IDs.
Artifacts
Repro: executable retry endpoint harness
- Contains supporting evidence from the run (text/x-python; charset=utf-8).
Repro: harness output showing 200 OK and multiplied results
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: features/alterations/applying-alterations/rest-api.md
Line: 108
Comment:
**Retry results multiply** The shipped retry endpoint does not always return one result per targeted workflow instance. In `release/3.8.0`, it loops over each loaded workflow instance, then calls the alteration runner with the full requested `workflowInstanceIds` collection each time. With two workflow IDs and omitted `activityIds`, callers can receive four results, and incident activity IDs from one instance can be applied to the other instance. The docs should describe this release behavior or recommend one workflow instance ID per retry request when relying on incident-derived activity IDs.
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| The Alterations module exposes a REST API for submitting, inspecting, and dry-running alteration plans. | ||
|
|
||
| All endpoints on this page require the `run:alterations` permission. |
There was a problem hiding this comment.
Wrong read permission The status endpoint on this page does not use
run:alterations. In release/3.8.0, GET /alterations/{id} is guarded by read:alterations, while submit and dry-run use run:alterations. An operator following this note can grant only run:alterations and still get authorization failures when trying to inspect plan/job status.
Artifacts
Repro: executable authorization metadata harness for alteration endpoints
- Contains supporting evidence from the run (text/x-python; charset=utf-8).
Repro: harness output showing endpoint permissions and HTTP status mappings
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: features/alterations/alteration-plans/rest-api.md
Line: 5
Comment:
**Wrong read permission** The status endpoint on this page does not use `run:alterations`. In `release/3.8.0`, `GET /alterations/{id}` is guarded by `read:alterations`, while submit and dry-run use `run:alterations`. An operator following this note can grant only `run:alterations` and still get authorization failures when trying to inspect plan/job status.
How can I resolve this? If you propose a fix, please make it concise.
What changed
release/3.8.0execution modes, built-in types, Studio surfaces, and persistence/dispatcher optionsDOC-053complete and selectDOC-019as the next recommended sliceWhy
The existing alterations pages were partially outdated: they omitted the built-in
Cancelalteration, did not cover Studio's alterations module and plan/job inspection, and did not document the released/alterations/workflows/retryendpoint.Impact
Operators and Studio users now have a release-backed explanation of how to choose between plan-based and immediate alterations, how background job execution works, and which runtime surfaces are available in Elsa 3.8.0.
Validation
release/3.8.0inelsa-core,elsa-studio, andelsa-extensionsgit diff --check