Repository navigation
feat: per-target zone translation (#11) - #12
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-book (#11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…shells (#11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck (#11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1 zones (#11) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design spec stays as the maintainer document. The implementation plan was internal workflow text (agent instructions, environment, and commit trailers) and does not belong in the public repository.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change do, and why?
Adds a per-target
zone_map(master zone → slave zone) so a slave can use different zone names from the master. For example, the master'sAPP1/APP2/APP3/UNTRUSTcan becomeAPPS/UNTRUSTon a slave. Closes #11. Design spec:docs/superpowers/specs/2026-10-16-zone-translation-design.md.attach.APP1→APP2becomesAPPS→APPS.security zonesis never sent withreplace="replace", even under--replace. This also stops--replacefrom wiping zone interface bindings.zone_mapkey that isn't a zone on the masterchecktranslates the source the same way before comparing. A zone fed by several master zones is checked only for existence. Zones that exist only on the slave aren't drift, because push will never remove them.Without a
zone_map, the payload is byte-for-byte unchanged.Does this touch the push/commit path?
Yes. It changes payload computation in
srxsync/orchestrator.pyandsrxsync/diff.py, and push now makes one extra read-only fetch of the slave'ssecurity zonesbefore loading.--dry-runstill performs zeroload/commitcalls, no model output decides what gets pushedVerified by hand: running
push --dry-runagainst a fake transport with azone_mapreturnedok, recorded zeroload/commit_confirmed/confirmcalls, and produced the expected "creating zone APPS" warning. Translation errors still go through the existing per-targetexcept Exceptionhandler, so--on-errorstill applies.Not verified on hardware: the NAT
from/to zoneXML shape and a commit check of zones with no interfaces were confirmed on labvsrx-ci. The XML shapes for global-policyfrom-zone/to-zoneand address-bookattach zonecome from the Junos schema and haven't been exercised on a device yet. A lab dry run with azone_mapis recommended before relying on those paths.Checklist
ruff check .passesmypy srxsyncpassespytest tests/unitpasses (120 passed)🤖 Generated with Claude Code