Skip to content

Stage 6 images partial and upload facade#12

Merged
Leechael merged 12 commits into
mainfrom
stage-6-images-partial
May 25, 2026
Merged

Stage 6 images partial and upload facade#12
Leechael merged 12 commits into
mainfrom
stage-6-images-partial

Conversation

@Leechael
Copy link
Copy Markdown
Owner

@Leechael Leechael commented May 25, 2026

Summary

  • add image-domain query RPCs for templates, discover surface, and media prompt expansion
  • add library methods and a top-level expand-prompt command
  • route resumable upload through a transport facade and fix image-to-image extraction
  • sync upstream planning docs for Stage 6 status

Verification

  • go vet ./...
  • go test ./... -count=1
  • make build
  • make ci
  • prek
  • protocol purity and bypass facade grep checks

Summary by cubic

Implements Stage 6 image partials (templates, Discover surface, media prompt expansion) and adds the expand-prompt CLI. Introduces a resumable upload transport facade with correct headers, cookie forwarding, and hardened image-to-image extraction.

  • New Features

    • Image RPCs and methods: ListImageTemplates, GetDiscoverSurface, ExpandMediaPrompt, with protocol encoders/decoders and tests.
    • CLI: expand-prompt <text> with optional --json.
    • Upload transport: new facade routes resumable uploads and forwards cookies from the jar.
  • Bug Fixes

    • Image-to-image extraction: capture URLs from arr[0]["8"] and ignore marker strings; adds tests.
    • Upload headers: forward Push-Id on both start and finalize; tests now capture handler failures from the server goroutine.

Written for commit e0d65ba. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

1 issue found across 23 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="internal/client/transport/upload_test.go">

<violation number="1" location="internal/client/transport/upload_test.go:22">
P2: `t.Fatalf` is called inside the `httptest` handler goroutine. `Fatalf`/`FailNow` must run in the test goroutine, so this can make failures unreliable or flaky. Use non-terminating reporting in the handler (for example `t.Errorf`) and fail from the main test goroutine.</violation>
</file>

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

Re-trigger cubic

Comment thread internal/client/transport/upload_test.go Outdated
@Leechael Leechael merged commit 0a31ba1 into main May 25, 2026
3 checks passed
@Leechael Leechael deleted the stage-6-images-partial branch May 25, 2026 18:54
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