Skip to content

PROD-2310: count content/page prep failures instead of silently skipping#193

Merged
5PK merged 1 commit into
mainfrom
fix/prod-2310-content-page-failure-counting
Jul 23, 2026
Merged

PROD-2310: count content/page prep failures instead of silently skipping#193
5PK merged 1 commit into
mainfrom
fix/prod-2310-content-page-failure-counting

Conversation

@5PK

@5PK 5PK commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Content items that fail during payload preparation (missing model/container mapping, deleted target container, unresolved content reference) were counted only as skippedCount in content-batch-processor.ts, which never feeds totalFailed/totalSyncFailures — so these real failures never affected the sync exit code that PR PROD-2310: sync exits non-zero on failures and precondition aborts #182 wired up.
  • A channel-level exception from processSitemap in push-pages.ts set status = "error" (display-only) without incrementing failed, making a whole channel's worth of page failures invisible to the exit code.
  • Both now count as real failures with failureDetails entries, consistent with how batch-level API failures are already handled.

Follow-up to #182 (PROD-2310), reopened 2026-07-21 after Nick reproduced sync runs on 1.0.0-beta.13.22 that printed failure details in the ERROR SUMMARY but still exited 0.

Test plan

  • content-batch-processor.test.ts updated for the new failedItems field on prepareContentPayloads, including the stale-container-mapping case now asserting a failure instead of a skip
  • Full content-pusher, page-pusher, orchestrate-pushers, and core/push test suites pass (302 + 8 tests)
  • Have Nick re-verify against the Brightstar repro cases on the next beta build

🤖 Generated with Claude Code

Two classes of content/page sync failures never reached the exit-code
check PR #182 wired up, because they were counted as skips rather than
failures:

- content-batch-processor.ts: items that fail during payload prep
  (missing model/container mapping, deleted target container, unresolved
  content reference) only incremented skippedCount, which never feeds
  totalFailed/totalSyncFailures.
- push-pages.ts: a channel-level exception from processSitemap set
  status="error" (display-only) without incrementing failed, so a whole
  channel's worth of page failures was invisible to the exit code.

Both now count as real failures with failureDetails entries, so they
fail the sync exit code like batch-level API failures already do.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@5PK
5PK merged commit 3eed920 into main Jul 23, 2026
3 checks passed
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.

2 participants