Skip to content

fix(cloud): print top-up instructions on 402 and guide oversize or ar… - #1250

Open
bearsyankees wants to merge 1 commit into
mainfrom
fix/cli-topup-guidance-and-source-archive-hints
Open

bearsyankees wants to merge 1 commit into
mainfrom
fix/cli-topup-guidance-and-source-archive-hints

Conversation

@bearsyankees

Copy link
Copy Markdown
Collaborator

…chive --source

  • Every payment-required error now ends with a "Next step" line: the platform hint when one is sent, else the topup command and the billing URL for the configured platform. JSON output gets the same text as next_step. The platform hint is no longer repeated inside the error.
  • An archive file passed to --source is rejected with guidance to pass the directory instead, which packs and excludes deps/build output.
  • An oversize archive names its largest files and points to --exclude and --dry-run --show-files.
  • uploads request help points to scans start --source for local code.

…chive --source

- Every payment-required error now ends with a "Next step" line: the
  platform hint when one is sent, else the topup command and the billing
  URL for the configured platform. JSON output gets the same text as
  next_step. The platform hint is no longer repeated inside the error.
- An archive file passed to --source is rejected with guidance to pass
  the directory instead, which packs and excludes deps/build output.
- An oversize archive names its largest files and points to --exclude
  and --dry-run --show-files.
- uploads request help points to scans start --source for local code.
@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR improves recovery guidance for payment-required responses and invalid or oversized source archives.

  • Adds consistent human and JSON next-step instructions for credit errors.
  • Rejects archive files passed directly to --source with directory-based workflow guidance.
  • Reports the largest selected files when a generated source archive exceeds its size limit.
  • Updates upload-request help to direct local-source users to scans start --source.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issue identified.

The changed payment-error rendering preserves existing exit behavior, and the source-upload diagnostics reject invalid inputs and clean up oversized temporary archives without changing upload or approval boundaries.

Important Files Changed

Filename Overview
strix/interface/cloud/http.py Adds structured payment-recovery instructions while preserving payment exit-code handling and active-platform URL selection.
strix/interface/cloud/runner.py Emits optional recovery instructions through separate human and JSON error-output paths.
strix/interface/cloud/source_upload.py Adds archive-input guidance and diagnostic details for generated archives exceeding the upload limit.
strix/interface/cloud/spec.py Clarifies that local source scans should use the integrated source-upload command.
tests/test_cloud_cli.py Covers fallback and platform-provided payment instructions in human and JSON output.
tests/test_cloud_source_upload.py Covers archive rejection and oversized-archive diagnostics, ordering, guidance, and cleanup.

Reviews (1): Last reviewed commit: "fix(cloud): print top-up instructions on..." | Re-trigger Greptile

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