November 26, 2026 · 36 min read
What 148 bugs taught me
The bug log of a club system I built over four months with an AI partner: 148 entries, each one a symptom, a root cause and a rule. The most instructive ones come with their stories; the rest are in the full list.
Last summer I started building a website for a student club. Calling it a “website” is a little unfair, honestly: today MVK (Medeniyet Vizyon Kulübü, a student club at my university) runs on a small system that handles membership, event registrations, QR tickets, attendance that works even without internet, a points ledger, badges, verifiable participation certificates and board applications. Under the hood there’s Next.js 16, PostgreSQL 17, Drizzle and Docker. Images are built in GitHub Actions and pushed to GHCR, and the server goes live from behind a Cloudflare Tunnel without opening a single port to the internet.
The first commit landed on August 1st, the 249th on November 24th. Roughly four months, on my own; well, as the only human. Claude Code was by my side from start to finish. Today the test count sits at around 4,100.
Along the way I kept one more thing: a bug log.
What is this log?
For every bug or trap, the same four questions: what was the symptom, what was the root cause, how was it fixed, and what rule should it turn into for the next project? Today the log stands at 148 entries.
The real reason it exists is that it’s a handover document. A new site is going to be built for the same club, and whoever builds it (most likely an AI agent, once again) is expected to read this list before writing a single line of code. The idea is simple: let’s not pay for the same bug twice.
Some entries are a one-line setting, others are chains several layers deep. But most of them have one thing in common: they’re silent. No error on screen, tests green, everything looks fine; and yet something is wrong. In this post I’m sharing the whole log. A few stories first, then all of it.
On writing code with an AI
I don’t want this to be an “I wrote code with AI and it was amazing” post; I don’t want it to be an “AI broke everything” post either. The truth is somewhere in between, and a bit more boring.
What shaped how the work went was rules, and a good chunk of those rules came straight out of the bugs in this log:
- Plan first, code second. For every slice, what’s going to be done gets explained, I approve it, and only then does it get written. Commit once the full test run is green.
- Push only with my explicit permission. Saying “it’s urgent” is not permission to push.
- Only I log into the server. The agent doesn’t SSH; it gives me the commands, I run them and paste the output back. Nobody touches the live database; test runs happen on a throwaway database.
- “The tests are green” is not evidence. When a guard test is written, the thing it claims to measure gets broken on purpose, we watch it go red, and then the change is reverted. As the log puts it: a false green is worse than a failing test.
The log also carries some marks that are unique to working with an AI. Next.js’s dev server would shut down after the first request once it noticed it was running under an agent (#48); the version before that wrote its own instruction block into the CLAUDE.md file (#49). On Windows, the tools set traps too: a Python script written inside Bash turned a backslash into a control byte, and a guard test stayed green no matter what (#107).
But I don’t think those are the real lesson. One of the most expensive bugs, the permissions bug I’ll get to in a moment, came out of the gap between the two of us: I had said a decision out loud but never written it into the plan. When you’re working with an AI, a decision that isn’t written down simply doesn’t exist.
The most instructive ones
Capacity: the two-person test lied
Events have a capacity. The classic trap goes like this: first count how many people are registered, and if there’s room, add one more. If two requests arrive at the same moment, both see “there’s room”. We knew this from the start, so the rule was clear: the event row gets locked with FOR UPDATE; waitlist promotions and cancellations happen in the same transaction, under the same lock.
The interesting part showed up in testing. To see whether the lock was really doing its job, we removed it and ran the tests. The “two people, last seat” test passed even without the lock; two requests usually just fall into line on their own. The “ten people, capacity three” test, on the other hand, found six registrations instead of three and went red.
Under Postgres’s default READ COMMITTED isolation, burying the count inside a single INSERT … SELECT doesn’t save you either, because the subquery still reads the same snapshot. Since you can’t lock registration rows that don’t exist yet, you lock the parent row instead: the event.
We ran into something similar with the “last president” check (#3): the count was correct, but because the excluded row wasn’t locked, two operations could slip through at once. Whether a lock works depends on what it locks, not on what it counts.
The rule: race tests are written with 10–20 concurrent requests, and you watch them go red with the lock deleted. A race test you’ve never seen fail is most likely testing nothing at all.
A title is not a permission
This one isn’t technical; maybe that’s exactly why it’s the most instructive.
Early in the project I’d said, “The Board and the President shouldn’t be things that grant permissions on the site.” But I never wrote that decision into the plan document. And the code did the exact opposite: the president sat at the top of the role ladder, and the Club President could assign roles, permanently delete things, close accounts and send mass emails. Without the site owner knowing.
The fix wasn’t a small patch, it was a change of model. We called it “zero trust”: the default answer is “no”. A role is now just one of three values: member, staff, site owner. Titles like president are for display only; a titleholder can only send requests. Permissions are fine-grained, per person, time-limited, and granted only by the site owner. Heavy operations go through a request → approval queue; nobody gets to decide on their own request, and a rejection requires a reason. The old role ladder was ripped out entirely.
A yardstick we’d set earlier for telling roles and titles apart came in very handy here too: “If it changes the gate’s answer, it’s a role; if all it does is print a label, it’s a title.”
The rule: a verbal architectural decision from the user gets written into the plan the same day. If you’re working with an AI, this rule counts double.
The vulnerability we called “high, but it doesn’t affect us”
During a dependency audit, Next.js’s “remote code execution via AVIF” advisory showed up, along with the sharp/libheif vulnerability underneath it. First impression: far-fetched. next/image was only used for logos.
But images.localPatterns wasn’t defined. Which meant Next’s image optimization endpoint would process any local path on the site, including media uploaded by members. The chain went like this: a member uploads an image; the upload check looks at the file’s first bytes, while sharp detects the format on its own; the optimization endpoint hands the file to libheif; and the server is exactly the environment the advisory is talking about when it says RCE.
Instead of assuming, we measured. In a production build, requesting user media through the optimization endpoint returned 200, and the file had been resized; so it really was going through sharp.
The fix had two layers, and both were done in the same slice. The version upgrade closed this particular vulnerability. Narrowing localPatterns down to brand files only closed the whole class of vulnerability: user input no longer reaches the optimizer at all, and it won’t reach it when the next decoder bug comes along either. User media is served with a plain <img>, and there’s a guard test that catches that line being quietly added back. If the second layer had been pushed to a separate slice with a “we’ll do it later”, we would have shipped with just one layer.
The rule: before you say “high, but it doesn’t affect us”, actually try the chain.
Red tests, green CI
The test step in CI was roughly something like npm test | tee cikti.txt. Looks innocent. But in GitHub Actions the default shell runs as bash -e, and pipefail isn’t on. A pipeline’s exit code is the exit code of its last command; the last command is tee, and that almost always succeeds. The result: the step goes green while the tests are red, and an image gets built from a red tree.
The fix is basically one line:
defaults:
run:
shell: bash
When you explicitly set the shell to bash, Actions runs it with -eo pipefail. But we didn’t blindly trust the one-line fix either: on a separate branch, with a canary that fails on purpose, it was verified over two runs on real CI.
The rule lands in the same place again: if you’ve never seen a check go red, it being green tells you nothing.
The build nobody started
Toward the end of the project we designed an automatic update pipeline: Dependabot opens a PR; if the full CI gate is green, patch and minor versions merge on their own; after the merge, an image gets built and pushed to GHCR; the server pulls the new image weekly, and if the health check fails, it rolls back to the old version by itself. Major versions and images carrying migrations still wait for a human.
While planning it, we tripped over a critical line in GitHub’s docs: a merge or push made with GITHUB_TOKEN doesn’t start a new workflow. So if we’d built auto-merge on that token, the PR would merge, everything would look green, but the image would never get built. Silently.
The fix was to trigger CI explicitly after the merge (gh workflow run). One more thing got fixed in the same round: the latest tag was being pushed before the checks, meaning a broken image could land through the automatic pipeline. The order is now build → check → sha tag → latest last.
We caught this one before living through it, just by reading the docs. That’s a lesson of its own: before you trust an automation, also read what it doesn’t trigger.
It said “saved”. It didn’t.
The log itself calls this one “the sneakiest”, and it’s right.
Here’s the symptom: if the page loads and, before React finishes hydrating, you type something into a pre-filled text area and hit save, a green “saved” message shows up on screen, but it’s the old text that goes to the database. Reproduced eight times out of eight. If you “select all” and type during hydration, this time the old and new text get merged and saved as a single string; five out of five. On top of that, it only happens on a slow device or a slow network. On a fast dev machine, you’ll never see it.
Root cause: React 19.2.4, during hydration, rewrites the value of a filled textarea with the content that came from the server. Whatever the user typed in the meantime gets overwritten.
The fix has two parts. A small capture script at the top of the page keeps track of what the user types; and a component called MetinAlani (roughly “TextField”) puts the typed text back if, after hydration, the value still equals the default. Using a bare <textarea> is forbidden by a guard test. React was also pinned to this version, because the workaround was measured against exactly this version’s behavior; when an upgrade pulled React to a different version, it was rolled back.
Luckily, no real record got corrupted in production. The rule: pin React; before upgrading, run the same scenarios with the workaround turned off, and if they don’t go red, the workaround can be removed.
A few rules I took away from this list
Line up a hundred and forty-eight entries side by side and certain sentences keep coming back to you:
- A silent failure costs more than a loud one. Let a missing environment variable crash the app at startup, let a migration stop when it’s in doubt, let errors be called by their name. As the log puts it: a warning gets lost in the logs; a gate doesn’t.
- A false green is worse than a failing test. A cron job turned out not to have run once since phase two, while its tests were green (#41). Break your guard on purpose; and a red that shows up without an unchanged baseline run doesn’t count as evidence either.
- Don’t say “flaky”, measure. The failure counts of tests we thought were flaky turned out to correlate with run duration, but one of them was a real bug (#62).
- Dead code that looks alive is worse than no code. The permission functions were written, their tests were green, but nothing ever called them (#134).
- Confirmation and logs instead of locks. The “it’s irreversible, let’s lock it” reflex ends up blocking the fix too, one day (#145).
- Writing the text is the cheapest way to audit the system. While writing the privacy notice, we found three silent pieces of code debt (#127).
None of these rules are new; I’d read every one of them somewhere before. The difference is that now each one has an entry number behind it.
The full list
Below are all 148 entries, with their numbers from the log. Each line roughly follows “symptom → root cause → rule”. Since MVK is a system running live, I’ve kept some details about the server, the infrastructure and security at a conceptual level; every vulnerability described here is one that has been closed.
Database, Drizzle and Postgres
- #1 A constraint violation returned a 500 instead of “this name is taken” → Drizzle wraps the driver error inside
cause, so the outer error code is empty → read the Postgres error code by walking the chain, from a single helper; test with a real constraint violation. - #2 With the lock removed, 6 registrations got written to an event with a capacity of 3; the 2-request test passed even without the lock → under READ COMMITTED the count sees the same snapshot →
FOR UPDATEon the parent row; race tests are written with 10–20 concurrent requests. - #3 The “how many presidents are there besides this person” count was correct, but two operations got through at once → the excluded row wasn’t locked → a lock depends on what it locks, not on what it counts.
- #4
FOR UPDATEcan’t be used together with aggregate functions → instead ofcount(*), select the rows and lock them. - #5 The log order looked reversed →
now()gives the transaction’s start time, and a transaction waiting on a lock may have started earlier →clock_timestamp()for event order. - #6 On an append-only table, the trigger rejected a foreign key with
set nullbehavior →set nullis actually an UPDATE → think about foreign key behavior together with triggers and CHECKs. - #7 A row trigger wasn’t enough to protect the ledger → TRUNCATE doesn’t fire row triggers → a separate BEFORE TRUNCATE trigger.
- #8 NULL bit from two directions: a UNIQUE on a nullable column allowed unlimited anonymous votes, and manual corrections in the ledger were only working by accident → NOT NULL; write a partial constraint’s predicate out explicitly.
- #9 A single non-UUID ID crashed a member’s entire points page → a text column was being joined against a UUID column → an ID coming from a form goes through UUID validation first.
- #10 You can’t put
now()in a partial index → “open” and “valid” are not the same thing → the gate asks about the end time separately. - #11 A settings group with no row couldn’t be locked →
FOR UPDATEneeds a row → advisory lock; every path that writes to that group takes the lock first. - #12 A constraint violation was poisoning the outer transaction → catch it inside a nested SAVEPOINT; the user sees “couldn’t be applied” instead of a 500.
- #13 Rolling back one migration silently stripped another table’s protection too → the trigger function was shared → a separate function per table.
- #14 A CHECK can’t see other rows; writing the end as “23:59” left half a second outside both periods → EXCLUDE for overlaps, half-open
[)ranges. - #15 Had the partial index predicate been written as
durum <> 'kapali'(status is not “closed”), a row pending verification would have blocked the real site owner and locked up the setup → write predicates positively:durum = 'aktif'(status is “active”). - #16 drizzle-kit generate produced an extra CHECK → hand-written SQL hadn’t been reflected in the snapshot → read the generate output every time; if there’s hand-written SQL, sync the snapshot.
- #17 Two concurrent migration runs produced “relation already exists” or duplicate records → Drizzle’s migrator doesn’t take a lock → advisory lock + a concurrency test.
- #18 A down migration was blocked by rows with new values → the CHECK/NOT NULL being re-added trips over those rows → the down migration cleans those rows up first; if there’s an audit trail, it stops.
- #19 An ambiguous data migration situation → a migration doesn’t guess when in doubt and doesn’t migrate silently; it stops.
- #20 Scripts that reset the dev database also deleted the fixed rows that came with migrations → migrations didn’t re-run → the seed is rebuilt idempotently after every script that empties tables.
- #21 A hand-maintained cleanup list left out a new table → the list is read from the database catalog. A cleanup that says it cleaned up but leaves leftovers behind is worse than no cleanup at all.
- #22 A column named
not(Turkish for “note”) broke a raw CHECK expression → reserved word → a different name. - #23 During anonymization, linked rows stayed put → cascade doesn’t kick in because the row isn’t deleted → linked rows are deleted by hand in the same transaction.
- #24
lower()converted “İ” depending on the locale → the same Turkish case-folding table on both sides; escape%and_in LIKE. - #25 Points could be written by hand to a closed account → the action never read the account’s status → every path that writes checks the status.
- #26 The application period was linked by text, without a foreign key; if it got deleted between the check and the write, an orphaned application could be left behind →
FOR SHAREon submission,FOR UPDATEon deletion; the right order when changing keys. - #27 Because of a default threshold with no UI, nobody could apply, and the reason wasn’t visible either → the default was lowered to zero → adding a restriction should be the deliberate act, not removing one.
jsonb, double writes and idempotency
- #28 A payload written to jsonb produced fake diffs when read back (Dates don’t come back, URLs get normalized) → the payload is stored as the raw form text and goes through the same schema both on write and on approval.
- #29 jsonb read with a single schema either couldn’t open old records or wrote garbage → strict on write, lenient on read; the key is the question’s code, not its text.
- #30 “Select first, then mark” in cron was producing duplicate emails → a single
update … where … returning. - #31 During a provider outage, everyone would have been stamped “sent” → the stamp was applied before the result was read → read the result, and if it failed, roll the stamp back.
- #32 A double-click produced a false log entry and a second email → a transition to the same stage falls into a “no change” branch, and nothing gets written.
- #33 A form left filled after success could get the same row written to the append-only ledger twice → entry forms clear on success.
- #34 “Ask first, then write” was recording attendance twice → single use enforced in the database (
on conflict); the guard drops the constraint and tries it on every run. - #35 Had a summary, a consent or a title been copied somewhere, the old one would have stuck around when the source changed → anything that can be derived isn’t stored.
- #36 Pulling every column with
select()leaks a column added tomorrow onto the public surface → columns are listed one by one, and the key set is tested.
Next.js and React
- #37 Text typed into a textarea before hydration got overwritten, and the old text was saved with a green “saved” message → React 19.2.4 writes the value back during hydration → capture script + custom component; bare
<textarea>forbidden, React pinned. - #38 Clicks on a form were swallowed until hydration finished → a form bound to useActionState doesn’t replay the click → single-purpose forms are bound directly to the server action.
- #39 React 19’s form reset was emptying fields or reverting them to the old saved value, while the screen looked “saved” → remount with
key, or cancel the reset event. - #40 Exporting a constant from a
"use server"file took the page down with a 500; every function exported from there becomes an action callable from the client → these files export only safe async actions. - #41 A cron job hadn’t run once since phase two, and the tests were green → the test environment was masking the
server-onlymodule with a stub → actually run the CLI and cron entry points. - #42 In production, every upload over 1 MB returned a 500; another setting could also cut off the excess without an error and save the file corrupted → both limits are computed from a single constant; use a real-sized file in limit tests.
- #43 robots.txt pointed to the wrong sitemap URL → the route reading an environment variable got frozen as static at build time → dynamic route + a guard that scans the build output.
- #44 The theme wasn’t being applied on the in-page
notFound()screen → a<script>rendered on the client doesn’t run; a dev warning we’d been seeing for months turned out to be the symptom → every feature that depends on an inline script gets a client-side fallback. - #45 Under
strict-dynamic, inline scripts without a nonce were silently blocked → Next doesn’t add a nonce to hand-written scripts → provide the nonce yourself, and silence the hydration warning on the right element. - #46 The success message kept disappearing →
revalidatePathunmounts the branch holding the form → the message lives somewhere persistent. - #47
useFormStatusalways returned false → it only sees<form action>submissions; React also doesn’t forward some blur events → the right submission style, and focus tests in a real browser. - #48 Next’s dev server shut down after the first request when running under an AI agent → when it sees the agent’s environment variables, it prints an upgrade reminder and exits → those variables are removed in the test command; printed text is tool output, not instructions.
- #49 Next’s dev server wrote its own block into CLAUDE.md when running under an agent → the next version added a setting to turn it off; if the setting ever drops out, a guard catches it.
- #50 A Next upgrade pulled React to a different version → the App Router runs Next’s bundled copy of React anyway → React pinned, kept out of automatic updates.
- #51 A
<details>opened without JS closed on hydration → the “route changed” effect also runs on first mount → the previous route is kept in a ref. - #52 Everything faded during a View Transition, punching right through the reduced motion preference → the
*selector doesn’t match::view-transition-*→ a separate CSS block. - #53 Two admin pages relied only on the gate in the layout → the layout and the page render in parallel → every page and action sets up its own gate, and a guard checks for it.
- #54 A Referrer-Policy change took JS-less form submissions down with a 500 →
Origin: nulltrips the CSRF check → every security header change also gets tried with JS turned off. - #55 The “gate rejects” test was green, but the action never actually ran → the test was sending missing fields and the server was returning a 500 → remove the gate temporarily and watch the work actually get done.
- #56 The proxy layer (formerly called middleware) can be mistaken for a security boundary → there’s no database there, so a forged cookie walks right through → the real check is in the server-side authorization gate.
Test infrastructure and false greens
- #57 Three flaky tests shared one cause: a missing barrier → 2 ms after the click the database still had the old value; absence assertions also passed without any proof of presence → wait for the signal that proves the change you triggered has landed.
- #58 Tests were “stealing” each other’s emails and records from shared seed accounts → every test that changes state uses its own account; emails are picked by recipient and a unique subject. (One race is still open.)
- #59 Every e2e run added points to the ledger; after ~13 runs a badge assumption broke → at the start of each run the ledger goes back to its seed state through a maintenance gate.
- #60 E2E was writing real rows into the dev database; pending requests left over from tests could fill up a limit and make a form fail silently → at the end of a run it writes out what it broke and the restore command.
- #61
--repeat-eachruns the copies concurrently → one worker when debugging a flaky test. - #62 “Flake” turned out to be the name for a bug nobody had measured: the failures correlated with run duration, but one of them was a real bug → first duration, then a single worker, then an A/B on the baseline commit.
- #63 Things that skewed measurements: the computer’s sleep mode, two sessions on the same machine, a deleted build cache, an orphaned dev server, a heavy game in the background → quiet the machine down before measuring.
- #64 The “zero animations under reduced motion” test sometimes saw two animations → Next’s own dev button → when a test goes red, have it print its target.
- #65 Tests were green but the vitest run was red → promises started at the same time and then rejected → attempts are started lazily.
- #66 A controlled-field test was a false green → FormData values are collected from the DOM → also test a re-render or a second submission on the same form.
- #67 A signature-tampering test gave a false green when it tampered at the end → base64’s leftover bits → tamper at the start.
- #68 The tool meant to open up the hydration window misled us three times → CPU throttling doesn’t open the window → delay the client JS; measure “the work got done”, not “the request went out”.
- #69 The source-scanning guard was blind: it matched import lines and comments, and the regex got cut off at
=>→ scan with comments stripped, and write a self-test for the guard. - #70 The contrast test couldn’t see CSS variables and was measuring the wrong values → prove what your measuring tool actually measures.
- #71 A negative test was green for the wrong reason (the 400 came back because of “no file”) → verify the error message too.
- #72 A fixture where everything was set up together hid a “doesn’t count staff” bug → every count is tested with its own fixture.
- #73 The rate limit test didn’t prove the page actually called it → a static guard that looks for the call.
- #74 A string constant in a security test quietly became meaningless after a rename → the test is tied to the source constant.
- #75 A “reminder” test was punishing the code that did the right thing → test the invariant.
- #76 A single line of CSS broke five e2e tests, four of which were measuring the wrong proxy → a test should measure what it claims to measure.
- #77 Because of members piling up locally, the target didn’t make it onto the first page of a paginated list → hook into search, not the list.
- #78 Playwright traps:
beforeAllruns once per worker, a new context inherits the test options, and prefix-based cleanup was deleting another worker’s data. - #79 Password hashing was saturating the single-process dev server → 3 workers turned out both faster and green; tests that write the same file go into a serial project.
- #80 Timing tests were starving their neighbors → separate project, separate process; use the minimum, not the average.
- #81 A race test with 3 parallel requests was green even on broken code → 20 concurrent calls.
- #82 Nobody in the seed was eligible to apply, so the positive case was never tested → an eligible account and an open period were added to the seed, and the seed’s dates are refreshed on every run.
- #83
toBeVisibledidn’t catch overflow (a 424-pixel QR code was overflowing a 360-pixel screen) → measure the bounding box. - #84 Running only e2e let a failing unit guard slip by → a full run is mandatory at the end of every slice.
- #85 A test group depended on a command that doesn’t exist on Windows → a fixed test certificate in the source file.
- #86 Tailwind was also scanning test files; the test checking that a dead class had been removed brought the class back → tests and md files are excluded from the scan.
Deployment, CI and Docker
- #87 The CI step went green while the tests were red → no
pipefailin the default shell, sonpm test | teereports the pipeline’s last command →shell: bashat the workflow level; verified with a canary on real CI. - #88 Excluding docs wholesale from CI triggers also left out two files the tests depended on → list files one by one; YAML anchors don’t work in Actions.
- #89 “Green locally, red in CI”: npm 10 and 11 read the lockfile differently → the Node version lives in one place, and CI and the Dockerfile read it from there.
- #90 A merge made with
GITHUB_TOKENdoesn’t start new workflows; the image from an auto-merged PR would silently never have been built → CI is triggered explicitly after the merge. - #91 The
latesttag was pushed before the checks, so a broken image could land in the automatic pipeline → build → check → sha →latestlast. - #92 The “critical” alerts on GitHub didn’t belong to the local tree → the remote branch was far behind, and an old lockfile was being scanned → measure which tree is actually being scanned.
- #93 “Audit clean” didn’t mean there was nothing to patch → some framework security advisories never showed up in npm audit → read the framework’s release notes and advisory page separately.
- #94 Image optimization was handing user files to sharp/libheif → allowed paths were undefined → version upgrade + user media taken out of optimization; try the chain before saying “it doesn’t affect us”, and close both layers in the same slice.
- #95
npm audit fix --forcewould have downgraded a dev tool to a very old version → forbidden. - #96 On the first production install the compose configuration blew up, and some variables never reached the app at all → a guard that checks every field in the environment schema is present in compose.
- #97 The production environment gate broke the build → the build also runs in production mode → an exemption for the build phase. Building is not deploying.
- #98 The setting meant to keep dependencies out when bundling CLI jobs didn’t work → only the native module stays external, everything else goes into the bundle.
- #99 In the Alpine image, Turkish date formatting quietly fell back to English instead of crashing → ICU was missing → the image check asserts the Turkish format.
- #100 Without a persistent volume for media, every restart would have wiped the posters; if dev and production had used the same volume name, two Postgres instances would have mounted the same data directory → separate names, correct file ownership.
- #101 Back when the server was directly reachable, unconditionally trusting the IP header added by the CDN made the rate limit bypassable; the host firewall didn’t cover ports published by Docker → the server moved to a tunnel setup that opens no ports at all, and security headers come from a single source.
- #102 Secrets showed up in plain text in
docker inspectoutput; a\rin a secret file generated on Windows could go unnoticed; a missing secret file got replaced with an empty folder; some side paths skipped the secret-loading step → secrets come from files, through a single reader; each one is checked separately. - #103 Backup failures were noticed late → a signal to the monitoring service on every failure; the backup script is tested against the production environment.
- #104 The container looked “healthy” while the tunnel was broken; an outdated setting was silently ignored; an expired access key gave a meaningless error → health checks from the outside too, the script stops, and errors are called by their name.
- #105 The firewall script, with no interface specified, also cut off the container’s outbound traffic; real values had made their way into an example environment template, caught before the commit.
Windows tooling traps
- #106 A force-killed dev server printed “Ready” and returned a 500 to every request; a process left behind in the background held the port and handed the tests a zombie server → delete the cache, verify the port.
- #107 Python written inside a Bash heredoc turned
\binto a single control byte, and the guard stayed green no matter what → edits containing backslashes go through the edit tool, scripts are written as files; then a byte scan. - #108 PowerShell 5.1 read BOM-less UTF-8 as ANSI, and when it wrote it back, the Turkish characters got double-encoded → a tool that sets the encoding explicitly + a
git diff --statcheck. - #109 A lowercase drive letter in the path made vitest load a module twice; three fake reds during break-it experiments → uppercase drive letter, an unchanged baseline run, and an “assertion failed” requirement.
- #110 Git Bash’s path conversion turned paths inside the container into Windows paths → turn the conversion off, and then watch out for absolute POSIX paths.
- #111 Git’s
shstrips\rread from files on its own, so CRLF tests were false greens locally → skip visibly in that shell, run them in CI (Linux). - #112 An A/B experiment with
git worktreedidn’t work with Turbopack →git stash push -uor a checkout in the main tree. - #113 On Windows, media always returned 404 →
path.joinproduces backslashes, so the string prefix check never matched → check path containment withpath.relative, not a prefix; write an e2e that actually downloads the media. - #114
npxdownloads and runs a package from outside the project on the spot, punching through the “versions at least 14 days old” rule →node_modules/.binfirst.
Security and privacy
- #115 The verification link meant for development could show up in production too → the example env file had dev mode in it, and the gate was a blacklist → whitelist + a separate production-mode test. Testing a gate that looks at
NODE_ENVon the dev server is the same as not testing it at all. - #116 With JS off, a form without a
methodfell back to GET and wrote the password into the URL, the history and the logs →method="post"on every form with a submit handler, enforced by a source test. - #117 The attendance screen didn’t display email addresses, but it carried them in the data sent to the client → removed from the query. A field sent to the client has leaked, even if it’s never displayed.
- #118 Password login wasn’t tied to the rate limit → now it is; resetting the counter on a successful login would have been a hole too.
- #119 Free text from a URL parameter was being printed on screen, a phishing surface sitting under our domain name → carry codes in the URL, not text.
- #120 When domain checks were done with
endsWithorincludes, addresses likeokul.edu.tr.saldirgan.examplegot through → parse the URL and do exact, label-by-label matching. - #121 At the email provider’s notification endpoint, a valid signature alone wasn’t enough; blindly following the subscription link would have opened up SSRF; the wrong response code would either lose notifications or send them into endless retries → verify the source alongside the signature, and choose response codes deliberately.
- #122 Email error text was writing the recipient’s address into the queue table; the Reply-To header was open to injection → mask at the source, stop sending on an invalid value; announcement rounds don’t eat into the quota for transactional emails.
- #123 A free-form return address would have turned into an open redirect;
</script>could have leaked into JSON-LD → the return target is picked from a list, and<is escaped. - #124 A compromised account could close itself through the admin path without being asked for a password; three out of four destructive operations had no server-side confirmation → forbidden, and confirmation moved to the server.
- #125 A future-dated “second step” timestamp would have held the freshness gate open indefinitely → the window is bounded from both sides.
- #126 Hashes of short email codes could collide between two members → the hash is bound to the member.
KVKK (Turkey’s personal data protection law), legal and email providers
- #127 Writing the legal text uncovered three silent pieces of code debt: one consent field was never read (people who didn’t tick the box still got announcements), closing an account left the face photo behind, and there was no job enforcing the promised retention periods → every consent you collect needs a reader, and every promise in the text needs code behind it.
- #128 A pasted table silently turned into a single paragraph → tables aren’t on the sanitizer’s whitelist → texts are written as lists with headings.
- #129 Deleting a guest registration would have taken the attendance with it and retroactively changed participation counts → anonymization instead of deletion.
- #130 The email provider’s key dies if it goes unused for a while or when it expires; the site looks up while email quietly stops → every expiring key goes on the calendar with its expiry date.
- #131 AWS SES rejected production access without giving a reason, and another provider banned bulk email → abstract the provider away, read the terms of service per email type; the contact form shouldn’t burn through the daily sending quota.
- #132 If the test email provider gets left in place in production, or SPF/DKIM/DMARC is missing, the sign-up funnel dies silently → rejected at startup.
- #133 The welcome email never carried a certain link → there was no screen that wrote the setting being read → every setting that gets read needs a writer; and nothing gets written to a queue that has no consumer.
Silent bugs born from logic and process
- #134 Permission functions had been written but were never called; unit tests green, gates wide open → prove they’re called with grep, verify the gate with mutation, and in multi-condition queries break each condition separately.
- #135 An unwritten decision flipped the code around, and the President could do everything → a verbal architectural decision from the user gets written into the plan the same day.
- #136 Nothing linked to the admin panel; the gates were right, but there was no road to them → a “there’s a road to the gate” test.
- #137 A forgotten attendance check would have written penalty points to everyone, and they’d have had to be fixed one by one in the append-only ledger → an event requires at least one attendance row; a member who can’t earn points doesn’t get penalties either.
- #138 The deletion guard counted three dependencies when it should have been four; the duty rows on the document were silently disappearing → the missing dependency was added.
- #139 A
datetime-localvalue shifted by 3 hours on a UTC server, calendar days landed on the wrong day, and the year in the footer would have shown the old one on New Year’s Eve → a single time module and club time. - #140 Turkish:
/[A-Z]/rejected Turkish capital letters, line folding in the calendar file split multi-byte characters, and a PDF library’s built-in font had no ş/ğ/ı/İ →\p{Lu}, octet-based folding, the right font. - #141 An emptied rich text editor was sending
<p></p>→ a shared “does it actually have text” check. The editor’s hidden-field race still isn’t fully closed under load. - #142 Developer notes like “Planned stage: Phase 5” leaked into production → internal references are banned in UI text, enforced by a guard.
- #143 In dark theme, documents were printed white on white paper; animated elements came out blank when printing → dark theme on screen only; @supports, reduced motion and a print gate on every animation.
- #144 The reduced motion reset was losing the specificity war → the rule is defined inside the
no-preferencegate; don’t forget that unlayered CSS beats layered CSS. - #145 The “it’s irreversible, let’s lock it” reflex led to a two-minute trial period permanently blocking the real period → confirmation + log instead of a lock.
- #146 A problem we thought was “2 out of 33 forms” was actually 33 files and about 58 forms → a wrong count describes the wrong shape of the problem.
- #147 A cold server was mismeasuring response times by 2–3x → warm-up requests + multiple runs; once measured, the “the site got slower” complaint turned out to be a 240 ms page transition.
- #148 During code cleanup, an admin command turned out not to walk the error chain (a copy of #1); some cleanup functions still aren’t hooked up to a scheduled job.