Conversation
Contributor
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
isMachineConsumerto treat--quiet,--ids-only, and--countas machine consumers (in addition to--agent/--jsonand non-TTY stdout). - Standardize missing-argument errors to use the
<arg> requiredformat inrecordingsandcards steps. - Remove an unused variable in
files listand 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)
9731a2d to
707f71b
Compare
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.
Summary
isMachineConsumerin root.go to check--quiet/--ids-only/--countflags, matchingisMachineOutputandApp.IsMachineOutput()behaviormissingArgcalls incards stepsandrecordingsfor consistent<arg> requirederror formatvaultTitlevariable in files list (pre-existing lint issue on main)Test plan
make checkpasses (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.isMachineConsumernow treats--quiet,--ids-only, and--countas machine consumers (parity withisMachineOutputandApp.IsMachineOutput()).<card-id|url>incards stepsand<type>inrecordings; e2e asserts JSON error andusagecode.vaultTitlein files list.Written for commit 707f71b. Summary will update on new commits.