<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AheadKit</title>
    <description>The latest articles on DEV Community by AheadKit (@aheadkit).</description>
    <link>https://dev.to/aheadkit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4217845%2F0d45555e-3b0e-4dc8-bd10-ccb48f82dd71.png</url>
      <title>DEV Community: AheadKit</title>
      <link>https://dev.to/aheadkit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aheadkit"/>
    <language>en</language>
    <item>
      <title>The Comment That Ruined My Thursday</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Sat, 21 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/the-comment-that-ruined-my-thursday-mb8</link>
      <guid>https://dev.to/aheadkit/the-comment-that-ruined-my-thursday-mb8</guid>
      <description>&lt;p&gt;09:12. I open the pull request and there it is, three words under a line of my code, in red.&lt;/p&gt;

&lt;p&gt;"This is wrong."&lt;/p&gt;

&lt;p&gt;No line number beyond the one it sits on. No "because". No "try this instead". Just the three words, and a name beside them I recognise from the team list, and a little grey timestamp that says it arrived at 08:47, twenty-five minutes before I got to my desk.&lt;/p&gt;

&lt;p&gt;I read it again. Then I read it a third time, slower, as if the extra words might be hiding between the three that are there. They are not.&lt;/p&gt;

&lt;p&gt;The line it sits on is mine. It sorts a list of invoices by date, and I wrote it on Tuesday afternoon, in a hurry, because the dashboard needed it and the afternoon was already gone. I remember writing it. I remember feeling clever about it for about four seconds, which is the usual length of time I feel clever about anything I write.&lt;/p&gt;

&lt;p&gt;09:14. I click on the file. The function is eleven lines long. I read it the way you read a text from someone you like, looking for the tone underneath the words. It sorts. It returns. It handles the empty list. I check the tests. Two tests, both green, both mine. I run them again anyway, because running them feels like doing something, and they go green again, which tells me nothing except that the tests agree with me, and the tests were written by me, so of course they agree with me.&lt;/p&gt;

&lt;p&gt;09:31. I start a reply.&lt;/p&gt;

&lt;p&gt;"Could you say a bit more about what's wrong here? Happy to fix it."&lt;/p&gt;

&lt;p&gt;I read it back. It sounds fine. It sounds like a person who is not bothered at all. I delete it. It sounds too fine, which is the problem. If I send that, I will spend the rest of the day wondering whether she thinks I am being passive-aggressive, and she will spend the rest of the day wondering whether I am. Nobody wins.&lt;/p&gt;

&lt;p&gt;09:47. Second draft.&lt;/p&gt;

&lt;p&gt;"Which part is wrong? The sort, or the date handling?"&lt;/p&gt;

&lt;p&gt;Shorter. Honest. I hover over the button. My finger does not press it. Because what if she answers "both", and then I have to ask again, and now I am the person who needs three rounds of comments to understand one line of code. I delete it too.&lt;/p&gt;

&lt;p&gt;10:05. Third draft, and this one is long. It explains why I wrote it this way. It mentions the Tuesday deadline. It points out that the tests pass. It has a paragraph about the date format coming in as a string from the old system, which is true, and which has nothing to do with anything. I read the whole thing and I can hear how it sounds: a man building a small fort out of excuses and sitting inside it. I select all of it and delete it, and the empty box looks back at me, and I feel better and worse at the same time.&lt;/p&gt;

&lt;p&gt;10:40. I give up on the reply and go back to the code. This is the part of the day where I become a detective in my own flat, looking for something I lost in a room I cleaned myself.&lt;/p&gt;

&lt;p&gt;Maybe it is the sort. The dates arrive as strings, "2026-11-04", "2026-11-19", and string sort works fine on those, until it doesn't. I think about it. It works fine. I think about it more. It still works fine. I think about it until "works fine" starts to sound like something a person says right before finding out it doesn't.&lt;/p&gt;

&lt;p&gt;Maybe it is the empty list. Maybe it is the duplicate dates. Maybe it is the fact that I named the variable &lt;code&gt;sorted&lt;/code&gt; and shadowed something somewhere. I open the file that calls this function. I open the file that calls that file. By 11:20 I have five tabs open and I am reading code I wrote last month as if it were written by a stranger who might have left me a clue.&lt;/p&gt;

&lt;p&gt;11:58. I close the tabs. I have found three things that might be wrong, and I am not sure about any of them, and the honest truth is that I could rewrite the whole function in twenty minutes and still not know whether I fixed the thing she meant. I eat lunch at my desk, which I never do, because leaving the desk feels like leaving the argument, and the argument is only happening in my head, and I cannot leave my head.&lt;/p&gt;

&lt;p&gt;13:20. I check the thread. Nothing new. The three words are still there, patient as a parked car. I read them again and this time I notice the full stop. "This is wrong." The full stop makes it worse. Without it, it could be a thought she typed quickly. With it, it sounds finished. Settled. A verdict with nowhere to go.&lt;/p&gt;

&lt;p&gt;13:44. I open the reply box again. I type "Thanks for catching this —" and stop. Thanks for catching what? I do not know what she caught. I am thanking her for a mystery. I delete it.&lt;/p&gt;

&lt;p&gt;14:15. I do actual work for an hour, or I pretend to. I fix a typo in a readme. I rename a variable in a file nobody will ever open. I answer two messages with unusual speed, because answering messages is a thing I can complete, and the comment is a thing I cannot. Every ten minutes I click back to the pull request, the way you check a phone that has not buzzed, and every time the thread is the same, and every time I am a little annoyed at myself for checking.&lt;/p&gt;

&lt;p&gt;15:30. I write the reply I should have written at 09:14. Six words.&lt;/p&gt;

&lt;p&gt;"What part is wrong? Happy to fix."&lt;/p&gt;

&lt;p&gt;No explanation, no defence, no "thanks for catching this". Just the question, asked plainly, the way I would ask it if she were sitting next to me and I had not spent six hours making it complicated. I press the button before I can re-read it. The page reloads. My question sits under her comment, small and a little bit naked, and there is nothing to do now except wait, which turns out to be its own kind of work.&lt;/p&gt;

&lt;p&gt;16:02. She is online. I can see the little dot. I watch the dot the way you watch a kettle. The dot stays. Nothing arrives. I open another file and stare at it without reading it.&lt;/p&gt;

&lt;p&gt;16:41. The reply comes. Two lines.&lt;/p&gt;

&lt;p&gt;"The sort compares the strings, so the 9th sorts after the 19th. Compare the timestamps instead."&lt;/p&gt;

&lt;p&gt;I read it twice. Then I laugh, out loud, alone, at my desk, because of course. Of course it is the dates. The strings sort fine until the day number hits double digits and then "9" sits after "19" like it owns the place, and every invoice from the first nine days of the month has been sitting in the wrong order for a week, and the tests passed because both my test dates were in the twenties. A four-minute fix. A four-minute fix that cost me a Thursday.&lt;/p&gt;

&lt;p&gt;16:47. I change one line. I compare the timestamps. I run the tests. Green. I add a third test with a date on the 9th and a date on the 19th, because that is the test I should have written on Tuesday, and it goes red before the fix and green after, which is the sound a test is supposed to make. I push. I write "Fixed — sorting by timestamp now, added a test for single-digit days." I press the button. The thread closes itself in my head the way a door closes when you finally stop holding it open.&lt;/p&gt;

&lt;p&gt;17:20. The rest of the day is quiet. The quiet is the strange part. The comment is answered, the code is fixed, and there is nothing left to be angry about, which leaves me with the anger and nowhere to put it. I keep thinking about the six hours. Not the bug. The bug was four minutes. The six hours were mine. I spent them writing replies I never sent and reading code I had already read, because three words with no "because" felt like a verdict, and I treated it like one, and a verdict is something you defend yourself against, and a question is something you just answer.&lt;/p&gt;

&lt;p&gt;18:35. A pull request from someone else lands in my queue. A new joiner, three weeks in, and I open it, and I read it, and I find the thing that is wrong. It is a small thing. A loop that runs one time too many. I click on the line. The comment box opens, empty and patient. I type "this is wrong" and I look at it, sitting there in the box, three words and a full stop, and I delete it.&lt;/p&gt;

&lt;p&gt;I write the other version instead. The line number, and what it does wrong, and what to change, and the two minutes it will take. I read it back and it sounds like a person who wants the code fixed, not a person who wants to be right. I press the button. The comment goes out with my name beside it, and the thread waits, and somewhere on the other side of it a person is about to have a much shorter Thursday than I did.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Trimming Fixed the GitHub Shape. On the Web Shape It Costs You the Answer.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Sat, 21 Nov 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/trimming-fixed-the-github-shape-on-the-web-shape-it-costs-you-the-answer-2ga4</link>
      <guid>https://dev.to/aheadkit/trimming-fixed-the-github-shape-on-the-web-shape-it-costs-you-the-answer-2ga4</guid>
      <description>&lt;p&gt;helve_dev left a comment on my trimming piece that I could not shake. He had seen the same thing in a different shape: web search and extraction results, full markdown and JSON payloads, making a small model anchor on whatever was longest or loudest instead of what answered the question. Trimming to the tight fields that actually carry the answer, he said, fixed accuracy and the token bill at the same time, and it mattered most on long loops, where old results pile up over 15 or 20 turns until the model is reading boilerplate instead of facts. He had watched it happen in real traces. He had never run a clean two-sided test with scored pass rates. So I ran one. The result is not what either of us expected.&lt;/p&gt;

&lt;p&gt;The setup is the same shape as the GitHub run, moved onto the web. Twelve questions, five pages each, all written for this test. The model searches, reads pages, and answers with the exact value: a version, a price, a flag, a limit. One arm sees the full page text in the search results. The other sees only the title, the link, and the first 200 characters of each page, and has to open a page to read the rest. Six questions hide the decisive fact inside those first 200 characters. Six hide it further down, where only opening the page finds it. Same small model as before, same six-call limit, every arm run twice. Both second runs came back identical to the first, so I am counting 24 tasks per arm, not 48.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The accuracy gain does not travel. It reverses.
&lt;/h2&gt;

&lt;p&gt;Full pages solved 22 of 24. Trimmed pages solved 20 of 24. On the GitHub shape, trimming nearly doubled the score. On the web shape, it costs two tasks.&lt;/p&gt;

&lt;p&gt;Both tasks it loses are the ones where the fact sits past the cut. One asks the per-seat price of a team plan after a price change. The trimmed snippet shows the cheaper plan's price first ($8, for the solo plan), and the model answers $8 and never opens the page. The real answer, $12, is three sentences further down. The other asks which command flag skips the build cache. The snippet never shows the flag, so the model opens the wrong page, the caching guide, and answers with a cache command instead. The trimmed arm solved all twelve questions where the fact was visible in the snippet, and only eight of twelve where it was not. The full arm solved all twelve of the hidden ones.&lt;/p&gt;

