-
Each change shows what both optional gates say now: Jira transition refused, Bitbucket merge check fails. (Walkthrough data.)
-
You approved one revision; a different one deployed. The change says so in one sentence. (Walkthrough data.)
-
he Rovo agent repeats the computed value change exactly, explains the code and shows its worst-case arithmetic. (Walkthrough data.)
-
Real repository: after a push, the approver sees what moved, dailyPayoutCap 5000 → 50000 (×10), above the diff read from Bitbucket.
-
Jira refuses the transition while the current revisions are unapproved. The message comes from Lockstep's workflow validator.
-
Findings: every change that moved after approval, and any file two pending changes both touched. (Walkthrough data.)
-
After the approver approves the new revision in Jira and the check is re-run, the same merge check passes.
-
On the Bitbucket pull request, the Lockstep merge check did not pass: the current revisions are not approved for CHG-11.
Know which code you approved, and know the moment it changes.
A change approver signs off a Jira change on Friday. One more commit lands on the branch, and that code ships under the same approval. Lockstep pins each approval to the exact pull-request revisions. When Bitbucket reports a push, the open change flags itself, the Jira transition is refused and the Bitbucket merge check fails until the approver reapproves. On our sandbox the panel changed about 18 seconds after the push, with no reload.
Inspiration
A Jira or JSM change approval says "approved". It does not say which code. An Atlassian Community member described what follows, in a thread titled "How to block COMMITs to Approved PRs?" (November 2024):
"the Approval is made stale, but the code may be packaged and deployed without that approval."
"The problem is knowing it has happened and "blocking" the Jira ticket from CAB approval and/or production deployment."
Bitbucket dealt with the reviewer's half of this: a request to reset pull-request approvals when new commits arrive (BCLOUD-7042) drew 83 votes before it was resolved in 2017. JSM can gate a deployment on a change's status. Neither records which revisions the change approver authorized, so afterwards nobody can show what was approved and what shipped instead.
Lockstep connects three kinds of context Atlassian already holds, the work (the change), the person (its approver) and the code (the exact revisions), on the Jira change where the approver already is.
What it does
Lockstep is built on one mechanism, a pinned approval: the change approver approves an exact set of pull-request revisions, and the approval covers nothing else.
- See what you are signing. On the Jira change, the approver sees the linked pull requests, their current revisions and the changed lines, read from Bitbucket and never stored. Numbers that moved are listed first: "dailyPayoutCap 5000 → 50000 (×10)". The pull-request author and merger cannot approve their own code.
- When a push arrives, the change flags itself. A signed Bitbucket webhook reports the push and the open change re-reads without a prompt or a reload. It then says "The revision set changed after approval" and shows the files that changed.
- Two gates that fail closed. A Jira workflow validator and a Bitbucket merge check each re-read the current revisions. If they are not the approved ones, or cannot be verified, the transition is refused and the check fails. Unknown is never a pass. Both gates are optional, and Bitbucket blocks the merge only where the check is marked Required, which needs a Premium plan.
- A record that reapproval cannot rewrite. If a revision ships outside the approval in force, the change says so: "Jil J approved e9a848d for this change. c1fe889 deployed instead, without change approval." Approving afterwards restores coverage and leaves that event on the record. Every decision exports as a readable report with JSON, CSV and a checksum manifest.
- An agent that explains and cannot act. In Rovo, the Lockstep agent answers "are any approved changes different from what was approved?" across every change you can see, and explains what a change's lines do. It gives the computed numbers exactly and shows its worst-case arithmetic. It has no tool that approves, merges, transitions or deploys: the decision stays with the approver.
Try it in two minutes. Install from the setup guide; no repository or credentials are needed. A new site opens on a made-up walkthrough in which you are the approver. Approve CHG-144, simulate a push, simulate shipping it, and read what the change says about your own decision and what both gates would say. It runs the live decision engine and stores nothing.
How we built it
Two Forge apps, each piece doing one job:
- Jira workflow validator (
jira:workflowValidator) re-reads revisions from Bitbucket and refuses the transition. - Bitbucket custom merge check and pull-request card (
bitbucket:mergeCheck), in a second small Forge app. It holds no approval state: it sends one signed question per pull request to a Forge web trigger in the Jira app and gets one of a fixed set of outcomes. - Forge Realtime tells open pages to re-read when the webhook lands. The signal carries only a timestamp, and subscribing needs the same access check as reading the change.
- A signed webhook receiver (Forge web trigger) for pushes, reviews and merges, plus read-only collection of pull requests, commits and Pipelines deployments.
- Rovo agent and
rovo:mcp: one agent and seven read-only tools, also open to external AI clients once a site administrator enables that. Each call is authorized as the person asking. No verdict is decided by a language model. - Forge storage: decisions are append-only records, each tied to the one before it, with an entity property so approval state is searchable in JQL.
- JSM approvals decide who may approve, and one confirmation can answer the JSM round too.
Challenges we ran into
- Approving something that is still moving. A push can land between the preview and the click, so an approval is confirmed against freshly read revisions and refused if anything moved.
- Our own approval step failed its first live test. It took about 25 seconds and the panel gave up at 20, so the approver never saw the review. We removed repeated checks and reads; it now takes about 15 seconds.
- Letting an agent read code safely. Reading changed lines is off until a site administrator turns it on. With it on, the lines are bounded, never stored and treated as data, and the numbers the agent quotes come from a fixed rule over the diff, not from the model.
- A walkthrough that is not a mock. The no-setup demonstration runs the real decision engine on made-up changes, so what a judge clicks is what a customer gets.
Accomplishments that we're proud of
Everything here is our own test changes on a real Jira, Bitbucket and Pipelines sandbox, with separate author and approver accounts. Nobody outside the team has used Lockstep yet. The Rovo agent has been run on the walkthrough's changes only, because our sandbox site has no Rovo.
- One change, end to end (CHG-11). The approver approved a revision. A push then changed the daily payout cap. With the approver's panel open and untouched, it changed about 18 seconds after the push and showed the comparison within 45 seconds. The Jira transition was refused with "Linked revisions changed after approval", and the merge check reported "The current revisions are not approved for CHG-11". After reapproval the transition went through and the check passed.
- A shipment that stayed on the record (CHG-7). The approved and deployed revisions differed, and the change remained an exception after two reapprovals.
- All seven tools called from an external MCP client as an administrator, and five of them as a non-administrator, including refusals.
- 294 automated tests, and 37 checks that deliberately weaken a rule and confirm a test catches each one.
What we learned
- An approval that names no revision is a statement about a ticket, not about code.
- An agent that repeats the screen adds nothing. It became useful when it read the changed lines, and dependable when the numbers it quotes were computed for it.
What's next for Lockstep
- Getting it in front of change approvers outside our team.
- Seeing the merge check block a merge on a Premium workspace. Ours is not one, so we have seen the check fail and pass, not block.
- More than one Bitbucket Cloud repository per site, and deployments from tools other than Pipelines.
- Gating the deployment itself, and matching pull requests to a change by more than the Jira key in the title or branch.
Built With
- atlassian-forge
- atlassian-mcp
- bitbucket-cloud
- bitbucket-merge-checks
- bitbucket-pipelines
- forge-custom-ui
- forge-realtime
- forge-storage
- forge-ui-kit
- forge-web-triggers
- hmac-sha256
- javascript
- jira
- jira-service-management
- jira-workflow-validator
- node.js
- react
- rovo
- vite
- webhooks