fix(generation): do not overwrite real tool reports with placeholders - #73
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Catalog fill, ensure-tool-report extraInputs, and overlapping generate/visit races all persist through persistOnDemandToolReports. A later success+placeholder payload could replace a stored palmistry (or other) reading. Match Stage B's keep-existing guard so a failed refresh cannot destroy a real report. Co-authored-by: Andy Oliver Rozario <andyrozario7@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
placeholder: truepayload.persistOnDemandToolReportsnow matches it. First-time placeholders still persist when nothing real is stored, and sibling tools in the same batch still write.Why this change is safe
persistOnDemandToolReportstreatedstatus: "success"+placeholder: trueas a normal write. Palmistry (vision API failure), Feng Shui (analysis catch), and other orchestrator tools return success+placeholder instead offailed, so a later persist clobbered the real report.ensure-tool-reportand a catalog batch can both persist; if the later write is a placeholder, the stored reading is destroyed. Feng ShuifacingDirectionextraInputs force-refresh has the same overwrite if generation returns a placeholder.Verification
pnpm exec eslint lib/onDemandToolReports.ts tests/unit/onDemandPlaceholderOverwrite.test.tspnpm test— 74 suites / 400 tests passedpnpm run lint:securitypassedRegression prevention
tests/unit/onDemandPlaceholderOverwrite.test.ts(would fail before this change: placeholder persist wrotepalmistryonto the profile patch).Release checklist (solo-friendly)
CI / Lint + JestCI / Playwright smokemain.