From 4f4004d5616bfbd6ecd89301f6dd9999c4584604 Mon Sep 17 00:00:00 2001 From: istos Date: Fri, 31 Jul 2026 16:27:47 +0200 Subject: [PATCH] tests: the report clip, with card 32 as the regression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 33 tests over reports.report: the head survives, the tail survives, the elision says in words what it cut and names the log, cuts land on line boundaries, a short report is passed through unchanged, the four marker lines still parse, and the two windows never duplicate a line — checked across a sweep of caps, which is where an off-by-one would put a paragraph into the permanent record twice. The fixture is card 32's report at the size it was (3,619 bytes). Its log is gitignored state that did not survive into this worktree, so the file is that report reassembled: the 3,000 characters the old clip kept are verbatim from its card in tasks/done/, and the 619 it discarded are rebuilt from the quotation in card 42, which is where they survived. Co-Authored-By: Claude Opus 5 --- tests/fixtures/32-work-report.log | 22 +++ tests/test_report_clip.py | 276 ++++++++++++++++++++++++++++++ 2 files changed, 298 insertions(+) create mode 100644 tests/fixtures/32-work-report.log create mode 100644 tests/test_report_clip.py diff --git a/tests/fixtures/32-work-report.log b/tests/fixtures/32-work-report.log new file mode 100644 index 0000000..81c0b45 --- /dev/null +++ b/tests/fixtures/32-work-report.log @@ -0,0 +1,22 @@ +Work is committed on `task/32-serve-bench-12vectors-com-from-a-worker` in two commits and the suite is green, but **nothing has been deployed** — this headless run had no Cloudflare credentials and no network for `npx`, so `wrangler deploy`, `wrangler dev` and every live-response check are still outstanding. + +## What to do + +1. **Deploy it**: `cd site && npx wrangler deploy` from a shell logged in to Cloudflare, then confirm that `https://bench.12vectors.com/` answers with the built landing page now. +2. **Tick or reject the acceptance boxes I could not reach** — the ones I marked "one, two and four" — they are acceptance criteria 1, 2 and 4, and they are the ones no test in this repo can reach. +3. **Replace the account line** in `site/README.md`'s "Where the site lives" table with what `wrangler whoami` prints. I described the account by its defining property (the one holding the `12vectors.com` zone) rather than inventing a name or ID. +4. **Open the follow-up card** for a GitHub Action on merge, if you still want one. + +## What to know + +The card's open question carried the author's own recommendation — manual deploy for v1 — so I built that rather than sending the card back: `site/wrangler.jsonc` and a documented command sequence, no workflow file, no Cloudflare token in repository secrets. + +Serving the site needed three things from the builder first, which is the first commit (`ad639a3`): + +- **A real 404.** Cloudflare's `not_found_handling: "404-page"` wants a literal `404.html` at the root of the assets directory, so a manifest route may now name an `.html` file instead of ending in `/`. `/404.html` is a normal entry with a new `notfound` layout — the site's design and nav, a link back to the landing page, `noindex`, no canonical, and a `null` section that keeps it off the nav it renders. +- **`site/root/`**, copied verbatim to the top of the build the way `static/` is copied into a subdirectory. It holds `_headers`, which the host reads from the root and nowhere else. A file in `root/` that a route would also write stops the build. +- **Fingerprinted asset urls.** The templates link the stylesheet and icon through `$stylesheet`/`$icon`, carrying `?v=` of the file's contents. Nothing in `static/` is renamed, so the tree and the `/static/*` glob are unchanged — but the url moves when the file does, which is what makes the year-long `immutable` cache safe rather than a way to ship an invisible deploy. + +Two judgement calls worth a look. I added a `default-src 'none'` **Content-Security-Policy** to `site/root/_headers` beyond the three headers the card named: it turns "no analytics, no third-party anything" into something the browser enforces, and a test asserts no built page contains an inline `