Repository navigation
fix(cli): resume async polling and artifacts - #87
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 28 files
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 11 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes async CLI recovery by adding --resume with original polling/artifact settings and moves raw JSON handling ahead of stream dispatch; the change is bounded and backed by extensive generated and runtime tests.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 11 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Bounded CLI fix adding --resume to async commands so escaped/timed-out operations resume with original polling and artifact settings, plus raw JSON handling before stream dispatch; extensive generated and runtime tests cover the new behavior.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
Nonblocking coverage gaps
- Second operation dispatch path: the schema-mismatch regression exercises the polling operation's direct command. Both the ordinary operation path and the async-capable operation executor move raw-JSON preparation. A direct
render-assetJSON/jq call receiving schema-mismatched JSON would protect the latter independently. - Validation classification: conflict cases assert an error and zero requests, correctly protecting side effects. They do not assert
CLI_VALIDATION; an unrelated early error could satisfy those checks. - Help/schema semantics: help and usage assertions use text containment. A structural schema assertion would better protect optional create arguments and the alternate resume input contract.
- Windows: the printed-hint execution test intentionally skips shell execution on Windows. Cross-compilation does not verify native shell quoting; this is a stated validation limit, not a newly established defect.
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Turn on auto-fix | Re-trigger cubic
1ef1735 to
8109b48
Compare
Why
An async command could return a handle, but its recovery hint pointed to a one-shot polling command that lost the original waiting and artifact-output settings. Stream-capable commands also decoded JSON against generated types before honoring explicit JSON or jq output, so otherwise valid responses could fail on schema changes.
What changed
Async commands now accept
--resume <id>to poll an existing operation with the original recipe and output settings. Resume skips creation, required create inputs, stdin and interactive prompts; it rejects conflicting inputs before making requests. Help and usage describe resume on the flag itself; conflict errors explain invalid combinations. Artifact destinations must be supplied again with--out; existing URI-only artifact errors are preserved.Raw JSON preparation now runs before stream dispatch. Actual SSE and JSONL responses continue through their streaming handlers. The generated review fixture and runtime tests cover resume, output modes, validation, dry runs, safe recovery hints and mixed-response behavior.
The generated help uses this flag description, with no additional resume paragraph:
Testing
TARGET=review make test-clipassed: 644 tests, with two existing incomplete-workflow skips.TARGET=primary make test-clipassed: 1,656 tests, including the counted JSONL regression. Review usage checks and both coverage checks passed.make check-template-cli,npm run format, andmake lintpassed.Public-safety check
.claude/skills/public-repo-communication/SKILL.md).git diff --check.Summary by cubic
Tracks async operation resumption so polling and artifact settings survive an escape or timeout, and prevents stream-capable commands from failing on explicit JSON/jq output when the response drifts from the generated schema.
--resume <id>, which polls an existing operation without creating another; it skips create inputs, stdin, and interactive prompts and rejects conflicting flags, with help text describing the resume flow.cli get-asset --id) is replaced by--resume; artifact destinations must be supplied again with--out, and async notices now print their resume command to stderr so machine-mode stdout stays clean.-o json/--jqworks on stream-capable operations even when the schema changed, while SSE and JSONL responses still stream normally.Written for commit 8109b48. Summary will update on new commits.