Commit Graph
12 Commits
Author SHA1 Message Date
wtgoku 7054436a99 Make test deployment version observable
The test server health endpoint now reports 0.2.1 so deployments that include start-end frame routing can be verified directly after restart.

Constraint: Deployment verification relies on /health because the service does not expose a build SHA endpoint.

Confidence: high

Scope-risk: narrow

Directive: Keep this value in sync with test deployments until a real build metadata endpoint exists.

Tested: go test ./...

Tested: make build

Tested: GOOS=linux GOARCH=amd64 go build -o dist/popiartserver-linux-amd64 ./cmd/popiartserver
2026-05-18 18:18:49 +08:00
wtgoku 7e8244668e Support start-end frame image2video routing
The CLI now submits gateway-compatible first/final-frame payloads, so the server accepts the same public SkillHub schema fields, normalizes them to images[0]/images[1] with metadata.action=firstTailGenerate, and routes multi-frame Vidu-style submissions through the unified video generations endpoint.

Constraint: Align server behavior with popiartcli v0.3.21 start/end-frame payloads

Constraint: Keep existing single-image image2video and MiniMax paths compatible

Rejected: Hardcode only the new fields in server seed skills | loading SkillHub input_schema.json keeps the remote catalog as the source of truth

Confidence: medium

Scope-risk: moderate

Directive: Preserve first-frame then final-frame ordering when changing video reference handling

Tested: go test ./...

Tested: make build

Tested: GOOS=linux GOARCH=amd64 go build -o dist/popiartserver-linux-amd64 ./cmd/popiartserver

Not-tested: Live test-server deployment; current SSH key is rejected by 101.42.99.35
2026-05-18 17:32:53 +08:00
wtgoku d0318292c1 Make artifact and media metadata first-class server records
Artifact and media metadata were previously reconstructed from job result
refs and JSON sidecar files. This change regularizes metadata into SQLite,
keeps filesystem blobs in place, and preserves backward compatibility via
lazy fallback and backfill from existing job refs and JSON metadata.

Constraint: Blob storage remains on the local filesystem in this phase
Rejected: Migrate blobs into SQLite | larger scope and worse operational profile for current media sizes
Rejected: Hard cutover without fallback | unsafe for historical data already on the test server
Confidence: medium
Scope-risk: moderate
Directive: Treat SQLite as the metadata source of truth; JSON sidecars are compatibility fallback only
Tested: go test ./...; deployed to test server 101.42.99.35; verified /v1/artifacts, /v1/artifacts/:id, signed media URL 200, unsigned content 401
Not-tested: Full historical backfill sweep over all existing artifact rows under production-sized data volume
2026-04-18 23:06:34 +08:00
jiajia 07fd1ad0a7 Log Seedream payload shape before forwarding to the gateway
Seedream image jobs now log whether image input was present, whether it was sent as a single string or an array, how many references were included, and which size preset was used. This makes it possible to prove whether missing reference images are a server bug or a downstream gateway issue.

Constraint: The test server needed a low-noise way to confirm what reached /v1/images/generations without changing the external API contract
Rejected: Rely on gateway-side observation alone | it could not distinguish whether the image array was dropped before or after the server boundary
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep this Seedream request-shape log until the gateway team has finished validating image-array forwarding end to end
Tested: go test ./internal/server
Tested: Seedream 4.5 job on test server with three image refs after deploying binary (job_47513ead2708)
Not-tested: Long-term log volume impact under sustained Seedream traffic
2026-04-17 13:06:14 +08:00
jiajia dcd21746d2 Keep Gemini image edits role-aware on the server path
The server now resolves source, identity, and style artifacts separately, emits role-labeled Gemini parts, and logs the effective request shape so deployed debugging can confirm which references reached upstream.

Constraint: The test deployment must stay on gemini-3.1-flash-image-preview while gaining better multi-image editing semantics
Rejected: Change the default model to gemini-3-pro-image-preview | test-server parity required keeping flash as default
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Preserve the source/identity/style logging until the upstream gateway exposes equivalent structured traces
Tested: go test ./internal/server
Tested: image img2img against http://101.42.99.35:18080/v1 (job_5af212df2c27)
Not-tested: Non-Gemini multi-image providers still fall back to the first reference only
2026-04-16 18:49:05 +08:00
wtgoku 531ffc6ee8 Align Vidu defaults and S2V image handling with tested server behavior
The server now keeps Vidu URL-based image2video requests on a valid default duration when callers omit duration, and it forwards MiniMax S2V reference images in the images[] shape expected by the deployed Hailuo adapter.

