Skip to content

fix(review): drop the cubic default flags that produced a false clean review - #529

Merged
amondnet merged 3 commits into
mainfrom
amondnet/cubic-default-flags
Sep 11, 2026
Merged

amondnet merged 3 commits into
mainfrom
amondnet/cubic-default-flags

Conversation

@amondnet

@amondnet amondnet commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #514.

The defect

.please/config.yml pinned default-flags: "--json -b" for every local cubic invocation.
-b, --base is declared [string] in cubic review --help. The reviewer agent builds
cubic review -j <configured words>, so the configured value put -b last on the command
line, with no value after it
. cubic then fails internally to produce a diff — but still
exits 0 with an empty issues array:

$ cubic review --json -b
exit: 0
{ "issues": [] }

To every caller that is indistinguishable from a review that ran and genuinely found
nothing. The misconfiguration did not surface as a broken reviewer; it surfaced as a
clean review.

Why remove the key rather than repair it

The reviewer agent already does better without one. Its execution rules:

Context Command
default flags configured cubic review -j <configured words>
no flags + uncommitted changes cubic review -j
no flags + clean working tree cubic review -b -j

So it passes -j itself — making the configured --json redundant — and it selects the
scope from the working tree. A configured value overrides that adaptive choice on every
run, including /review:apply-review Step 5, which runs before the fix commit and wants
exactly the uncommitted-changes scope. Removing the key restores both behaviors.

Verification

setup-env.sh --print, the only consumer of this key:

# before (origin/main)
export REVIEW_CUBIC_ENABLED='true'
export REVIEW_CUBIC_DEFAULT_FLAGS='--json -b'

# after (this branch)
export REVIEW_CUBIC_ENABLED='true'

enabled: true is preserved; only the flag export is gone.

Scope

Only the locally-invoked CLI path was affected. The cubic GitHub app reviews pushed
commits normally and was never impacted — it posted real findings throughout #508, #526,
and #528.

Not fixed here — upstream, passionfactory/review

Two related hazards live in the review plugin, not in this repository, so this PR does not
touch them:

  1. The agent's own clean-tree fallback is cubic review -b -j — the same bare -b, which
    here swallows -j.
  2. The wrapper treats an empty result as a clean pass regardless of cubic's internal status,
    which is what let this misconfiguration stay invisible. cubic default-flags "--json -b" silently returns a false-clean review #514 raised this as "worth
    checking alongside".

Docs

No doc surface describes this key. The root READMEs mention cubic only as a listed review
service, and .please/config.yml is workspace tooling rather than a shunt config key,
endpoint, CLI, or provider surface. The rationale is recorded as an inline comment at the
removal site instead.


Summary by cubic

Removes the cubic default-flags from .please/config.yml, which previously forced --json -b on every local run. -b takes a string and was left without a value, so cubic failed internally to produce a diff but still exited 0 with an empty issues array — a misconfigured reviewer looked like a clean review. Now the agent passes -j itself and selects scope from the working tree, so dirty-tree reviews reflect actual changes. Closes #514.

Scope

  • The fix repairs only the dirty-tree path; the clean-tree fallback cubic review -b -j lives in the review plugin upstream, where bare -b can still yield a false clean review, and no key in this file reaches it.
  • Only the local CLI path is affected; the cubic GitHub app is untouched.

Written for commit 755af41. Summary will update on new commits.

… review

`.please/config.yml` pinned `default-flags: "--json -b"` for every local cubic
invocation. `-b, --base` takes a string, so a bare `-b` swallows the token that
follows it; cubic then fails internally to produce a diff but still exits 0 with
an empty `issues` array. To every caller that is indistinguishable from a review
that ran and found nothing, so the misconfiguration surfaced as a clean review
rather than as a broken reviewer.

Removing the key rather than repairing it, because the reviewer agent already
does better without one: it passes `-j` itself and selects the scope from the
working tree — uncommitted changes when dirty, the base branch when clean. A
configured value overrode that adaptive choice on every run, including
`/review:apply-review` Step 5, which runs before the fix commit and wants
exactly the uncommitted-changes scope.

