Skip to content

improvement(cleanup): tighten the agent-harness changes from the latest audit - #9650

Merged
waleedlatif1 merged 1 commit into
stagingfrom
improvement/audit-cleanup-1104
Nov 4, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
improvement/audit-cleanup-1104

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Follow-up cleanup on the recently merged agent-harness changes (#9634–#9646).

CLI parse-error guidance

  • Picks the guidance from the error code commander raises (commander.missingArgument, missingMandatoryOptionValue, excessArguments, unknownOption) instead of matching commander's English message text. Hidden siblings come from Help.visibleCommands, and the one remaining private read (_actionHandler) now lives in a single helper, hasOwnAction.
  • Fix: the hint "x was passed as a positional; pass it as --flag" only appears when the argv allows no other reading: no unknown option was typed, exactly one required flag is missing, and there is exactly one extra operand. Before, an unknown flag's value, or one of two missing flags, could be named in the hint.
  • Fix (latent): the hint now names the option's long flag. For an option with a short form it used to print -w,.
  • buildLeaf was a pass-through and is now inlined.
  • Body-variant shape errors use isRecordLike, compute the shape once, and show a generic example.

Workflow lint

  • Sections are built eagerly. hasWorkflowLintIssues now derives from the same section list.
  • Run-button advice is now written from the issue's structured fields; the canvas message is unchanged.
  • New shared quotedBlockLabel helper, used by lint and the Copilot run-from-block refusal. formatQuotedNameList takes an optional quote formatter.

Other

  • Grep no longer passes a reportNonText callback around. Skipped non-text files are marked with nonText: true instead, and the output text is unchanged.
  • Dead code removed: the isLoopNode branch in run-from-block (findOutermostContainer already catches it) and the unreachable !startBlockId guard in the run hook.
  • Tests: a shared createEmptyWorkflowLintReport factory in @sim/testing, tighter Copilot assertions, a Drizzle insert in place of raw SQL in delivery.integration.ts, and updated test comments.

Test plan

  • New CLI regression tests in build.test.ts. All three fail on the code before this change and pass after it.
  • Targeted vitest runs: the sim-cli suite (59 files) and 21 touched app test files.
  • bun run lint; type-check for sim-cli, testing, and utils; check:utils, check:comment-hygiene, check:test-patterns, check:file-names.

…st audit

- CLI parse-error guidance branches on commander's error codes, reads hidden
  siblings through Help.visibleCommands, and names a misplaced positional
  only when unambiguous (no unknown option, one missing required flag, one
  extra operand); the hint uses the option's long flag, not '-w,'
- body-variant shape errors use isRecordLike, compute the shape once, and
  show a generic example
- workflow lint builds sections eagerly, derives hasWorkflowLintIssues from
  them, and phrases Run-button advice from the issue's fields
- shared quotedBlockLabel; formatQuotedNameList takes a quote formatter
- grep marks skipped non-text files instead of threading a callback
- drop dead run-from-block loop branch and unreachable run-hook guard
- shared empty lint report test factory; tighter assertions
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 4, 2026 12:59am UTC

Request Review

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 26 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Cleans up CLI error guidance, workflow lint messages, grep skip counts, and shared test fixtures.

  • CLI errors give clearer hints about the right flags and request shapes.
  • Workflow lint and Copilot refusal messages use shared block labels.
  • Grep marks skipped non-text files on the results it returns.
  • Execution cleanup and shared test setup leave workflow behavior unchanged.

waleedlatif1 explicitly describes eager section building as intentional in the PR description. No material performance failure was established.

Reviews (1) · Last reviewed commit: "improvement(cleanup): tighten the agent-..." · Reviewed by Greptile

This branch was successfully deployed

1 active deployment
Preview — e25cc961 Deployed Nov 4, 2026 by vercel[bot]
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