fix(docs): payload prose contract is snake_case, all six fields (repairs #15) - #17
Open
serenakeyitan wants to merge 1 commit into
Open
fix(docs): payload prose contract is snake_case, all six fields (repairs #15)#17serenakeyitan wants to merge 1 commit into
serenakeyitan wants to merge 1 commit into
Conversation
… the merged validator The row merged in #15 documented a camelCase rename (verdictHandle/quip) that the website never implemented: the merged validator + renderer (first-tree-website #183) read the snake_case names verbatim — report_lang, verdict, verdict_handle, verdict_quip, roast_tldr, hero_prose. A payload built per the old row stores dead camelCase keys and the hosted page shows neutral copy instead of the scan's own roast. Corrects the payload table + the hosted-report bullet to the real merged contract: snake_case verbatim, caps 10/40/120/240/1000/1000, non-blank, no control/bidi-override chars (\n allowed), report_lang zh… switches page chrome. Contract pair: first-tree-website src/pages/api/reports/index.ts (validateReport). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
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.
Summary
#15 (merged) documented the payload prose as a camelCase rename (
verdictHandle/quip) with a ≤500 quip cap. The website side that actually merged (first-tree-website#183) reads the snake_case names verbatim and validates six fields — so a scanner following the current table POSTs dead camelCase keys: they're stored but never validated or rendered, and every hosted report falls back to neutral copy instead of the scan's own roast.This PR corrects the Step 7 item 4 payload table and the Step 9.5 hosted-report bullet to the real merged contract:
report_lang,verdict,verdict_handle,verdict_quip(from scan-report.json) +roast_tldr,hero_prose(lifted from the md)report_lang≤10,verdict≤40,verdict_handle≤120,verdict_quip≤240,roast_tldr/hero_prose≤1000; no control/bidi-override characters (\nallowed)report_langstartingzhswitches the hosted page chrome to Chinese; missing fields → neutral copy (tdoc roast reserved for the sample ids)Contract pair:
validateReportin first-tree-websitesrc/pages/api/reports/index.ts(as merged in #183; hardening follow-up first-tree-website#188).🤖 Generated with Claude Code