Guide / Test and run
Incident to fix
Turn an incident from the Monitor tab into a scenario that reproduces it, hand it to the AI chat for a fix, and run the whole loop: reproduce, fix, check, send, retry.
Reproduce as a scenario
In the Monitor tab, press Reproduce as scenario on an incident. Penstock builds a scenario in the Camunda Process Test format that starts the process with the instance's variables, drives the path the instance took, and ends on an incident of the same type at the same element, with the message pattern.
- Anything that looks like a secret is replaced by a placeholder. The names stay, and a note says so.
- Previewing the scenario is Free, with no time limit.
- Saving it next to the diagram's other scenarios, and running it on the engine marked for tests, are Pro. The run says reproduced or did not reproduce.
The message pattern is matched without a backtracking regular expression for the patterns Penstock writes, so a very long or hostile incident message cannot hang the matcher. Patterns you write by hand still run as regular expressions.
Propose a fix
Pro
Propose a fix hands the reproducing scenario, the redacted incident message and variables and the diagram to the AI chat, with a prepared prompt. When the agent proposes a diagram change, the scenario is run again on the proposed diagram. Scenario now passes or still fails is shown next to the ghost proposal and in the agent's question.
That check does not run AI-written content by itself. It belongs to the chat that proposed the fix and is used once. It runs by itself only on an engine marked deployment.forTests (or a local one already confirmed for tests), and says so otherwise. When the proposal adds or changes any script, listener, expression, condition, mapping, timer, service call or connector reference, it waits for a Check this fix button next to the proposal that says what was added.
Fix end to end
Pro incident-loop
Fix end to end… in the incident dialog shows five steps and runs them in order, stopping at the first one that does not hold:
- Reproduce the incident with its scenario on an engine marked for tests.
- Take the fix from the editor.
- Check that the scenario now ends without the incident.
- Send only the changed file to the connection.
- Retry the failed work. On Camunda 8 the job gets one retry and then the incident is resolved. On Camunda 7 the failed job or external task is given one.
Rehearse is the default and changes nothing on the engine. Run for real asks before the deploy and again before the retry, asks once more on a connection marked deployment.protected, and does not retry when the engine already had the file. A fix that does not pass the scenario is never sent.
From the command line
penstock incident scenario 2251799813685249
penstock incident scenario 2251799813685249 --write --run
The argument is the instance key or the incident key. It prints the scenario as a dry run. --write saves it atomically inside the project, and --run runs it on the engine and says whether the incident reproduced. Reading the incident and previewing are free; --write and --run are Pro. Exit 0 when the scenario was made, and with --run it reproduced; 1 when the incident or diagram could not be found, the file could not be written, or it did not reproduce.
The incident_to_scenario MCP tool does the same for an agent, confined to the roots the client gave.
Common problems
- Run or the loop is refused.
- The engine is not marked
deployment.forTests: true. A shared or production engine is refused. See Scenarios. - The scenario did not reproduce the incident.
- The incident may depend on something the variables do not carry, such as an external system. Edit the scenario by hand. See The scenario file.
- "Check this fix" waits.
- The proposal adds content that runs. Read what was added, then press the button.