channel-worker 2.5.6 → 2.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {
@@ -1257,6 +1257,19 @@ async function run({ page, payload, log }) {
1257
1257
  // of publishing).
1258
1258
  const pub = await findByVerbs(publishVerbs, { requireBottomHalf: true });
1259
1259
  if (pub) {
1260
+ // Strict-input contract: if the caller supplied a thumbnail_url but
1261
+ // we never opened the "Chỉnh sửa hình thu nhỏ" overlay (FB didn't
1262
+ // render it / DOM selector miss), refuse to publish — the reel
1263
+ // would otherwise ship with FB's auto-generated thumb and the user
1264
+ // sees no custom artwork. Surface as a hard failure so the daemon
1265
+ // retries with a fresh page load instead of silently shipping bad
1266
+ // output. (Observed on reel 1506614811005729: step 1 → click Tiếp
1267
+ // → publish, the thumb-edit pill never appeared.)
1268
+ if (thumbPath && !customThumbDone) {
1269
+ await dumpInventory(page, log, `thumb-step-missed-${step + 1}`);
1270
+ await dumpFailure(page, `thumb-step-missed-${step + 1}`, log);
1271
+ throw new Error(`FB publish: thumbnail_url provided but the "Chỉnh sửa hình thu nhỏ" overlay was never detected before publish (step ${step + 1}). Refusing to ship without custom thumb. Inspect dump screenshots in Temp\\cm-worker-pw\\.`);
1272
+ }
1260
1273
  log('info', `[fb-pw] click publish "${pub.verb}" via "${pub.sel}" (step ${step + 1})`);
1261
1274
  // Snapshot the captured-IDs list RIGHT BEFORE the publish click. The
1262
1275
  // network listener captures from EVERY graph response, including the