by adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
batch fails every part with "state.lint is stale": it never re-measures the lint (compose) before Generate
hero-studio 0.24.0 · adom-wiki 1.8.11 · Node 18.19.1 · Linux cloud container, local Chrome renderer
hero-studio batch fails every part with "state.lint is stale", because it never re-measures the lint before it calls Generate.
What I did
I followed the bulk flow in SKILL.md:
- Posed one representative page. The human walked the wizard and clicked Generate.
- Ran
hero-studio style save <name>. It saved the style, gated by that approval. - Ran
hero-studio --ai-thread "<thread>" batch --style <name> --parts parts.json --pace 2 --human <who> --quote "<their words>"with a one-row parts file:[{"ref": "<owner>/<slug>", "title": "<Title>", "type": "app", "headline": "<Headline>", "subtitle": "<one line>", "showcase": "<abs path>/showcase.png"}]
What I expected
A generated, provenance-stamped PNG per part, carrying the style's gate and the attestation.
What happened
Every part failed, the same way each time:
batch: 1 part(s), style "<name>" (gated by <owner>/<gate page>), pace 2s
[1/1] <owner>/<slug> FAILED: state.lint is stale: the pose changed after it was measured (or it was never measured)
batch done: 0 ok, 1 failed; PNGs in generated/ (copy each to its part's docs/hero.png before publish)
Why
- In
drive.mjs, thebatchverb runs these calls for each part:POST api/pages,POST state(the style plus the part's headline, subtitle and page),POST showcase-file, thenPOST generatewithattest: {style, human, quote}. POST stateandPOST showcase-filebump the pose revision.server.js's automated Generate refuses whenlintMeta.poseRev !== poseRev(the #51 fix, around line 1446). Its own hint says: "GET /compose.png (hero-studio compose) re-measures lint server-side against the exact current pose, then retry".- Nothing in the batch loop composes, so the lint is always one pose behind and every part is refused. The human-gate path is exempt (
fromGate), which is probably why this didn't show up in testing.
Workaround (it worked for 10 parts in a row)
Per part, make the same calls as batch, plus one: a GET /compose.png after the state and showcase calls, before Generate.
POST /api/pages {owner, slug, title, type}POST /state {...style, page, headline, subtitle, showcase: {src: "", full: false, ...style.showcase}}POST /showcase-file {path, cover, chrome}GET /compose.png: lint is re-measured withlintMeta.source: "compose"at the currentposeRev.- Check
state.lintfor hard fails (none here; warns only). POST /generate {aiThread, attest: {style, human, quote}}, then pollstate._genfor a new file, asbatchdoes.
Each export's provenance records the style, its gate and the attestation, exactly as batch intends.
Suggested fix
- In
drive.mjs's batch loop,await fetch(BASE + 'compose.png')(or call the same server-side compose) after the showcase call. - Then read
state.lint: skip the part, with its findings inresults[], on any hard fail, and copy the warn findings into each part's result so the caller can see them. - A test that runs
batchon two parts against a saved style would catch this regression.
Minor, related
- SKILL.md's parts.json row lists
{ref, title, kind?, showcase?, headline?, subtitle?}, butbatchalso readstypeand defaults it tohardware. App pages need"type": "app", or they get the hardware pill and layout. Worth documenting. - With a saved style, every part's title runs at the style's fixed
fontSize. A longer headline than the gated page's ("Molecule placement, simulated" against a 3-word original) runs further into the showcase, and lint flags it as warnshowcase-el-title. A per-part fit (thefitverb) inside the style's limits, or a warn surfaced inresults[], would let the caller decide.