Skip to content

feat(cli): add experimental stack logs - #6510

Open
jgoux wants to merge 8 commits into
feat/experimental-stack-listfrom
feat/experimental-stack-logs
Open

feat(cli): add experimental stack logs#6510
jgoux wants to merge 8 commits into
feat/experimental-stack-listfrom
feat/experimental-stack-logs

Conversation

@jgoux

@jgoux jgoux commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

supabase experimental stack logs reads the selected stack’s logs with service filtering, a bounded tail, and live following. Interrupting a log follower leaves the stack running.

Support text and structured output, with stream-json for live machine consumers. This PR builds on experimental stack list (#6509).

@jgoux
jgoux requested a review from a team as a code owner September 7, 2026 23:51

@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

Only Claude's independent review was available; the Codex review did not complete. After checking every claim against the PR tree and trusted conventions, eight findings are confirmed and one is refuted. No critical or major defects were found; the principal concerns are incomplete branch coverage, a declared stack error misclassified as unknown telemetry, and incomplete compatibility documentation.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/experimental/stack/logs/logs.integration.test.ts:145 test-coverage claude The integration suite leaves multiple handler and error-classification branches uncovered, contrary to the trusted requirement for 100% command-handler branch coverage.
🟡 MINOR apps/cli/src/commands/experimental/stack/logs/logs.handler.ts:54 error-handling claude StackRuntimeMismatchError is a declared openStack failure but falls through to the unknown telemetry classification.
🟡 MINOR apps/cli/src/commands/experimental/stack/logs/SIDE_EFFECTS.md:15 documentation claude SIDE_EFFECTS.md omits required exit-code documentation and does not document legacy output-flag rejection or the different outcomes for an absent default stack and a missing named stack.
⚪ NIT apps/cli/src/command-internal/legacy-db-target-flags.ts:80 maintainability claude The service flag is placed under the db-family provenance comment even though it belongs to experimental stack logs.
⚪ NIT apps/cli/src/commands/experimental/stack/logs/logs.command.ts:30 consistency claude The new --follow flag lacks the -f alias provided by the sibling experimental workers logs command.
⚪ NIT apps/cli/src/commands/experimental/stack/logs/logs.handler.ts:140 maintainability claude The non-follow path duplicates emitEntries rendering logic, and the synthesized stack-id target carries an unused projectRoot field.
⚪ NIT apps/cli/src/commands/experimental/stack/logs/logs.command.ts:22 consistency claude The tail limit is duplicated as literals and the flag description does not explain that zero skips retained history.
⚪ NIT apps/cli/src/shared/output/types.ts:14 documentation claude The shared log-entry stream enum now permits internal, but the new machine-readable value is not documented for consumers.
Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/experimental/stack/logs/logs.handler.ts:128 (output-contract): The found and not-found success payloads are improperly inconsistent because cursor and running are absent when no stack exists.
    Refuted: The payload is intentionally discriminated by found. Cursor, running, and id describe an existing stack and are inapplicable when found is false; the sibling stack stop handler provides concrete counter-evidence that sparse no-stack results are the established shape. Missing documentation is covered separately.

Stats

Claude findings: 9 · Codex findings: 0 · Confirmed: 8 · Refuted: 1 · 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.

Comment thread apps/cli/src/commands/experimental/stack/logs/logs.handler.ts
Comment thread apps/cli/src/command-internal/legacy-db-target-flags.ts Outdated
Comment thread apps/cli/src/commands/experimental/stack/logs/logs.command.ts
Comment thread apps/cli/src/commands/experimental/stack/logs/SIDE_EFFECTS.md Outdated
Comment thread apps/cli/src/commands/experimental/stack/logs/logs.handler.ts
Comment thread apps/cli/src/commands/experimental/stack/logs/logs.command.ts
Comment thread apps/cli/src/shared/output/types.ts
@jgoux
jgoux force-pushed the feat/experimental-stack-logs branch from d74dc21 to 225892e Compare September 8, 2026 05:31
@jgoux
jgoux force-pushed the feat/experimental-stack-logs branch from 225892e to 0a37784 Compare September 8, 2026 06:02
@jgoux
jgoux force-pushed the feat/experimental-stack-logs branch from 0a37784 to ee53c9d Compare September 8, 2026 12:32
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@ee53c9df5dd73a429b90f4ca9a11f81757b4d011

Preview package for commit ee53c9d.

@jgoux

jgoux commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/ai-review

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