Topic
Notes from building
Measured notes on Cloudflare Workers, D1, OpenNext, SEO and crawlers; only what we measured, never costs or client data.
- Notes from building
Refactor without changing behavior: null and empty values
A tidy rewrite often changes what null, zero or an empty string turns into, and tests that call the function normally do not notice. How to catch it.
Notes from buildingLink previews: no card, wrong image, blank icon
A pasted link with no card, a template's stock picture or a blank tab icon: where the tags must live for scrapers, and how to prove the picture exists.
Notes from buildingSecurity headers that do not break the page
HSTS, framing, nosniff and a Content-Security-Policy, in an order that keeps the site working: what is safe to send today, and what to stage first.
Notes from buildingSoft 404: why a missing page answers 200 OK
An address that never existed should get status 404. When it gets 200, Search Console calls it a soft 404. Where the 200 comes from, and a safe fix.
Notes from buildingCodeTour files: a guided walk through a codebase
A CodeTour file is JSON in a .tours folder: a title plus steps aimed at files and lines. Write one that survives edits, helps a newcomer and is checked.
Notes from buildingMotion that hurts visitors: reduced motion and layout
Animation can make visitors dizzy or lock up a page. The common CSS motion mistakes, which WCAG criteria apply, and how to test reduced motion in DevTools.
Notes from buildingParse a Fixed-Width File and Log Lines to CSV or JSON
Fixed-width files, CSV and log lines look easy to split and lose data quietly. Padding, implied decimals, quoting, log fields and syslog, from the specs.
Notes from buildingForm Input UX Mistakes: Number Fields, Passwords, Long Data
Wrong keyboards, blocked paste, missing autocomplete tokens, and components that crack on long, empty or right-to-left data. How to find each before release.
Notes from buildingHow API keys and tokens leak out of application code
Leaked keys usually escape through a log line, an error body, a URL or a commit. Four leaks to look for, plus a grep check on the build that can fail.
Notes from buildingConvert HTML to Markdown, Keep Heading Anchors Working
Converting HTML to CommonMark without losing meaning, then writing a table of contents whose links land: how GitHub and GitLab turn headings into anchors.
Notes from buildingiCalendar files: time zones and all-day events
An .ics file imports and still shows the wrong hour or a day too long when time zones, all-day end dates, escaping or folding break RFC 5545. What to check.
Notes from buildingJSON Schema 2020-12 in OpenAPI 3.1: what changed from 3.0
A schema should accept the real examples and refuse what the rules forbid. What 2020-12 changes, what OpenAPI 3.1 inherits, and a test built to fail.
Notes from buildingMoving a mysqldump or pg_dump file into SQLite and D1
A dump file is a script for its own engine. What mysqldump and pg_dump write that SQLite rejects, what it misreads without a sound, and how D1 takes the file.
Notes from buildingManual test steps into a Playwright test that can fail
A written test case becomes a Playwright file through role and label locators, auto-waiting assertions and one test per scenario, then a deliberate red run.
Notes from buildingFree books on Project Gutenberg: rights and links
Project Gutenberg texts are free of US copyright only. What its license allows, when the header must go, and how to fetch books without getting blocked.
Notes from buildingReact and Next.js mistakes that pass tests and slow pages
Sequential awaits, oversized client boundaries, eager heavy imports, images without size, unstable props and missing Suspense: how to spot and measure each.
Notes from buildingGenerate a Regex From Examples: The Must-Not-Match List
Why the strings a JavaScript regex must reject define it more than the ones it accepts, with anchors, the u flag and \p{L} for non-English text.
Notes from buildingWhen a Remotion render differs from the preview
A Remotion render can flicker, lose images or differ between runs when motion ignores the frame number or assets are not awaited. Causes and a real check.
Notes from buildingHow to Write an On-Call Runbook Anyone Can Follow at 3 a.m.
How to read one operational runbook step by step for what fails a person at 3 a.m.: missing commands, no expected result, no stop point, hidden prerequisites.
Notes from buildingAuto-posting to social channels: duplicates and floods
Code that announces new articles on social networks fails quietly: double posts, a flooded first run, wrong trigger, cut text, a dead channel nobody hears.
Notes from buildingSQLite queries that return the wrong answer quietly
SQLite runs queries that other databases would reject and answers a different question. Division, text dates, NOT IN with NULL, COUNT, LIKE, GROUP BY, LIMIT.
Notes from buildingCompare Two Versions: Unified Diff and JSON Diff
How to write a unified diff from an old and a new text, and how to compare JSON by meaning, naming each changed value with a JSON Pointer path.
Notes from buildingImport Contacts Cleanly: vCard 4.0 and E.164 Phone Numbers
A vCard imports cleanly when its required lines, name and address fields and escaping follow RFC 6350, and its phone numbers are E.164 with a known country.
Notes from buildingA/B test readouts: when the conclusion does not hold
A readout can say a variant won and still be wrong. Five checks on how the test was stopped, counted and reported show whether the conclusion can be trusted.
Notes from buildingAgent loops: repeats, ceilings and self-grading
An agent loop that works on a quiet day can fail when a trigger fires twice or a goal never arrives. Three structural checks keep it safe to run alone.
Notes from buildingAuditing what an agent says it did, using its log
An agent's summary is a story about the session; the tool log is the record. How to test each sentence of the summary and see what the record backs.
Notes from buildingCloudflare image quota and WebP traps
A free monthly quota of unique transformations, a fallback that hides it running out, and lossy WebP that greys thin text. How to keep the pipeline honest.
Notes from buildingRate limiting on Cloudflare: rules, Workers, 429
A rate limit that looks fine in the dashboard can count the wrong thing, in one location only, or on the wrong key. WAF rule, Workers binding, 429.
Notes from buildingCSS Grid and hydration bugs in Next.js pages
A grid column that will not shrink, a date that differs between server and browser, an env variable that is undefined: bugs a desktop screenshot never shows.
Notes from buildingMoving mail and DNS without losing messages
A mail cutover rarely fails with an error. Cached MX records, two SPF records, deleted keys and an early strict policy lose mail while every screen says done.
Notes from buildingFlaky tests: six causes and how to tell them apart
A test that fails once in a while on good code has a cause you can name. Six common ones, the clue each leaves in a failing run, and the fix for each.
Notes from buildingGA4 limits that quietly cut a tracking plan
A plan can look complete on paper and still lose events, parameters and dimensions. The published GA4 limits and naming rules are worth checking first.
Notes from buildingWhat breaks in HTML email on Outlook and Gmail
Email clients draw markup by their own rules, not a browser's. Four web habits often break it: flex columns, head-only styles, missing alt, bare backgrounds.
Notes from buildingIAM policies: the wide permissions that pass review
A short AWS IAM policy can still hand out far too much. Five patterns pass review because they look tidy: star grants, role passing, NotAction and more.
Notes from buildingNext.js caching: ISR, cache tags and redirects
Five caching mistakes in a Next.js project that pass every local run: ISR that never starts, a stale cache key, tag storms and redirects over cached 404s.
Notes from buildingWhat counts as a breaking change in an OpenAPI spec
A breaking change depends on which way the data flows. Requests may loosen and responses may tighten; the reverse breaks clients. A field guide with examples.
Notes from buildingFrom Postgres or MySQL to SQLite and D1: what breaks
Moving SQL from Postgres or MySQL to SQLite and D1 mostly parses fine and then misbehaves. Keys, enums, dates, division, upserts and D1 limits explained.
Notes from buildingWhy your prompt cache never hits, and what it saves
A prompt cache pays only when the start of every request is identical and calls come often enough. The usual reasons it misses, and a way to check.
Notes from buildingReDoS: the regex that locks your server
A single pattern in a validator can pin a Node process when the input is crafted to fail. Here is why it happens, how to spot it, and how to fix it.
Notes from buildingSpending ceilings that really stop the spending
A budget alert tells you about spend after it happens. A ceiling only counts if the paid call has to pass it. Here is how to test which one you have.
Notes from buildingStripe webhook mistakes that lose or repeat payments
A Stripe webhook endpoint is a public URL that moves money and access. Five coding mistakes let a forged request or a plain retry do the wrong thing.
Notes from buildingTerraform plan: what to read before you press apply
A plan is a preview of what will be destroyed, replaced or opened. Read the action symbols, the replacement reasons and the firewall lines before you approve.
Notes from buildingA test that can never fail measures nothing
A green check only counts if it would turn red when the thing it guards breaks. Here are common ways a test cannot fail, and how to prove yours can.
Notes from buildingWhy a patch fails to apply: broken unified diffs
A patch is rejected when its hunk counts, context lines, line endings or last-line marker disagree with the file. How to spot each and test before applying.
Notes from buildingWatchdogs that stay silent or mail too much
A watchdog fails quietly in two ways: it says nothing when a source dies, or it mails so often that nobody reads it. Where the clock, limit and mail go wrong.
Notes from buildingCORS settings that let other sites read your API
CORS only decides which web pages may read a response in the browser. Reflected origins, wildcards with cookies, null and sloppy patterns undo that decision.
Notes from buildingCommon Content-Security-Policy mistakes
A Content-Security-Policy only helps if it forbids what an attacker needs. The usual ways a policy ends up permitting injected script, and how to check yours.
Notes from buildingWhat a Dockerfile review should catch
A Dockerfile can leak a secret, run as root, break the build cache or ship build tools. Seven checks a reviewer can run by reading the file, with safe forms.
Notes from buildingWhat makes a GitHub Actions workflow dangerous
Five mistakes in a workflow file let a stranger run commands or read secrets: risky triggers, injected text, loose pins, a wide token and leaked values.
Notes from buildingWhat verifying a JWT must include
Checking a token signature is not enough. Which algorithm, issuer, audience, expiry and key id your code insists on decides whether a forged token gets in.
Notes from buildingKubernetes manifest settings that affect safety
Which fields in a Kubernetes manifest decide how safe and stable a workload is, what each one changes, and what to write instead of the risky default.
Notes from buildingOAuth redirect flow mistakes that leak logins
Most OAuth sign-in breaches happen at the redirect, not in the token. Prefix matching, a missing state check, no PKCE and open redirects, each with a test.
Notes from buildingPostgreSQL migrations that lock a busy table
Which schema changes in PostgreSQL block reads or writes on a live table, why each one does, and the safer sequence of statements to use in its place.
Notes from buildingRetry policy mistakes that turn a blip into an outage
A sound retry policy needs jitter, caps, idempotency, a read of Retry-After and a budget. Here is each piece, and the storms that follow when one is missing.
Notes from buildingPages Not Indexed on Cloudflare Workers: 500s Under Load
A site on Cloudflare Workers looked healthy page by page, yet half its pages failed under a burst. What caused it, how we fixed it, and a two-model test.
Notes from buildingCloudflare Web Analytics: link previews are not readers
Link previews, our own browser checks, a cache host and an EU setting skew Cloudflare stats. We gave 21 dashboards to two models, with and without a skill.
Notes from buildingDoes cookieless analytics need consent in the EU?
No cookie is not the legal test, and EU sources disagree on analytics. We read the texts, then watched a fresh browser load analytics, video and fonts.
Notes from buildingOpenNext R2 cache: old builds pile up, 41 GB cleaned
OpenNext writes every deploy to a new folder in R2 and never removes the old ones. How we found the live build, what we deleted, and what a model got wrong.
Notes from buildingGemini fallback chains: when an empty 200 should move on
Our model chain stopped while another model would have answered. Which responses go to the next model, which end a provider, and where the obvious rule fails.
Notes from buildingWhich SQLite queries quietly read the whole table
We put 30 query shapes through the SQLite planner. A prefix LIKE scanned a normal index, and an OR we had blamed for full scans was fine on its own.