test(cli): cover network-restrictions get and update (CLI-2288) - #6478
Open
7ttp wants to merge 4 commits into
Open
test(cli): cover network-restrictions get and update (CLI-2288)#64787ttp wants to merge 4 commits into
network-restrictions get and update (CLI-2288)#64787ttp wants to merge 4 commits into
Conversation
Contributor
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@9cd12b703926ac150e07d4d0562ab3bf9066d02cPreview package for commit |
Contributor
There was a problem hiding this comment.
🤖 AI Review
Four concerns are confirmed: the 300-second path has no margin before cleanup, mixed-family baselines can be widened during restoration, restoration is attempted only once, and the get test loses diagnostics on malformed JSON. The entitlement and CIDR-order findings are refuted by trusted live-test and configuration conventions. No production code changed.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/legacy/commands/network-restrictions/update/update.live.test.ts:18 |
test-reliability |
claude+codex | The timeout budget can expire before the shared project's allowlist is restored. |
| 🟡 MINOR | apps/cli/src/legacy/commands/network-restrictions/update/update.live.test.ts:124 |
test-isolation |
claude | Restoration widens an originally empty address family to allow-all when the other family had a captured allowlist. |
| 🟡 MINOR | apps/cli/src/legacy/commands/network-restrictions/update/update.live.test.ts:150 |
test-isolation |
claude | The restore command has no retry, so a transient restore failure can leave the serial live project's allowlist restricted for later tests. |
| ⚪ NIT | apps/cli/src/legacy/commands/network-restrictions/get/get.live.test.ts:15 |
test-diagnostics |
claude | Malformed JSON output produces a bare parse error without stderr or useful command context. |
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/src/legacy/commands/network-restrictions/update/update.live.test.ts:131(test-coverage): The update live test should skip when get reports entitlement "disallowed" instead of requiring a successful mutation.
Refuted: The two tests exercise different command contracts: get validly reports either contract enum, while update is a golden-path mutation test. trusted/docs/adr/0013-live-e2e-bypasses-replay-server.md explicitly rules out capability-specific skipping, so a target lacking the required capability is expected to fail this live check.apps/cli/src/legacy/commands/network-restrictions/update/update.live.test.ts:105(test-reliability): The restore proof should ignore CIDR ordering because reordered allowlists could otherwise fail equality.
Refuted: Trusted default-branch configuration explicitly treats both CIDR arrays as ordered sequences. Exact ordered equality therefore follows the repository's documented convention rather than introducing an accidental flaky comparison.
Stats
Claude findings: 6 · Codex findings: 1 · Confirmed: 4 · Refuted: 2 · Uncertain: 0
Models: claude-opus-5 + gpt-5.6-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
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.
TL;DR
adds live e2e coverage for
network-restrictions getandupdate, covering the command familywhats introduced?
network-restrictions get: reads the target project's restrictions and proves the json payload carriesentitlement,configandstatusnetwork-restrictions update: captures the current allowlist, replaces it with documentation ranges, proves the replacement in its own output and through get, then restores...
ref: