Workflow healing: drift and proposals
When a portal changes and a block starts failing, Browserberg measures the drift and proposes a fix — which a human adopts as a new version or rejects.
Last updated:
Drift is measured, not guessed
Portals change under working workflows: a button is renamed, a form gains a step, a selector goes stale. Browserberg calls this drift and tracks it per block. One drift is one episode — outcomes are buffered per block and iteration and flushed when the block ends, so an author's maxRetries setting cannot multiply a single problem into an alarming score.
GET /v1/workflows/:id/health returns the drift score and its episodes: which block, which runs, what changed.
List the open proposals
Requires: api-key
BASE="https://browserberg.com"
AUTH="Authorization: Bearer $BROWSERBERG_API_KEY"
JSON="Content-Type: application/json"
WFID=$(curl -s -X POST "$BASE/v1/workflows" -H "$AUTH" -H "$JSON" -d '{
"title": "Healing walkthrough",
"blocks": [ { "blockType": "navigation", "label": "Open_page", "url": "https://example.com" } ]
}' | python3 -c 'import json,sys; print(json.load(sys.stdin)["workflow"]["workflowId"])')
# A fresh workflow has no drift and therefore no proposals -- the empty list
# IS the healthy state. Proposals appear when runs start diverging from the
# published definition, and a human adopts or rejects each one.
curl -s "$BASE/v1/heal-proposals?workflowId=$WFID" -H "$AUTH" | python3 -m json.tool
{
"proposals": []
}
A proposal stays a proposal
Healing never edits your workflow behind your back. A proposal carries the baseVersion it was computed against and a content hash of the change; you adopt it as a new version or reject it — over the API today, with POST /v1/heal-proposals/:id/adopt or /reject. Publishing a new version yourself marks the open proposals stale, since they no longer describe the workflow that exists.
What may be proposed is a closed list of fields on a closed list of block types — closed on both axes, because a login block has a url too. A code block can never be proposed against: a proposal able to rewrite code would be a mechanism for proposing arbitrary code into your account.