Repository navigation
T41: the mark wired into both journal sites - #203
Conversation
install_mark.py takes psi.json straight through render_mark.render, so the four <path> elements the page inlines are byte-identical to the ones psi.svg draws. It copies psi.svg and the 180x180 Apple touch icon into web/public/assets/mark/ and rewrites the block between the mark:start/mark:end sentinels in index.html. --check re-renders the block and compares it, the two copied files and the two head <link>s byte-for-byte, so the page cannot drift from the committed mark. index.html inlines the glyph in a .wordmark flex row beside the title and links assets/mark/psi.svg as the SVG icon and assets/mark/psi-180.png as the Apple touch icon; style.css sizes .mark at 27x27, keeping a 1px border, a 7px radius and the page's palette variables. The journal site (superposition.github.io) is a Jekyll checkout with the same <span class="mark"> header glyph and the same notebook.css .mark rule: its assets install with --assets-only and its two layout edits are handed off in the pull request rather than pushed from here.
Revert the web/public/** wiring: ticket #58's file set is the two Jekyll sites, and the operator page gets its mark under its own ticket. assets/mark/install_mark.py now installs and verifies the committed favicon files in a site checkout (--site <checkout> [--check]) and prints the inline wordmark block the sites' layouts carry, so both external copies stay tied to psi.json -> render_mark.py -> psi.svg.
T41 follow-up: real shape is in-repo installer + two external PRsNew head The installer is retargeted to the external sites: The ticket's edits are two open, unmerged PRs:
Both heads replace the Verified on the pushed head: installer Main must decide: merge the two external PRs (the |
|
role: correctness Reviewed head Scope and ticket stepsThe in-repo diff is exactly the installer, and the two site edits now live where ticket #58 Step 41 puts them: Step 41's two external PRs are both merged now — The external edits, token for tokenThe four The favicon links are the ticket's form verbatim in both layouts, after The The glyph is replaced in place inside
Installer reproduced at this head
Committed asset identity holds across all three repos by git blob (so the LF/CRLF checkout question is irrelevant to content): Write/verify cycle in a throwaway clone (deleted FalsificationsA — byte drift refused (rc 1). Appended one B — geometry refused (rc 1). Removed one Because the byte compare fires first on any edit, B alone does not prove the SVG check is real. So I isolated it: corrupted the source Both falsifications were restored; Missing The ticket's own test, liveThe deployed bytes are the committed blob: Notes
VerdictApprove. The installer does what it says at this head (copy, |
First clean-room read of PR #203 at Head
Scope$ git diff --name-only $(git merge-base origin/main HEAD) HEAD
assets/mark/install_mark.py
$ git diff --name-status $(git merge-base origin/main HEAD) HEAD
A assets/mark/install_mark.py
$ git diff --name-status $(git merge-base origin/main HEAD) HEAD -- web/public/
# emptyThe diff over the merge-base The gate, and what it does not cover$ python scripts/provenance_check.py
provenance: compared 152 authored file(s) (1 generated skipped); 0 identical, 33 EOL-identical, 7 code runs over 20, 0 prose runs over 2
provenance: highest identical-code-line share 1.000 (.cargo/config.toml)
...
provenance: OK # rc 0The 1.
|
| Metric | Result |
|---|---|
| Byte-identical reference files | 0 |
| Longest identical code run | 2 — import struct / import sys (vs scripts/guard_camera_daylight.py) |
| Longest identical prose run | 1 — the shebang #!/usr/bin/env python3 |
| Prose runs > 2 lines | 0 |
| Max code-line share vs any reference file | 0.082 |
The 2-line maximum is stdlib import order, the forced form a clean-room cannot avoid. No
docstring, comment or logic line has a reference twin.
2. vs this repo's sibling generators: reuse by import, not copy
install_mark.py:38 is import render_mark, and the file reaches the mark through that
module — render_mark.load_spec, render_mark.render, render_mark.num,
render_mark.EXPECTED_PARTS, render_mark.SpecError — rather than restating any of its
logic. It is the house pattern (D-007): the geometry lives once in render_mark.py and is
consumed, never duplicated.
| Counterpart | Longest identical code run | Longest identical prose run | Code-line share |
|---|---|---|---|
assets/mark/render_mark.py (214 lines) |
2 — def main(argv=None) -> int: / parser = argparse.ArgumentParser( |
1 (shebang) | 0.157 |
assets/mark/build_mark.py (712 lines) |
2 — if __name__ == "__main__": / sys.exit(main()) |
1 (shebang) | 0.063 |
Both maxima are Python entry-point boilerplate — the argv/argparse pair and the
__main__ guard — not the mark logic and not prose. No passage of render_mark.py or
build_mark.py is reproduced.
3. The copies are byte-identical, and the sources are read-only
Committed blobs in this repo (git hash-object): psi.svg = 6f13363c67d33f8ac25fd4bf597a04490dcf8900,
psi-180.png = 39fb7c45f628a4af0eb256a5c1aadfa8a83da666 (sha256 42be74cb… / 5af594bc…).
The asset pairs the installer carries into the sites are those exact blobs:
| Repo (branch) | psi.svg blob |
psi-180.png blob |
|---|---|---|
superposition/superposition.github.io (main, assets/mark/) |
6f13363c… |
39fb7c45… |
superposition/mage (master, docs/assets/mark/) |
6f13363c… |
39fb7c45… |
Smoke of the install path against a throwaway checkout (C:/tmp/Rev203T41Clean/site):
$ python assets/mark/install_mark.py --site .../site
install_mark: wrote ...\site (4 paths, 2 assets) # rc 0
$ git hash-object .../site/assets/mark/psi.svg .../psi-180.png
6f13363c67d33f8ac25fd4bf597a04490dcf8900
39fb7c45f628a4af0eb256a5c1aadfa8a83da666 # == committed blobs
$ python assets/mark/install_mark.py --site .../site --check
install_mark: up to date: ...\site (4 paths, 2 assets) # rc 0
$ printf x >> .../site/assets/mark/psi.svg && python ... --check
install_mark: ... differs from ...\assets\mark\psi.svg # rc 1
$ rm .../site/assets/mark/psi-180.png && python ... --check
install_mark: ... is missing; run the script without --check # rc 1The script never rewrites the source assets. Its only write is
assets/mark/install_mark.py:148, assets.joinpath(name).write_bytes(source.read_bytes()),
where assets = site.joinpath("assets", "mark") — under the target checkout. HERE appears
only at line 136, as the read-only source side. After the install run, git status --porcelain assets/mark/ is empty and both source blobs are unchanged.
4. The emitted inline block matches both sites
--print emits the wordmark <svg class="mark" viewBox="0 0 100 100" aria-hidden="true"> with the mark's four <path> elements, taken verbatim from
render_mark.render (PATH_COUNT of them, else InstallError). I fetched both sites'
_layouts/default.html (journal main, mage docs/): their four d= strings are
byte-identical to the printed block — the pasted geometry cannot drift from the committed
favicon.
Verdict: approve. One new Python file, no reference twin, house-style reuse by import,
byte-identical assets, and a copy path that provably cannot mutate what it installs from.
Contract read of head Contract surfaces
1 — the installer belongs here, as the mechanismStep 41 names no in-repo file: its edits are four external paths. What the branch carries Its CLI tracks the house script shape exactly. Same as
2–5 — the external edits are the contract, and nothing else movedProgrammatic, not eyeballed: the layout The The full merged-vs-base diffs are the four paths each — no README, no config, no other 3 — the DoD, stated plainlyStep 41's test is The ticket's DoD template also names the package build/test, an aarch64 build and Pinkie Notes
Verdict: approve. The in-repo set is the installer alone and its CLI matches the |
T41 — the mark wired into both journal sites
Ticket
#58Step 41 names two sites:superposition.github.ioandsuperposition/mage.This branch carries the one piece of that work that lives in this repository — the
installer next to the committed mark — and the two site changes are the two open PRs
below. The earlier head of this branch wired the mark into the in-repo
web/pageinstead; that is reverted, because
web/public/**is not in the ticket's file set (theshipped page gets the mark under its own ticket).
What this branch carries
assets/mark/install_mark.pyinstall_mark.pycopies the committedassets/mark/psi.svgandassets/mark/psi-180.pnginto a site checkout (
--site <checkout>,--site <mage>/docsfor the site published froma subdirectory) and
--checkproves the copies have not drifted: byte comparison, theinstalled SVG parses to the four
<path>elements ofpsi.json, and the installed touchicon's IHDR is 180x180.
--printemits the inline<svg class="mark">wordmark block fromrender_mark.render, which is what the site layouts carry, so the pasted geometry cannotdrift either.
assets/mark/psi.json,render_mark.py,psi.svgandpsi-180.pngare unchanged fromorigin/main(they landed in T40, #57).By the same ruling,
web/public/README.md,web/public/index.html,web/public/style.cssand
web/public/assets/mark/**are restored toorigin/main:The two external PRs
Both carry the ticket's edits exactly, and both are prepared but not merged:
superposition.github.iomaint41-mark@fb9d76e_layouts/default.html,assets/notebook.css,assets/mark/{psi.svg,psi-180.png}superposition/magemastert41-mark@72ab4b4docs/_layouts/default.html,docs/assets/notebook.css,docs/assets/mark/{psi.svg,psi-180.png}Both heads replace the
<span class="mark" aria-hidden="true">∿</span>inside.wordmarkwith the four-
<path>SVG, add the tworelative_urlfavicon<link>s after{% feed_meta %}, change.markto the 27x27 box keeping border, radius and colour, andadd the byte-identical favicon pair.
magecarries the glyph (docs/_layouts/default.htmlwas re-read first, as the ticket asks), so both sites took the replacement path.
Verification
Asset identity with this repo's committed files, by blob hash (so it holds for the
committed bytes, not the checkout's line endings):
The installer's
--checkagainst both site clones, and the gate:The ticket's own test — the header renders the path and the favicon returns 200 — run
against both site branches locally (each layout rendered with
relative_urlresolved,served over loopback, driven in headless Chromium):
Installer error paths (throwaway harness, 37/37): a drifted copy, malformed SVG, wrong SVG
root, missing PNG and wrong PNG size each exit 1 with the reason named; a missing site
directory and a missing
--siteexit 2; a fresh install into an empty root passes--check;--printwrites nothing.Not verifiable here
The deployed URL needs the
superposition.github.ioPR merged and Pages rebuilt; theticket's command still reports the pre-deploy state:
Pinkie: this artifact is static files in two other repositories; there is no aarch64
artifact to build and the board is off-limits to non-board agents per host safety.
Closes #58