Skip to content

Runner: a Listing run whose only other tiles need copy ends "partial", not "failed" - #41

Merged
wilsonhj merged 2 commits into
mainfrom
fix/listing-hero-partial
Oct 30, 2026
Merged

wilsonhj merged 2 commits into
mainfrom
fix/listing-hero-partial

Conversation

@wilsonhj

Copy link
Copy Markdown
Owner

What was wrong

finishRun (lib/pipeline/runner.ts) only counted a succeeded leaf step as a deliverable. On Listing, the hero (compose_main) is not a leaf, because every other tile depends on it. When every other tile ends needs_input (copy missing), there is no succeeded leaf, so the run ended failed even though the hero succeeded and can be exported. docs/spec/api.md (run status) says partial means "finished with a deliverable", and the Listing spec (G7, T-T3, and api.md §2.3 "Missing copy") says a run with needs_input tiles ends partial.

needs_input being in BAD is correct: it is what keeps the run from being succeeded. Only the deliverable check was wrong.

Reproduce (mock Comfy, succeeded scenario)

POST /api/pipelines/listing with a transparent product PNG and either:

  • {"assets":["gallery_callouts","gallery_contents"],"productImages":[{"upload":"product"}]}, or
  • {"scope":"story", ...} with no copy at all.

Before: cutout and compose_main succeeded, every other tile needs_input, run failed. After: run partial. (scope: "gallery" was already partial, only because the angles/detail/in-use tiles are succeeded leaves.)

Change

A succeeded step whose dependents all ended needs_input now counts as a deliverable, alongside leaves. Only Listing code steps return needs_input, so Product Shoot, Motion and Identity outcomes don't change (their tests pass unchanged).

Not covered here: a hero whose dependent tile failed (e.g. text_too_long, or a failed diffusion job) still makes the run failed when no other leaf succeeded. Fixing that needs the definition to name its deliverable steps, which would change PipelineDefinition, so I left it out of this PR.

Tests

  • New: tests/pipeline/runner.test.ts › "a Listing run whose only other tiles need copy ends partial: the hero is a deliverable" (fails before with failed, passes after).
  • pnpm lint && pnpm typecheck && pnpm test pass (427/427). I re-ran the three POSTs above against pnpm dev with the mock.

Based on main after #34 (which edited the same lines of finishRun), so the two don't conflict.

🤖 Generated with Claude Code

wilsonhj and others added 2 commits October 30, 2026 14:15
…al, not failed

finishRun counted a deliverable only as a succeeded leaf step. The hero
(compose_main) is not a leaf: every other tile depends on it. When those
tiles all end needs_input (copy missing), no succeeded leaf exists and the
run ended failed, though the hero is exportable. docs/spec/api.md and
listing.md (G7, T-T3) say such a run is partial.

A succeeded step whose dependents all ended needs_input now counts as a
deliverable. needs_input is only returned by Listing code steps, so Product
Shoot, Motion and Identity outcomes do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds failed

Pins the other half of the partial rule: the hero-is-a-deliverable change
must not let a failed compliance check (gating step) end the run partial
when the remaining tiles are skipped for lack of copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wilsonhj
wilsonhj merged commit 02909fb into main Oct 30, 2026
1 check passed
wilsonhj added a commit that referenced this pull request Oct 31, 2026
…, not "failed" (#41)

* Runner: a Listing hero whose other tiles need copy ends the run partial, not failed

finishRun counted a deliverable only as a succeeded leaf step. The hero
(compose_main) is not a leaf: every other tile depends on it. When those
tiles all end needs_input (copy missing), no succeeded leaf exists and the
run ended failed, though the hero is exportable. docs/spec/api.md and
listing.md (G7, T-T3) say such a run is partial.

A succeeded step whose dependents all ended needs_input now counts as a
deliverable. needs_input is only returned by Listing code steps, so Product
Shoot, Motion and Identity outcomes do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Runner test: a Listing run whose main image fails compliance still ends failed

Pins the other half of the partial rule: the hero-is-a-deliverable change
must not let a failed compliance check (gating step) end the run partial
when the remaining tiles are skipped for lack of copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
wilsonhj added a commit that referenced this pull request Oct 31, 2026
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