Skip to content

fix(srx-ips, srx-mnha-builder, srx-mnha-ipsec-builder): commit check confirms a pending commit - #115

Merged
fastrevmd-lab merged 3 commits into
mechubsec:mainfrom
jgrizzuti:feat/mcp-server-commit-confirmed-upstream
Nov 15, 2026
Merged

fastrevmd-lab merged 3 commits into
mechubsec:mainfrom
jgrizzuti:feat/mcp-server-commit-confirmed-upstream

Conversation

@jgrizzuti

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #94, after Juniper/junos-mcp-server#34 was merged on 2026-11-02.

  1. Server identity. The "junos-mcp-server with commit confirmed" server in the capability mappings is now Juniper's own 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_commit plus confirm_timeout_mins).
  2. A commit check confirms a pending commit. On Junos, a commit check or commit issued while a commit confirmed is 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).
  3. New server messages. The merged server refuses those calls with Error: a commit confirmed is pending on <router>…. confirm_commit now returns Error: No pending commit confirmed on <router>; nothing to confirm when 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 confirmed that 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 the traffic-generation.md snippet now warn about this.

Changes

Skill Version Files
srx-ips 0.1.3 → 0.1.4 references/mcp-server-notes.md, references/commit-and-verification.md (new step and checklist item)
srx-mnha-builder 0.2.6 → 0.2.7 references/mcp-server-notes.md, SKILL.md Step 7
srx-mnha-ipsec-builder 0.1.0 → 0.1.1 references/mcp-server-notes.md, SKILL.md (Step 7 unplanned test, guardrails), references/traffic-generation.md

Plus README catalog versions, a CHANGELOG entry under Unreleased, and the eight skills/CHECKSUMS.sha256 entries.

Evidence

Lab-verified on vSRX 24.4R2.21 on 2026-10-05, during the Juniper PR review:

  • Without the guard: commit confirmed 3 min, then a dry_run with a different change inside the window. rollback pending disappeared 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".
  • RPC reply: a pending commit is marked by <commit-confirmed>rollback pending</commit-confirmed> on entry 0 of get-commit-information, with or without a commit comment. The <comment>commit confirmed, rollback in N mins</comment> text stays after confirmation.
  • With the merged guard: the dry run was refused and rollback pending stayed intact; confirm_commit confirmed the commit; a second confirm_commit reported 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

  • Passing, run on a clean exported tree:
    • check-skill-packages, check-markdown-links, test-markdown-links
    • check-runtime-intake, check-runtime-intake-safety, test-runtime-intake-safety, test-runtime-intake-validator
    • check-catalog-counts, sync-installer-inventory --check, check-shared-schema
    • check-readme-branding, check-evals, test-check-evals, test-skill-packages
    • the SRX/audit contract checks and check-sd-bundle-server
    • git diff --check
    • Checksum contents match a fresh gen-checksums.py run.
  • Not run locally: check-inventory, test-inventory, check-installer, test-installer-supply-chain, test-codex-review-optin and test-codex-review-verdict execute shell scripts, which Windows Python can't run. They fail identically on unmodified main in that environment; CI covers them.
  • Not run: 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

…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 fastrevmd-lab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is well evidenced. I checked:

  • Juniper/junos-mcp-server#34 merged on 2026-11-02, and 2fb721a is upstream main. v1.1.1 is still the latest tag.
  • The three quoted messages match jmcp.py exactly.
  • The checksums and version bumps are consistent.
  • rust-junosmcp 2.7.3 doesn't refuse commit_check_config or 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.

Comment thread skills/srx-mnha-builder/SKILL.md Outdated
Comment on lines +246 to +247
`references/mcp-server-notes.md`). If `confirm_commit` reports nothing pending, the stage
has already rolled back.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
`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.

Comment on lines +27 to +29
`references/mcp-server-notes.md`). If `confirm_commit` reports nothing
pending, the change has already rolled back: re-check before saying it is
live.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
`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.

Comment on lines +155 to +158
- `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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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.

Suggested change
- `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.

Comment on lines +135 to +137
- `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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the srx-ips notes:

Suggested change
- `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.

Comment on lines +111 to +112
# 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
# 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.

fastrevmd-lab and others added 2 commits November 15, 2026 14:35
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>
@fastrevmd-lab

Copy link
Copy Markdown
Member

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 main in (7c34a21) to resolve the README/CHECKSUMS conflict with #116; no force-push. Lint and tests pass locally. Thanks for the evidence-heavy write-up.

@fastrevmd-lab
fastrevmd-lab merged commit 9284f26 into mechubsec:main Nov 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants