Skip to content

docs: scheduled-publish wrap-up (#13) — per-image fan-out, ingested sortAt, model3dId - #332

Merged
JustMaier merged 2 commits into
mainfrom
docs/scheduled-publish-wrapup
Jul 17, 2026
Merged

docs: scheduled-publish wrap-up (#13) — per-image fan-out, ingested sortAt, model3dId#332
JustMaier merged 2 commits into
mainfrom
docs/scheduled-publish-wrapup

Conversation

@JustMaier

Copy link
Copy Markdown
Contributor

Task #13 of docs/design/scheduled-publish-execution-plan.md — final doc pass for the shipped scheduled-publish effort (PRs #325/#326/#328/#329/#330). Docs-only; no code changes.

What changed

docs/design/pg-sync-v2-final.md

  • Post publish fan-out documented as per-image materialized (type: fan_out_per_row, PR trigger_gen: per-image materialized Post fan-out (fan_out_per_row) + sortAtUnix #325), resolved transactionally in PG (WHERE postId = NEW.id) — no longer a queryOpSet. Old shape kept for history.
  • Shared, unhashed STABLE PG op-builders bitdex_post_fanout_ops(_p "Post") / bitdex_image_sortat_ops(_i "Image") documented, with the disjointness invariant (PR-m2) and the re-emitter binding.
  • ModelVersion/Model stay on queryOpSet (can fan out to millions) — made explicit.
  • Computed→Ingested sortAt: computed: block dropped, sortAtUnix → sortAt ms→seconds mapping; ops may trust Image.sortAt (BEFORE trigger recomputes on write) but the dump never trusts it (PR fix(dump): sortAt must never trust the Image.sortAt column (no-backfill decision) #328, ~92M stale rows); model3dId indexing.

CLAUDE.md — Sync V2 section reflects the new fan-out shape, ingested sortAt, and model3dId.

docs/design/scheduled-publish-design.md

  • §1 "Image.sortAt written by NOTHING" corrected to the verified history (2024 migration built the triggers; Post-side neutered by a programmability name-collision; new_image_sort_at/update_new_image_sort_at verified absent from prod pg_trigger/pg_proc per zuri's live-prod check).
  • §2.D marked EXECUTED with the no-backfill decision (fix(dump): sortAt must never trust the Image.sortAt column (no-backfill decision) #328) and W1-4's dominant-class finding (visible-but-misordered, 7–28%, not the invisible class).

docs/design/scheduled-publish-execution-plan.md — W4 step 2 no-backfill correction note.

FOLLOWUP.md — 7 residuals: over-cap fan-out skip (baseModel/poi), flaky flush-observation tests (#330 + residual), retired combinedNsfwLevel in Meili builder, frankenstein-doc latent bug, MV publish cascade cost, stage_dir isolation, E2E population gap.

docs/HANDOFF.md — scheduled-publish design-chain pointer + W4 rollout state (model-share migration PRs in review, prod hand-apply held for Justin).

Verification

Ground-truthed against the merged commits (Explore agent, file:line evidence) and against zuri's live-prod PG verification. The §1 name-collision "why" comes from the W1 migration archaeology relayed by the coordinator; confirmation from w1-migration is pending (message out) — will amend if it corrects.

🤖 Generated with Claude Code

JustMaier and others added 2 commits July 17, 2026 10:20
… model3dId (#13)

Documents the shipped scheduled-publish effort (PRs #325/#326/#328/#329/#330)
across the doc set:

- pg-sync-v2-final.md: Post fan-out is now per-image materialized
  (type: fan_out_per_row) not queryOpSet; shared PG functions
  bitdex_post_fanout_ops / bitdex_image_sortat_ops; sortAt ingested (computed:
  dropped), dump never trusts the column; ModelVersion/Model stay queryOpSet.
- CLAUDE.md: Sync V2 section reflects new fan-out shape + ingested sortAt +
  model3dId.
- scheduled-publish-design.md: §1 history corrected (2024 migration triggers,
  Post-side neutered by name-collision, new_image_sort_at absent from prod
  pg_trigger per zuri's live verification); §2.D marked EXECUTED with the
  no-backfill decision and W1-4 dominant-class (visible-but-misordered) finding.
- execution-plan: W4 step 2 no-backfill correction note.
- FOLLOWUP.md: 7 residuals (over-cap fan-out skip, flaky flush tests, retired
  combinedNsfwLevel, frankenstein docs, MV cascade cost, stage_dir isolation,
  E2E population gap).
- HANDOFF.md: scheduled-publish design chain pointer + W4 rollout state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prod evidence (sortat-divergence-specimens-2026-07-16.md PR-m5 + execution
plan corrected [PR-B2]) established that scheduled slots are ALIVE with
isPublished=false (quarantine branch), NOT deferred-map-resident, so Tf
activation is an overdue-sweep shadow flip, not activate_due. The re-emitter is
therefore a co-driver of activation, not a pure safety net. W3 confirmed the
no-op case (sweep alone flipped isPublished + preserved ingested sortAt, 14/14
E2E). Fixes fact #1 + the §7 'does not drive activation' bullet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JustMaier
JustMaier merged commit f2a04d5 into main Jul 17, 2026
4 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.

1 participant