Skip to content

Fix stale tool reports after birth-data regeneration - #53

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-9e56
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-9e56

Conversation

@cursor

@cursor cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

What changed

  • After a user changes birth data and clicks Generate, only natal charts were rewritten. Other stored tools (tarot, numerology, etc.) and Main Seer context kept serving readings computed for the old chart.
  • Generate Full Report now clears catalog reports whose generationIdempotencyKey does not match the new profile hash (and drops Seer Master). Tool pages and Main Seer treat hash-mismatched reports as not ready so they regenerate on visit instead of displaying stale data.
  • Bug introduced by on-demand generation on main (364fc4f). No separate issue link.

Why this change is safe

  • Root cause: persistOnDemandToolReports merges natal charts only; useEnsureToolReport skipped work whenever hasReport was true, with no hash check. Main Seer packed those leftover reports.
  • Scope is limited to hash freshness on generate, client readiness, and Seer packing. Unchanged-hash generate still skips. Legacy reports without a key still display so we do not force a catalog-wide regen.
  • Risk areas reviewed: profile generate, comprehensive mystical profile reads, Main Seer context. Auth/payments untouched. Natal charts are kept through the clear (keepSlugs: vedic, western) and then overwritten by the natal persist.

Verification

  • ESLint on touched files (pnpm exec eslint …)
  • pnpm test (376 passed)
  • pnpm run lint:security
  • Playwright smoke (auth-gated; not run in this environment)

Regression prevention

  • Added/updated tests that fail without the hash check: tests/unit/staleCatalogReports.test.ts, tests/unit/mainSeerContext.test.ts, plus cases in report-readiness, profile-generate, and mainSeerTools.
  • Unchanged-hash generate still returns alreadyGenerated and does not clear the catalog.

Release checklist (solo-friendly)

  • CI is green:
    • CI / Lint + Jest
    • CI / Playwright smoke
  • Ready to merge to main after review.
  • Post-merge: change birth time, regenerate, open Tarot and Main Seer — old reading must not appear; Tarot should regenerate on visit.
Open in Web View Automation 

On-demand generation only rewrote natal charts when birth data changed,
so tarot/numerology/Seer context kept showing readings for the old chart.
Clear mismatched catalog fields on regenerate and treat hash-mismatched
reports as not ready in the client and Main Seer packer.

Co-authored-by: Andy Oliver Rozario <andyrozario7@gmail.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
future-seer Ready Ready Preview Aug 22, 2026 11:13am

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