Skip to content

Fix review followups from #235#237

Merged
jeremy merged 1 commit intomainfrom
fix/pr-235-review-followups
Mar 10, 2026
Merged

Fix review followups from #235#237
jeremy merged 1 commit intomainfrom
fix/pr-235-review-followups

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 10, 2026

Summary

  • Expand isMachineConsumer in root.go to check --quiet/--ids-only/--count flags, matching isMachineOutput and App.IsMachineOutput() behavior
  • Add missing angle brackets to missingArg calls in cards steps and recordings for consistent <arg> required error format
  • Remove unused vaultTitle variable in files list (pre-existing lint issue on main)

Test plan

  • make check passes (all Go tests, lint, vet, e2e)

Summary by cubic

Expands machine-output detection to include --quiet, --ids-only, and --count, and standardizes missing-argument errors across commands. Updates e2e to expect JSON error shape; removes an unused var flagged by lint.

  • Bug Fixes
    • isMachineConsumer now treats --quiet, --ids-only, and --count as machine consumers (parity with isMachineOutput and App.IsMachineOutput()).
    • Standardized missing-arg errors: <card-id|url> in cards steps and <type> in recordings; e2e asserts JSON error and usage code.
    • Removed unused vaultTitle in files list.

Written for commit 707f71b. Summary will update on new commits.

@jeremy jeremy requested a review from a team as a code owner March 10, 2026 21:37
Copilot AI review requested due to automatic review settings March 10, 2026 21:37
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) bug Something isn't working labels Mar 10, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="e2e/errors.bats">

<violation number="1" location="e2e/errors.bats:174">
P2: The split assertions weaken this test — they don't verify the actual `<type> required` error format that the PR introduces. Other `missingArg` tests in this file check the exact message via `assert_json_value '.error' '<type> required'`, which also validates the JSON error envelope. Consider matching that pattern here.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Follow-up fixes to align CLI non-interactive detection and usage-error formatting with existing machine-output behavior and conventions, plus a small cleanup and e2e adjustment.

Changes:

  • Expand isMachineConsumer to treat --quiet, --ids-only, and --count as machine consumers (in addition to --agent/--json and non-TTY stdout).
  • Standardize missing-argument errors to use the <arg> required format in recordings and cards steps.
  • Remove an unused variable in files list and update an e2e assertion for recordings’ missing-type error.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/commands/recordings.go Updates missingArg call to use <type> for consistent error formatting.
internal/commands/files.go Removes unused vaultTitle (and now discards the fetched vault object).
internal/commands/cards.go Updates missingArg call to use `<card-id
internal/cli/root.go Broadens machine-consumer detection to include additional output-mode flags.
e2e/errors.bats Adjusts recordings missing-type error assertion to accommodate new formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Expand isMachineConsumer to check --quiet/--ids-only/--count (parity
  with isMachineOutput and App.IsMachineOutput)
- Add angle brackets to missingArg calls in cards steps and recordings
  for consistency with all other commands
- Remove unused vaultTitle variable in files list (lint fix on main)
@jeremy jeremy force-pushed the fix/pr-235-review-followups branch from 9731a2d to 707f71b Compare March 10, 2026 21:56
@jeremy jeremy merged commit efd1436 into main Mar 10, 2026
24 checks passed
@jeremy jeremy deleted the fix/pr-235-review-followups branch March 10, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working commands CLI command implementations tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants