"""Student workspace: implement the contract in EXERCISE.md.

Python 3.10+, standard library only. Do not connect to a network or device.
Run: python3 -m unittest -v test_planner.py
The starter intentionally raises NotImplementedError until you implement it.
"""


class ValidationError(ValueError):
    """Input cannot safely be used to generate a plan."""


def load_json(path: str):
    """Read a fixture, enforcing a size limit and rejecting duplicate JSON keys."""
    raise NotImplementedError("Implement load_json")


def plan_changes(desired_raw, observed_raw, *, expected_observed_revision: str,
                 allow_removals: bool = False):
    """Validate complete, scoped snapshots and return a deterministic change plan.

    Reject stale revisions, invalid CIDRs, duplicate normalized prefixes,
    identity/scope mismatches, incomplete inventories, and unapproved removals.
    Never mutate the inputs. Include revisions and normalized fingerprints.
    """
    raise NotImplementedError("Implement plan_changes")