Constraint: The test environment currently validates provider behavior through popiartServer binary deploys rather than waiting for broader upstream adapter rollouts
Rejected: Keep the old shared 4-second default for all providers | breaks viduq3-turbo when duration is omitted
Rejected: Translate S2V references into subject_reference in popiartServer | the deployed Hailuo adapter already expects top-level images and performs its own mapping
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep provider-specific video defaults and reference-shape compatibility isolated in popiartServer unless upstream adapters are upgraded in lockstep
Tested: go test ./internal/server -run TestInferRouteKeyForModelRecognizesViduAsVideo|TestGenerate|TestResolve|TestSubmitMiniMaxVideoTask|TestSubmitImageToVideoTask|TestExecuteImageToImageJobUsesGenerationsPathForMiniMax|TestExecuteImageToVideoJob|TestResolveVideoReferencesSupportsImagesArray
Not-tested: Full PopiNewAPI unit suite from the local checkout
2026-04-15 14:54:42 +08:00
wtgoku 6ff9ad6997 Restore MiniMax media routing parity across image and video flows
The server now keeps portable image ratio normalization, enforces documented Seedream size presets, routes MiniMax img2img through generations-style payloads, and submits Hailuo video variants through the video generations API with proper reference-image handling.

Constraint: The deployed test chain relies on popiartServer as the lowest-risk place to adapt provider-specific routing without broad newapi changes
Rejected: Expand newapi relay modes for every MiniMax image/video branch | larger blast radius than needed for the verified server-managed flows
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep MiniMax-specific media routing in popiartServer unless upstream newapi adapters are upgraded to the same contract
Tested: go test ./internal/server -run TestInferRouteKeyForModelRecognizesViduAsVideo|TestGenerate|TestResolve|TestSubmitMiniMaxVideoTask|TestExecuteImageToImageJobUsesGenerationsPathForMiniMax|TestExecuteImageToVideoJob|TestResolveVideoReferencesSupportsImagesArray
Not-tested: Full PopiNewAPI unit suite (blocked earlier by external module checksum drift in local checkout)
2026-04-15 11:57:05 +08:00
wtgoku a73b85c45f Route direct image-edit requests through the img2img pipeline
Direct `models/infer` image requests were defaulting to `image.text2image`, which dropped reference inputs and produced unrelated generations. Route image-edit payloads to `image.img2img`, accept canonical `image` URLs during reference resolution, and preserve reference-aware prompt hints.

Constraint: The test server must continue accepting both canonical `image` and legacy alias fields from callers already in circulation
Rejected: Fix only reference URL parsing | direct overrides would still be misrouted as text2image before reference resolution runs
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any future image-model route inference must inspect input shape before defaulting to text2image
Tested: `env GOCACHE=/tmp/popiartserver-gocache go test ./internal/server -run 'TestInferRouteKeyForModelRecognizesViduAsVideo|TestInferRouteKeyForModelRecognizesImageEditInputs|TestResolveImageToImageReferenceAcceptsCanonicalImageURL|TestGenerateEditedImageRefsUsesSeedreamImagesGenerationsEndpoint'`; deployed to `101.42.99.35` and verified Seedream gateway requests include `image`
Not-tested: Full manual validation against every non-Seedream image-edit provider
2026-04-13 17:08:07 +08:00
wtgoku 214ffa1dfc Route Seedream 4.5 image flows through the NewAPI generations endpoint
Seedream image generation in the server was still split across the generic text2image path and the legacy multipart image edit path. That shape does not match Volcengine Seedream 4.5, which expects JSON requests to /v1/images/generations for both text2image and img2img, with reference images carried through the image field.

Constraint: Seedream 4.5 and 5.0 use /v1/images/generations rather than the older multipart /v1/images/edits contract
Constraint: Existing Gemini and other image routes must keep their current behavior unchanged
Rejected: Keep using /v1/images/edits for Seedream img2img | upstream rejects the request body shape
Rejected: Special-case the CLI input contract | the server route adapter owns upstream normalization
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep Seedream routes on the JSON generations path; do not reintroduce multipart edits for these models without revalidating the upstream API contract
Tested: go test ./internal/server; go test ./...; go build -o /tmp/popiartserver-verify ./cmd/popiartserver; test-server txt2img/img2img/img2video smoke with Seedream 4.5 + Vidu
Not-tested: Seedream 5.0 live smoke against the test server
2026-04-10 17:40:49 +08:00
wtgoku b99c49790a Align popiart-server repo with the clean local source snapshot
The remote master branch was carrying AppleDouble metadata, local database state, and checked-in Next.js build output. This commit syncs the repository to the current local source snapshot, preserves the skillhub static pages that exist locally, and extends ignore rules so these runtime artifacts stay out of history going forward.

Constraint: The existing remote history already contained tracked macOS metadata files and web build output
Constraint: The local source tree must remain deployable after removing repository noise
Rejected: Force-push the unrelated local bootstrap commit | would discard the existing remote history
Rejected: Leave tracked runtime artifacts in place | would keep polluting future diffs and deployments
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep AppleDouble files, local SQLite state, and web build artifacts out of version control; regenerate them per-environment instead
Tested: go test ./...; go build -o /tmp/popiartserver-sync ./cmd/popiartserver
Not-tested: Remote test-server deployment
2026-04-10 16:05:33 +08:00
wtgoku 4b20dc5e37 add stable media support and sync skillhub UI 2026-04-08 23:17:42 +08:00
zhangzhengqiang 1b494b6029 init:初始化项目 2026-04-07 15:21:27 +08:00