Skip to content

feat(cli): add warehouse inspect capacity - #7714

Merged
bnjjj merged 2 commits into
feat/generated-warehouse-commandsfrom
bnjjj/pipe-1463-warehouse-inspect-capacity
Nov 19, 2026
Merged

bnjjj merged 2 commits into
feat/generated-warehouse-commandsfrom
bnjjj/pipe-1463-warehouse-inspect-capacity

Conversation

@bnjjj

@bnjjj bnjjj commented Nov 19, 2026 •

Copy link
Copy Markdown

Add the experimental supabase warehouse inspect capacity command, stacked on #7640.

supabase warehouse inspect capacity --remote <project-ref> --since 30m

Generate the command from the public capacity API contract, with --from/--to, --attributes, and --interval. Keep metric selection defaults and range validation server-owned.

Reuse the shared text, JSON, and YAML output contract, preserving units, dimensions, null values, and availability. JSON/YAML retain the complete response.

No new generated-command runtime or generator logic is needed.

Closes PIPE-1463.

@bnjjj
bnjjj marked this pull request as ready for review November 19, 2026 10:22
@bnjjj
bnjjj requested review from a team and supabase-oss as code owners November 19, 2026 10:22
@bnjjj
bnjjj requested review from avallete and removed request for a team November 19, 2026 10:22

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI Review

CLI reference prose guidance: snapshot supabase/supabase@08388ee supplied to reviewers (advisory, not a style pass).

The PR adds the experimental warehouse inspect capacity command. Both independent reviews were available. I confirmed that the response schema advertises 12 workload metrics outside the documented capacity selection, the timestamp help omits required components, and the tests miss terminal output and wire-format preservation. The three help-style findings are advisory. The generated timestamp schemas follow the existing generator policy, which deliberately drops date-time patterns. No warehouse overlay drift was found. The CLI suite was not run because workspace dependencies were absent.

Findings

Severity Location Category Sources Claim
🟡 MINOR packages/api/scripts/openapi-overrides.json:3057 api-contract codex The capacity response schema advertises 12 workload metrics that callers cannot select on the capacity endpoint.
🟡 MINOR apps/cli/src/commands/api/generated.ts:223 cli-help codex The --from and --to help omits the seconds and time zone required by the documented API format.
🟡 MINOR apps/cli/src/commands/api/api-commands.integration.test.ts:548 test-coverage claude The capacity command has no terminal text test covering both series, their dimension labels, the unit, availability, and the null sample.
🟡 MINOR apps/cli/src/commands/api/api-commands.integration.test.ts:587 test-coverage codex The piped JSON test can pass after a parse-and-reserialize regression that preserves the response values.
⚪ NIT apps/cli/src/commands/api/generated.ts:201 docs-style codex The capacity help puts time selection, response fields, metric interpretation, and request limits in one paragraph.
⚪ NIT apps/cli/src/commands/api/generated.ts:201 docs-style codex The capacity help leaves flag references, response fields, and accepted values unmarked in the prose.
⚪ NIT apps/cli/src/commands/api/generated.ts:232 docs-style codex The interval help omits the thousands separator in the point limit.
Refuted findings (kept for transparency, not posted as review comments)
  • packages/api/src/generated/contracts.ts:14325 (schema-validation): The generated Effect input should enforce the OpenAPI timestamp patterns for from and to before sending a request.
    Refuted: The schema difference follows the existing compatibility policy. packages/api/scripts/generate.ts:328–333 explicitly removes date-time patterns because Management API timestamps can use forms those patterns reject. The same branch exists in the trusted checkout, and packages/api/scripts/generate.unit.test.ts:99–117 verifies that even offset-tolerant patterns are dropped. The sibling query-stats input follows the same policy.

Stats

Claude findings: 1 · Codex findings: 7 · Confirmed: 7 · Refuted: 1 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread apps/cli/src/commands/api/generated.ts Resolved
Comment thread apps/cli/src/commands/api/generated.ts Resolved
Comment thread apps/cli/src/commands/api/generated.ts Resolved
Comment thread apps/cli/src/commands/api/generated.ts Resolved
@bnjjj
bnjjj force-pushed the bnjjj/pipe-1463-warehouse-inspect-capacity branch 2 times, most recently from 0815bfa to 1233841 Compare November 19, 2026 10:55
Base automatically changed from bnjjj/pipe-1461-inspect-warehouse-query-stats to feat/generated-warehouse-commands November 19, 2026 10:56
@bnjjj
bnjjj force-pushed the bnjjj/pipe-1463-warehouse-inspect-capacity branch from 1233841 to c4f362e Compare November 19, 2026 11:02
@bnjjj
bnjjj merged commit e35de1e into feat/generated-warehouse-commands Nov 19, 2026
8 checks passed
@bnjjj
bnjjj deleted the bnjjj/pipe-1463-warehouse-inspect-capacity branch November 19, 2026 11:04
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.

1 participant