Repository navigation
fix(srx-ips, srx-mnha-builder, srx-mnha-ipsec-builder): commit check confirms a pending commit - #115
Conversation
…confirms a pending commit Juniper/junos-mcp-server#34 merged on 2026-11-02, so the "junos-mcp-server with commit confirmed" column now points to Juniper's own main (no tagged release yet) instead of a third-party fork. On Junos a commit check or commit inside a confirm window confirms the pending commit. All three skills now say to run only read-only commands on a device while a commit confirmed is pending there; this matters most for the IPsec builder's self-restoring uplink test. The merged server's refusal and "No pending commit confirmed" messages are documented. Lab-verified on vSRX 24.4R2.21, 2026-10-05. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fastrevmd-lab
left a comment
There was a problem hiding this comment.
Thanks, this is well evidenced. I checked:
- Juniper/junos-mcp-server#34 merged on 2026-11-02, and
2fb721ais upstreammain. v1.1.1 is still the latest tag. - The three quoted messages match
jmcp.pyexactly. - The checksums and version bumps are consistent.
- rust-junosmcp 2.7.3 doesn't refuse
commit_check_configor dry runs during a pending window either, so keeping the rule in the skills is right. The server side is now mechubsec/rustjunosmcp#632.
I'm requesting changes for one thing. Four places treat No pending commit confirmed … nothing to confirm as proof that the change rolled back, and two of them say never to report or treat the change as live. The PR's own evidence shows the other case: after a successful confirm_commit, a second one reported nothing pending. A lost confirm reply, another session, or the stray commit check this PR is about would also leave the change live with nothing pending. Suggested wording is inline. srx-mnha-ipsec-builder/references/mcp-server-notes.md:53-55 already hedges and is fine as it is.
There's also one nit in traffic-generation.md.
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing pending, the stage | ||
| has already rolled back. |
There was a problem hiding this comment.
Nothing pending doesn't prove the stage rolled back. It may already have been confirmed, for example by a lost confirm reply or by a commit check. The baseline diff tells which:
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing pending, the stage | |
| has already rolled back. | |
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing pending, the stage | |
| either rolled back or was already confirmed; diff against the baseline to tell which. |
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing | ||
| pending, the change has already rolled back: re-check before saying it is | ||
| live. |
There was a problem hiding this comment.
This is the same point as srx-mnha-builder/SKILL.md. "Already rolled back" and "re-check before saying it is live" contradict each other:
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing | |
| pending, the change has already rolled back: re-check before saying it is | |
| live. | |
| `references/mcp-server-notes.md`). If `confirm_commit` reports nothing | |
| pending, the change either rolled back or was already confirmed: compare the | |
| configuration with the baseline before reporting which. |
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; | ||
| nothing to confirm` when nothing is pending, usually because the window | ||
| expired and the change already rolled back. Re-check the configuration; never | ||
| report the change as live. |
There was a problem hiding this comment.
"Never report the change as live" is wrong when the change was confirmed and the reply was lost. The PR's own evidence shows this: a second confirm_commit reported nothing pending.
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; | |
| nothing to confirm` when nothing is pending, usually because the window | |
| expired and the change already rolled back. Re-check the configuration; never | |
| report the change as live. | |
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; | |
| nothing to confirm` when nothing is pending: the window expired and the | |
| change rolled back, or it was already confirmed (a lost reply, another | |
| session, or a `commit check`). Compare the configuration with the baseline | |
| before reporting either. |
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; nothing to | ||
| confirm` when nothing is pending, usually because the window expired and the stage | ||
| already rolled back. Check the diff against the baseline; never treat the stage as live. |
There was a problem hiding this comment.
Same as the srx-ips notes:
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; nothing to | |
| confirm` when nothing is pending, usually because the window expired and the stage | |
| already rolled back. Check the diff against the baseline; never treat the stage as live. | |
| - `confirm_commit` returns `Error: No pending commit confirmed on <router>; nothing to | |
| confirm` when nothing is pending: the window expired and the stage rolled back, or it was | |
| already confirmed (a lost reply, another session, or a `commit check`). Check the diff | |
| against the baseline to tell which before going on. |
| # Until it rolls back, no commit check, dry run or other commit on this node: | ||
| # Junos treats any of them as confirming the pending commit. |
There was a problem hiding this comment.
Nit: this sits directly above the snippet's own early restore (rollback 1 + commit), which is a commit on this node. Someone copying the block reads the two as contradicting each other:
| # Until it rolls back, no commit check, dry run or other commit on this node: | |
| # Junos treats any of them as confirming the pending commit. | |
| # Until it rolls back, no commit check, dry run or commit on this node other than | |
| # the early restore below: Junos treats any of them as confirming the pending commit. |
Applies the maintainer's mechubsec#115 review suggestions: a `No pending commit confirmed` reply does not prove the change rolled back. A lost confirm reply, another session, or a stray commit check also leaves it live with nothing pending, so compare with the baseline before reporting either. Also clarifies the traffic-generation snippet's early restore, and the CHANGELOG entry's wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # README.md
|
Applied the review suggestions on your branch (385ae21): all five wordings as suggested, plus the same fix in the CHANGELOG entry ("nothing pending" means rolled back or already confirmed). Merged |
Summary
Follow-up to #94, after Juniper/junos-mcp-server#34 was merged on 2026-11-02.
main, not a third-party fork. No tagged Juniper release includes it yet (v1.1.1 is the latest tag), so the skills keep identifying it by its tool list (confirm_commitplusconfirm_timeout_mins).commit checkorcommitissued while acommit confirmedis pending confirms it and cancels the automatic rollback, without adding a commit entry. None of the skills said so. All three now say: while a commit confirmed is pending on a device, run only read-only commands there (no dry run, commit check or other push).Error: a commit confirmed is pending on <router>….confirm_commitnow returnsError: No pending commit confirmed on <router>; nothing to confirmwhen the change has already rolled back. Both are documented, with what the agent should do next.The most important case is srx-mnha-ipsec-builder's self-restoring uplink test: a 2-minute
commit confirmedthat disables the active hub's uplink and is never meant to be confirmed. On a server without the guard, one dry run or push to that node during the test would have left the uplink disabled permanently. The skill, its guardrails and thetraffic-generation.mdsnippet now warn about this.Changes
references/mcp-server-notes.md,references/commit-and-verification.md(new step and checklist item)references/mcp-server-notes.md,SKILL.mdStep 7references/mcp-server-notes.md,SKILL.md(Step 7 unplanned test, guardrails),references/traffic-generation.mdPlus README catalog versions, a CHANGELOG entry under Unreleased, and the eight
skills/CHECKSUMS.sha256entries.Evidence
Lab-verified on vSRX 24.4R2.21 on 2026-10-05, during the Juniper PR review:
dry_runwith a different change inside the window.rollback pendingdisappeared with no new commit entry. The rollback never fired, and the change was still present after the window, while the dry run reported "Nothing was committed".<commit-confirmed>rollback pending</commit-confirmed>on entry 0 ofget-commit-information, with or without a commit comment. The<comment>commit confirmed, rollback in N mins</comment>text stays after confirmation.rollback pendingstayed intact;confirm_commitconfirmed the commit; a secondconfirm_commitreported nothing pending; and a dry run was allowed again afterwards.rust-junosmcp was not tested for this behavior, so the skills treat it as unguarded and hold the rule themselves.
Validation
check-skill-packages,check-markdown-links,test-markdown-linkscheck-runtime-intake,check-runtime-intake-safety,test-runtime-intake-safety,test-runtime-intake-validatorcheck-catalog-counts,sync-installer-inventory --check,check-shared-schemacheck-readme-branding,check-evals,test-check-evals,test-skill-packagescheck-sd-bundle-servergit diff --checkgen-checksums.pyrun.check-inventory,test-inventory,check-installer,test-installer-supply-chain,test-codex-review-optinandtest-codex-review-verdictexecute shell scripts, which Windows Python can't run. They fail identically on unmodifiedmainin that environment; CI covers them.just review(the Codex gate), because it sends the diff off-box and needs explicit opt-in.Per CONTRIBUTING, a maintainer merges this PR; the author won't.
🤖 Generated with Claude Code