Verified `setup-env.sh --print` now exports only `REVIEW_CUBIC_ENABLED='true'`,
where before it also exported `REVIEW_CUBIC_DEFAULT_FLAGS='--json -b'`.

Only the locally-invoked CLI path was affected; the cubic GitHub app reviews
pushed commits normally and was never impacted.

Closes #514

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request removes the 'default-flags' configuration for the 'cubic' reviewer in '.please/config.yml' and adds a detailed comment explaining the change. The previous configuration of '--json -b' caused silent failures and false clean reviews because the bare '-b' flag swallowed the subsequent token. I have no further feedback to provide as there are no review comments.

@greptile-apps

greptile-apps Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The configuration change appears safe to merge, with a non-blocking clarification needed in the inline rationale about the unresolved clean-tree fallback.

Fix All in Claude CodeFindings

  1. P2 Clean-Tree Risk Is Omitted ▶
Fix with agent prompt
### Issue 1
.please/config.yml:45-47
The new rationale says the reviewer selects the base branch on a clean working tree, but the documented clean-tree command is `cubic review -b -j`. Because `-b` consumes the following token as its string argument, this path can still produce the same false-clean result. Please clarify that removing `default-flags` restores adaptive invocation but does not make clean-tree local reviews reliable until the upstream fallback is fixed; otherwise, maintainers may infer that every false-clean path is resolved.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Preserves local cubic review enablement.
  • Removes the redundant --json and malformed -b override.
  • Adds inline rationale for the configuration removal.
  • The rationale should acknowledge the still-broken upstream clean-tree fallback.

Reviews (1) · Last reviewed commit: "fix(review): drop the cubic default flag..."

Comment thread .please/config.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c95e37464

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .please/config.yml Outdated

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The comment claimed the bare `-b` "swallowed the following token". In the
invocation that actually failed — `cubic review -j --json -b`, the agent's `-j`
plus the configured words — `-b` sat last, so there was no following token to
swallow. It is a string option left without a value, which is why cubic could
not produce a diff.

The swallow-the-next-token form is a real hazard for this flag, but it belongs
to a different invocation (the reviewer agent's own `cubic review -b -j`
fallback, upstream), not to the one this repository's config produced. #514
stated it correctly as "with nothing after it the flag consumes the next token
— here, nothing at all"; the précis dropped the qualifier.

Found by the silent-failure finder while reviewing the parent commit.
Three reviewers landed on the same gap: the rationale comment described the
agent's adaptive scope selection as if both of its branches worked, when this
change repairs only one of them. A maintainer reading the config would have
inferred that removing the key closed every false-clean path.

The comment now says the dirty-tree path is the one repaired, and that the
clean-tree branch issues `cubic review -b -j` — `-b` again with no base ref of
its own — so a local review of a clean worktree can still come back falsely
clean. That command belongs to the review plugin, and no key in this file
reaches it, so #514 carries it as the upstream follow-up.

The first paragraph is reworded along with it: it claimed the agent "picks the
base branch when it is clean", which the new paragraph then contradicted. It
now says the agent *attempts* a base-branch review, and the second paragraph
gives both branches the same root cause.

One deliberate difference from the reviewers' wording. Two of them stated that
the fallback's `-b` consumes the following `-j` as its base argument; that is
not asserted here, because confirming what yargs does with a value token
beginning with `-` would take running the parser, and an unverified swallow
claim in this same PR already had to be corrected. "No base ref of its own" is
true without that check and carries the same conclusion.

Applied from PR #529 review: greptile-apps, chatgpt-codex-connector, and the
gpt finder (which caught the self-contradiction the first two fixes created).
@codspeed

codspeed Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 83 untouched benchmarks


Comparing amondnet/cubic-default-flags (755af41) with main (c7bc752)

Open in CodSpeed

@sonarqubecloud

Copy link
Copy Markdown

@amondnet
amondnet merged commit dcdc019 into main Sep 11, 2026
15 checks passed
@amondnet
amondnet deleted the amondnet/cubic-default-flags branch September 11, 2026 18:29
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.

cubic default-flags "--json -b" silently returns a false-clean review

1 participant