Skip to content

fix(cli): keep exactly named find blocks, the typed --run on retry, and measure only referenced bytes - #10605

Open
waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/cli-find-run-dedupe-byte-preflight
Open

waleedlatif1 wants to merge 2 commits into
stagingfrom
fix/cli-find-run-dedupe-byte-preflight

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Three small sim-cli fixes:

  • sim workflows source find: with several names, matches were joined in the order given and then cut to 20 blocks. A broad partial name (find 'core' 'Fallback') could push a block named exactly past the cap, and then the command told the caller to name it exactly. Exact matches now go ahead of partial matches before the cap.
  • sim workspaces source apply --run: the failed-run next command deduped runs by their names as typed. That caused two problems. A bare run that was refused and rewritten to orders.apiIn={a} beat the user's own orders.apiIn={b}. And a rewrite next to a run naming the same trigger by its block key survived the dedupe, so the suggested command was then refused ("one trigger of workflows/orders/"). testRuns now dedupes on the lock-resolved trigger id, as its own check does, and keeps the value the user typed over a rewritten one.
  • sim workflows source apply: the size preflight summed every file it sent, including code files that only the lock still names. The server measures only the entry plus the code files it references, so the CLI could refuse a source the server accepts. maxFiles is still counted over every sent file. maxTotalBytes is now measured over the entry and the code files it references.

Tests

Each new test fails on the pre-fix source and passes after the fix:

  • find: 21 Score N blocks plus find 'core' 'Fallback' still prints Fallback
  • workspace apply: a bare ingest={"a":1} plus ingest.apiIn={"b":2} gives a next command that keeps {"b":2}. A bare run plus ingest.apiin={"b":2} (the block key) gives a single entry
  • workflow apply: a 4 MB code file that only the lock names is sent without E_LIMIT_EXCEEDED. A referenced 4 MB code file is still refused before sending (guard)

Gates

  • sim-cli type-check
  • full sim-cli vitest (1366 passed)
  • biome
  • bun run generate (no artifact changes)
  • check:cli-docs, check:utils, check:comment-hygiene, check:test-patterns, check:explicit-any, check:file-names

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Dec 1, 2026 10:13pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge.

Summary

Three focused CLI fixes:

  • Exact block matches stay visible when a broad search reaches the result limit.
  • Workspace retry commands keep one run per trigger and preserve the input you typed.
  • Workflow apply measures bytes only for the entry and code files it references.

No actionable issues found. Reviewed the added regression tests; did not run them.

Reviews (2) · Last reviewed commit: "fix(cli): keep the trigger-named retry r..." · Reviewed by Greptile

@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.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

…nd measure only referenced bytes

- source find: blocks a name matches exactly go ahead of partial matches before the 20-block cap
- workspaces source apply: the failed-run next command dedupes runs by the lock-resolved trigger and keeps the --run the user typed over a refusal's rewrite
- workflows source apply: the size preflight sums the entry and the code files it references, as the server does; the file count still covers every sent file
@waleedlatif1
waleedlatif1 force-pushed the fix/cli-find-run-dedupe-byte-preflight branch from 29e3d22 to 3af0fa7 Compare December 1, 2026 22:12
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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 6 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

This branch was previously deployed

1 inactive deployment
Preview — 3af0fa70 Deployed Dec 1, 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