&lt;p&gt;That is the shape of the failure, and it is worth naming plainly. The model does not treat a snippet as a pointer to a longer page. It treats it as the page. When the visible text contains a plausible answer (another plan's price, a related command), it answers from that and stops. Trimming only helps when the trim keeps the answer. When it cuts the answer, the model does not go looking for it. It answers with whatever the trim left behind.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The saving is small, and the re-open eats it
&lt;/h2&gt;

&lt;p&gt;Trimmed pages cost 513 tokens per turn against 556 for full pages, and 1,472 per task against 1,667. That is 12%, not the 63% the GitHub trim saved. Two reasons. First, the pages here are short, so the gap between a full result and a trimmed one is only about 70 tokens. Second, the trimmed arm opens pages more often (0.67 opens per task against 0.42), and every open drops a full page into the history. By the third turn, the trimmed arm's prompt is actually bigger than the full arm's: 791 tokens against 783. The saving exists on the first turn and is gone by the third.&lt;/p&gt;

&lt;p&gt;This is the part helve_dev's traces got right and my test sharpens. The bill on a long loop is not set by the size of one result. It is set by what stays in the history. Every result the model sees stays there, turn after turn, and every page it opens to recover a trimmed fact stays there too. Trimming one result does not trim the history. It just moves tokens from the search result into the re-open.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Both arms balloon the same way
&lt;/h2&gt;

&lt;p&gt;Turn one costs about 162 tokens in both arms. Turn two costs 722 for full pages and 651 for trimmed. Turn three costs 783 and 791. That is nearly a fivefold rise in three turns, whatever the payload size, because the history only grows. The trim does not bend the curve. It shifts it by one turn at most.&lt;/p&gt;

&lt;p&gt;The honest limit here is that nothing in this test ran long. Every task ended in three turns, so the 15-to-20-turn loops helve_dev described never happened. The curve to turn three is real evidence; the curve to turn twenty is still his traces, not my numbers. But the direction of the evidence is against the trim: if the history grows fivefold in three turns in both arms, a longer loop does not fix that by trimming harder. It makes the re-opens pile up faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The two arms fail in opposite ways
&lt;/h2&gt;

&lt;p&gt;The full arm's only failure is a question needing two facts, a version and a date. It answered the date and dropped the version. The trimmed arm solved that one, and all three two-fact questions. Short results seem to help the model hold two facts at once. That is three tasks, and I will not lean on it. But the pattern is neat enough to note: full pages cost you the second fact, trimmed pages cost you the hidden fact. Neither shape is free. The question is which fact your task hides.&lt;/p&gt;

&lt;p&gt;So where does that leave helve_dev's claim? Half right, in a way that matters. Trimming does cut the bill on the web shape, a little, not a lot, and only until the model starts re-opening pages. And trimming does not fix accuracy here. It breaks it, exactly on the questions where the answer sits past the cut. The GitHub trim worked because every decisive fact sat inside the first 300 characters by design. The web does not promise that. A page puts the price of the wrong plan first and the right one third. A snippet is not a summary. It is the top of a page, and the top of a page is where the least important facts live.&lt;/p&gt;

&lt;p&gt;The fix I am keeping is narrower than the one I went in with. Trim the search result, yes, but only when the snippet is built to carry the answer, not just the first 200 characters of whatever the page happens to start with. And if the answer might sit past the cut, the model needs a reason to open the page before it answers, not permission to. A snippet that shows a plausible wrong answer is worse than no snippet at all, because the model will take it and stop.&lt;/p&gt;

&lt;p&gt;Have you watched a small model answer from a snippet instead of opening the page? What made it open the page — a better snippet, a different instruction, or just a bigger model? I am curious what worked, because trimming alone did not.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>programming</category>
    </item>
    <item>
      <title>`npm ci` Doesn't Fix the .npmrc Override. It Just Hides It Better.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Sat, 21 Nov 2026 07:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/npm-ci-doesnt-fix-the-npmrc-override-it-just-hides-it-better-3769</link>
      <guid>https://dev.to/aheadkit/npm-ci-doesnt-fix-the-npmrc-override-it-just-hides-it-better-3769</guid>
      <description>&lt;p&gt;Ana cloned the repo on a Friday afternoon, the way everyone on her team does it now. Clean folder, fresh clone, one command she trusts more than the old one, because the team switched to it months ago for exactly this reason: no surprises. The output said one line, &lt;code&gt;added 1 package&lt;/code&gt;, and she moved on. Monday morning she found a file in the package folder that should not have been there, stamped Friday afternoon, written by a hook she believed she had switched off years ago in her own config file. Nothing had warned her. Nothing had even whispered. The install had done exactly what it was told to do by a file she had never opened, and the one line of output had hidden all of it.&lt;/p&gt;

&lt;p&gt;That is the part people keep getting wrong about &lt;code&gt;npm ci&lt;/code&gt;. It feels safer than &lt;code&gt;npm install&lt;/code&gt;. It wipes the folder, it reads the lockfile, it refuses to improvise. All of that is true, and none of it touches the question that actually bit Ana. The question is not whether the install is clean. The question is whose word it takes when two config files disagree, and whether you would ever find out.&lt;/p&gt;

&lt;p&gt;maxbuildsdev asked me that in the comments on my last piece: does the layering hold the same way under &lt;code&gt;npm ci&lt;/code&gt;, with a lockfile in play, and does the foreground flag show a hook running instead of swallowing it? Same trap, same two config files, same tiny test package with one install hook that leaves a marker file behind. Fourteen installs, two runs per shape, and I wrote down what actually happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The lockfile changes nothing about who wins
&lt;/h2&gt;

&lt;p&gt;This was the question, and the answer is blunt: the repo still wins. Plain &lt;code&gt;npm ci&lt;/code&gt; inside the repo ran the hook both times, markers stamped 00:09:25 and 00:09:35 UTC. Plain &lt;code&gt;npm ci&lt;/code&gt; in the clean folder, the same package with no repo file of its own, ran it neither time. The CLI flag kept it off both times in the repo. Twelve installs in the main matrix, two repeats per shape, and not one repeat disagreed with its twin.&lt;/p&gt;

&lt;p&gt;I had half expected the lockfile to matter. It is the whole point of &lt;code&gt;ci&lt;/code&gt;, after all: the install is supposed to follow the lockfile and nothing else. But the lockfile only pins which packages and versions get installed. It says nothing about whether their install hooks are allowed to run. That decision still comes from the config layers, and the layers still stack the same way they did under plain &lt;code&gt;npm install&lt;/code&gt;: the file sitting in the repo beats the file sitting in your home folder, every time, without a word about it. If you switched to &lt;code&gt;ci&lt;/code&gt; because you thought the lockfile closed this hole, you switched to a stricter installer for a problem it was never built to solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Silence is not proof, and &lt;code&gt;ci&lt;/code&gt; is quieter than most
&lt;/h2&gt;

&lt;p&gt;Here is the part that should bother you more than the override itself. In both repo installs, the hook ran and the output said nothing at all. One line: &lt;code&gt;added 1 package&lt;/code&gt;. No hook name, no hook output, no hint that anything besides the install had happened. The only proof was the marker file sitting in the package folder afterwards, which nobody looks for on a normal Friday.&lt;/p&gt;

&lt;p&gt;That is the same silence plain &lt;code&gt;npm install&lt;/code&gt; gave me in November, and it lands harder under &lt;code&gt;ci&lt;/code&gt; for a simple reason: &lt;code&gt;ci&lt;/code&gt; is the command people reach for when they want certainty. The whole pitch is that nothing unexpected happens. So when the output comes back clean, people read it as confirmation that nothing unexpected happened. It is not confirmation. It is just a quiet log. A hook can run, write files, print nothing, and leave you with an output line that reads like a clean bill of health. If your evidence that hooks are off is "the install looked fine," you have no evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The foreground flag is a witness, not a guard
&lt;/h2&gt;

&lt;p&gt;This is the one piece of good news, and it comes with a catch worth naming plainly. Run the same install with the foreground flag and the hook stops being invisible. Both repo runs printed the hook out in the open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; hook-test-pkg@1.0.0 preinstall
&amp;gt; node -e "require('fs').writeFileSync('HOOK-RAN.txt', ...); console.log('HOOK-RAN-MARKER preinstall executed')"

HOOK-RAN-MARKER preinstall executed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There it is, the hook's own printed line, in the output where you can actually see it. After two rounds of installs where the hook ran in total silence, watching it finally announce itself felt like the tool apologising. But a witness is all it is. The flag never stopped a hook. In the clean folder, where my user setting already blocks hooks, the flag changed nothing, both times. And with both flags together in the repo, the hook stayed off both times: the ignore flag still beats the foreground flag. So the foreground flag answers one question, did a hook run and what did it say, and no other. If you add it hoping it will protect you, you have bought a window, not a lock, and a window helps only if someone is looking through it at the exact moment the install runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The check lies unless it stands next to the install
&lt;/h2&gt;

&lt;p&gt;cryptostrapon added the edge that makes the other three problems actually dangerous, and it is the one I keep thinking about. The check I have been recommending, &lt;code&gt;npm config list&lt;/code&gt; inside the repo, tells the truth. Run it from the folder above the repo and it tells you something else entirely: my user value, &lt;code&gt;true&lt;/code&gt;, with no project section at all, no mention that a repo file even exists. Same machine, seconds apart, two opposite answers, and both are correct about the folder they were asked in.&lt;/p&gt;

&lt;p&gt;Then I split the check and the install apart on purpose, the way a build job does when the check lives in one step and the install in a later one. Check at the root said &lt;code&gt;true&lt;/code&gt;, safe. The later install in the repo ran the hook anyway, marker stamped 00:11:13 UTC. And the mirror image: check inside the repo said &lt;code&gt;false&lt;/code&gt;, hook will run, and the later install in the clean folder ran nothing at all.&lt;/p&gt;

&lt;p&gt;That is how this trap actually gets built in real teams. Nobody skips the check. They run it in the wrong folder, or in an earlier step with its own working directory, read the green answer, and walk into an install that answers to a different file. The fix is not a better check. It is a check that refuses to live anywhere except right next to the install: same folder, same step, immediately before &lt;code&gt;npm ci&lt;/code&gt;. Anything further away is a reading about a different place.&lt;/p&gt;

&lt;p&gt;So here is where I land. &lt;code&gt;npm ci&lt;/code&gt; does not fix the override. It just hides it better, behind a lockfile and a one-line summary that both feel like safety and neither is. The repo file still wins, the hook still runs in silence, and the only flag that shows it is a witness that cannot stop it. The CLI flag still wins when you type it, and the check still tells the truth when it stands in the right folder at the right moment.&lt;/p&gt;

&lt;p&gt;What do you run before you install a repo you did not write? The check in the repo folder, the CLI flag every time, or do you trust the lockfile and the one-line output like Ana did on that Friday? Tell me what your setup actually does, not what it is supposed to do. I want to know which of these four problems has bitten you, and whether the bite came from the override, the silence, or a check that was read in the wrong folder.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>npm</category>
      <category>javascript</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Provider Said 'Already Charged'. Nothing Was Charged.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Sat, 21 Nov 2026 04:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/the-provider-said-already-charged-nothing-was-charged-49l4</link>
      <guid>https://dev.to/aheadkit/the-provider-said-already-charged-nothing-was-charged-49l4</guid>
      <description>&lt;p&gt;Saturday morning, before coffee, a customer called Ana wrote in. She had tried to buy the $29 book twice, and twice my site told her she had already paid. Her bank showed nothing, and no order existed on my side. She asked whether I had taken her money and forgotten the book. I had not taken anything. My checkout had refused her money and then told her the refusal was her own history.&lt;/p&gt;

&lt;p&gt;That email is the whole piece. A provider saying "already charged" is a rumour, not a receipt, and most payment code treats it as a verdict. It should not. On a first attempt the provider's word can be wrong in the direction nobody checks for: it can say the money moved when nothing moved at all. If your code believes it, you do something quieter than double-charging anyone. You turn away a customer who is trying to pay you, and no statement, no dashboard, no alert ever shows you did it.&lt;/p&gt;

&lt;p&gt;ilragioniere put this to me in the comments, and he put it better than I could. He called it the false positive, and the quietest failure in the whole series: a provider that answers "already charged" when nothing was charged skips a real charge forever, and no statement ever shows it. His floor under it: the provider's own settlement report, a charge record nobody prunes, dated, independent of the key. Inside the lag, answer "unknown, hold" and let the file settle it when it lands. So I ran his shape. I built a small stand-in for the provider, one that lies on purpose, and I put two ways of handling a first attempt through the same 10 tries, twice over.&lt;/p&gt;

&lt;p&gt;The stand-in answers "already charged" on every first attempt, even when no charge exists and no settlement line exists. That is the lie, stated plainly. The first handler is the three-line version: if the provider says already charged, skip. It never looks at the settlement file. The second handler reads the provider's answer and refuses to trust it. It says "unknown, hold", waits for the settlement file to land, and reads that instead. No line in the file means no settlement, and the charge goes ahead. A matching line means the charge is real, and nothing is charged twice.&lt;/p&gt;

&lt;p&gt;The count is what makes this more than an opinion. Across 60 first attempts the stand-in said "already charged" 60 times, and in all 60 nothing had been charged. The trusting handler skipped 20 out of 20 real charges, $580 of payments refused, and never once looked at the file. The careful handler charged 20 out of 20 when the file held no matching line, $580 taken properly, and recognised the charge 20 out of 20 times when the file did hold one, with zero second charges. Same lie, same tries. The only difference was what each handler treated as evidence.&lt;/p&gt;

&lt;p&gt;Five things I took away from that count.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The lie leaves no trace. A double charge is loud. The customer sees $58 for a $29 book and asks for a refund. A skipped charge is silent. The provider took nothing, the file lists nothing, and the only record of the missing money is a customer deciding whether to write in or just leave. Ana wrote in. Most people do not; they assume the site is broken and buy the book somewhere else. Your numbers stay clean while sales quietly shrink, and nothing in your records can tell you why.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The two mistakes are not the same size. A false "not charged" costs a double charge, a refund, and a thread with an unhappy customer. Somebody sees it the same day. A false "already charged" costs one charge nobody sees, found only if a customer complains. The loud error gets the guardrails and the late-night fixes. The quiet one gets trusted code and a shrug, because nobody has felt it yet. That is exactly backwards. The error you cannot see is the one you have to design against, not the one you will notice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The key cannot rescue this one. The key is a good tool for the job it does. If the charge landed and your own record of it did not, the key stops the retry from charging twice. But this failure happens before any of that. It is a first attempt. Nothing was charged, so there is no key entry worth asking about, and if the key was pruned it is gone anyway. A key proves a retry is the same request. It was never a receipt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The search lags, and the lag has a floor. The other place people look is the charge search: ask by your own order number instead of by key. It beats the key, and the previous piece showed it surviving a pruned key. But a search is not a read. It lags the charge by seconds, and inside those seconds the only honest answer is that you do not know yet. Code that cannot say "I don't know" fills the gap with whatever answer arrives first, usually the provider's confident one. The floor under the lag is the file: the settlement report lands on its own schedule, dated, and once it lands it does not change its mind.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The file is the only thing nobody prunes. Keys get pruned, searches lag. The settlement file is the provider's own record of money that actually moved, written down after the fact, and it answers a different question from the other two: not "do you remember this request" but "did this money move". With the line absent, the careful handler's answer was not "already charged" but "no settlement", with the age of the attempt attached, and then it charged. With the line present, it said charged, and it was right. It is not fast or convenient. It is the one record that does not depend on the answer you are trying to check.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is a limit to what this run can claim, and I would rather state it plainly. The provider here is a stand-in I built, not a real payment company, and the settlement file is one I wrote myself, landing a second after each attempt. The shape of the lie is real and the counts are real, but a real provider's file could arrive late, mangled, or not at all, and I did not measure that. The check that would close this properly needs a real sandbox account, a real charge, a pruned key, and both answers held up against the settlement line. I have not done that one, and I am not going to pretend the stand-in is the same thing. What it does prove is narrower: the three-line shortcut fails every time the provider is wrong, and the hold-and-read shape survives the same lie in both directions, twenty times out of twenty.&lt;/p&gt;

&lt;p&gt;So here is where I land. Never let a provider's "already charged" be the last word on whether money moved. Read it, then check the record that does not depend on it. Inside the lag, say you do not know, wait for the file, and let the file decide. It costs a second and one extra read per attempt. The alternative costs customers you will never hear from, which is a strange price to pay for saving a second.&lt;/p&gt;

&lt;p&gt;Has this one bitten you? As a buyer, were you ever told you had already paid when your bank said otherwise, and what did you do, write in or walk away? As a builder, what do you check first when a charge is in doubt, the provider's answer or your own records, and has the provider's answer ever been wrong for you? Tell me what you found. The quiet failures are the ones I only hear about when somebody says so out loud.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webhooks</category>
      <category>payments</category>
      <category>backend</category>
      <category>programming</category>
    </item>
    <item>
      <title>Stop Trimming Tool Descriptions. They Were Never the Biggest Part.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Fri, 20 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/stop-trimming-tool-descriptions-they-were-never-the-biggest-part-2edn</link>
      <guid>https://dev.to/aheadkit/stop-trimming-tool-descriptions-they-were-never-the-biggest-part-2edn</guid>
      <description>&lt;p&gt;kevinhall left a comment on my piece about the 200-tool menu, and it pointed at the one split my run never made. He had measured real hosted tools, and the heaviest definition he found was almost all an output schema the server had made up from past runs, nothing the author wrote. So the cost was not always in the descriptions. My run never split the output schema out from the description and the input schema, so I could not say whether he was right, or how far it went.&lt;/p&gt;

&lt;p&gt;I split five real server definitions open this week: the filesystem, memory, sequential-thinking, everything, and github servers, 68 tools in total, counted the same way as the earlier runs so the totals reproduce exactly. The answer is messier than either of us expected. kevinhall is right that the cost is not in the descriptions. He is wrong about where it is. And the split turned up something neither of us was looking for, hiding in the heaviest server of all.&lt;/p&gt;

&lt;p&gt;My claim before the numbers: the output schema would be the biggest chunk on the heavy servers, and trimming descriptions would be trimming the wrong thing. The first half was wrong. The second half was right for the wrong reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: the description is the biggest chunk on none of the five servers
&lt;/h2&gt;

&lt;p&gt;Across all 68 tools, 23,298 tokens of definition: descriptions are 2,619 tokens, 11.2 percent. Input schemas are 6,876, 29.5 percent. Output schemas are 2,205, 9.5 percent. The description is not the largest part anywhere.&lt;/p&gt;

&lt;p&gt;On the filesystem server, the input schema is 39.4 percent, the description 26.1, the output schema 18.1. On sequential-thinking, the input schema is 43.8 percent against a 33.8 percent description. On github, the input schema is 84.4 percent and the description is 8.0. And github has no output schema at all, on any of its 26 tools. Stripping every description on all five servers saves 2,619 tokens. The output schema alone is 2,205, nearly as big as all the descriptions put together, and the input schema is nearly three times the descriptions.&lt;/p&gt;

&lt;p&gt;So the advice to trim descriptions is trimming the third-biggest bucket at best. It is not useless. 11 percent is 11 percent, and over forty turns it compounds. But it is not where the cost lives, and anyone selling description-trimming as the fix for definition bloat is selling a haircut for a weight problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: the output schema wins on exactly one server, by 27 tokens
&lt;/h2&gt;

&lt;p&gt;The memory server is the one place kevinhall's shape shows up. Its output schema is 37.3 percent, edging out its input schema at 36.4 percent, and the description is a distant third at 14.2. Stripping every description there saves 453 tokens while the output schema alone costs 1,186, two and a half times more. The three read tools, read_graph, search_nodes and open_nodes, each carry the fattest output schema in the whole set at 238 tokens: the full entity and relation shape, with per-field descriptions.&lt;/p&gt;

&lt;p&gt;But here is the detail that changes the story. I checked the shipped server source instead of guessing, and every output schema in this set is author-written. The memory server's schemas are Zod objects written in the server's own code, reusing the same entity shape as the input schema. The filesystem server's output schema is a generic wrapper the author wrote once: &lt;code&gt;{content: string}&lt;/code&gt;, the identical 40-token schema on fifteen of its sixteen tools, because the server returns every result as one text blob. The "everything" server's two output schemas are plain JSON Schema literals written by hand. None of them was generated from past runs. None of them describes anything the tool actually returns in particular. The filesystem one does not even try: it is a wrapper that says "the result is text", forty tokens, fifteen times over.&lt;/p&gt;

&lt;p&gt;So kevinhall's "made up from past runs" shape does not appear on these five servers. That does not disprove his measurement. His server was a hosted one he did not name, and I could not measure it. It means the pattern is not universal. Whether an output schema dominates depends on whether the server author bothered to write one, and how rich it is. On github, the author did not bother at all. On memory, the author wrote a rich one. The cost follows the author's habits, not the protocol.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: the heaviest server is fat with pictures
&lt;/h2&gt;

&lt;p&gt;The surprise came from the heaviest server in the set. The &lt;code&gt;everything&lt;/code&gt; test server totals 11,914 tokens across 16 tools, and 9,520 of those, 79.9 percent, are icons. Every one of its tools carries two base64-encoded SVG icons, light and dark, 595 tokens each. The single heaviest tool in the whole set, get-header-params at 898 tokens, is 595 tokens of icons, 108 of input schema, 91 of output schema, and 58 of description. The earlier run called that tool fat on schema richness. The split shows it is mostly pictures.&lt;/p&gt;

&lt;p&gt;Strip the icons and the whole test server falls to 2,394 tokens — cheaper than the filesystem server. Whether a host even sends icons to the model is host-dependent, but they are in the listed definition, so they are in the count. And &lt;code&gt;everything&lt;/code&gt; is a test server, so its numbers are real but not representative. It is included because it proves the point the other four servers only suggest: schema and icon richness dominates tool count. A server with 16 tools can cost more than a server with 26, because the cost was never about how many tools there are. It is about what each definition carries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: presence is an author choice, not a protocol fact
&lt;/h2&gt;

&lt;p&gt;Step back and the pattern across all five servers is simple. 28 of 68 tools have an output schema. Github has none. The filesystem server's is a 40-token boilerplate repeated fifteen times. The memory server's is a hand-shaped entity graph. Any claim of the form "output schemas cost X percent" needs the server named alongside it, because the answer is 37 percent on one server, 18 on another, 1.4 on a third, and zero on a fourth. There is no general number. There is only the server in front of you, split open.&lt;/p&gt;

&lt;p&gt;That is the rule I am keeping, and it is narrower than the one I went in with. Split the definition before you trim anything, because the biggest chunk is different on every server, and on most of them it is the input schema, and on one of them it is pictures. The description is never the biggest chunk. Trim it if you like. 11 percent is real money over forty turns. But trim it knowing it is the third thing on the list, not the first.&lt;/p&gt;

&lt;p&gt;The honest limit, stated plainly: these are local stdio servers, not hosted ones. kevinhall measured a real hosted server and did not name it, so I could not re-measure his server. A hosted server that synthesises output schemas from past runs would show a much larger output-schema share than anything here. This run neither confirms nor refutes that shape. It says what the five real official servers actually carry, and what they carry is input schemas, author-written output schemas, and, on the fattest one, pictures.&lt;/p&gt;

&lt;p&gt;Have you ever split one of your own tool definitions open? I would like to hear what the fattest part turned out to be, and whether it was the part you expected.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>programming</category>
    </item>
    <item>
      <title>rm -rf and the Sound It Makes</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Fri, 20 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/rm-rf-and-the-sound-it-makes-1hb4</link>
      <guid>https://dev.to/aheadkit/rm-rf-and-the-sound-it-makes-1hb4</guid>
      <description>&lt;p&gt;The folder is empty.&lt;/p&gt;

&lt;p&gt;Not broken. Not corrupted, not locked, not asking for a password I forgot. Empty. The name is still there on the screen, "client-portal", sitting in the list exactly where it always sat, and when I open it there is nothing inside. White space. A scrollbar that has nothing to scroll. I stare at it for a long time, the way you stare at a room after someone has moved out of it and taken everything, even the smell.&lt;/p&gt;

&lt;p&gt;I know what I did. That is the worst part. There was no crash, no power cut, no mysterious bug to blame. I typed it. I watched it run. I pressed enter like a man posting a letter.&lt;/p&gt;

&lt;p&gt;Three weeks of work. A client portal, the whole thing: login, dashboard, the invoice list, the file upload that took me four days because the progress bar lied and I believed it. Gone in the time it takes to blink. The command does not ask twice. It does not say "are you sure" in the tone of a friend. It just does what you told it to do, and then it waits, politely, for your next instruction, as if nothing happened.&lt;/p&gt;

&lt;p&gt;That is the sound it makes. Nothing. No error, no warning, no sad trombone. Just the cursor, blinking, on a fresh empty line.&lt;/p&gt;




&lt;p&gt;Forty minutes earlier I am sitting at the same desk, and the folder is full, and I am annoyed at it.&lt;/p&gt;

&lt;p&gt;The annoyance is specific. There is a folder inside the project called "client-portal-old" and another one called "client-portal-backup", and a third one called "client-portal-final", and none of them are what their names say they are. The "final" one is from two weeks ago. The "backup" one has half the files. The "old" one is somehow newer than the "final" one. I have been meaning to clean this up for days. Today is the day. I will delete the old ones, keep the real one, and stop living like this.&lt;/p&gt;

&lt;p&gt;I open the terminal. I type the command the way I have typed it a hundred times. The folder name after it. I check it. I check it again, because I am the kind of person who checks. The name looks right. The path looks right. I press enter.&lt;/p&gt;

&lt;p&gt;The screen does what screens do. A line of output, gone too fast to read. And then nothing.&lt;/p&gt;

&lt;p&gt;I do not notice at first. I notice when I look for the folder and it is not where I left it. Not the old one. The real one. The one with three weeks in it. My eyes do the thing eyes do when the brain has not caught up yet: they scan the list again, slower, as if the folder is hiding behind another folder, as if it will step out and say it was a joke.&lt;/p&gt;

&lt;p&gt;It does not step out.&lt;/p&gt;




&lt;p&gt;Three hours earlier, the folder is full, and I am proud of it, and that is what makes the whole thing worse.&lt;/p&gt;

&lt;p&gt;I had just finished the file upload. Four days on a progress bar. Four days because the bar would climb to ninety percent and stop, and I would sit there watching it the way you watch a kettle, and then I found it: the thing was reporting the wrong total. It was measuring the wrong file. One line. One wrong variable, and the bar had been lying to me for a week. I fixed it in eleven minutes and sat there laughing at my own screen, alone, at my desk, because the fix was so small and the days were so long.&lt;/p&gt;

&lt;p&gt;I showed it to a friend on a call. He watched a file climb from zero to a hundred in a straight honest line and said "nice", which is the highest praise a developer ever gives another developer. I closed the call feeling like a person who knows what he is doing. I wrote a commit message that said "upload progress fixed, finally". I meant the "finally" in the warm way. The way you say it when a thing is done.&lt;/p&gt;

&lt;p&gt;That commit is gone too. Everything is gone. The fix, the message, the "finally". The whole three weeks, and the feeling that went with it.&lt;/p&gt;




&lt;p&gt;The morning of the same day, the folder is full, and I am building the invoice list, and I am thinking about the name of the project.&lt;/p&gt;

&lt;p&gt;"Client-portal" is a boring name. I know it is a boring name. I named it on the first day, in a hurry, because the folder needed a name before it needed anything else, and I never renamed it. Every project I have ever made has a boring first-day name that stuck. There is a folder on this machine called "test-final" that holds a whole website. There is one called "new-app-2" that holds the thing I am proudest of. I tell myself I will rename them one day, when there is time, and there is never time, and the names stay, and after a while the boring name starts to feel like the real name, the way a nickname you hate at first becomes the only thing anyone calls you.&lt;/p&gt;

&lt;p&gt;I am building the invoice list and thinking about this, and about how the list needs to show the paid ones in green and the overdue ones in red, and how the red ones should not shout, just sit there quietly, because nobody likes being shouted at by an invoice. Small decisions. The kind that take ten seconds and shape the whole thing. I make about forty of them before lunch and forget thirty-nine.&lt;/p&gt;




&lt;p&gt;A week before that, the folder is nearly empty, and I am starting.&lt;/p&gt;

&lt;p&gt;Starting is the part nobody talks about. The first file. The blank page with a cursor on it, waiting. I sit there for twenty minutes doing nothing that looks like work: moving the window, checking the time, opening the folder and closing it again. Then I write the first line. It is a bad line. I know it is a bad line even as I write it. But it is a line, and a line is a beginning, and a beginning is the only thing a blank folder cannot give you.&lt;/p&gt;

&lt;p&gt;By the end of the first day there are six files. By the end of the first week there are thirty. I do not remember writing most of them. I remember the stuck moments, the afternoons when nothing worked and I walked around the room and came back and it worked, and I remember the small wins, the button that finally lined up, the page that loaded in under a second. The rest is a blur, the way a road trip is a blur except for the wrong turns and the good meals.&lt;/p&gt;

&lt;p&gt;Three weeks. Thirty-something files. One wrong command.&lt;/p&gt;




&lt;p&gt;The folder is empty.&lt;/p&gt;

&lt;p&gt;I sit there for a while, and then I do the only thing there is to do. I open a new folder with the same boring name, and I start again.&lt;/p&gt;

&lt;p&gt;The second version is better. I know that sounds like the kind of thing people say to make themselves feel better, and maybe it is, but it is also true. The first version's mistakes are the one thing I remember perfectly. I remember every place I got stuck, every wrong turn, every line I wrote and then wrote around instead of fixing. This time I do not write around them. I fix them. The upload bar works on the first try. The invoice list takes an afternoon instead of two days. The login page, which took me a week the first time because I kept second-guessing it, takes a morning.&lt;/p&gt;

&lt;p&gt;It is not faster because I am smarter. It is faster because the first version taught me where the walls are, and this time I walk around them instead of into them.&lt;/p&gt;

&lt;p&gt;By the end of the week the folder is full again. Fuller than before, in fewer files, with fewer apologies hidden in the comments. I show it to the same friend on the same kind of call. The file climbs from zero to a hundred in a straight honest line. He says "nice". I do not tell him it is the second time he has seen it. Nobody ever knows. The client never knows. The portal ships on time, and it works, and the first version, the one with the "finally" in its commit message, never existed as far as anyone can tell.&lt;/p&gt;

&lt;p&gt;Sometimes I open the folder just to look at it. Not to change anything. Just to see that it is full. And then I close it, and I check the path twice before I type anything, and I always will now.&lt;/p&gt;

&lt;p&gt;The command still does not ask twice. I am the one who asks twice. Every time.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>discuss</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>`npm config get` Knows Which Layer Won. It Just Won't Tell You.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/npm-config-get-knows-which-layer-won-it-just-wont-tell-you-140i</link>
      <guid>https://dev.to/aheadkit/npm-config-get-knows-which-layer-won-it-just-wont-tell-you-140i</guid>
      <description>&lt;p&gt;fluffydesk left a comment on my last piece about &lt;code&gt;.npmrc&lt;/code&gt; layers, and it named the exact check I had been skipping. I had shown that a repo's own &lt;code&gt;.npmrc&lt;/code&gt; beats your user config: my user file says &lt;code&gt;ignore-scripts=true&lt;/code&gt;, the repo says &lt;code&gt;false&lt;/code&gt;, and the repo wins: the install hook runs. The check I recommended was &lt;code&gt;npm config list&lt;/code&gt;, run inside the repo before installing, because it names the winning file.&lt;/p&gt;

&lt;p&gt;fluffydesk asked about the check people actually run instead. &lt;code&gt;npm config get ignore-scripts&lt;/code&gt; answers with the merged value from wherever you are standing: &lt;code&gt;false&lt;/code&gt; inside the repo, &lt;code&gt;true&lt;/code&gt; from home. Same command, two answers, and no mention that a vote happened. Worse, &lt;code&gt;--location=user&lt;/code&gt; does not rescue it. The flag is accepted, and the command still returns &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So I ran the comparison. Same setup as last time: user config &lt;code&gt;true&lt;/code&gt;, project config &lt;code&gt;false&lt;/code&gt;, a test package with an install hook that leaves a marker file when it runs. Thirteen commands, three locations, every answer recorded. The flag does nothing. That is the claim, and I know it sounds like a small thing, but a flag that is accepted and ignored is worse than a flag that errors, because it lets you walk away believing you asked one layer a question and got its answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: the same command gives two answers, and neither says why
&lt;/h2&gt;

&lt;p&gt;Inside the repo, &lt;code&gt;npm config get ignore-scripts&lt;/code&gt; prints &lt;code&gt;false&lt;/code&gt;. From home, the same command prints &lt;code&gt;true&lt;/code&gt;. From the folder above the repo, &lt;code&gt;true&lt;/code&gt; again. All three answers are the effective value for that spot, and all three are correct in the narrow sense. The install proves it: the hook ran in the repo and did not run in the clean folder. But none of them says which layer won. If you run the check from home and read &lt;code&gt;true&lt;/code&gt;, you walk into the install believing hooks are off. They are not. The command answered the question you typed and hid the question you meant: who decided this?&lt;/p&gt;

&lt;p&gt;That is the trap in its plainest form. The value is right and the understanding is wrong, and the understanding is the part that costs you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: &lt;code&gt;--location=user&lt;/code&gt; is accepted, and then ignored
&lt;/h2&gt;

&lt;p&gt;This is the one fluffydesk called, and they called it exactly. Inside the repo, &lt;code&gt;npm config get ignore-scripts --location=user&lt;/code&gt; returns &lt;code&gt;false&lt;/code&gt;. Not &lt;code&gt;true&lt;/code&gt;, the user layer's value. &lt;code&gt;false&lt;/code&gt;, the project-overridden value. The flag does not error, does not warn, does not print anything extra. It just takes your request to hear from the user layer and hands you the merged answer anyway.&lt;/p&gt;

&lt;p&gt;I ran it from all three spots to be sure. Home: &lt;code&gt;true&lt;/code&gt;. Run root: &lt;code&gt;true&lt;/code&gt;. Inside the repo: &lt;code&gt;false&lt;/code&gt;, with the flag on. The flag changes nothing about the value anywhere. If you believed &lt;code&gt;--location=user&lt;/code&gt; was a way to interrogate one layer at a time, you were never interrogating anything. You were asking the same merged question with extra words attached.&lt;/p&gt;

&lt;p&gt;A flag that errors is honest. A flag that is silently ignored is a trap with good manners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: &lt;code&gt;--location=project&lt;/code&gt; outside a repo answers instead of refusing
&lt;/h2&gt;

&lt;p&gt;The other direction is worse, because it invents an answer. From home, where no project config exists at all, &lt;code&gt;npm config get ignore-scripts --location=project&lt;/code&gt; returns &lt;code&gt;true&lt;/code&gt;, the user value, with no warning that there is no project layer to ask. From the run root, same thing: &lt;code&gt;true&lt;/code&gt;, silence, no complaint.&lt;/p&gt;

&lt;p&gt;Read that as a person would. You asked the project layer a question, and it answered. Except it did not. There is no project layer there. The command reached past the layer you named, took the next value down the chain, and handed it to you dressed as a project answer. If you are writing a check that runs in CI, in a directory you did not verify first, that silent fallback is the difference between "the repo has no override" and "I never actually looked at the repo".&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: only one command names the winner, and it is not the one with JSON
&lt;/h2&gt;

&lt;p&gt;Plain &lt;code&gt;npm config list&lt;/code&gt;, run from inside the repo, is the only command in the whole matrix that tells you which layer won. It prints the user value &lt;code&gt;true&lt;/code&gt; stamped &lt;code&gt;; overridden by project&lt;/code&gt;, then names the winning file by its full path, &lt;code&gt;; "project" config from .../repo/.npmrc&lt;/code&gt;, and then the effective &lt;code&gt;false&lt;/code&gt;. That stamp is the whole story in one line: a vote happened, here is who lost, here is the file that beat them.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm config list --json&lt;/code&gt; shows &lt;code&gt;"ignore-scripts": false&lt;/code&gt; and names no source file at all. So the machine-readable version is the one that drops the one fact you need, and the human-readable version is the one that keeps it. If your tooling parses the JSON, it gets the value and loses the provenance in the same breath.&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;config list&lt;/code&gt; only tells the truth from inside the repo. From the parent folder, the project layer is invisible: &lt;code&gt;true&lt;/code&gt;, user file named, no project section. Same command, same honesty, but the answer depends on where you stand, and standing in the wrong place is the easiest mistake in the whole chain.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Inside &lt;code&gt;repo/&lt;/code&gt;
&lt;/th&gt;
&lt;th&gt;From home&lt;/th&gt;
&lt;th&gt;From outside&lt;/th&gt;
&lt;th&gt;Names the winner?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm config get ignore-scripts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;... --location=user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;... --location=project&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm config list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;npm config list --json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every command took about 0.2 seconds. The check costs nothing. The wrong check costs a hook running on a machine you thought was protected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 5: the value was never wrong, which is why this keeps biting
&lt;/h2&gt;

&lt;p&gt;Here is the part that keeps me from calling the whole thing broken. &lt;code&gt;npm config get&lt;/code&gt; gets the effective value right every time. The install confirms it: hook ran in the repo at 00:14:01 UTC, no marker in the clean folder. If all you need is "what will the install do", &lt;code&gt;get&lt;/code&gt; answers correctly from the right directory.&lt;/p&gt;

&lt;p&gt;But "what will the install do" is not the question people are asking when they type &lt;code&gt;get&lt;/code&gt;. They are asking "am I safe", and safety is a question about layers, not values. A &lt;code&gt;true&lt;/code&gt; from home is not a promise about the repo. A &lt;code&gt;false&lt;/code&gt; inside the repo is not an explanation of who set it. The command gives you the outcome and withholds the cause, and the cause is the thing you need when the outcome surprises you at 2 a.m. in a CI log.&lt;/p&gt;

&lt;p&gt;So the rule I am keeping is narrow, and it is the same shape as the last piece: &lt;code&gt;cd&lt;/code&gt; into the repo, then plain &lt;code&gt;npm config list&lt;/code&gt;, not &lt;code&gt;--json&lt;/code&gt;. Not because &lt;code&gt;get&lt;/code&gt; lies. It does not. But because it answers the question you typed while the question you meant goes unasked. And if you ever catch yourself adding &lt;code&gt;--location&lt;/code&gt; to make the answer more specific, stop. It is accepted, it changes nothing, and the silence afterwards is the command agreeing with a premise it never checked.&lt;/p&gt;

&lt;p&gt;What check have you run that reported the loser without mentioning a vote happened? I would like to hear which command it was, and whether you found out from the output or from the hook running anyway.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>npm</category>
      <category>javascript</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Key Expires in 24 Hours. The Retry Arrives on Monday.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Fri, 20 Nov 2026 07:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/the-key-expires-in-24-hours-the-retry-arrives-on-monday-289c</link>
      <guid>https://dev.to/aheadkit/the-key-expires-in-24-hours-the-retry-arrives-on-monday-289c</guid>
      <description>&lt;p&gt;itsvicmoreno left a comment on my last piece about the crash between the key insert and the charge, and it named the hole my run never tested. My rig crashed the receiver between writing the key and charging the card, in both orders, and measured what each shape lost. But every retry in that run arrived seconds later, while the provider still held the key. itsvicmoreno asked about the retry that arrives after the key is gone.&lt;/p&gt;

&lt;p&gt;The provider's own docs say an idempotency key can be pruned once it is at least 24 hours old. A retry that waits past that, a dead-letter replay after a weekend outage or a row reclaimed the next day, is treated as a brand-new request. The shape as I ran it never tested a retry outside the window. So I built the weekend: same event, same $29 payment for order ORD-1042, a crash after the first charge lands, and then the retry arriving 25 hours later, after the key has expired. Two candidate fixes, and one of them survives. The other one refuses the retry and leaves the order stuck.&lt;/p&gt;

&lt;p&gt;My claim before the numbers: the retry-age cap would be the fix, because refusing a stale retry is simpler than teaching the retry to look anything up. I was wrong about which one holds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: the expired key charges twice, exactly as the docs say
&lt;/h2&gt;

&lt;p&gt;The control arm is the shape most systems actually have. First attempt: the charge lands at the provider, then the receiver dies before marking it done. Twenty-five hours later the dead-letter queue replays it. The provider's key is 90,000 seconds old. The lifetime is 86,400. The provider no longer holds it, so the retry looks like a new request, and the provider charges again.&lt;/p&gt;

&lt;p&gt;Two provider charges. $58.00 for a $29.00 order. One local charge on the books, one charge the customer sees twice and nobody on our side can explain from the local record alone, because the local record says the order was charged once. The retry returned 200, status processed, and nothing in that response says anything went wrong. The double charge is invisible until the customer finds it, which is the same asymmetry as the last piece: a false "already charged" costs one charge nobody sees, and a false "not charged" costs a double charge somebody sees. This one is the second kind, and it still took a customer to notice, because our side of the record looked clean.&lt;/p&gt;

&lt;p&gt;I ran the whole thing twice, and both runs gave the same numbers in every arm. The double is not a flake. It is what the shape does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: the order-id lookup makes the provider's clock irrelevant
&lt;/h2&gt;

&lt;p&gt;The second arm changes one thing. Before retrying, the receiver searches the provider by our own order id, ORD-1042, instead of asking by the key. The key is still expired. The lookup does not care. The provider finds the first charge under that order id, answers "already charged", and the retry stops there.&lt;/p&gt;

&lt;p&gt;One provider charge. $29.00. The retry returns 200, status duplicate, detail "provider already charged (order-id lookup)", and nothing is charged a second time. The order lands in "done" on the local record, which is the part the other fix never manages.&lt;/p&gt;

&lt;p&gt;itsvicmoreno said it first in his follow-up: search the provider by your own order id before retrying, and the provider's clock stops mattering. He was right, and the run proves it in the shape that matters most: the retry that arrives after the key is dead is exactly the retry the lookup saves. The key is a convenience for the first 24 hours. The order id is the record that outlives it. If your retry path only knows the key, it has a 24-hour memory and a weekend-long blind spot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: the age cap refuses in time, and abandons the order
&lt;/h2&gt;

&lt;p&gt;The third arm is the fix I believed in before the run. The retry path refuses any retry older than a 23-hour cap, set below the provider's 24-hour lifetime. The replay arrives at 25 hours. The receiver refuses it with a 422: retry older than cap, needs manual reconciliation.&lt;/p&gt;

&lt;p&gt;One provider charge. $29.00. No double. The money is safe. But look at the local record: the order is still sitting in "processing". Zero local charges. The customer was charged once, the order was never marked done, and the only thing standing between that row and a human is a dead-letter entry that says "needs manual reconciliation". The cap protected the money and abandoned the job. Somebody has to go and finish it by hand, and if nobody does, the customer paid for an order the system still thinks is unfinished.&lt;/p&gt;

&lt;p&gt;That is the honest shape of the cap. It is a backstop, not a fix. It stops the bleeding and leaves the wound open. On a quiet week, one manual reconciliation is nothing. On a weekend outage with a queue full of replays, it is a Monday morning of manual work, and every row in that queue is a customer who already paid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: the two fixes are not symmetric, and the order matters
&lt;/h2&gt;

&lt;p&gt;So which one holds? The lookup, and it is not close. The lookup finishes the order: one charge, done on the record, no human needed. The cap refuses the retry: one charge, processing on the record, human needed. Both keep the money at $29. Only one finishes the work.&lt;/p&gt;

&lt;p&gt;The right shape is both, in this order: lookup first, cap as the backstop. The lookup handles the replay that arrives after the key is gone, which is the common case after an outage. The cap handles the replay the lookup cannot settle — the provider that cannot be searched by order id, the lookup that fails, the answer that comes back "unknown". The cap is the fence at the edge. The lookup is the road.&lt;/p&gt;

&lt;p&gt;The limit I have to state plainly: the provider here is a second table in the same process, modelling exactly one property — an idempotency-key lookup with a 24-hour lifetime. It has no network failures, no provider-side timeouts, no partial provider state. The 25-hour gap was simulated by ageing the stored key in place, not by waiting a day. What the run proves is the shape of the three arms against a key that is gone, not the behaviour of any real provider's prune. And the lookup only works if the provider lets you search by your own order id. If yours does not, the cap is all you have, and you should know what it leaves behind.&lt;/p&gt;

&lt;p&gt;What do you do with retries older than the key lifetime: cap them, look them up, or let them through? I would like to hear which one your system does, and whether you found out from the design or from the second charge.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webhooks</category>
      <category>payments</category>
      <category>backend</category>
      <category>programming</category>
    </item>
    <item>
      <title>Summary-First Lost to Trimming, at 2.6x the Tokens</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Fri, 20 Nov 2026 04:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/summary-first-lost-to-trimming-at-26x-the-tokens-3p2g</link>
      <guid>https://dev.to/aheadkit/summary-first-lost-to-trimming-at-26x-the-tokens-3p2g</guid>
      <description>&lt;p&gt;Yesterday I found that trimming issue text to its first 300 characters nearly doubled a small model's accuracy: 17 out of 24 tasks solved, against 9 out of 24 when the model saw the full text. The failure mode was obvious. The model fixated on issue 412, a crash-on-launch bug, and answered 412 for tasks where the answer was something else entirely. A reader, nikodim_apps, asked the natural next question: what if you put a short summary of every issue first, and the full text after it? The model would see the whole field before it locks onto one candidate. That sounded right. I ran it. It did not work, and the way it did not work is more interesting than a plain loss.&lt;/p&gt;

&lt;p&gt;The setup is identical to yesterday's, so the numbers compare cleanly. Same model, Qwen2.5-1.5B-Instruct, quantized, running locally. Same 12 tasks, same prompts, temperature 0, six calls per task at most. Three arms: full text of all five issues, trimmed text (first 300 characters plus title and label), and the new one — a five-field summary of every issue placed first, then the full text. A thirteenth task, suggested by raju_dandigam, hides its decisive clue after the first 300 characters. The trim arm cannot see it; the summary and full arms can. Every arm ran twice; the second run came back bit-identical to the first, temperature 0 plus the server's prompt cache, so the two reps are one measurement repeated, not two independent ones. I am counting them as 24 tasks, not 48.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;p&gt;Summary-first solved 16 of 24 (66.7%). Trim solved 17 of 24 (70.8%). Full solved 9 of 24 (37.5%). Summary-first is a huge improvement over full text and a dead heat with trim, and it costs 2.6 times trim's tokens to get there. Mean prompt tokens per turn: summary 1,724, trim 673, full 1,421. Per task: summary 5,172, trim 2,020, full 5,475. The summary arm's first prompt alone is 7,686 characters against trim's 2,275. Every task in every arm took exactly three turns with exactly one second look: the model lists the issues, re-reads the one it is about to answer, and answers. That second look is a confirmation, not a search.&lt;/p&gt;

&lt;p&gt;So the summary buys nothing trim does not already buy, at two and a half times the price. That is the headline. But the four problems below are why it matters, because each one is a different way the obvious fix failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The fixation survives the summary
&lt;/h2&gt;

&lt;p&gt;The summary arm answered issue 412 on 10 of its 24 tasks. Eight of those answers were wrong. Every single one of its eight failures is the same answer: 412, bug. Tasks whose correct answers were 397 (enhancement), 393 (documentation), 404 (bug), and 375 (good first issue) all came back 412.&lt;/p&gt;

&lt;p&gt;Think about what that means. The summary of 412 is sitting right there in the first prompt, next to four other summaries, and the model still locks onto it. The summaries did not give the model a map of the field; they gave it five candidates, and it picked the loudest one — the crash-on-launch bug, the most dramatic issue in the set — and stopped looking. A summary does not fix a fixation. It just makes the thing the model fixates on arrive sooner.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The summary costs more than the full text's problem, not less
&lt;/h2&gt;

&lt;p&gt;Trimming works because it removes the text that drags the model toward the wrong issue. Summarizing does the opposite. It adds text on top of the full text. The summary arm's prompt is bigger than the full arm's, and its token bill per task (5,172) is nearly the same as full (5,475) — while trim does the same job for 2,020. If you are paying per token, summary-first is the worst of both worlds: full-text accuracy would be embarrassing at that price, and trim-level accuracy is available for less than half.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The late-clue test came back mixed, and one arm's win is a leak
&lt;/h2&gt;

&lt;p&gt;Task 13 hides its decisive clue after the first 300 characters. Summary solved it twice, trim solved it twice, full failed twice. On the surface that looks like a win for summaries. It is not, quite.&lt;/p&gt;

&lt;p&gt;The full arm re-read issue 412 and answered 412. The fixation again, now on a task designed to punish it. The trim arm, though, did not solve it from the clue — it could not see the clue. It solved it from the visible fields alone: issue 417's title and its label, "bug", against the distractor 419's "enhancement". The label field leaks the signal the late clue was meant to isolate. So trim's 2-for-2 on this task is real accuracy and a flawed test at the same time. The honest reading: the late clue did not decide anything, because the labels decided it first. If you want a clean test of whether a model reads past 300 characters, strip the labels too.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The second rep added nothing
&lt;/h2&gt;

&lt;p&gt;Both reps returned identical answers and identical token counts in every arm. That is expected at temperature 0 with a prompt cache, and it is worth saying plainly because it changes what "two reps" means here. I have one measurement, confirmed stable, not two measurements. The wall clock, meanwhile, told a different story — the summary arm's first rep took 2,914 seconds under the morning's CPU load and the second took 269 — but token counts do not care about wall time, and neither should the conclusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would do instead
&lt;/h2&gt;

&lt;p&gt;Trimming stays the default. It is cheaper, it scores the same, and it has one clear mechanism: less text, fewer chances to fixate. Summaries are not useless — they are the right shape when the model genuinely cannot see the whole field, when the candidate set is large and the summaries are the only way in. But when the field is five issues and the model can already see them, a summary is decoration on a fixation. The next experiment is not a better summary. It is a prompt that makes the model name two candidates before it answers, or a test setup that hides the labels, or both. The fixation is the problem. Everything else is formatting.&lt;/p&gt;

&lt;p&gt;Have you watched a small model fixate like this, one candidate it keeps answering no matter what you show it first? What broke the fixation for you: a different prompt, a different setup, or just a bigger model? I am curious what worked, because summaries did not.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>programming</category>
    </item>
    <item>
      <title>A JSONB Side Table Only Wins on Rows You Rewrite Twice</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Thu, 19 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/a-jsonb-side-table-only-wins-on-rows-you-rewrite-twice-3mki</link>
      <guid>https://dev.to/aheadkit/a-jsonb-side-table-only-wins-on-rows-you-rewrite-twice-3mki</guid>
      <description>&lt;p&gt;I have a table that holds issue reports. Each row has a few fields that change all day (a status, a counter, a timestamp) and one big JSONB column holding the whole issue body. The status flips every time someone triages an issue, the body almost never changes, and the write-ahead log on that database had started to feel like the most expensive part of the whole setup. A reader, johnnylemonny, left a comment on my last piece about JSONB under write load, and his point was blunt: do not split the hot fields into a side table. The big payload already lives outside the row in TOAST, he said, so an update that only touches the hot fields rewrites a narrow tuple with an 18-byte pointer where the payload used to be. The side table would save almost nothing and charge you a second insert, a second primary key index, and a join on every read.&lt;/p&gt;

&lt;p&gt;I believed him. Almost. The reasoning is clean, and clean reasoning about databases has a way of being right right up until you measure it. So I measured it: same workload, two shapes, two payload sizes, everything twice. One thousand rows, hot fields updated in scattered rounds the way a real triage queue updates them, and the log measured before and after each batch so every number below is bytes that actually got written.&lt;/p&gt;

&lt;p&gt;My claim before the numbers: the side table is not a saving. It is a bet on how often you rewrite the row. And like most bets, it pays on some rows and loses on others, and the payload size decides which.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: HOT fires everywhere, and that changes the whole argument
&lt;/h2&gt;

&lt;p&gt;The first surprise is how completely HOT wins. Across the eight cells, 7,996 of 8,000 hot-field updates were HOT updates, every cell at 99.9 percent or better. No index maintenance, no new index entries, just a new tuple version on the same page. That needs two things to be true: the columns you change are not indexed, and the page has free space. I gave the tables room with a fillfactor of 80, and I updated rows scattered across the table instead of sweeping the whole thing in one go.&lt;/p&gt;

&lt;p&gt;That second detail matters more than it looks. My first attempt swept all 1,000 rows in a single update, and HOT fired only about a quarter of the time, because rewriting every row on a page burns through its free space in one pass. Scattered writes are what a live queue actually does, and under scattered writes HOT is not a sometimes thing. It is the whole story. If your hot fields are indexed, or your pages are packed full, none of what follows applies, and that is the first thing to check before you believe any number in this piece, including mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: with a small payload, the split wins by a lot
&lt;/h2&gt;

&lt;p&gt;When the payload is small, about 170 bytes, it stays inside the row. Then the in-table shape pays for it on every update: 368 bytes of log per hot-field update, because each new tuple version carries the payload along. Move the payload to a side table and the same update costs 150 bytes. That is a 218-byte saving per update, about 59 percent, and it is the only cell where the split looks like an obvious win.&lt;/p&gt;

&lt;p&gt;But the split charges rent. Inserting a row now costs 513 bytes of log instead of 334, the extra insert plus its primary key index. Divide one by the other and the break-even is under one update per row: 179 bytes extra on the insert, 218 saved on each update. Any row that gets rewritten even once has paid for the split. Most rows in a triage queue get rewritten more than once, so for small inline payloads the side table is a fair trade, and the argument against it mostly fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: with a big payload, TOAST does most of the work, not all of it
&lt;/h2&gt;

&lt;p&gt;This is the cell johnnylemonny was actually arguing about, and he was mostly right. When the payload is about 8,180 bytes of real text, it spills out of the row into TOAST (five thousand toast chunks across my thousand rows), and the in-table hot update drops from 368 bytes to 231. The pointer really is cheap. The whole point of his comment survives the measurement: the scary version of this story, where every status flip rewrites eight kilobytes of issue body, does not happen. HOT plus TOAST already killed it.&lt;/p&gt;

&lt;p&gt;Where his comment goes too far is the word "matching." The in-table update costs 231 bytes and the side-table update costs 151. The side table still wins, by 80 bytes per update, about 35 percent. The tuple version in the main table is still wider than the slim side row, pointer or not. Eighty bytes is not much, and on the insert side the split still charges its 182 bytes, so the break-even moves to about two and a quarter rewrites per row. But it is not zero, and "the split saves nothing" is the kind of clean claim that only survives until someone measures it. He reasoned from the mechanics. The mechanics said the pointer is 18 bytes. The measurement says the row around the pointer still costs you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: the insert is the payload, wherever you put it
&lt;/h2&gt;

&lt;p&gt;The least surprising number is also the one that kills the most arguments. Inserting a row with an eight-kilobyte payload costs about 9,054 bytes of log in the table and 9,236 in the split shape. The payload has to be written once, wherever it lives, and TOAST writes it either way. The split adds 182 bytes to a nine-thousand-byte operation. If you were hoping the side table would make inserts cheaper, it will not, in either size: for the small payload the split makes inserts more expensive, and for the large one it makes them trivially more expensive. The split is a tax on writes that create rows and a discount on writes that change them. Whether that trade is good depends on your ratio of creates to rewrites, and nothing else.&lt;/p&gt;

&lt;p&gt;Reads, for completeness: a thousand point lookups took between 0.12 and 0.29 seconds in both shapes, and the spread between my two repetitions was bigger than any gap between the shapes. At this size there is no join tax worth quoting. On a bigger table, with colder caches, there might be. This run cannot tell you that, and I am not going to pretend it can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 5: the run I threw away
&lt;/h2&gt;

&lt;p&gt;I should say plainly that my first version of this run measured the wrong thing. The "large" payload I built was eight thousand copies of the same letter, and Postgres compressed it down to 173 bytes inside the row, so nothing ever spilled to TOAST and both sizes measured the same small thing. Real issue bodies do not compress fifty to one. I rebuilt the payload out of hundreds of different hashes so it would not compress, confirmed five thousand toast rows, and ran everything again. The numbers above are the second run. The lesson is boring and worth writing down: a test payload has to behave like the real data, and repeating characters do not.&lt;/p&gt;

&lt;p&gt;The other honest limit: these are a thousand rows on one machine, hot fields unindexed, pages given room. Change any of that — an indexed status column, the default fillfactor, a vacuum that cannot keep up — and HOT stops firing, and the in-table shape gets expensive in exactly the way this piece says it does not. The numbers are real. Their range is narrow.&lt;/p&gt;

&lt;p&gt;So the rule I am keeping is simple enough to fit on a sticky note. If the payload stays inline, split when rows get rewritten at all. If the payload spills to TOAST, split only when a row gets rewritten more than twice. And if a row is written once and never touched again, do not split it: you are paying an insert, an index, and a join for a discount you will never collect.&lt;/p&gt;

&lt;p&gt;johnnylemonny's comment was the reason this piece exists, and he was right about the mechanism and wrong about the size of the saving, which is the best kind of comment to get. Where do you draw the line in your own tables — do you split hot fields out, or do you trust HOT and leave the row alone? And if you have measured it rather than reasoned it, what did the log actually say?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
      <category>programming</category>
      <category>performance</category>
    </item>
    <item>
      <title>442,368 Files Turn Off TLS Verification. Three of Them Say They'll Fix It Later.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Thu, 19 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/442368-files-turn-off-tls-verification-three-of-them-say-theyll-fix-it-later-471</link>
      <guid>https://dev.to/aheadkit/442368-files-turn-off-tls-verification-three-of-them-say-theyll-fix-it-later-471</guid>
      <description>&lt;p&gt;The first number came back as 442,368. That was just Python, just one switch — &lt;code&gt;verify=False&lt;/code&gt; — just the files GitHub's code search could see on a Monday morning. I stared at it for a while, because the story every developer tells about this switch is that it's temporary. Someone hit a certificate error, flipped it off to get past it, and meant to come back. 442,368 files is a lot of people meaning to come back.&lt;/p&gt;

&lt;p&gt;So I went looking for the coming back. That is this episode: count the switches, then read what the code around them actually says.&lt;/p&gt;

&lt;h2&gt;
  
  
  The claim
&lt;/h2&gt;

&lt;p&gt;"Everyone turns TLS verification off sometimes. It's always temporary — a local test, a self-signed cert, a TODO to fix it later."&lt;/p&gt;

&lt;p&gt;You have heard some version of this. I have said some version of this. The claim has two parts: the switch is common but excusable, and the excuse is written down next to it. Both parts are checkable, so I checked them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I counted
&lt;/h2&gt;

&lt;p&gt;Eight switches, the ones people actually type when they want the certificate check to go away: &lt;code&gt;verify=False&lt;/code&gt; (Python's requests and friends), &lt;code&gt;ssl._create_unverified_context&lt;/code&gt;, &lt;code&gt;rejectUnauthorized: false&lt;/code&gt; (Node), &lt;code&gt;NODE_TLS_REJECT_UNAUTHORIZED=0&lt;/code&gt;, &lt;code&gt;CURLOPT_SSL_VERIFYPEER, 0&lt;/code&gt; (PHP and C), &lt;code&gt;--insecure&lt;/code&gt;, &lt;code&gt;InsecureSkipVerify: true&lt;/code&gt; (Go), and &lt;code&gt;VERIFY_NONE&lt;/code&gt; (Ruby). I ran each one through GitHub's code search and wrote down the file count it reported, then split the big ones by language. Then I took the first 20 results for each switch — 200 files — and read the lines around every match, classifying each one: does the comment say it's temporary, does it give a real reason, or does it say nothing at all?&lt;/p&gt;

&lt;p&gt;The counts first, because they are the blunt part:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Switch&lt;/th&gt;
&lt;th&gt;Files&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;verify=False&lt;/code&gt;, all languages&lt;/td&gt;
&lt;td&gt;589,824&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;verify=False&lt;/code&gt;, Python&lt;/td&gt;
&lt;td&gt;442,368&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;rejectUnauthorized: false&lt;/code&gt;, all&lt;/td&gt;
&lt;td&gt;394,240&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--insecure&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;340,992&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;InsecureSkipVerify: true&lt;/code&gt;, all&lt;/td&gt;
&lt;td&gt;126,208&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ssl._create_unverified_context&lt;/code&gt;, all&lt;/td&gt;
&lt;td&gt;72,960&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CURLOPT_SSL_VERIFYPEER, 0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;60,160&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;VERIFY_NONE&lt;/code&gt;, Ruby&lt;/td&gt;
&lt;td&gt;30,144&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NODE_TLS_REJECT_UNAUTHORIZED=0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;22,240&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Python's &lt;code&gt;verify=False&lt;/code&gt; by language, since that is the switch the episode is named after: Python 442,368, Go 2,560, TypeScript 1,484, JavaScript 1,432, PHP 1,060, Java 548, Ruby 179. Those seven add up to 449,631; the other roughly 140,000 sit in languages I didn't split out. And &lt;code&gt;rejectUnauthorized: false&lt;/code&gt; splits 234,752 JavaScript to 133,120 TypeScript — the Postgres connection pool in just about every Node backend you have ever seen, usually in a file called &lt;code&gt;db.js&lt;/code&gt;. Sixteen of the twenty JavaScript hits I read were a file called &lt;code&gt;db.js&lt;/code&gt;. Sixteen.&lt;/p&gt;

&lt;p&gt;One honest note on the counting, because I got it wrong before I got it right. My first pass at the fragments looked like the search was matching the two words separately — one file showed &lt;code&gt;ELASTIC_TLS_VERIFY&lt;/code&gt; on one line and &lt;code&gt;rejectUnauthorized = false&lt;/code&gt; on another, and I nearly wrote up the whole episode on inflated numbers. Then I checked the match positions in the raw results and they pointed at one unbroken string: &lt;code&gt;VERIFY=false&lt;/code&gt; inside &lt;code&gt;ELASTIC_TLS_VERIFY=false&lt;/code&gt;. The search matches the literal string, quotes or no quotes — I re-ran the counts both ways and got identical totals, and re-ran the first query a few minutes later and got 589,824 again, exactly. So the counts are real. What they are not is pure. The literal string also shows up inside longer names, and the sample is where that gets measured.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the 200 files actually say
&lt;/h2&gt;

&lt;p&gt;Here is the whole episode in one table. Two hundred files, read one by one:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What the lines around the switch say&lt;/th&gt;
&lt;th&gt;Files&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nothing at all&lt;/td&gt;
&lt;td&gt;111&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;It's in docs or prose, not code using the switch&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A real reason is given&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;It's test, demo, or example code&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;It's temporary / to fix later&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three. Out of two hundred. And if you throw out the 60 docs mentions and look only at the 140 actual code hits, it is still three — 2.1% — against 111 files, 79.3%, that say nothing whatsoever next to the switch.&lt;/p&gt;

&lt;p&gt;Here are the three, word for word, because they deserve to be quoted in full and you should judge for yourself how much of a promise each one is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"not the best for production use to not verify ssl, but fine for testing" — in a LangChain document-retrieval demo, next to &lt;code&gt;ssl._create_unverified_context&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;"Skip verify by default?" — in a Go HTTP client library, a question, not a plan.&lt;/li&gt;
&lt;li&gt;"Keep getting cert errors?? Had to do this to work around it:" — in a Ruby build script, with two question marks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One is a shrug, one is a question, one is a workaround note. None of them says "fix later". None of them has a date, a ticket, or a name. The "temporary" story turns out to be something people say about the switch in conversation. In the code, almost nobody says it at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The silence has shapes
&lt;/h2&gt;

&lt;p&gt;The 111 silent files are not all the same kind of silent, and the differences matter.&lt;/p&gt;

&lt;p&gt;Some of them are worse than silent. One Python helper takes &lt;code&gt;verify=False&lt;/code&gt; as its &lt;em&gt;default parameter&lt;/em&gt; — every caller gets unverified connections unless they ask otherwise. One Ruby script globally reassigns the constant: &lt;code&gt;OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE&lt;/code&gt;, which turns verification off for the whole process, not just one request. Three files have a hardcoded database password sitting a few lines from the switch. One Go file asks its own question and answers it by shipping anyway.&lt;/p&gt;

&lt;p&gt;Some of the silence is honest in a different way: the switch is doing exactly what the tool is for. Exploit proofs-of-concept, network scanners, a certificate-inspection tool that has to see the raw certificate — verification would defeat the purpose. Five of the twenty &lt;code&gt;CURLOPT_SSL_VERIFYPEER&lt;/code&gt; hits came from a single exploit archive. Those files aren't pretending. They just aren't explaining either.&lt;/p&gt;

&lt;p&gt;And then there are the 22 that do explain themselves, and most of them are fine. Self-signed certificates on a local server. A user-facing flag the operator has to choose deliberately — git's own code only turns verification off when its config option says so. The best one I found is in the LastPass command-line client, where the off-switch sits behind a compile flag literally named &lt;code&gt;DO_NOT_ENABLE_ME_MITM_PROXY_FOR_DEBUGGING_ONLY&lt;/code&gt;. That is how you write a temporary switch: make it impossible to enable by accident, and name it so nobody can mistake it for normal.&lt;/p&gt;

&lt;p&gt;The docs mentions deserve their own paragraph, because they bend two of the counts badly. The top twenty &lt;code&gt;--insecure&lt;/code&gt; hits are all documentation — eight of them are translation files for the same download tool, in eight languages, each translating the same help text. The top twenty &lt;code&gt;NODE_TLS_REJECT_UNAUTHORIZED=0&lt;/code&gt; hits are all documentation too, and several of them are warnings &lt;em&gt;against&lt;/em&gt; the setting: the MCP inspector docs tell you flat out not to use it, and point at the proper fix instead. So the headline counts include a lot of files that merely talk about the switch. The sample is the correction to the count, not the other way round.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verdict
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Claim&lt;/th&gt;
&lt;th&gt;Measured&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The switch is rare&lt;/td&gt;
&lt;td&gt;442,368 Python files with &lt;code&gt;verify=False&lt;/code&gt; alone; 589,824 across languages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;It's always temporary&lt;/td&gt;
&lt;td&gt;3 of 200 sampled files say anything like that — and none says "fix later"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;People explain why they did it&lt;/td&gt;
&lt;td&gt;22 of 200 give a reason; 111 of 140 code hits say nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The count is all real code&lt;/td&gt;
&lt;td&gt;60 of 200 are docs or prose; the &lt;code&gt;--insecure&lt;/code&gt; and &lt;code&gt;NODE_TLS_REJECT_UNAUTHORIZED&lt;/code&gt; samples are 20 of 20 docs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The claim fails on the part that matters. The switch isn't rare, and it isn't temporary — or rather, nobody can show it is temporary, because almost nobody writes that down. What the code actually shows is a switch that gets flipped on, uncommented, and left. The "temporary" part lives in conversation, not in the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  The limits, stated plainly
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File counts, not repositories, not people.&lt;/strong&gt; One file counts once however many times the switch appears; forks count separately, so a switch copied into fifty forks counts fifty times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The sample is the search's order, not a random draw.&lt;/strong&gt; The first twenty results per switch are the best matches, not a lottery. The shares describe those 200 files, and I will not pretend they describe all 589,824.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The literal string catches lookalikes.&lt;/strong&gt; &lt;code&gt;ssl_verify=False&lt;/code&gt; in Gradio, &lt;code&gt;cert_verify=False&lt;/code&gt;, &lt;code&gt;hostkey_verify=False&lt;/code&gt;, a JWT library's &lt;code&gt;verify=False&lt;/code&gt; (signature checking, not TLS), a websocket setting with the same field name that checks origins instead of certificates. The sample measures this; the headline count does not separate it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docs and tests are inside the counts.&lt;/strong&gt; The &lt;code&gt;--insecure&lt;/code&gt; total is mostly documentation. The Python total includes test files and exploit code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One morning's snapshot.&lt;/strong&gt; The counts were taken on 2026-11-16 and they move as code is pushed. Public code only — the default branch, files under 384 KB. Everything behind a private repository is invisible to this measurement.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Run it yourself
&lt;/h2&gt;

&lt;p&gt;Type any of the eight strings into GitHub's code search, with a language filter if you want one — &lt;code&gt;verify=False language:python&lt;/code&gt; is the place to start — and read the first page the way I did: not the count, the lines around each match. The full record is in the members' data pack on Patreon, live now, under "LGTM S4 — verify=False in the Wild: Complete Files": every query string, every count with its raw result, and all 200 classified files with the exact comment that put each one in its bucket. If your numbers disagree with mine, that is data too. Tell me.&lt;/p&gt;

&lt;p&gt;Next episode, Saturday 19:00: five free tiers, one real job — the same task pushed through five AI tools until each one hits its wall.&lt;/p&gt;

&lt;p&gt;If three people in two hundred bothered to say "later", and the rest said nothing at all — how many of those 442,368 files do you think anyone is coming back for?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>security</category>
      <category>opensource</category>
      <category>github</category>
    </item>
    <item>
      <title>I Trimmed My Agent's Tool Results to Five Fields. It Solved More, Not Fewer.</title>
      <dc:creator>AheadKit</dc:creator>
      <pubDate>Thu, 19 Nov 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/aheadkit/i-trimmed-my-agents-tool-results-to-five-fields-it-solved-more-not-fewer-27d5</link>
      <guid>https://dev.to/aheadkit/i-trimmed-my-agents-tool-results-to-five-fields-it-solved-more-not-fewer-27d5</guid>
      <description>&lt;p&gt;A reader named izgorodin left a comment on my piece about the 200-tool menu, and it changed the question I thought I was answering. He had run the numbers himself: forty turns of a triage helper whose only tool returns five GitHub issues, and by turn twenty the tool results were 99.1 percent of everything sent, about 326,000 tokens, thirteen times the cost of the menu itself. Keeping only the last six turns flattened the call at around 99,000. Trimming each result to the five fields the helper actually reads kept the whole history and ended turn forty at 36,934. Then he wrote the sentence that matters: his replay called no model and used a fixed answer, so it measured how big the window gets, not whether the helper still finds what it needs.&lt;/p&gt;

&lt;p&gt;That is the question I spent this week answering. Same twelve triage jobs, run twice: once with the full issue text coming back, once with each result cut to the five fields (the number, the title, the labels, the comment count, and the first 300 characters of the body). A real model did the work, a small one I run locally, and every job was scored on whether it found the right issue and the right label. I expected the trim to cost something. I was wrong about the direction.&lt;/p&gt;

&lt;p&gt;My claim before the numbers: trimming the results would save about half the tokens per turn and cost a few solved jobs, because sooner or later the helper would need something the trim cut. The first half was right. The second half was backwards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: the trim did not cost a single solved job
&lt;/h2&gt;

&lt;p&gt;Across both runs, the full results solved 9 of 24 jobs. The trimmed results solved 17 of 24. That is 37.5 percent against 70.8, and the gap is not a rounding error in one direction: the trim won 9 to 4 in the first run and 8 to 5 in the second. Look at the twelve jobs one by one and the trim never loses a job the full text wins. The two arms agree on seven jobs (both solve four, both fail three), and on the other five the trim wins or ties every time.&lt;/p&gt;

&lt;p&gt;Three jobs beat the model in both arms, and they are worth naming because they set the limit. On the Linux dependency guide, the Windows 11 question, and the misspelled error dialog, the model answered the crash-on-launch issue every single time, in both arms, in both runs. Those are small-model limits, not trim damage. The trim cannot be blamed for what the full text also fails, and the fact that the failures are identical in both arms is the cleanest evidence in the whole run that the trim is not hiding anything load-bearing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: the full text has a favourite issue, and it is always the crash
&lt;/h2&gt;

&lt;p&gt;The full arm's failures have a shape, and once you see it you cannot unsee it. On five of its failed jobs, the model answered issue 412, the crash on launch, with the label "bug" — whatever the job actually asked. The job about garbled dates in a CSV export? 412, bug. The job about the install guide missing a Linux step? 412, bug. The job about a typo in an error dialog? 412, bug. It even went back and read 412 a second time before answering it, as if checking its work.&lt;/p&gt;

&lt;p&gt;The trimmed arm does the same second look just as often, about once per job in both arms, but it answers the right issue afterwards. The difference is not that the trim hides the crash report. It is that five short results sit side by side and all five stay visible, while five long ones let the most dramatic report swallow the rest. A small model reading a long list does not weigh five issues. It remembers the loudest one. Cutting the noise did not just save tokens. It changed what the model could pay attention to, and attention was the scarce thing, not information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: the full text can eat the whole window just by looping
&lt;/h2&gt;

&lt;p&gt;The ugliest full-arm result is not a wrong answer. It is no answer at all. On two jobs the model listed the issues, listed them again, and listed them again, six turns of the same call, and burned 10,063 tokens on one job before the turn cap stopped it. The first time I ran this, that loop pushed the prompt past the model's whole window and the run died outright. I added a rule that a repeated call comes back as a one-line note instead of the full dump again, the same rule in both arms, and the run survived, but the loop still cost the job.&lt;/p&gt;

&lt;p&gt;The trimmed arm never needed a fourth turn on any job. Every job ended in three: list, one second look, answer. The full arm averaged close to four turns and needed six on its worst jobs, and each of those extra turns carried another thousand-plus tokens of history with it. The token bill per turn tells the same story from the other side. Turn one is identical in both arms, about 179 tokens. Turn two is 1,749 with full results and 759 trimmed. By the third turn the full arm is sending about 1,900 tokens a turn and the trimmed arm about 1,080. The average across the run is 1,421 tokens per turn against 673, and 5,475 per job against 2,020. The trim cuts the bill by more than half per turn and almost two thirds per job, and the jobs it saves are the ones where the full text was already losing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: the second look is not the price of the trim
&lt;/h2&gt;

&lt;p&gt;izgorodin asked for a miss signal alongside the solved rate, and he was right to: a trim that quietly sends the helper back for the full text every time has not saved anything, it has just moved the cost. So I counted every time the helper asked for one issue in full. Full results: 0.88 second looks per job. Trimmed results: 0.92. That is the same number, inside the wobble between runs, and it is the number that surprised me most. The trim did not drive the helper back for more. The helper goes back about once per job in both arms, usually to look once more at the issue it is about to answer, and the full text costs the same second look for the same reason.&lt;/p&gt;

&lt;p&gt;That kills the natural objection in both directions. The trim is not free because the helper never needs the cut material: it goes back just as often. And it is not expensive because of the second looks, because the second looks cost the same either way. The saving is in the list itself, paid once per turn, and the second look is a fixed cost of doing the job carefully, not a tax on trimming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 5: the honest limit is the size of the model
&lt;/h2&gt;

&lt;p&gt;All of this is one small model on twelve jobs. A bigger model would solve more jobs in both arms (the three jobs that beat this one in both arms would probably fall), and the gap between the arms would likely shrink. The absolute rates, 38 percent and 71 percent, belong to this model and these twelve jobs, and anyone quoting them as general truths about agents is over-reading a small run. Twelve jobs is also small enough that the run-to-run wobble is a whole job per arm. I ran it twice for that reason, and the direction held in both runs, but the direction is the finding, not the percentages.&lt;/p&gt;

&lt;p&gt;The other limit is the jobs themselves. My issue bodies run a hundred-odd words, shorter than real reports. Real bodies are longer, messier, and more repetitive, which would widen the token gap, not narrow it. But it would also give the trim more to cut, and I have not measured that. The five fields are also izgorodin's five, chosen for a triage prompt that cites numbers and suggests one existing label. A different prompt reads different fields, and its trim would cut somewhere else.&lt;/p&gt;

&lt;p&gt;So the rule I am keeping is narrower than the one I went in with. Trim the result to the fields the prompt actually reads, and measure the solved rate before you argue about it, because the cost you expect (the helper going back for what you cut) may not exist, and the benefit you did not expect (the helper deciding better with less noise) may be the whole story. The menu was never the bill. The results were. And the results, it turns out, were also the distraction.&lt;/p&gt;

&lt;p&gt;What do you trim from your tool results, and did you check whether the solved rate moved when you did? I would like to hear the number, either way, and what the helper went back for when it went back.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;P.S. Everything I write stays free — that part doesn't change. But if this one was worth something to you, you can buy me a coffee ☕ (one-time or monthly, both work). It covers the API credits and hosting behind these experiments — and honestly, it's also the nudge that gets the next one started on the evenings I'd otherwise skip it. — Salam&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/AheadKit" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87bycvv0drlpbwxjppyi.png" alt="Buy me a coffee" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aheadkit.gumroad.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2drqzoo445l7bea4exr9.png" alt="AheadKit on Gumroad — Beginner-Friendly Books &amp;amp; Packs" width="800" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
