hub: public pages build the site frame through one function, not a second assembly patched with str.replace
tsk-phjz93fq73zn Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: design (one frame built two ways).
What is wrong
public_pages._shell_frame(public_pages.py:303-359) rebuilds whatrender.stored_in_frame(render.py:1247-1284) does (chrome,public_frame,with_hero_cta), then edits the markup as text:href="?becomes the path-prefixed form, the<headerand<footertags getdata-served-path, and the sign-in href is re-parsed to add?next=.shell._served(shell.py:471-475) does anotherreplaceon the same elements to add thesite-ids.- A change to
_site_headeror_landing_footermarkup makes these replacements miss without an error.
Proposal
public_frameand_landing_footertake the base path, extra attributes and the sign-innextas parameters; both paths build the frame through that one function, no string patching.
Effort / risk: M. Medium; the served HTML must stay byte-identical (test_public_no_script, test_frame_headers).