Repository navigation
test(deploy): assert twin-network-policy golden/template parity - #11
Merged
Harikeshav-R merged 1 commit intoSep 11, 2026
Merged
Conversation
deploy/policies/twin-network-policy.yaml (the golden copy, applied
with `kubectl apply -n <namespace>`) and
twin-network-policy.template.yaml (rendered at fork time, carries
`namespace: ${TWIN_NAMESPACE}`) are maintained entirely by hand -- no
generation script exists yet (fleet manifest rendering is build-plan
step A2.2, unbuilt). The two existing unit tests validate each file's
own structure independently and never diff them against each other,
so a future edit to one that isn't mirrored in the other would pass
CI silently.
Add a test that loads both, strips the namespace field they're
expected to differ on, and asserts everything else is identical.
Also corrects docs/02-architecture.md's directory tree, which
documented a deploy/twin/ directory for "twin manifest templates"
that doesn't exist -- the templates actually live in deploy/policies/
next to their golden copies.
Implements build-plan step A1.7 (test coverage follow-up).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CzBeBUsZmE38K1kWeLMhNh
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.
Build-Plan Step Implemented
Checkpoint Execution & Output
ADRs Relied On
NetworkPolicy and its template stay in sync; it does not change the policy
itself.
Mock Registry Disclosures
Documentation Updates
docs/02-architecture.md§2.1: corrected the repository-layout tree, whichdocumented a
deploy/twin/directory for "twin manifest templates" thatdoesn't exist -- the
*.template.yamlfiles actually live indeploy/policies/alongside their golden copies.Definition of Done
make checkgreen# MOCKED:marker without a row in docs/MOCKS.mdContext
A
/code-reviewpass against PR #6 flagged thatdeploy/policies/twin-network-policy.yaml(the golden copy, applied viakubectl apply -n <namespace>) andtwin-network-policy.template.yaml(rendered at fork time) are maintained by hand with nothing keeping them in
sync -- the two existing tests validate each file independently and never
diff them against each other. This PR adds that diff as a test, and fixes an
unrelated but adjacent doc error found in the same area (a
deploy/twin/directory documented in the architecture doc's tree that was never actually
created).
Base branch is
feat/policies-and-loadgen(PR #6, still open), sincedeploy/policies/only exists on that branch's stack.🤖 Generated with Claude Code
https://claude.ai/code/session_01CzBeBUsZmE38K1kWeLMhNh