Skip to content

fix(rollups): stabilize tied monthly themes and partial-month wording - #833

Merged
jmservera merged 1 commit into
mainfrom
fix/month-synthesis-determinism
Oct 12, 2026
Merged

jmservera merged 1 commit into
mainfrom
fix/month-synthesis-determinism

Conversation

@jmservera

Copy link
Copy Markdown
Owner

Publication blocker

Source-only fix for the valid review on #831: #831 (comment).

  • Count each tag once per week; rank by descending count, then tag name (including single-week synthesis and the top-five cutoff).
  • Bump synthesis version to invalidate already-cached nondeterministic output; downstream monthly/yearly consumers use the same ordered themes.
  • Replace October chapter wording "By month end" with "By the latest weekly report" so a partial month is not presented as finished.
  • Regression covers real rendered synthesis across PYTHONHASHSEED 1, 2, 7, 42, 101; tied counts, duplicate tags, count priority, top-five selection, cache invalidation/reuse, and October wording.

Validation

  • python3 -m ruff check .: passed
  • python3 -m ruff format --check .: 212 files passed
  • Affected synthesis/pipeline/yearly-evidence/sync tests: 99 passed
  • Full python3 -m pytest -q tests/: 2030 passed, 1 existing skip
  • git diff --check: passed

No generated artifacts changed. After source merge, production recovery must regenerate rollups on the data branch and verify the artifact before resolving the original data-review thread. Original PR831 thread remains unresolved intentionally. W42 video remains waiting; this PR does not authorize it.

Independent review is being arranged by the coordinator. Do not merge before latest-head CI, completed Copilot review, resolved source-PR threads, and that independent reviewer gate.

Rank distinct weekly tags by descending count then tag, invalidate cached synthesis output, and describe the latest October report without claiming month end.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ab74df71-7f3c-4a63-a324-7f030dd5e719
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused implementation resolves the reported nondeterminism and includes comprehensive regression coverage.

0 open findings

What changed in this PR

Fixes the nondeterministic monthly rollup behavior reported in PR #831 and corrects partial-month yearly wording.

Changes:

  • Deterministically ranks deduplicated weekly themes and invalidates stale synthesis caches.
  • Rewords partial-month transitions.
  • Adds regression coverage for ordering, hash seeds, caching, and wording.
File Description
scripts/​month_synthesis.py Stabilizes theme ordering and bumps the cache version.
scripts/​generate_yearly_narrative.py Avoids implying the current month has ended.
tests/​test_generate_rollups.py Covers deterministic output, cache refresh, and October wording.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jmservera

Copy link
Copy Markdown
Owner Author

READY FOR INDEPENDENT REVIEW at head 1e8c5bd064d8c1c3f557b3eed4f4a5e9ade8cd55.

All 18 latest-head checks passed, including Python/Ruff, lockfile, hydration parity, CodeQL/Bandit/Checkov/Zizmor, production build, Axe/responsive, Lighthouse and visual gates. Copilot completed review of this exact head at 2026-10-12T16:41:22Z: approval recommended, zero findings. Local affected suite: 99 passed; full Python suite: 2030 passed, 1 pre-existing skip. Working tree clean.

Coordinator must obtain the actual independent review before merge. Original #831 thread intentionally remains open until this source fix is merged and regenerated artifacts visibly demonstrate deterministic ordering and evidence-relative October wording. No generated checked-in files changed; no video approval performed.

@jmservera

Copy link
Copy Markdown
Owner Author

AI functional approval — Rusty, independent reviewer (not human signoff).

APPROVE exact head 1e8c5bd064d8c1c3f557b3eed4f4a5e9ade8cd55. Reviewed full diff and synthesis/cache/rollup/yearly paths; no blocking findings. Per-week duplicate suppression is preserved; descending-count/lexical ranking stabilizes ties and top-five cutoff. Version 9 invalidates old checksums without changing artifact schema. October transition is evidence-relative.

Independent python3 verification: old full renders produced 5 distinct outputs across 5 seeds; fixed renders produced 1, for both single/multiple weeks. Affected tests: 109 passed, 1 skipped. All 18 hosted checks passed; latest-head Copilot completed, zero unresolved threads; current with main. Merge eligible. Recovery still requires owning regeneration and W42 video completion, not merely green dispatch.

@jmservera
jmservera merged commit 78d41df into main Oct 12, 2026
19 checks passed
@jmservera
jmservera deleted the fix/month-synthesis-determinism branch October 12, 2026 17:03
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