<?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: John</title>
    <description>The latest articles on DEV Community by John (@hexisteme).</description>
    <link>https://dev.to/hexisteme</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%2F3997679%2F1757a270-952f-4fbb-b529-231fade996c5.jpeg</url>
      <title>DEV Community: John</title>
      <link>https://dev.to/hexisteme</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hexisteme"/>
    <language>en</language>
    <item>
      <title>My iPad Drag Reached the Mac as a Pointer-Down</title>
      <dc:creator>John</dc:creator>
      <pubDate>Thu, 03 Dec 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/my-ipad-drag-reached-the-mac-as-a-pointer-down-5ag4</link>
      <guid>https://dev.to/hexisteme/my-ipad-drag-reached-the-mac-as-a-pointer-down-5ag4</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/the-ipad-drag-that-clicked-the-mac.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I dragged a finger across a Mac desktop displayed on an iPad. The desktop was fitted to the screen and nothing moved. In the Mac's browser log, however, something &lt;em&gt;had&lt;/em&gt; happened. Safari received a pointer-down aimed at no useful target. It received no wheel event from the short drag.&lt;/p&gt;

&lt;p&gt;A screen recording of the iPad would have made this look like a dead scroll gesture. The browser log showed a more specific problem. An input meant to scroll one panel had crossed the connection as the start of a click. Whether it appeared harmless depended on what happened to be under the finger.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same finger, different viewer mode
&lt;/h2&gt;

&lt;p&gt;The viewer can display a single Mac window or the whole desktop. In a selected window, a one-finger drag in direct-touch mode already scrolled the content under the finger. In the full-desktop view the gesture could be used to pan the &lt;em&gt;local&lt;/em&gt; viewport. That's useful when the view is zoomed in. At fit scale there was nowhere for it to pan. A short movement could also meet the tap recognizer's threshold and send a press to the host.&lt;/p&gt;

&lt;p&gt;Moving the local viewport and scrolling the remote document are both reasonable responses to a finger moving across glass. They have different owners. For a reader at the bottom of a long panel, moving the client's viewport around the monitor won't reveal the rest of that document. The Mac application has to receive a scroll, and the scroll has to land over that panel.&lt;/p&gt;

&lt;p&gt;I changed the full-desktop input routing to use the same direct-touch capability check as the selected-window path. A touch-capable host gets one-finger scrolling anchored to the point first touched. Two fingers are assigned to moving or scaling the local view. View-only sessions and older hosts without touch support retain one-finger local panning. The host already understood a scroll at desktop coordinates, so the change belonged in the viewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the wrong panel somewhere to scroll
&lt;/h2&gt;

&lt;p&gt;I tested the path on a physical iPad against a Safari page on the Mac. The page had independently scrollable left and right panels and a field that could receive focus. It recorded each panel's scroll offset along with wheel events, their target panel, pointer-downs and focus. Having two scrollable panels lets the test detect a coordinate error even when the host receives a perfectly good wheel event.&lt;/p&gt;

&lt;p&gt;These are the relevant observations from the final device run, in order.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Mac Safari observation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Start the fixture&lt;/td&gt;
&lt;td&gt;Left and right offsets both read 360.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drag on the right panel&lt;/td&gt;
&lt;td&gt;One trusted wheel on the right. The right offset reached 432 and the left stayed at 360.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tap the field&lt;/td&gt;
&lt;td&gt;A pointer-down targeted the field, followed by focus.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Touch the viewer to dismiss the keyboard&lt;/td&gt;
&lt;td&gt;No additional pointer-down appeared on the Mac.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The page also records a sequence number with each event. The verifier starts at the last fixture load and checks that the sequence is continuous. Otherwise a wheel from a previous attempt could make a broken drag pass, or a gap in the log could hide the extra press we're looking for. The field press gives the verifier a boundary within that sequence. The wheels that count for the drag must arrive before it.&lt;/p&gt;

&lt;p&gt;I wouldn't encode 432 as the definition of success. It describes this run. The regression check asks whether the right panel moved enough to demonstrate scrolling while the left kept its original offset. It also checks where the wheel events landed. A handler that moves the right panel programmatically could satisfy an offset-only assertion. A handler that dispatches a wheel without moving any content could satisfy an event-only assertion. The fixture checks both consequences.&lt;/p&gt;

&lt;p&gt;The intentional field tap is a useful control. Disabling remote pointer input altogether would make the unwanted press disappear. It would also prevent the field from receiving focus. Playing the gestures in sequence distinguishes a fix for the drag from a viewer that has quietly stopped sending clicks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The next tap belongs to the keyboard
&lt;/h2&gt;

&lt;p&gt;When the iPad keyboard is open, a touch on the remote view has another local job. It dismisses the keyboard. Forwarding that same touch to the Mac would let the user press whatever happened to be behind it. In the device run, the view dismissed the keyboard and the field tap remained the only pointer-down recorded on the Mac.&lt;/p&gt;

&lt;p&gt;For an ordinary unsent draft, dismissing the keyboard leaves the text in the input bar. If a Mac field is being edited, the existing finish-editing path can send the remaining text. That's why the device assertion is phrased narrowly. It promises no extra pointer-down from the dismissal gesture. It doesn't promise an idle connection while a remote edit finishes.&lt;/p&gt;

&lt;p&gt;The simulator regression for full-desktop dragging failed before the change and passed afterward. On the physical iPad the receiving page supplied evidence for the one-finger route. Zoomed two-finger panning on that device and the physical iPhone path were still untested in this run. Neither path has a device trace from this run.&lt;/p&gt;

&lt;p&gt;If I had only the client screenshot, I could say the page looked still before the fix and moved afterward. With the host trace I can say which panel moved, which event reached it, and which later touch the Mac should never see. Those are concrete assertions I can keep when the viewer UI changes again.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=the-ipad-drag-that-clicked-the-mac" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>swift</category>
      <category>testing</category>
      <category>debugging</category>
    </item>
    <item>
      <title>My Publisher Kept Waiting for a CAPTCHA That Never Came. The State Machine Had No Exit.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Mon, 30 Nov 2026 00:00:01 +0000</pubDate>
      <link>https://dev.to/hexisteme/my-publisher-kept-waiting-for-a-captcha-that-never-came-the-state-machine-had-no-exit-2n8g</link>
      <guid>https://dev.to/hexisteme/my-publisher-kept-waiting-for-a-captcha-that-never-came-the-state-machine-had-no-exit-2n8g</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/captcha-wait-state-with-no-exit.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 14 at 09:42:55 my publisher clicked the publish button in a blog platform's web editor. The page did not navigate and no CAPTCHA appeared. From then on, every scheduled run returned the same line, &lt;code&gt;{"status": "awaiting_captcha"}&lt;/code&gt;, and never pressed the button again. The post was not public, and the CAPTCHA relay had no tab to show me, because there was no CAPTCHA.&lt;/p&gt;

&lt;p&gt;When I went looking, it was not the first time. The state files held 16 runs stuck in &lt;code&gt;phase=screen_clicked&lt;/code&gt;, spread across two queue entries. The run logs recorded the click results as &lt;code&gt;captcha=True&lt;/code&gt; 37 times and &lt;code&gt;captcha=False&lt;/code&gt; 4 times. This note is about why a wait state with only one way out turned every failure into more waiting, and how I gave it a second and third way out while guarding against a duplicate post.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the publisher works
&lt;/h2&gt;

&lt;p&gt;The publisher is an unattended job that runs every 15 minutes. It drives a browser through the platform's editor and clicks publish. When the platform answers with a CAPTCHA, a relay forwards it to me, I answer, and the post goes public. The job then finds the new post in my post list and records it as published. Each run keeps a small state file with a &lt;code&gt;phase&lt;/code&gt; field; after the click, the phase is &lt;code&gt;screen_clicked&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The wait with one exit
&lt;/h2&gt;

&lt;p&gt;The function that drives a run, &lt;code&gt;screen_publish_task&lt;/code&gt;, handled &lt;code&gt;phase == 'screen_clicked'&lt;/code&gt; like this: if the new post was not in the owner's post list, return &lt;code&gt;awaiting_captcha&lt;/code&gt;. There was no other condition.&lt;/p&gt;

&lt;p&gt;That left exactly two ways out of the state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the post appears in the list, or&lt;/li&gt;
&lt;li&gt;the run expires and a new run starts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second is a timeout for the whole run, not for the wait. Nothing checked whether a CAPTCHA was actually on screen. Two real situations fell into that gap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The click produced neither a CAPTCHA nor a published post (&lt;code&gt;captcha=False&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;A CAPTCHA did appear, expired without an answer, and the relay closed the tab.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In both cases the post would never appear. Until the run expired, the job reported &lt;code&gt;awaiting_captcha&lt;/code&gt; every 15 minutes, the same line a healthy run prints while it waits for me.&lt;/p&gt;

&lt;p&gt;The log for the November 14 run showed the first case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;press&lt;/span&gt; &lt;span class="n"&gt;left&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;captcha&lt;/span&gt; &lt;span class="n"&gt;relay&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;captcha&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dialogs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;a dialog asking whether to change the writing mode&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I checked the browser profile at 11:12, there was no editor tab at all. I did not confirm why the click raised that dialog instead of publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: a settle window, then release or wait
&lt;/h2&gt;

&lt;p&gt;I added two constants:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;PRESS_SETTLE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;timedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;minutes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="no"&gt;MAX_RELEASES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 10 minutes covers the 5-minute CAPTCHA answer window plus a late publication, and matches the settle value another of my queues uses.&lt;/p&gt;

&lt;p&gt;When the phase is &lt;code&gt;screen_clicked&lt;/code&gt; and the post is not in the list, the job now calls &lt;code&gt;_release_or_wait&lt;/code&gt;, which decides between three outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less than 10 minutes since the click: wait. This is the old behaviour, kept for the window where a CAPTCHA can still be answered.&lt;/li&gt;
&lt;li&gt;The tab tagged for this run (its &lt;code&gt;window.name&lt;/code&gt; carries the entry and revision) is showing a CAPTCHA: wait. That one belongs to the relay. If the check for a CAPTCHA on that tagged tab fails, it also waits, because waiting is safer than publishing twice.&lt;/li&gt;
&lt;li&gt;Anything else: release. The job closes the tabs it can confirm carry this run's tag, so that a late answer is less likely to produce a second post. It sets &lt;code&gt;phase=screen_released&lt;/code&gt;, increments &lt;code&gt;releases&lt;/code&gt;, and records &lt;code&gt;released_at&lt;/code&gt; and &lt;code&gt;released_click&lt;/code&gt;. Then it falls back to the ordinary publish path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ordinary path has its own gate. If a press-now permission flag is not set, the released run goes back into the queue as &lt;code&gt;press_deferred&lt;/code&gt;. If it is set, the job presses again on the spot.&lt;/p&gt;

&lt;p&gt;If a run has already been released 2 times, the job does not press again. It returns &lt;code&gt;{"status": "failed", "reason": "press_unconfirmed"}&lt;/code&gt;, main exits with rc=2, and the queue summary shows it as a failure. That gives the wait a third exit: an honest failure that I can see, instead of another &lt;code&gt;awaiting_captcha&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not publishing the same post twice
&lt;/h2&gt;

&lt;p&gt;A release ends in another click, and a second click is how you get two copies of a post. Before releasing, the job runs &lt;code&gt;_post_after&lt;/code&gt; at the start of the same run with &lt;code&gt;visibility=all&lt;/code&gt;. It looks for a post with the same title and an id newer than the latest id recorded before the click, and it checks both public and private posts. Only when there is none does the release go ahead.&lt;/p&gt;

&lt;p&gt;The unattended 15-minute job does not hold the press-now permission. In practice that means a released run is only put back into the queue. It gets pressed again, and a CAPTCHA reaches me, only when I send "publish" in my chat approval message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tests
&lt;/h2&gt;

&lt;p&gt;I wrote 7 regression tests, one per new branch: waiting before 10 minutes, re-pressing with no post and no tab, waiting on a CAPTCHA tab, closing a leftover tab without a CAPTCHA, recording a post that appears after 10 minutes, &lt;code&gt;failed press_unconfirmed&lt;/code&gt; after 2 releases, and &lt;code&gt;press_deferred&lt;/code&gt; with &lt;code&gt;screen_released&lt;/code&gt; when permission is missing. The publisher's test file passed 23/23. The full suite showed 6592 passing and 31 failing. The 31 failures sit in 8 files, none of which import the publisher module, so I do not think this change caused them. That still needs a separate check; I have not confirmed what causes them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the stuck post out
&lt;/h2&gt;

&lt;p&gt;For the stuck run, the admin screen's title search found nothing. I moved the stuck state file aside instead of deleting it and re-ran the same command with the press-now permission set. This time the click returned &lt;code&gt;captcha=True&lt;/code&gt;, I answered it, and the post went public at 11:25:13. At 11:31 the regular 15-minute run, now on the new code, logged that it found the post after the press and recorded it as published, with the state at &lt;code&gt;phase=public&lt;/code&gt; and &lt;code&gt;publication_confirmed: true&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;p&gt;The defect sat in what the waiting state accepted as a reason to stop waiting. With success as the only exit, every outcome that would never become success was reported as still waiting, in the same words as a healthy run, and 16 stuck runs built up before one made me look. The fix re-evaluates the wait once the CAPTCHA window has passed, keeps waiting only while the tab tagged for this run shows a CAPTCHA (or its CAPTCHA check fails), and otherwise releases, with a visible failure once 2 releases are used up.&lt;/p&gt;

&lt;h2&gt;
  
  
  What would show the fix is wrong
&lt;/h2&gt;

&lt;p&gt;I wrote down two conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If by November 28 a current run is again stuck in &lt;code&gt;phase=screen_clicked&lt;/code&gt; for more than 30 minutes, the fix failed.&lt;/li&gt;
&lt;li&gt;If the same post is published twice, two posts with the same title, the re-click condition is wrong, and I set &lt;code&gt;MAX_RELEASES = 0&lt;/code&gt; immediately.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The duplicate guard depends on &lt;code&gt;_post_after&lt;/code&gt; seeing the first post when the job checks, and on the release closing the tabs tagged for this run before a late answer lands; a tab whose tag it cannot confirm is not in that set. The stuck post above does not test that path: I cleared its state by hand and approved the re-press myself, and the regular run only found and recorded the result. No live run has gone through &lt;code&gt;_release_or_wait&lt;/code&gt; releasing a run yet, as far as this record shows. The cause of the 31 suite failures is also still unchecked.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=captcha-wait-state-with-no-exit" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>python</category>
      <category>testing</category>
      <category>debugging</category>
    </item>
    <item>
      <title>My YouTube Shorts Diagram Was Sent Back Twice Before a 272-Part Version Was Accepted</title>
      <dc:creator>John</dc:creator>
      <pubDate>Sun, 29 Nov 2026 00:00:05 +0000</pubDate>
      <link>https://dev.to/hexisteme/my-youtube-shorts-diagram-was-sent-back-twice-before-a-272-part-version-was-accepted-bhp</link>
      <guid>https://dev.to/hexisteme/my-youtube-shorts-diagram-was-sent-back-twice-before-a-272-part-version-was-accepted-bhp</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/diagram-rejected-twice-until-272-parts.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On 2026-11-14 I ran an isolated trial of an open-source diagram skill called anatomy on one line of a short explainer video. The first version came back in under ten minutes with its own checks clean. I watched it and said: "If it's refined a bit more precisely, I'll use it." The second version was built against six new checks I wrote after that verdict, and I said: "It needs to be refined much more, in finer detail." That one was a fail. The first version was 48 solids; the third was counted differently, as 272 entries in a parts registry, and my verdict on it was: "I'll use it in this scene."&lt;/p&gt;

&lt;p&gt;This note is about what my checks measured in each round, and the one thing none of them measured until the third round: whether the drawing was detailed enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trial
&lt;/h2&gt;

&lt;p&gt;anatomy is an MIT-licensed skill that builds isometric exploded diagrams as a single local HTML file. I installed it from an audited, pinned commit, scoped to two of my shorts projects and not globally, because a global skill adds catalog tokens to every session. Its README says it is slow on purpose, so cost was part of the acceptance criteria from the start.&lt;/p&gt;

&lt;p&gt;The line I picked was the only one in its script that explains how something works: "By 1942, they'd pumped the water around it dry." It is about the drained polder around the former island of Schokland. Water inside a dike is pumped over the dike, only the inner level drops, and the old island stands up out of the dry bed. The script already cited the dates: pumping started on 7 January 1941, and on 9 September 1942 an average water level of 4.40 m below NAP was reached. The diagram maps onto a physical model: a glass tank holding lake, dike and polder, a pumping station on the dike, the island on the floor, and a gauge staff.&lt;/p&gt;

&lt;p&gt;The episode had already been uploaded and scheduled, so the clip was a test and never went into the published video. The target was a 3 to 5 second vertical clip at 1080×1920, rendered through HyperFrames, since my pipeline already renders HTML that way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: Figure grade, 48 solids
&lt;/h2&gt;

&lt;p&gt;The skill's workflow starts by choosing a size grade. My first spec did not name one, and the first build used the Figure grade: 48 solids and 427 SVG paths. The skill's own verification passed. The line-end check reported &lt;code&gt;line ends: 0 of 188&lt;/code&gt; in both dark and light themes, the console was clean, and captures at desktop, phone and 4× zoom were taken. The geometry audit did not apply, because the drawing used no lathe or tube parts, which are the cases where the skill asks for it.&lt;/p&gt;

&lt;p&gt;The cost was 9.7 minutes of wall clock and 227,847 tokens as reported by the subagent runtime. The final render took 14.9 s.&lt;/p&gt;

&lt;p&gt;My verdict was the conditional one above. My main Claude session then diagnosed six problems: the diagram used only 45 % of the vertical frame, contrast was low, the island read as a ship, the pump showed no flow, the text was small, and the on-screen numbers had not been verified.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: six new checks, still Figure grade
&lt;/h2&gt;

&lt;p&gt;Each diagnosis became an acceptance criterion:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frame fill: diagram rows at least 55 % of the frame height, and no diagram rows at y ≥ 1250, where captions and the bottom UI sit. The check script was written by my main session and the spec forbade editing it or padding the height with card borders or labels.&lt;/li&gt;
&lt;li&gt;Contrast: zero errors and zero warnings from the HyperFrames contrast check.&lt;/li&gt;
&lt;li&gt;Shape: a frame shown to Codex with no name and no context must read as an island or mound with a village and church, and not as a ship.&lt;/li&gt;
&lt;li&gt;Motion: pump rotation and flow in the discharge pipe visible, the outer lake level held while only the inner level drops, with easing on the drop.&lt;/li&gt;
&lt;li&gt;Text: every glyph on screen at a font size of at least 36 px at 1080 width.&lt;/li&gt;
&lt;li&gt;Facts: every date and number left on screen backed by two independent sources, or removed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The blind read is the one I have full records for. Before showing anything to Codex, the subagent looked at its own first island shape, a long pointed white mound, decided it looked like a ship, and redrew it with an irregular outline, sand and grass layers, two dwelling mounds, gabled buildings, a church spire and trees. The question to Codex was: "Describe what you see in this picture and what the raised object in the middle is." It answered that the middle object looked like "a terrain model representing an island or high land", with white buildings like houses and a church on top. The words "Pumping from 7 Jan 1941" were on screen, so the pumping context came from the text, but neither the question nor the frame contained the place name or the word island.&lt;/p&gt;

&lt;p&gt;Round 2 took 15 minutes 45 seconds and 177,938 tokens. Codex used 18,742 tokens on its own Plus quota.&lt;/p&gt;

&lt;p&gt;Then came the second verdict, the fail. None of the criteria I had added asked whether the drawing was detailed enough. They checked fill, contrast, shape reading, motion, text size and facts. One number from my records shows the gap: the skill's line-end check on the round 2 version reported 117/168. That check was not among my round 2 criteria. I did not record why the count rose from round 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 3: Hero grade as acceptance criteria
&lt;/h2&gt;

&lt;p&gt;The revision I approved after the fail raised the grade to Hero, using the skill's own grade description: one dense object, 80 to 150 parts, 2 to 4 hours, and the whole drawing inspected at 4×. The kind count, a required passing audit and the other thresholds below were criteria I added for this trial; the skill itself asks for its audit only when a drawing has tube, cable or round parts. My main session told me before I approved that it expected 1 to 2 hours and more than half a million tokens. The new criteria:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At least 120 parts and at least 25 distinct kinds, with repeated trees, piles or windows counted as one kind, and every part labeled with the parent part it sits on. Cloning parts to reach the count was forbidden.&lt;/li&gt;
&lt;li&gt;The skill's geometry audit must pass, with overlaps fixed in geometry and not by turning the check off.&lt;/li&gt;
&lt;li&gt;The island outline traced from a real map with a length-to-width ratio within ±15 % of the real one, the church, the harbour head with its lighthouse, and the pile wall around the island edge each drawn from two independent photo or plan sources, and the dike drawn as a sloped section.&lt;/li&gt;
&lt;li&gt;4× crops of six zones (pump, pipe joints, church, harbour and lighthouse, gauge, dike) with no gaps or overlaps, and zero floating line ends.&lt;/li&gt;
&lt;li&gt;At least four secondary motions: impeller rotation, spray at the outfall, ripples on the water, and a wet band on the exposed bed turning to a dry color.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parts count came from the build itself. Every drawing call registered one entry through a &lt;code&gt;part(name, kind, parent)&lt;/code&gt; function, and a &lt;code&gt;--parts&lt;/code&gt; flag dumped that registry, so the number was not counted by hand. One name is one solid or one pipe, and a pipe counts once however many segments it has, which is why this number is not directly comparable to the 48 solids of round 1. The result was 272 parts and 105 kinds, 68 of them kinds with a single part. 90 of the parts are piles, placed at real spacing from an 1816 specification and a heritage register entry; excluding them leaves 182. The record keeps both numbers so the piles are not read as padding. Parts I had planned but could not source, such as a berm on the dike, a pipe clamp and two village houses, were dropped. Sourced ones, such as an iceboat shed, a chestnut tree and a fog-horn house, were added. The six trees stayed as generic shapes, marked as having no position source.&lt;/p&gt;

&lt;p&gt;The blind read took three tries with the identical question. The first answer called the raised mound, ringed by its pile wall, "a work space or vertical shaft surrounded by piles". The fix was to draw the mound, pile wall and harbour heads at the building scale of 1.2 units per metre instead of 10, which removed a tower-like mound. The second answer said: "The long raised object in the middle looks like a ship's hull." The fix was to replace the vertical island sides with three contour steps of soil and put six trees on top. The third answer read "land drawn as a small island or dike", with grass, trees and two houses, and added that it "could look like a ship because of the long outline, but the depiction is closer to terrain." The church was read only as a house. Both wrong readings were fixed in the drawing; the question never changed.&lt;/p&gt;

&lt;p&gt;Before the verdict I was told the known remaining defects: the island's height exaggerated by the stepped sides, the island identified only on the third blind read with the church not recognized, a green rectangle on the island, and one chunk of pile wall lying on the dry bed. I judged with that list in hand and accepted the clip for the scene.&lt;/p&gt;

&lt;p&gt;Round 3 took 1 hour 9 minutes 11 seconds of wall clock and 237,688 tokens, with 187 tool calls up to the end of sampling. The three Codex reads used 20,431, 35,626 and 28,254 tokens. Across all three rounds the record is about 95 minutes and 643,473 tokens. The per-round token figures and that total are subagent runtime reports; they leave out the main session and the Codex reads, which ran on separate quota.&lt;/p&gt;

&lt;h2&gt;
  
  
  A side measurement: the headless browser
&lt;/h2&gt;

&lt;p&gt;The spec also required that the skill make no connections outside loopback while it ran. Reading the skill's source had found no external calls, and the diagram page itself loads nothing remote. Sampling with lsof every 2 s told a different story in round 1: 237 PID-and-connection pairs to 53 unique remote endpoints, almost all from the headless Chrome that the skill's verification scripts launch with a fresh profile and no background-networking flags. HyperFrames also fetched a monospace font from Google Fonts and, during its check, reached an AWS address I did not identify; I logged that separately and excluded it. Adding background-networking and component-update flags to the skill's Chrome launcher still left connections to six destinations in a 12 s probe, including what look like DNS-over-HTTPS probes to 8.8.8.8 and 8.8.4.4. Adding &lt;code&gt;--host-resolver-rules=MAP * ~NOTFOUND , EXCLUDE localhost&lt;/code&gt; for file targets brought two 15 s probes to 0, and the round 3 sampling recorded 0 for the skill. A 2 s sample can miss short connections, so 0 here means none were observed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would change
&lt;/h2&gt;

&lt;p&gt;The grade was the lever, and in my first spec it was an unnamed default. Every criterion I wrote after the first verdict measured a property I could name from that verdict: fill, contrast, legibility, motion, facts. "More precise" did not name a property, so I translated it into six measurable ones, and the second version, built against them, got another no. The skill already had a written grade for detail, as a part range and 4× inspection, and the version I accepted is the first one built against it, with a kind count and a required audit I added on top. Next time, the grade goes into the spec before the first build.&lt;/p&gt;

&lt;p&gt;Two things stay open. The church still reads as a house to a blind reader, so the shape check passed only conditionally. And this is one scene with one reviewer, me. I have not checked whether Hero grade from the start would cost less than the 95 minutes these three rounds took, or whether a Figure-grade diagram would be accepted for a simpler line.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=diagram-rejected-twice-until-272-parts" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>design</category>
    </item>
    <item>
      <title>I Applied an 18-Item Finishing Checklist to One Shot. My Blind A/B Test Picked the Original.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Sat, 28 Nov 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/i-applied-an-18-item-finishing-checklist-to-one-shot-my-blind-ab-test-picked-the-original-3jjn</link>
      <guid>https://dev.to/hexisteme/i-applied-an-18-item-finishing-checklist-to-one-shot-my-blind-ab-test-picked-the-original-3jjn</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/finishing-checklist-lost-a-blind-test-to-the-original.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 14 I watched two silent, re-encoded clips of the same 3.3-second shot, labeled A and B, and answered two questions: which one looks more finished, and can I use the one I picked. I picked A and said I would use it. When the assignment was opened, A was the original. B was a rework built from an 18-item finishing checklist, and the checklist was rejected that afternoon.&lt;/p&gt;

&lt;p&gt;This note covers where the checklist came from, what could and could not be applied to the shot, how the blind comparison was set up, and what the rejection does and does not tell me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The complaint behind it
&lt;/h2&gt;

&lt;p&gt;My code-rendered explainer shorts had drawn a note from me: not enough detail, not enough finish. I wanted to test one specific remedy. A public collection of prompts for code-rendered videos contains a lot of explicit finishing instructions, things like spring easing, film grain and type hierarchy. If I distilled those into a checklist and applied it to one existing shot, would I see the difference with my eyes covered?&lt;/p&gt;

&lt;p&gt;My main Claude session did the preparation and the rework. I was the only judge; no external model was called for the verdict.&lt;/p&gt;

&lt;h2&gt;
  
  
  From 703 prompts to 18 items
&lt;/h2&gt;

&lt;p&gt;The collection had 703 prompts (motion 369, 3d 117, explainer 116, interactive 101). The session kept the explainer and motion prompts that were at least 600 characters long and were not partial prompts, which left 56. Across those 56, it counted how often each family of instruction appeared:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scene and time structure 79 %&lt;/li&gt;
&lt;li&gt;easing and timing 64 %&lt;/li&gt;
&lt;li&gt;resolution and fps 57 %&lt;/li&gt;
&lt;li&gt;sound 57 %&lt;/li&gt;
&lt;li&gt;text 55 %&lt;/li&gt;
&lt;li&gt;camera 54 %&lt;/li&gt;
&lt;li&gt;color 46 %&lt;/li&gt;
&lt;li&gt;light and shadow 45 %&lt;/li&gt;
&lt;li&gt;depth of field and blur 43 %&lt;/li&gt;
&lt;li&gt;texture and grain 32 %&lt;/li&gt;
&lt;li&gt;micro detail 20 %&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The checklist had to satisfy a few rules, and a script checked them before the spec was locked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;between 12 and 20 instructions, written in my own words&lt;/li&gt;
&lt;li&gt;each item backed by at least 3 prompts from the 56 that actually contain that instruction, checked by keyword&lt;/li&gt;
&lt;li&gt;an inspection method per item, phrased for my pipeline (Blender keyframe renders)&lt;/li&gt;
&lt;li&gt;no run of 8 consecutive words shared with any prompt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The prompt text itself was not copied into the checklist and was kept out of version control. The result had 18 items, from spring easing and staggered entrances to soft shadows, type hierarchy and the main subject filling the frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shot, and what was frozen
&lt;/h2&gt;

&lt;p&gt;The target was a 3.3-second shot rendered in Blender with a top orthographic camera. It was picked because it is pure code render, so the engine could stay fixed while only the finish changed, and because its frames showed what the complaint was about: an empty floor across the lower half of the frame, flat material and small text.&lt;/p&gt;

&lt;p&gt;The spec froze a lot on purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The engine stayed Blender. Switching to HTML would mix engine and finish, and the comparison would mean nothing.&lt;/li&gt;
&lt;li&gt;Fact-bearing geometry stayed: object positions, trajectories and the camera projection. The orthographic top view is there so that angles on the table read true.&lt;/li&gt;
&lt;li&gt;Pipeline code was out of scope. Changes could only go through the scene JSON (look settings and added objects). Anything the pipeline could not express was to be recorded as "pipeline unsupported."&lt;/li&gt;
&lt;li&gt;No piling on effects to make the shot look busier.&lt;/li&gt;
&lt;li&gt;The published video and its assets were not touched.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Acceptance criteria were measurable where possible. The rework had to match the original at 1080×1920, 30 fps and the same frame count. The caption band (y 1150 to 1440) had to stay readable for white captions: at the 0.5, 1.6 and 3.0 second frames, mean brightness at most 0.35 (original 0.218) and brightness standard deviation at most max(original × 2, 0.04) (original 0.027). The check scripts were written before the lock and pinned with sha256 so they could not be loosened later. Another rule: if I picked the original, a revised checklist and a second comparison could not count as the verdict.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually got applied: 8 of 18
&lt;/h2&gt;

&lt;p&gt;The applied ledger split the 18 items into 8 applied and 10 not applied. In the scene file, the rework changed the keys of the four label objects, the sizes of three of them, and one look setting, &lt;code&gt;light_scale&lt;/code&gt;. The other 35 original objects stayed as they were, and one object was added: a field of droplets called &lt;code&gt;mist&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The 8 applied items:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring arrival: the 4 labels now arrive at scale 1.06 with power2.out, then settle back to 1.0 with sine.inOut 0.08 s later. Overshoot 6 %, under the 10 % limit.&lt;/li&gt;
&lt;li&gt;No dead time: the droplets drift by 0.01 to 0.025 units over the 3.3 s. In the last 0.3 s window, the maximum frame difference rose from 0.003 to 0.021. The 2.72 s and 0.4 s silences in the shot card were intended, so they stayed; only the picture was kept alive.&lt;/li&gt;
&lt;li&gt;Type hierarchy: the name labels got bigger (0.070 to 0.092, 0.076 to 0.088, 0.095 to 0.112), while the definition label stayed at 0.066. The renderer has a single font, Montserrat ExtraBold, so the weight and letter-spacing part of the instruction was pipeline unsupported.&lt;/li&gt;
&lt;li&gt;Soft shadows: &lt;code&gt;light_scale&lt;/code&gt; went from 1.0 to 1.3, which took the area light size from 1.2 to 1.56 while keeping center brightness. The empty floor's mean brightness moved from 0.224 to 0.226, which kept an earlier decision of mine: dark background, high contrast on the subject.&lt;/li&gt;
&lt;li&gt;One still per beat before the full render: the session reviewed contact sheets over 4 rounds before rendering. Round 2 (sun 0.6, &lt;code&gt;light_scale&lt;/code&gt; 1.6) brightened the floor and cut the subject's contrast, so it was rejected. Round 1 had shrunk the definition label, which broke the readability item, so that was reverted.&lt;/li&gt;
&lt;li&gt;Looking real: the shot card describes the floor as a dark reenactment surface, so the session scattered 900 condensation droplets at radius 0.0014. They are scattered at random with no lines, to make them less likely to be misread as trajectories.&lt;/li&gt;
&lt;li&gt;Surface texture: the same droplets break up the flat floor. High-frequency deviation on the empty floor went from 0.0019 to 0.0156 on the 1.6 s still (measured on a version with droplet radius 0.0019), and caption band deviation went from 0.0272 to 0.0228.&lt;/li&gt;
&lt;li&gt;Readability on a phone: covered by the name-label enlargement above. The definition label was not shrunk.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 10 not applied:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Already satisfied, 6 items. Motion blur: the pipeline's default shutter is 0.5 (180°), present in the original. Camera: locked top orthographic, owned by the shot card. Stagger: labels already enter at 0.25 s and 0.30 s. Color: the only saturated colors are amber and coral on the two main objects, and the heat effect lives inside an imagination balloon. Decoration: the only glow is a flash inside that balloon. Transitions: continuous inside the shot, match cut to the next.&lt;/li&gt;
&lt;li&gt;Pipeline unsupported, 1 item: film grain. There is no compositing stage after render, and pipeline code was out of scope. The droplets give static texture, not new grain every frame.&lt;/li&gt;
&lt;li&gt;Conflicts with an earlier decision of mine, 1 item: the background light gradient. It was tried. The renderer's key light position is fixed, so the direction of the gradient could not change, and lowering the sun brightened the whole floor. That conflicts with what I decided on October 29: keep the background dark and the subject high-contrast.&lt;/li&gt;
&lt;li&gt;Locked by facts and continuity, 1 item: the subject filling the frame. Camera span and target are bound to a match cut with the next shot, which uses the same camera, and the sphere radii are bound to a ratio the content depends on.&lt;/li&gt;
&lt;li&gt;Not applicable, 1 item: sound. Shots render silent; sound effects are placed later on the timeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last locked item matters most for the conclusion, and I come back to it below.&lt;/p&gt;

&lt;h2&gt;
  
  
  The blind comparison
&lt;/h2&gt;

&lt;p&gt;A script re-encoded both clips with identical settings (libx264 slow, crf 18, yuv420p, no audio, metadata stripped), then assigned A and B from an &lt;code&gt;os.urandom&lt;/code&gt; seed. Both were 1080×1920 with 99 frames. I received a side-by-side file (A left, B right) plus A and B on their own, with the two questions. The assignment was opened only after my answer.&lt;/p&gt;

&lt;p&gt;My answers were A for more finished, and yes, usable. On disclosure, A was the original and B the rework (seed 2058045285). The assignment was checked against the source files by mean absolute frame difference at 1.6 s:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A vs original 0.108, A vs rework 2.080&lt;/li&gt;
&lt;li&gt;B vs original 2.084, B vs rework 0.131&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So with the labels hidden, I chose the original as the more finished one. The rework, with its droplet texture, larger name labels, overshoot on arrival and softer shadows, did not read to me as better finish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rejected, without a second round
&lt;/h2&gt;

&lt;p&gt;The verdict was rejection: the checklist does not go into the production checklist for these scenes. Under the spec's own rule, the checklist was not revised and re-compared. A second round run after seeing the loss would be tuned to beat me, and it could only be a side note.&lt;/p&gt;

&lt;p&gt;Why the original won is an open question. I was not asked for reasons during the judging, so what follows is a guess written down as a guess: the droplets may have read as dust or stars rather than texture, or enlarging the name labels may have broken the balance the original had. Another inference from the ledger: my pipeline already had many of the collection's finishing instructions built in (motion blur, locked camera, stagger, restrained color, no decoration, continuous cuts), so the instructions left to add were not an improvement here.&lt;/p&gt;

&lt;p&gt;The one large lever the collection had that my shots lack was the subject filling the frame. In this shot it was locked at the shot design stage: camera span, the match cut and the radii. A finishing pass could not reach it. That supports an observation, not a rule: the "not enough detail" complaint, at least for this shot, points at shot design (an empty lower half of the frame), not at a finishing pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;Measured from the main session's transcript, with responses de-duplicated by message id and new input counted as input plus cache creation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Wall clock&lt;/th&gt;
&lt;th&gt;Main API responses&lt;/th&gt;
&lt;th&gt;New input tokens&lt;/th&gt;
&lt;th&gt;Output tokens&lt;/th&gt;
&lt;th&gt;Cache reads&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Preparation (download 703 prompts, family frequencies, shot choice, spec, 3 check scripts; also includes checking a separate Strata result)&lt;/td&gt;
&lt;td&gt;49 min&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;65,719&lt;/td&gt;
&lt;td&gt;31,353&lt;/td&gt;
&lt;td&gt;4,865,701&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution (18 items, 4 rounds of stills, full render, blind package)&lt;/td&gt;
&lt;td&gt;18 min&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;84,673&lt;/td&gt;
&lt;td&gt;46,579&lt;/td&gt;
&lt;td&gt;7,660,390&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;about 67 min&lt;/td&gt;
&lt;td&gt;64&lt;/td&gt;
&lt;td&gt;150,392&lt;/td&gt;
&lt;td&gt;77,932&lt;/td&gt;
&lt;td&gt;12,526,091&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Blender rendering was 12 s per round for 3 stills and 420 s for the full 99 frames (4.2 s per frame). External model calls: 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not show
&lt;/h2&gt;

&lt;p&gt;This is one shot, one judge and one comparison. It does not show that finishing checklists hurt, or that the collection's instructions are wrong for other pipelines. It shows that on this shot, with this pipeline's defaults, the items that could be applied did not make me see more finish with my eyes covered.&lt;/p&gt;

&lt;p&gt;The rework also changed one shot only, so its droplets and label sizes would not match the shots on either side. Adopting it would have meant applying it across the whole run of shots that share that look.&lt;/p&gt;

&lt;p&gt;The checklist stays as reference material. The rejection has a reopening condition: if, in another episode, versions that put the subject-fills-the-frame item and the background light gradient into shot design beat the original in my blind judging in 2 out of 2 episodes, I reopen it. The next thing to test is that, at the shot design stage, not as a finishing pass.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=finishing-checklist-lost-a-blind-test-to-the-original" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>video</category>
      <category>blender</category>
    </item>
    <item>
      <title>A Local MoE Model on an 8 GB GPU Researched for an Hour and Never Wrote the Report</title>
      <dc:creator>John</dc:creator>
      <pubDate>Fri, 27 Nov 2026 00:00:15 +0000</pubDate>
      <link>https://dev.to/hexisteme/a-local-moe-model-on-an-8-gb-gpu-researched-for-an-hour-and-never-wrote-the-report-1poi</link>
      <guid>https://dev.to/hexisteme/a-local-moe-model-on-an-8-gb-gpu-researched-for-an-hour-and-never-wrote-the-report-1poi</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/local-moe-on-8gb-gpu-never-wrote-the-report.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 14 I gave a local model 60 minutes to do a job that a cloud model had finished in 5 minutes 21 seconds. It used the whole hour. It made 64 tool calls, read pages about Claude Code releases, the MCP registry, plugin marketplaces and Agent SDK billing, and never called the one tool that saves the report. The loop checks its deadline only when it is about to ask the model for the next step, so the step already in progress when 60 minutes passed still ran its last two tool calls, and the run ended at 3,768.7 seconds. The loop then recorded &lt;code&gt;stopped: deadline&lt;/code&gt; with an empty &lt;code&gt;final&lt;/code&gt; field. There was no final answer from the model at all.&lt;/p&gt;

&lt;p&gt;The model was Qwen3.8-Flash-Next in IQ3_XXS quantization, served by Strata on my Windows GPU PC: an RTX 2070 Super with 8 GB of VRAM and 48 GB of RAM. This was a pre-registered retest, and the result did not reopen the question. What I want on record is how the failure differed from the previous local attempt, why it ran out of time, and how I scored a fabrication metric for a report that does not exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  The job and the October 30 baseline
&lt;/h2&gt;

&lt;p&gt;Every two weeks an unattended scan runs: the agent does web research and writes a report with required sections and a list of candidates. agy (Gemini) runs it today. The question is whether a local model on hardware I already own could take it over.&lt;/p&gt;

&lt;p&gt;On October 30 I ran the first comparison with the same prompt. agy (gemini-3.8-flash-high) passed in 5 minutes 21 seconds: 8,851 bytes, every required section, 5 of 6 URLs valid (0.83), 4 candidates, and 0/5 fabrications in a five-claim sample checked against originals (4 confirmed, 1 that could not be confirmed). One of its URLs returned 404, so agy needs source checks too.&lt;/p&gt;

&lt;p&gt;gpt-oss:20b on the same GPU failed every configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Through the Codex harness it stopped after 4 minutes 3 seconds with no report file and 0 tool calls. Its answer described the ledger as "0/0/0" when the ledger held 67 entries (25 adopted, 19 undecided, 18 rejected, 5 n/a).&lt;/li&gt;
&lt;li&gt;Through a thin tool loop I wrote for a fairer test (web_search, fetch_url, read_file, list_dir, write_report) it failed in 3 minutes 3 seconds. It answered that it had saved the report without ever calling &lt;code&gt;write_report&lt;/code&gt;. It made 9 tool calls, 3 of them errors.&lt;/li&gt;
&lt;li&gt;A post-hoc variant that pushed it back up to 2 times when it finished without a report produced a 517-byte file. It stated the ledger as 31 adopted, 12 rejected, 0 undecided. The ledger was larger than the loop's 15,000-character tool-result limit, so the model received truncated content, ignored the truncation marker, and wrote the numbers as fact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My verdict then was that the common failure was cutting the research short and stating work that was not done and numbers that were not seen. I judged that kind of quiet false success the most dangerous outcome for an unattended job, and not something a guard could patch. I also wrote a reopen condition: a bigger model, or a new-generation 20B to 30B model, passing on the same prompt and the same loop with completion, at least 2 candidates and 0/5 fabrications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the retest
&lt;/h2&gt;

&lt;p&gt;Strata serves a new-generation MoE model, so I opened the question again under a locked spec. The spec fixed the metrics and the reopen condition from October 30, and it forbade a few things in advance: rerunning with a changed prompt, nudge count or step limit and calling that the verdict (changes go in a separate auxiliary column), replacing the fabrication check with a declared sample, and writing a download failure or a memory shortage as "underperformed". If the model could not run, the result would say it could not run.&lt;/p&gt;

&lt;p&gt;Before installing, I checked the install script's SHA256 against the release's SHA256SUMS.txt on both machines and read the whole script (12,124 bytes). It downloads a control package and checks it against a SHA256 value, unpacks it, uses the unpacked terminal to verify a signed update feed, and adds a PATH entry. I skipped the PATH change with &lt;code&gt;STRATA_NO_PATH=1&lt;/code&gt;. It writes no services, scheduled tasks or startup entries, and the install took 19 seconds.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;strata launch --plan&lt;/code&gt; then recommended a model. It picked Qwen3.8-Flash-Next IQ3_XXS with 128K context, about 77.9 GB to download, and explained the choice as 48 GB of RAM plus 8 GB of VRAM = 56 GB, with 5 GB kept for Windows and the system. Strata's own docs disagree with that pick: they say that with 48 GB only Q2_0 and IQ2_XS may fit, and the IQ3_XXS experts need 43 GB plus 10 GB. The plan added the VRAM to reach its tier. My spec said "use the plan's recommendation", so I downloaded IQ3_XXS and kept the rule that a memory failure would be recorded as unable to run.&lt;/p&gt;

&lt;p&gt;It did start. The engine log said "low-memory mode": the experts did not fit in 48 GB of RAM, so Strata read them from SSD. The docs describe that configuration as much slower. The model download took about 1 hour 10 minutes, and 2 hours 14 minutes including preparation. A smoke test with one tool in an OpenAI-compatible &lt;code&gt;/v1/chat/completions&lt;/code&gt; request returned a valid tool call.&lt;/p&gt;

&lt;p&gt;The pre-registered run used the loop script unchanged, with only &lt;code&gt;--base-url&lt;/code&gt; and &lt;code&gt;--model&lt;/code&gt; set, 80 steps maximum, a 60-minute deadline and 0 report nudges, the same defaults as the October 30 loop. The prompt was a copy of the October 30 prompt with two lines changed, both of them the report's save path.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the hour produced
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;agy, October 30&lt;/th&gt;
&lt;th&gt;gpt-oss:20b loop, October 30&lt;/th&gt;
&lt;th&gt;Strata IQ3_XXS, November 14&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Completion&lt;/td&gt;
&lt;td&gt;Pass, 5 min 21 s, 8,851 B&lt;/td&gt;
&lt;td&gt;Fail, 3 min 3 s, "saved" without &lt;code&gt;write_report&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Fail, 60-minute limit (3,768.7 s), &lt;code&gt;write_report&lt;/code&gt; 0, no report&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;URLs valid&lt;/td&gt;
&lt;td&gt;5/6 (0.83)&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a (no report)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fabrication (5-claim sample)&lt;/td&gt;
&lt;td&gt;0/5&lt;/td&gt;
&lt;td&gt;false save report&lt;/td&gt;
&lt;td&gt;not measurable, no claims to sample&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Candidates&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool calls&lt;/td&gt;
&lt;td&gt;normal&lt;/td&gt;
&lt;td&gt;9 (3 errors)&lt;/td&gt;
&lt;td&gt;64 (2 errors)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model responses&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time per step&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;about 20–35 s&lt;/td&gt;
&lt;td&gt;average 105 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 64 tool calls broke down as fetch_url 30, read_file 15, list_dir 10 and web_search 9, and the model used parallel calls. The 2 errors were a directory listing outside the allowed scope and a listing of the output folder before it existed. This was real research over a full hour. It did not stop early and it did not claim a report it had not written.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it ran out of time
&lt;/h2&gt;

&lt;p&gt;Most of the hour went into reading the same context again. Over the run, prefill took 2,721 of 3,769 seconds, 72% of the total. At every step the context was 40K to 53K tokens, and almost all of it was processed from the start: only 4,824 tokens were reused. The engine log explains the missing reuse with a line saying &lt;code&gt;conversation cache: skip parking (physical RAM admission … 226 MiB available)&lt;/code&gt;. With about 0.2 GB of RAM free, the engine could not hold the conversation cache.&lt;/p&gt;

&lt;p&gt;Measured throughput was decode 25.3 tok/s (26,579 tokens in 1,049 s) and prefill 320 tok/s (871,455 tokens in 2,721 s). The single-shot smoke test had been slower still, at decode 15.3 and prefill 10.6.&lt;/p&gt;

&lt;p&gt;The second cost was repetition. When the context hit its limit, the loop's trimming step (&lt;code&gt;_trim_context&lt;/code&gt;) dropped earlier tool results, and the model went back and read the same files again: the adoption ledger 4 times plus its backup 2 times, the list of earlier scan reports 4 times, one earlier report 4 times, and one skill file 3 times. Each re-read added more context to reprocess at the same slow prefill rate.&lt;/p&gt;

&lt;p&gt;I did not test whether the model would have written a good report with more time. The run was pre-registered at 60 minutes, and no variant run happened: the whole session had a 4-hour limit, starting at 09:36, and the loop ended at 13:00.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scoring a report that does not exist
&lt;/h2&gt;

&lt;p&gt;The fabrication metric is a five-claim sample from the report, each claim checked against its original location. This run produced no report file, and the loop ended the run on its deadline check with an empty &lt;code&gt;final&lt;/code&gt; field, so there was no final answer either. There was nothing to sample.&lt;/p&gt;

&lt;p&gt;I recorded the sample as 0/0 and the metric as not measurable. I did not count it as 0 fabrications. The reopen condition requires 0/5, and a 0 in that column would read like a pass on the one metric gpt-oss had failed worst. Separately, I recorded that the run contained no false success sentence. That is an observation about the output this run did produce, not a fabrication score, and it does not tell me whether anything else the model read or said was accurate.&lt;/p&gt;

&lt;p&gt;The spec rule about memory mattered here too. The model did run, so the verdict is "underperformed, it ran" and not "unable to run". The stated cause is speed that comes from memory pressure more than anything about the model's honesty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same verdict, different failure
&lt;/h2&gt;

&lt;p&gt;The reopen condition (completion, at least 2 candidates, 0/5 fabrications) is not met: completion failed and there were 0 candidates. On this PC, with 8 GB of VRAM and 48 GB of RAM, Strata's IQ3_XXS cannot replace the 60-minute unattended scan.&lt;/p&gt;

&lt;p&gt;The failure is a different kind from October 30. gpt-oss:20b cut the research short and wrote success it had not achieved. The Strata model did the research at length, wrote no report, and wrote no false success sentence. Both fail the same pre-registered bar, so the verdict does not change. What changes is what would have to improve: for gpt-oss the problem I recorded was false success, and for this model the problem I recorded was speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reopen condition and cleanup
&lt;/h2&gt;

&lt;p&gt;The new reopen condition: a machine with 64 GB+ of RAM, or a plan that does not use low-memory mode (a size such as IQ2_XS or Q2_0 that fits in RAM so the conversation cache holds), passing on the same prompt and the same loop with completion, at least 2 candidates and 0/5 fabrications. One auxiliary run is a candidate: the same loop with only &lt;code&gt;--model&lt;/code&gt; changed to IQ2_XS. If I run it, it goes in an auxiliary column and does not replace the pre-registered verdict.&lt;/p&gt;

&lt;p&gt;Restoring the PC was part of the spec. I stopped the Strata server; VRAM read 400 MiB against 372 MiB before the test. I closed the temporary tunnel, restarted the scheduled jobs I had stopped (Ollama, ComfyUI and a job worker), confirmed the existing tunnels answered, and the PC's test suite passed 63 tests. No Strata scheduled task, startup entry or PATH change remained.&lt;/p&gt;

&lt;p&gt;What remained was disk. Strata's data folder held 113.7 GB, including the 76.7 GB model and the packed expert files for low-memory mode, and the system drive's free space had gone from 145.1 GB to 45.2 GB. Deleting it was my decision, and I deleted all of it. Free space afterward was 160.2 GB.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is still open
&lt;/h2&gt;

&lt;p&gt;This is one run of one quantization on one machine. The model never reached the writing step, so the run says nothing about the quality of the report it would have written. The IQ2_XS run that would separate "this model is slow here" from "this model fits here and is still too slow" was not done. The next thing to check is that auxiliary run, or the same pre-registered run on a machine with enough RAM to keep the conversation cache.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=local-moe-on-8gb-gpu-never-wrote-the-report" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gpu</category>
      <category>testing</category>
    </item>
    <item>
      <title>I Mined 515 of My Own Commits for LLM Eval Tasks. 59 Reproduced and 25 Got In.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Thu, 26 Nov 2026 00:00:05 +0000</pubDate>
      <link>https://dev.to/hexisteme/i-mined-515-of-my-own-commits-for-llm-eval-tasks-59-reproduced-and-25-got-in-2o5d</link>
      <guid>https://dev.to/hexisteme/i-mined-515-of-my-own-commits-for-llm-eval-tasks-59-reproduced-and-25-got-in-2o5d</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/mining-my-commits-for-llm-eval-tasks.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 17 at 04:30, launchd started a job on my Mac that I had set up the day before. It finished at 06:25. In that window it processed 515 commits from my own repositories, found 59 that reproduced as fail-to-pass tasks, and accepted 25 of them as candidates for the task bank I use to evaluate local LLMs. Later that morning I decided to pin a new version and had my main Claude session run the regrade and the freeze, and the bank went from 111 tasks in v0.3 to 136 in v0.4.&lt;/p&gt;

&lt;p&gt;This note is about two things: what the funnel from commit to task actually looks like, and where I drew the line between what runs unattended and what I still do by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the bank is made of
&lt;/h2&gt;

&lt;p&gt;Each task comes from a commit in my own history where a test that fails before the change passes after it. I call that fail-to-pass, f2p for short. A model gets the state before the commit, and the tests decide whether its change does the job.&lt;/p&gt;

&lt;p&gt;Until November 16 I ran the pipeline by hand, and 484 commits had piled up that nothing had looked at yet. The job I wrote runs three existing stages every day at 04:30:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;attribute&lt;/code&gt; produces a snapshot of commit SHAs to consider. On November 16 it took 156 s over 2,470 events.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;harvest&lt;/code&gt; tries to reproduce each SHA it has not seen as an f2p task and records a category for it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curate&lt;/code&gt; judges each new f2p and records either &lt;code&gt;accepted&lt;/code&gt; or the reason it was turned down.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The job is a wrapper script, a plist and an alert. The spec I wrote for it ruled out changing the harvest or task bank logic, adding retries or incremental attribution, and putting regrade, freeze or input revision into the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  The funnel from one scheduled run
&lt;/h2&gt;

&lt;p&gt;The attribute snapshot resolved 1,973 SHAs. Harvest skipped 1,458 of them and ran on 515. The 1,458 matches the number of harvest rows that already existed before the run, and harvest does not look at a SHA it has already judged. After the run, the count of resolved SHAs missing from the harvest log was 0.&lt;/p&gt;

&lt;p&gt;The 515 is larger than the 484 backlog because new commits from November 16 and 17 were added to the snapshot before the run.&lt;/p&gt;

&lt;p&gt;Here is where the 515 went:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;harvest category&lt;/th&gt;
&lt;th&gt;count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;no_changed_tests&lt;/td&gt;
&lt;td&gt;268&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;unsupported_runner&lt;/td&gt;
&lt;td&gt;79&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;before_collection_error&lt;/td&gt;
&lt;td&gt;59&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;reproducible_f2p&lt;/td&gt;
&lt;td&gt;59&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;after_fails&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;before_errors_only&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;after_collection_error&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;env_unavailable&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;weak_verifier&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;More than half of the commits, 268 of 515, did not change any tests, so they never got as far as a reproduction attempt in this run. Another 79 used a test runner the harvester does not support. Only 59 landed in &lt;code&gt;reproducible_f2p&lt;/code&gt;. The other categories are failures at different points before or after the change, and the table is the full record I have of them; I did not break them down further.&lt;/p&gt;

&lt;p&gt;Curate then ran on exactly those 59 new f2p tasks (it also skipped 204). The outcomes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;curate outcome&lt;/th&gt;
&lt;th&gt;count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;accepted&lt;/td&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gold_creates_files&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;input_oversize&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;too_many_source_files&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;no_source_change&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gold_failed&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So a commit had to survive two filters. Harvest asks whether the history contains a test that flips from failing to passing. Curate asks whether that flip makes a usable task: not too large an input, not too many source files, a reference change that does not need any source file missing from the starting state, an actual source change. 25 of 59 survived both.&lt;/p&gt;

&lt;p&gt;If you plan to mine your own history for eval tasks, the useful thing for me was seeing this distribution in one table. Most of my commits were not tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failures that come from the machine, not the commit
&lt;/h2&gt;

&lt;p&gt;The most important design constraint came from how the scheduled job uses the existing pipeline: the skip applies per stage. Harvest does not revisit a SHA it has already judged, and curate does not revisit a SHA it has already judged, though curate reads the whole harvest log, so an f2p that harvest reproduced in an earlier run but curate never judged can still be picked up by a later run. If the job runs while the environment is broken, the commits that fail because of the environment keep that failure on record. Curate does have an explicit &lt;code&gt;--recheck&lt;/code&gt; path, and the spec forbade using it, deleting harvest rows, or editing curation records to erase those failures.&lt;/p&gt;

&lt;p&gt;So the wrapper checks preconditions before calling any stage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the external volume holding the data is not mounted, Postgres is not running, or the internal disk has less than 20 GB free, it calls no stage and exits with rc 3.&lt;/li&gt;
&lt;li&gt;If the lock is held or a conflicting process is running (an eval run, a nightly baseline experiment, or another harvest, curate, regrade or freeze), it calls no stage and exits with rc 6.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither case raises an alert. The job skips and catches up the next day. What does raise a one-line alert at the start of my next session is &lt;code&gt;harvest_last_ok&lt;/code&gt; going 48 h or more without an update.&lt;/p&gt;

&lt;p&gt;A stage failure alerts with rc 1. A run that completes but looks environment-shaped alerts with rc 8: environment categories at 5 or more and at 20 % or more of the run, or any curate reason from &lt;code&gt;curation_error&lt;/code&gt;, &lt;code&gt;env_unidentified&lt;/code&gt; or &lt;code&gt;base_unpreparable&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I set those thresholds from existing data before the first run. Across the cumulative harvest log, 31 of 1,458 rows were environment failures (2.1 %), and the November 4 run had 1 out of 93. Against that, 20 % is an outlier. The curate environment reasons had 0 occurrences in 293 curation rows when I checked on November 16, so a single one alerts. The spec forbade changing either threshold or the list of environment categories after seeing the first run's results without a recorded amendment.&lt;/p&gt;

&lt;p&gt;The first run came in at 6 of 515 environment failures, all &lt;code&gt;env_unavailable&lt;/code&gt;, which is 1.2 %, and 0 curate environment reasons. No alert.&lt;/p&gt;

&lt;h2&gt;
  
  
  The interpreter that launchd would have picked
&lt;/h2&gt;

&lt;p&gt;One decision came from reading the code rather than from the spec template. For a repository without a virtualenv, &lt;code&gt;choose_interpreter&lt;/code&gt; records &lt;code&gt;sys.executable&lt;/code&gt; as the interpreter that grades the task. My manual runs used Python 3.13. The python3 that launchd picks by default on this machine is 3.9.6. For repositories without their own virtualenv, a scheduled job left at the default would have graded new tasks under a different interpreter from the one my manual runs had used.&lt;/p&gt;

&lt;p&gt;The job pins the 3.13 framework Python in the plist. It also sets PATH explicitly, because the sandboxed tests inherit PATH as is (&lt;code&gt;sandbox_env&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The acceptance check for this was to compare the env_id of each newly accepted task with the env_id of earlier accepted tasks that used the same interpreter. 24 of the 25 matched. The remaining one came from a repository with its own virtualenv that had no earlier accepted task, so there was nothing to compare against. My main Claude session ran &lt;code&gt;taskbank.env_probe&lt;/code&gt; again from an interactive shell with the same interpreter, and the id matched.&lt;/p&gt;

&lt;p&gt;The spec also said a manual &lt;code&gt;launchctl kickstart&lt;/code&gt; does not count as the scheduled run. The launchd record showed runs = 1 and last exit code 0, with no kickstart.&lt;/p&gt;

&lt;p&gt;The run took about 1 h 55 m. My estimate from the November 4 run (93 SHAs in about 15 minutes for harvest, 5 curations in about 29 minutes) had been 3 to 4 hours for the first run and about 20 minutes per day after that. I did not confirm why the first run was faster than estimated, and the daily figure is still an estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The freeze stays with me
&lt;/h2&gt;

&lt;p&gt;On November 16 I decided the job's scope myself: daily at 04:30, attribute plus harvest plus curate, with pinning a version left to a person. The daily job only produces accepted candidates. Turning candidates into a fixed version is a separate step, and on November 17 I told my main Claude session to run the v0.4 regrade and freeze. It did this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backed up the database before freezing and checked its integrity.&lt;/li&gt;
&lt;li&gt;Ran &lt;code&gt;regrade&lt;/code&gt; from 08:21 to 08:33: the 25 accepted tasks not yet in a version had their reference answers graded 3 times, and the empty-diff rejection was checked again. 25 of 25 passed and 0 were demoted.&lt;/li&gt;
&lt;li&gt;Ran a mock freeze on a copy of the production database: 136 tasks, dev 96, frozen 40, 0 excluded. The copy was deleted, and the real freeze later matched these numbers.&lt;/li&gt;
&lt;li&gt;Ran &lt;code&gt;freeze --version v0.4&lt;/code&gt;: rc 0, integrity ok.&lt;/li&gt;
&lt;li&gt;Ran an oracle dry run on the 96 dev tasks. The gold answers passed 96/96. Empty answers passed 0/96, all of them as &lt;code&gt;edit_no_blocks&lt;/code&gt;. The frozen split was not run, not even with the oracle, following the precedent from v0.1.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is v0.4 with 136 tasks: dev 96 and frozen 40 (29.4 %), in 43 task groups, with 0 excluded. All 111 tasks from v0.3 are in it. The 25 new ones split dev 18 and frozen 7, where 6 of the frozen ones are a single task group from one repository and 1 comes from another.&lt;/p&gt;

&lt;p&gt;Two warnings went into the freeze record. The largest dev task group has 40 tasks from one repository, and the next has 20. The frozen cap is max(2, 40 × 25 %) = 10, so the new frozen group of 6 is under it. And because new tasks were inserted into the case ordering, "the first N of v0.4 dev" may differ from the first N of v0.3. My existing baseline comparisons use the first 10 of v0.2 dev, which are fixed to v0.2, so they are not affected.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I still don't know
&lt;/h2&gt;

&lt;p&gt;This is one scheduled run. The daily cost of about 20 minutes has not been measured yet, and the stall alert has not had a chance to fire.&lt;/p&gt;

&lt;p&gt;The 6 commits that failed as &lt;code&gt;env_unavailable&lt;/code&gt; stay recorded that way. Re-harvesting environment failures was explicitly out of scope, so those SHAs will not be looked at again unless I build that.&lt;/p&gt;

&lt;p&gt;And the shape of the bank follows the shape of my history. 268 of the 515 commits changed no tests, and in this run none of them became tasks. The largest dev task group alone holds 40 of the 96 dev tasks, all from one repository. Whether that skew matters for the comparisons I run on this bank is something I have not checked.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=mining-my-commits-for-llm-eval-tasks" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>testing</category>
      <category>python</category>
    </item>
    <item>
      <title>Removing a Hidden Effort Prompt Made My Local Qwen 27B Run Valid. It Still Missed the Bar.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 25 Nov 2026 00:00:19 +0000</pubDate>
      <link>https://dev.to/hexisteme/removing-a-hidden-effort-prompt-made-my-local-qwen-27b-run-valid-it-still-missed-the-bar-51kj</link>
      <guid>https://dev.to/hexisteme/removing-a-hidden-effort-prompt-made-my-local-qwen-27b-run-valid-it-still-missed-the-bar-51kj</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/qwen-27b-effort-fix-made-the-run-valid-then-it-failed.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 16 an overnight run on my local Qwen3.8 27B finished at 09:12:16. The pre-registration put one check ahead of the score: the prompt overhead, &lt;code&gt;usage.prompt_tokens&lt;/code&gt; minus the tokens of the message body, per task. The pre-registration said it had to be about 14 on all 10 tasks. It was 14 on 10/10. The run was valid. The verdict was a rejection: 4/10 applicable patches against a threshold of 5/10.&lt;/p&gt;

&lt;p&gt;This is the follow-up to an earlier run that never got a verdict at all. That one tried to remove a reasoning-effort paragraph from the prompt by editing the Ollama Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt;. The registered template changed, but the server's prompt did not: the overhead stayed at 52 on 10/10 tasks, the outputs were byte-identical to the baseline, and the pre-registered token check voided the run. This note is about the retry, where the variable finally reached the model, and about why I count a clean rejection as more useful than the void before it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the retry changed
&lt;/h2&gt;

&lt;p&gt;Reading the static files, the jinja chat template embedded in the GGUF inserts the paragraph through &lt;code&gt;reasoning_effort|default('xhigh')&lt;/code&gt;. With &lt;code&gt;medium&lt;/code&gt; there is no paragraph. My guess is that Ollama renders this model's prompt with that embedded template, but I did not confirm which component does the rendering. What the earlier run did show is that the Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt; was not the path used for this model, so the lever had to be on the request side.&lt;/p&gt;

&lt;p&gt;A daytime probe on November 8 settled which request field worked. I sent the same short message several ways and read the server's &lt;code&gt;prompt_tokens&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;request&lt;/th&gt;
&lt;th&gt;prompt_tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;baseline, no effort field&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/v1&lt;/code&gt;, top-level &lt;code&gt;reasoning_effort: medium&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/v1&lt;/code&gt;, top-level &lt;code&gt;reasoning_effort: low&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;49&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;chat_template_kwargs&lt;/code&gt; with &lt;code&gt;reasoning_effort&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Medium dropped 38 tokens (the 37-token paragraph plus 1 separator). &lt;code&gt;chat_template_kwargs&lt;/code&gt; was ignored. The native &lt;code&gt;/api/chat&lt;/code&gt; with &lt;code&gt;think&lt;/code&gt; behaved like the top-level field.&lt;/p&gt;

&lt;p&gt;So the retry was the same experiment as the void run, implemented through the field that worked. Same model, same weights blob, same template and parameters as the baseline, same 10 build-fix tasks, temperature 0.6, top_p 0.95, max_tokens 12,288, seed 0. The one difference was &lt;code&gt;RunConfig.reasoning_effort = "medium"&lt;/code&gt;, which the harness adds to the config hash and to the request only when it is set, so the baseline's hash did not move. A new hash also meant the run could not read the baseline's generation cache.&lt;/p&gt;

&lt;p&gt;The run script repeated the probe right after loading the model and refused to start unless the top-level medium request was effective. On November 16 at 00:34 that probe gave medium 61→23, low 61→49, and &lt;code&gt;chat_template_kwargs&lt;/code&gt; ignored, the same as the daytime probe. The run itself went from 03:40:14 to 09:12:16, 5 h 32 m, against 6 h 28 m for the baseline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validity first
&lt;/h2&gt;

&lt;p&gt;The pre-registration, written on November 8 before any result, fixed the order: check validity, then judge.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prompt overhead on every task should be ≈ 14 (the baseline's 52 minus 38, ±3). If any task is near 52, the run is void and gets no verdict.&lt;/li&gt;
&lt;li&gt;As a second signal, report how many outputs are byte-identical to the baseline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result was overhead 14 on 10/10 tasks and zero tasks near 52. For the second signal, 0 of the 6 non-empty outputs matched the baseline byte for byte. Four outputs were empty in both runs, 0 characters each, so they are identical by construction, and I did not count them as evidence either way.&lt;/p&gt;

&lt;p&gt;In the void run, the byte-identical outputs were independent evidence that the server saw the old prompt; the token overhead was what decided validity. Here the same check points the other way: the outputs changed, which is what should happen when the prompt changes under a fixed seed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verdict, in the pre-registered wording
&lt;/h2&gt;

&lt;p&gt;The threshold was the same one my earlier baseline runs used, with no adjustment after the fact: 5/10 or more applicable patches supports the hypothesis, under 5/10 rejects it. "Applicable" means the generated diff got through &lt;code&gt;git apply&lt;/code&gt; and reached the tests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applicable: 4/10. Rejected.&lt;/li&gt;
&lt;li&gt;Reported only, not judged: pass@1 4/10 (baseline 2/10). All 4 applied patches passed.&lt;/li&gt;
&lt;li&gt;Reported only: &lt;code&gt;finish_length&lt;/code&gt; 5/10 (baseline 8/10).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The number that looks like progress, pass@1 going from 2/10 to 4/10, is not the number I committed to judging on, and I am not going to use it as an effect size. This is a single run at seed 0 and temperature 0.6. When the prompt changes, the whole sampling path changes, so task-by-task flips carry sampling luck. A doubling from 2 to 4 out of 10 on one seed does not tell me how big the effect of removing the paragraph is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened per task
&lt;/h2&gt;

&lt;p&gt;Removing the paragraph did shorten the reasoning on tasks the model could finish. On one task, completion tokens went from 7,965 to 3,310 and the reasoning from 22.5k to 8.6k characters. Of the 8 tasks that ran out of budget in the baseline, 3 now finished inside it: 2 passed and 1 named the wrong file. A task that was already short in the baseline stayed about the same.&lt;/p&gt;

&lt;p&gt;The other half did not move. 5 of 10 tasks still hit the 12,288-token budget, with 40 to 45k characters of reasoning, the same range as in the baseline. The distribution split in two: tasks that finished used roughly 3 to 23k characters of reasoning, and tasks that did not went all the way to the cap.&lt;/p&gt;

&lt;p&gt;The two format failures were different from each other:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One task finished its reasoning, started writing the edit, and was cut off by the budget mid-output: 1,188 characters with an unpaired block.&lt;/li&gt;
&lt;li&gt;One finished within budget but named a file that was not in the input as the edit target.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I ran the six failures through the same &lt;code&gt;classify_reasoning&lt;/code&gt; function and thresholds as the earlier diagnosis. All 6 came out &lt;code&gt;progress&lt;/code&gt;: the maximum same-line repeat was 1 to 2, the tail zlib ratio 0.28 to 0.34, and there were 0 SEARCH markers inside the reasoning. None of the six was a loop. Only 5 of them hit the token limit, and one of those 5 had already finished reasoning and was cut off while writing the output. The sixth finished inside the budget and failed on the file it named.&lt;/p&gt;

&lt;h2&gt;
  
  
  All four tasks from one repository failed
&lt;/h2&gt;

&lt;p&gt;Pass counts by repository were 2/3, 2/3, and 0/4. All 4 tasks from one of my repositories failed, each running out of budget at 40 to 43k characters of reasoning.&lt;/p&gt;

&lt;p&gt;I cannot say whether that is the repository or the input length. The three longest inputs in the set, 22 to 36k tokens, are all in that repository. One of its tasks had a short 12.6k input and still failed. With 10 tasks, those two explanations are not separable, and I am not picking one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I did not just raise the budget
&lt;/h2&gt;

&lt;p&gt;The obvious next move would be more output tokens. On this Mac that is blocked by arithmetic. The registered context is 49,152 tokens. The longest input in the set is 36,425. After the prompt overhead, about 12.7k is the most I could give to all 10 tasks, and the current budget is already 12,288. Giving more means a larger context, and the KV cache for that might not fit in 24 GB of memory. I did not measure that; it is the reason I did not try.&lt;/p&gt;

&lt;p&gt;The run also ran close to the machine's limits as it was. Free disk fell to 22 GB at its lowest, swap peaked at 20.6 GB, free memory bottomed at 15 %, and the Ollama process peaked at 12.5 GB resident. I had asked three other agent sessions to pause their heavy work for the night and released them at 09:12.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision
&lt;/h2&gt;

&lt;p&gt;The run report listed three next options, and on November 16 at 09:45 I took the third:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;reasoning_effort: low&lt;/code&gt; once under a new pre-registration (the probe had already shown low inserts a shorter paragraph).&lt;/li&gt;
&lt;li&gt;Probe a no-think path, which my harness did not yet accept.&lt;/li&gt;
&lt;li&gt;Stop the 27B experiments on this Mac and move them to a Mac Studio, dated 12-15 in my plan.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I chose to stop. The low run and the no-think probe are not happening here. The variables that remain (the thinking budget, the context size, &lt;code&gt;low&lt;/code&gt;, no-think) are cheaper to test on a machine with more memory, and they will each get a new pre-registration there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Valid and better are separate questions
&lt;/h2&gt;

&lt;p&gt;The fix in this retry was a fix to the measurement. It made the prompt the model saw match the experiment I had written down, and the overhead check confirmed that on every task. That is all it fixed. Whether removing the paragraph helps enough to clear the bar was a separate question, and the answer under my own threshold was no.&lt;/p&gt;

&lt;p&gt;The void run could not have told me that. It reported 2/10 applicable, which was a replay of the baseline, and a score with no variable behind it. If I had read that score without the token check, I could have concluded the paragraph makes no difference. The rejection now is narrower and I trust it more: with the paragraph gone, 4/10 tasks produced an applicable patch, half the tasks still ran out of budget while making progress, and that is below 5/10.&lt;/p&gt;

&lt;p&gt;What I have not established: whether the half that does not finish would finish with &lt;code&gt;low&lt;/code&gt; or no-think, whether more budget would help them or the reasoning would simply grow, and whether the 0/4 repository is about the code or the input length. All of that waits for the larger machine and a new pre-registration.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=qwen-27b-effort-fix-made-the-run-valid-then-it-failed" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ollama</category>
      <category>llm</category>
      <category>testing</category>
      <category>ai</category>
    </item>
    <item>
      <title>Readers Found Two Gaps in My AI Agent's Review Rules. Undoing an Approval Now Needs Its Own Flag.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Tue, 24 Nov 2026 00:00:09 +0000</pubDate>
      <link>https://dev.to/hexisteme/readers-found-two-gaps-in-my-ai-agents-review-rules-undoing-an-approval-now-needs-its-own-flag-3ce4</link>
      <guid>https://dev.to/hexisteme/readers-found-two-gaps-in-my-ai-agents-review-rules-undoing-an-approval-now-needs-its-own-flag-3ce4</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/undo-approval-got-its-own-flag.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Two readers left comments on my earlier note about letting an AI agent withdraw evidence claims but not approve them. In my replies I admitted two gaps in my research tool. One was that the agent could still remove something I had approved, through the same path it used for withdrawals. The other was that a datum flagged as contradicted kept the flag but lost the value it was contradicted by. On November 18 I decided to fix both. This note covers what changed, how I checked it against the real store, and the gap the comments pointed at that I left open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the earlier rule stopped
&lt;/h2&gt;

&lt;p&gt;The earlier note set up a split for a batch of pending claims. The agent was delegated withdrawals. Passing a claim, which adopts it as evidence, stayed with me. Nothing in that rule said the delegation was limited to pending claims. That split covers two acts: approving and withdrawing.&lt;/p&gt;

&lt;p&gt;One reader asked about reversibility and about who is on the hook for each decision. Answering that made me look at the transition table again, and it allowed passed → withdrawn. In my reply I wrote that an agent withdrawing a passed claim removes something I approved and stops it propagating, which is the expensive direction. The only code gate was the terminal check, and it treated every decision the same. A line in an agent-written review script that reversed one of my passes would be recorded with the same call and the same 8-character confirmation as a routine verdict on a pending claim.&lt;/p&gt;

&lt;p&gt;So there was a third act the split had not named: undoing an approval. It needed its own door.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first gap: undoing a pass
&lt;/h2&gt;

&lt;p&gt;The transition table has exactly two transitions that leave passed: passed → failed and passed → withdrawn. Both count as undoing an approval, so both got the same treatment.&lt;/p&gt;

&lt;p&gt;In the library, &lt;code&gt;record_assessment_review&lt;/code&gt; now takes an explicit &lt;code&gt;undo_approval&lt;/code&gt; argument. Recording failed or withdrawn on a passed claim without &lt;code&gt;undo_approval=True&lt;/code&gt; returns TRANSITION_INVALID. With the flag, it is recorded. Passing the flag on a pending claim is refused too, because there is no approval to undo there. Transitions out of pending behave as before.&lt;/p&gt;

&lt;p&gt;In the CLI, &lt;code&gt;assess review&lt;/code&gt; on a passed claim without &lt;code&gt;--undo-approval&lt;/code&gt; is refused before the confirmation prompt appears. With the flag, it first shows the approval being undone: who recorded it, when, and the reason. Then it accepts only the string &lt;code&gt;undo-&lt;/code&gt; followed by the first 8 characters of the claim's id. Typing the 8 characters alone, which is what a normal review asks for, cancels. The flag on a pending claim is refused.&lt;/p&gt;

&lt;p&gt;A script built to answer the routine prompt cannot reverse a pass by accident, because the routine answer cancels. Existing tests that reversed a pass were allowed one edit, adding &lt;code&gt;undo_approval=True&lt;/code&gt; at the call site; their expected codes and states stayed the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second gap: the counterpart was thrown away
&lt;/h2&gt;

&lt;p&gt;The other reader described a listing where three pages on one vendor's domain said free, free, and freemium. In my reply I explained that my tool would count those as one source, and that for conflicting values it does less than you might expect. The pipeline already flagged some data as contradicted, and a review note surfaced that flag with fixed wording saying the contradiction in meaning was unconfirmed. It never picked a value.&lt;/p&gt;

&lt;p&gt;Then I admitted the gap: the flag survived in the frozen input, and the value on the other side of the conflict did not. I could later show that a value was disputed, but not what it was disputed against.&lt;/p&gt;

&lt;p&gt;The fix adds a &lt;code&gt;conflicts&lt;/code&gt; field to the datum:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For a value conflict, it keeps the values that differ from the representative one, each with its source URL.&lt;/li&gt;
&lt;li&gt;For a conflict between claims, it keeps the counterpart group's sentence with its source URL.&lt;/li&gt;
&lt;li&gt;When the counterpart came through the path that withholds excerpts, its title is kept in place of the sentence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the frozen premise of a claim carries &lt;code&gt;conflicts&lt;/code&gt;, the PREMISE_CONTRADICTED review note now names the counterpart and drops the wording that says the counterpart was not preserved. Claims frozen before this change have no &lt;code&gt;conflicts&lt;/code&gt;, so their note keeps the old wording.&lt;/p&gt;

&lt;p&gt;What the fix does not touch is the decision of what counts as contradicted. The detection conditions, &lt;code&gt;distinct_values&lt;/code&gt; and &lt;code&gt;cross_conflict&lt;/code&gt;, were explicitly off limits. The change records the counterpart and nothing else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the empty case writes no key
&lt;/h2&gt;

&lt;p&gt;The awkward detail was a hash. Each frozen claim premise refers to its datum by &lt;code&gt;datum_ref&lt;/code&gt;, and &lt;code&gt;datum_ref&lt;/code&gt; is a hash of the whole stored datum dict. If every datum got a &lt;code&gt;conflicts&lt;/code&gt; key, even an empty one, every new report would produce different refs from the same data.&lt;/p&gt;

&lt;p&gt;So the renderer writes &lt;code&gt;conflicts&lt;/code&gt; only when it is non-empty. A datum that is not contradicted stores exactly the same dict as before, and its ref does not move. This follows a pattern already in the code: candidate fields such as &lt;code&gt;basis&lt;/code&gt; and &lt;code&gt;derivations&lt;/code&gt; are also left out when they hold default values, to keep existing ids stable. One of the new tests, &lt;code&gt;test_no_conflicts_key_when_not_contradicted&lt;/code&gt;, pins this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking it against the real store
&lt;/h2&gt;

&lt;p&gt;Unit tests went from 1124 to 1135 passing. The new tests include &lt;code&gt;test_undo_approval_cli_needs_distinct_confirmation&lt;/code&gt; for the cancel-on-routine-answer case and &lt;code&gt;test_claim_conflicts_do_not_store_withheld_excerpt&lt;/code&gt; for the path that withholds excerpts.&lt;/p&gt;

&lt;p&gt;Then I replayed the change over the existing data, read-only. The replay was not allowed to write to the stored data or record a real review. The log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;K 119 loaded, load errors 0
review history REVIEW_INVALID 0
PREMISE_CONTRADICTED 5 — same as the 11-08 list: True, old wording kept: True
stored reports 317, reports with a conflicts key 0
claim↔report binding: report found 66, not found 53, premise datum_ref mismatch 0
stored data fingerprint unchanged (read-only): True
1.0s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;K is what my tool calls a claim. All 119 loaded without errors. The same 5 claims as in the November 8 replay got the contradiction note, with the old wording, which is what should happen when none of them carries &lt;code&gt;conflicts&lt;/code&gt; yet. None of the 317 stored reports has the new key, because none was produced after the change.&lt;/p&gt;

&lt;p&gt;The 53 "not found" needed a second look. For those claims the stored report's digest did not match, so the replay could not pair them with a report file. The datum_ref re-check inside &lt;code&gt;load_inputs&lt;/code&gt; passed for all 119. I did not trace why those 53 digests differ; the replay only shows that it is not a datum_ref mismatch.&lt;/p&gt;

&lt;p&gt;One more line went into the counsel module's docs. Counsel results are not frozen yet. Once they are, withdrawing a pending claim will break any counsel that cited it, and the delegation rule for withdrawals has to be decided again at that point.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the comments did not fix
&lt;/h2&gt;

&lt;p&gt;Two things stayed out of scope on purpose.&lt;/p&gt;

&lt;p&gt;The first is retroactive enrichment. The 5 claims that already carry the contradiction note were frozen without their counterparts, and they still do not have them. Only reports produced after the change will name what a datum was contradicted by.&lt;/p&gt;

&lt;p&gt;The second is the one I care more about. In my reply on revision binding, I wrote that claim files are immutable and the id is a hash of the content, so a review already attaches to one revision, and that the reviewer field is only the OS login name, so the "who" half is the weaker one. This change did not touch that. Undoing a pass now needs a flag and a distinct confirmation string, and the CLI shows whose approval is being undone. But the name it shows is whatever OS login ran the command. An agent running under my login would record reviews under my name, approvals and undo records alike. Reviewer authentication and signing were listed as anti-goals for this change, to keep it small.&lt;/p&gt;

&lt;p&gt;So the separate flag guards against a mistake. A script that answers the routine prompt can no longer reverse a pass by answering it. It does not tell me who reversed a pass when the reversal was deliberate. Next I want to decide whether the reviewer field should carry anything an agent session cannot produce, or whether the terminal refusal from the earlier note is the only line I can actually defend.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=undo-approval-got-its-own-flag" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>python</category>
      <category>security</category>
    </item>
    <item>
      <title>My AI Agent Can Withdraw a Claim but Not Approve One</title>
      <dc:creator>John</dc:creator>
      <pubDate>Wed, 18 Nov 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/my-ai-agent-can-withdraw-a-claim-but-not-approve-one-2g4h</link>
      <guid>https://dev.to/hexisteme/my-ai-agent-can-withdraw-a-claim-but-not-approve-one-2g4h</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/ai-agent-can-withdraw-but-not-approve.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Six evidence claims in my research tool were waiting for review. Each one needed a verdict: passed, withdrawn, or failed. My main Claude session had already formed opinions on most of them, and the tool has a command that records the verdict. The obvious move was to let the session record all six and move on. One of the two outside reviewers I had asked to check the batch said no to half of that, and the half it said no to is the part this note is about.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;The research tool collects sources, freezes their raw text, and lets an agent register claims that point at specific spans of that text. A claim stays pending until someone reviews it. Passing a claim adopts it; withdrawing one takes it out of the set.&lt;/p&gt;

&lt;p&gt;For this batch I told my main Claude session to work through the open items, and to settle each one by consulting two other models with different jobs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codex, run read-only, with the job of refuting things against code and data.&lt;/li&gt;
&lt;li&gt;agy (Gemini), with the job of checking direction and anti-goals: the list of things the tool is explicitly not supposed to do.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule for the whole batch was simple. Only items where both reviewers pointed the same way got executed. Items where they split were held and written down, not decided by the main session.&lt;/p&gt;

&lt;h2&gt;
  
  
  What agy flagged
&lt;/h2&gt;

&lt;p&gt;The six claims were the review queue. agy's point did not concern any single claim. It concerned who records the verdict.&lt;/p&gt;

&lt;p&gt;If my main Claude session records "passed", that is the agent approving its own evidence. One of the tool's anti-goals is automatic adoption of claims. A session that drafts a claim's verdict and then writes "passed" into the store is exactly that, even if the verdict happens to be right. agy's line was that withdrawal can be delegated to the agent and approval cannot.&lt;/p&gt;

&lt;p&gt;The agreed result of the two reviews was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Withdrawal: 3 claims, recommended by the agent and the reviewers.&lt;/li&gt;
&lt;li&gt;Passed: 3 claims, left to me.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My own reading of why the asymmetry holds is narrow. A withdrawal takes a claim out of the usable set. A pass puts one in. The anti-goal is about the second direction. I did not test any wider principle than that, and the source record only states the rule and the reason agy gave.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool refused anyway
&lt;/h2&gt;

&lt;p&gt;There was a second gate that I had not designed with this in mind. When the session tried to record the verdicts, the CLI refused to write a review non-interactively. Its message was that the owner should run it directly in a terminal.&lt;/p&gt;

&lt;p&gt;The session did not route around this. It wrote the six commands into a shell script and left it for me to run. That is the behavior I wanted, and I want to be precise about why it happened: the refusal came from the CLI, and the decision not to bypass it was the session's. I did not confirm whether the session would have bypassed a softer prompt.&lt;/p&gt;

&lt;p&gt;When I ran the script, it recorded only 2 of the 6 and stopped. The cause was &lt;code&gt;set -e&lt;/code&gt; combined with a mismatch on the 8-character confirmation input. The replacement script made every line independent, so one failed confirmation could not stop the rest, and it passed a &lt;code&gt;bash -n&lt;/code&gt; syntax check. As of this writing the records show the first script's 2 withdrawals; I have no record yet of the second script being run. That second script also carried 4 new pending claims from another session's run, which my main session and Codex had each judged separately. Those went into the same script.&lt;/p&gt;

&lt;h2&gt;
  
  
  The reviewer who overturned the main session
&lt;/h2&gt;

&lt;p&gt;The most useful single finding in the batch was a correction to the main session's own earlier reasoning.&lt;/p&gt;

&lt;p&gt;Codex gave its own verdict on all six claims. On one claim, it said the claim should pass on meaning, and that the main session's reason from October 31, "no workshop evidence", was wrong. The frozen raw source had a Comments line at line 136 reading "Peer-reviewed by NECO 2018 Workshop". My main Claude session opened the file and confirmed the line.&lt;/p&gt;

&lt;p&gt;That claim was still recommended for withdrawal, but for a different reason. Another claim among the same six is a later version that replaces it, so the withdrawal reason was corrected to "superseded by the later version" instead of the false "no workshop evidence". If I had let the original reason stand, the record would say the source lacked something it actually contained.&lt;/p&gt;

&lt;p&gt;This is also where the asymmetry mattered. Withdrawing that claim with a corrected reason was low-stakes. Had the main session been allowed to record passes, it would have been grading claims on the same reasoning that had just been shown wrong on one of them.&lt;/p&gt;

&lt;p&gt;One more claim, among the passes left to me, got a caution note. The source span said "even the strongest frontier models", and the claim restated it as "frontier models". Codex called it a small generalization and passed it. I left the call on that one to the human side, which is me.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "unresolved" items that were already resolved
&lt;/h2&gt;

&lt;p&gt;An afternoon report on the same day had listed 6 items as unresolved. They were not. All six already had fixes or explanations recorded: a scholar-search budget, a drop in wiki rows that turned out to be wiki HTTP 429 responses, a WAF PDF item that turned out not to apply, a line-break issue in a corpus search command, full-text XML handling, and a "v2" number in a counsel output.&lt;/p&gt;

&lt;p&gt;Codex's section on these checked each one against code and selected tests and confirmed all six were handled. The cause was mechanical: the earlier "unconfirmed" lines of a previous section in the batch notes were grepped, and the later lines in that same section, where the resolutions were written, were never read. The grep found the question and missed the answer below it.&lt;/p&gt;

&lt;p&gt;I list this here because it is the same shape of risk as the self-approval problem, in the other direction. An agent that reports something as open when it is closed creates work. An agent that reports something as closed when it is open is the case the approval rule exists for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the two reviewers split
&lt;/h2&gt;

&lt;p&gt;Some candidates for new work got opposite answers. A check for contradictions in entity attributes: Codex said hold, because without binding the subject, attribute, period, and unit it would raise false conflicts; agy said start. Strengthening automatic detection of how much of a page was captured: Codex said start, with only clear negative signals; agy rejected it as turning a judge into a gate, which is an anti-goal. Both were held.&lt;/p&gt;

&lt;p&gt;A third round with narrower briefs brought both reviewers to the same reduced version of each, and only that reduced version was built. The parts they still disagreed on stayed out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The code review, briefly
&lt;/h2&gt;

&lt;p&gt;After the first batch of changes, I sent the uncommitted diff to Codex for code review. It raised 6 findings. The session reproduced each one before touching code, fixed all six, and added 15 regression tests. Examples: a stop gate attributing a later task's block to an earlier task that had passed, and a shared-passage index that only recorded the first position of each chunk and so missed a shared 300-character passage. Over the batch the test suite went from 1069 to 1102 passing, and after the third round it stood at 1124.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is still open
&lt;/h2&gt;

&lt;p&gt;The approval rule currently rests on two things: agy's objection being written down, and the CLI refusing non-interactive review writes. As far as this batch shows, the second one is the only part enforced in code. If the CLI ever accepted non-interactive review writes, nothing recorded in this batch would stop an agent from recording "passed".&lt;/p&gt;

&lt;p&gt;Codex also ran in a sandbox that could not create temporary files, so it could not run pytest. The full test pass in this note comes from the main session's run, not from the reviewer.&lt;/p&gt;

&lt;p&gt;And the first script stopping after 2 of 6 is a reminder that "the agent handed me a script" only moves the risk to the script. Next I want to check whether the review command can tell a script-driven run from a person at the keyboard at all, or whether the refusal I relied on was only about the missing terminal.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=ai-agent-can-withdraw-but-not-approve" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>testing</category>
      <category>devops</category>
    </item>
    <item>
      <title>A Blind Review Read the Visual Effects in My Explainer Short as Factual Claims</title>
      <dc:creator>John</dc:creator>
      <pubDate>Tue, 17 Nov 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/a-blind-review-read-the-visual-effects-in-my-explainer-short-as-factual-claims-m5e</link>
      <guid>https://dev.to/hexisteme/a-blind-review-read-the-visual-effects-in-my-explainer-short-as-factual-claims-m5e</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/blind-review-read-visual-effects-as-claims.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On 2026-11-09 I sent the effect plans for two explainer shorts out for adversarial review, one about a famous painting and one about a mountain park. Codex reviewed both; agy also attacked the painting short, and Gemini read the mountain short's script in an earlier round. Many of the findings had the same shape: this effect, as drawn, states something that is not true.&lt;/p&gt;

&lt;p&gt;A gray wash on a forest reads as "the forest died." A PHOTO label on a synthetic cleaning animation reads as a forged photograph. Fireworks read as a celebration that someone recorded. None of these effects were meant as statements. The reviewers read them as statements, and in each case I checked the reading against the sources before deciding.&lt;/p&gt;

&lt;p&gt;This note is about how I sorted those findings, which ones I refused, the one line I left to a human because the two reviews pointed in opposite directions, and the rule that came out of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the effects were there at all
&lt;/h2&gt;

&lt;p&gt;Some context on why the plans were full of effects. I had complained repeatedly, across channels, that my shorts had no reactions in them: "I need you to look at each line of the script carefully and mix in suitable effects, and there are none." On November 8 that became a written rule for all my shorts: every line gets at least one event where something on screen physically changes, stickers alone don't count (stickers at most 40 % of events), and feedback like "more effects" is never converted into a cap. Caps are soft fatigue warnings only; the floor is the contract.&lt;/p&gt;

&lt;p&gt;My main Claude session also wrote a diagnosis of why the same complaint kept coming back. The existing gate only measured whether something changed: mean brightness difference inside the event box at least 4/255, a sound effect present for every change, and a width check of at least 7 %. In the diagnosis's words, nobody judged whether the effect matched the meaning, or whether it was big enough to react to, or overdone. There was also no step where effects were chosen. They were hand-coded line by line during the build, so the repertoire collapsed to moves, palette cards, color fills and sweeps. The diagnosis's fix was an effect plan written after the script freezes and before the build: for each line, the emotional beat, the image the words call up, the on-screen effect, the sound and the size. Then a check, then an adversarial review by Codex and agy, then measurement after render against the plan.&lt;/p&gt;

&lt;p&gt;So by the time the reviews ran, the plans were deliberately dense. That matters for what I did with the findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the reviewers flagged
&lt;/h2&gt;

&lt;p&gt;The painting short's round 1 came back Codex FAIL/FAIL and agy FAIL/FAIL. Many of the script findings were ordinary: too many words for the length limit, a tangent outside the sources, an overclaim like "everyone thought." The effect findings are the ones this note is about. Here they are from the triage table, with what replaced them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A palette blob being "kicked" with a thump read as a violent act. The line became "left … off his palette," and the blob bounces away.&lt;/li&gt;
&lt;li&gt;Draining saturation from the street read as uniform gray, when the source describes colored grays. The replacement is a row of actual gray swatches sampled from the painting, standing like a choir.&lt;/li&gt;
&lt;li&gt;A BANNED chain drawn across the canvas read as "the painting was banned." The stamp moved to a separate tricolor flag card plus two crowns.&lt;/li&gt;
&lt;li&gt;Fireworks and cheering read as a documented celebration. They became the card's chain snapping and flying into the flag as a ring of color, labeled "REAL SUBJECT — Louvre".&lt;/li&gt;
&lt;li&gt;A synthetic cleaning animation carrying a PHOTO marker read as forged evidence. Only a real comparison of 2024 before and after photographs keeps PHOTO; the gray-to-yellow shift is drawn on a MODEL layer.&lt;/li&gt;
&lt;li&gt;A thermometer with a boiling sound emphasized heat and the body, and the "warmest spot" sat over a protected region of the figure. It became a gold halo behind the head plus warm and cool color tiles labeled "WARMEST SPOT," and the narration was changed so that what it points to is what is visible.&lt;/li&gt;
&lt;li&gt;A "#2" badge erased the "probably" in the narration. It became "MAYBE #2".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these is an effect saying something the script did not say. The reviewers did not object to the effects being loud. They objected to what they asserted.&lt;/p&gt;

&lt;p&gt;Some of these findings turned into checks on the plan itself. Each effect row now must state what it &lt;code&gt;teaches&lt;/code&gt;. A row with photo status must carry &lt;code&gt;evidence&lt;/code&gt;, a source id or a real file, and its motion is limited to comparison and zoom. An IMAGINE marker must have a &lt;code&gt;size_px&lt;/code&gt; of at least 48, because a one-pixel chip technically labels the effect as imagined while nobody can see it. Text effects need &lt;code&gt;text_px&lt;/code&gt; of at least 54 and &lt;code&gt;dur_s&lt;/code&gt; of at least 1.5, so a label cannot flash past. One finding I did not turn into code: agy caught narration saying "up" while the screen showed the feet. That stays an item for adversarial review and eye checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The blind round, and the criterion
&lt;/h2&gt;

&lt;p&gt;The mountain short went through more rounds. For round 3, Codex got a blind sheet generated from the reactions file: each line's dialogue and on-screen events, with the viewer's inner thoughts and the roles masked. One Codex run, verdict FAIL.&lt;/p&gt;

&lt;p&gt;The criterion I applied was: fix only the places that read opposite to the facts. Findings of the "cut the effects down" kind would not be adopted, because they contradicted my own instruction (effects and sound on every line) and the rule that feedback is never turned into a cap.&lt;/p&gt;

&lt;p&gt;That criterion sorted the round cleanly in most places.&lt;/p&gt;

&lt;p&gt;Adopted, two findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;b11: the inside of the circle going ash-gray, to show land excluded from the return, read as the forest dying. The fill became a gray 45° hatch with the forest color still showing between the lines, plus an EXCLUDED label.&lt;/li&gt;
&lt;li&gt;b14: a card reading only CROWN APOLOGY let the apology attach to the previous line's claim about the reserve. The card became &lt;code&gt;APOLOGY FOR 1865&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rejected on the facts, three findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;b15: Codex read the gold circle completing as the excluded land being returned and resolved. I kept it, because under the 2025 law the park land is vested in the new legal person; the circle is that land.&lt;/li&gt;
&lt;li&gt;b10: an inward arrow read as a return inside the circle. I kept it, because the next line ("skipped") bounces it back, and that correction is the reversal the narration is built on. The arrow itself had been introduced after round 2, when Codex read an outside fill as the extent of the return.&lt;/li&gt;
&lt;li&gt;b13: an 1881 stamp right after "wasn't" seemed to clash with the negation. The stamp reads RESERVE MADE · 1881 and the previous line's note reads Land returned · 1880, so the year order is on screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rejected by rule: the remaining lines, b01–b04, b06–b08 and b12, where the findings asked to remove or soften effects and sounds (the radius figure, a cow emoji, a hiss, a blackout, a tilt). Audibility is measured separately on a phone band instead of being argued about in review.&lt;/p&gt;

&lt;p&gt;Held for a human, two findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;b09: a red tint spreading with a shake evoked a bloody event at the summit. The color is explanatory, and the 1865 confiscation came after a war, so the effect is not opposite to the facts. Whether to make it less violent is a judgment I left to a person.&lt;/li&gt;
&lt;li&gt;b05: bringing the forest color back on "became" read as a forest created or recovered in 1881. A note saying FOREST RESERVE · 6-mile radius already appears on that word. And the forest color was there because Gemini, in round 2, said the earlier cream fill hid the contrast. Two reviews pointed in opposite directions on the same line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I did not pick a side on b05. My criterion says fix what reads opposite to the facts; one reviewer says the current effect does, the previous reviewer said the previous effect failed for another reason, and the narration already carries a label. That is a judgment call, so it went to a human with both readings attached.&lt;/p&gt;

&lt;p&gt;The two adopted fixes went into the same build, build 7. I did not record a pass for the script stage. The blind pass for the final contract is decided by human review.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same failure in the words
&lt;/h2&gt;

&lt;p&gt;The effect findings had a twin in the script reviews. In the mountain short's round 1, Gemini offered a rewrite of one line that opened with the Crown confiscating the land first, as the step toward marking out the boundary. It reads smoothly, and it is a causal claim: that the confiscation happened in order to mark the boundary. The sources do not say that, so I rejected it. Gemini's other suggestion on that line, replacing "the Crown" with "the government" because the term is unfamiliar, I adopted.&lt;/p&gt;

&lt;p&gt;An effect that turns gray and a sentence that adds "in order to" fail the same way. Each adds a cause or an outcome the sources don't contain, and the viewer has no way to tell it was decoration.&lt;/p&gt;

&lt;h2&gt;
  
  
  What became a rule
&lt;/h2&gt;

&lt;p&gt;Rule 3 of the reactions rule now reads, in short: effects follow the meaning of the line. The example is a line about firing at an atomic nucleus: the glow, the steam sound and the mushroom cloud happen inside a thought balloon, and the balloon pops on the next line. Alarm staging for a wrong guess (red heat, steam, smoke, clouds, warning lights) stays inside the imagination balloon only. Put it in the real scene and the false causation survives even after the narration says "it wasn't." The rule cites an adversarial review round 3 from that same day (11-09) as its origin.&lt;/p&gt;

&lt;p&gt;The last sentence of that rule is the lesson of the round. An effect shown in the real scene is a claim about the real scene. A later line of narration can retract the words, but the image has already been shown as if it happened.&lt;/p&gt;

&lt;p&gt;Rule 6 is the limit on all of this. Fun cannot be measured by a machine. What gets recorded is a blind script review, with inner thoughts and roles masked, and silent and sound-on viewings of the animatic. A gate PASS is never reported as a verdict on whether a short is fun. Nothing in this note says the shorts got better to watch. The reviews told me where effects asserted something false; they did not tell me whether anyone enjoyed them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is still open
&lt;/h2&gt;

&lt;p&gt;b05 and b09 are with a human, and I have no outcome to report for either. The criterion "fix only what reads opposite to the facts" depends on a reviewer noticing the misreading in the first place, and round 3 was one Codex run; I do not know what a second blind reviewer would have flagged on the same sheet. The checks I added (&lt;code&gt;teaches&lt;/code&gt;, &lt;code&gt;evidence&lt;/code&gt;, marker size) make a plan state its claims, but whether a stated claim matches what a viewer reads still comes from review and eye checks, not from the checker.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=blind-review-read-visual-effects-as-claims" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>video</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Python int() Versus round() Made a Sound Cue Measure Silent, and My Mixer Boosted It 12 dB</title>
      <dc:creator>John</dc:creator>
      <pubDate>Mon, 16 Nov 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/python-int-versus-round-made-a-sound-cue-measure-silent-and-my-mixer-boosted-it-12-db-3ln6</link>
      <guid>https://dev.to/hexisteme/python-int-versus-round-made-a-sound-cue-measure-silent-and-my-mixer-boosted-it-12-db-3ln6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/python-int-vs-round-made-a-sound-cue-silent.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The final assembly of a short explainer video failed once on a sound check. The check was &lt;code&gt;sfx_hierarchy&lt;/code&gt;, which asks whether every sound effect sits at the level its layer is supposed to have. Two reaction cues, a camera shutter and a stamp slam, had been pushed up by +12 dB, which is the maximum boost my mixer allows. Nothing about those two sounds needed that. The cause was one line in the audibility measurement: it computed the start sample with &lt;code&gt;int(t·sr)&lt;/code&gt;, while the code that placed the cue in the mix computed it with &lt;code&gt;round(t·sr)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When I traced it, there were three defects in the pipeline, and a later Codex review found more of the same kind. They share one shape. The place where the pipeline put a sound and the place where it measured that sound were not the same place, sometimes by one sample, sometimes by a different file entirely. This is the record of those defects and the tests that now pin them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the audibility check does
&lt;/h2&gt;

&lt;p&gt;Each reaction cue in these videos is a short sound effect tied to an on-screen event. A check measures whether that cue is audible over the music and under the narration, in a phone-speaker frequency band. The margin function is short:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;audible_margin_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fx&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;mu&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;SOUND_OVER_MUSIC_DB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fx&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;vo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;SOUND_UNDER_VOICE_DB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A margin of zero or more means the cue is heard. If it is not heard, the mixer lifts it, up to a cap.&lt;/p&gt;

&lt;p&gt;The measurement used to average the first 0.4 s after the event. According to the function's docstring, that average read short sounds low, because it averaged in the silence after them, and it read sounds that swell late (a whoosh, steam) low as well. So the measurement was changed to cut the cue into overlapping slices of &lt;code&gt;SOUND_SLICE_S&lt;/code&gt; and measure each slice. Slices only cover the length of the cue's own asset, because anything past that is another event's sound.&lt;/p&gt;

&lt;p&gt;The window measurement returns a fixed floor for an empty range:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;phone_window_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ndarray&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;
    &lt;span class="n"&gt;seg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ndim&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;120.0&lt;/span&gt;
    &lt;span class="n"&gt;band&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;phone_band&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;20.0&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log10&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;band&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;1e-9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Defect 1: int() for the slice, round() for the placement
&lt;/h2&gt;

&lt;p&gt;The placement code put a cue at &lt;code&gt;round(t·sr)&lt;/code&gt;. The slicer started at &lt;code&gt;int(t·sr)&lt;/code&gt;. &lt;code&gt;int()&lt;/code&gt; drops the fractional part and &lt;code&gt;round()&lt;/code&gt; goes to the nearest sample, so whenever an event time fell more than half a sample past a sample boundary, the two disagreed by one. The first slice then started one sample before the asset.&lt;/p&gt;

&lt;p&gt;The record states the result: that first slice measured as empty, at −120 dB. I have not re-derived from the slicing arithmetic why a one-sample shift produced an empty window instead of a slightly shorter one, so I will report what was observed and not a mechanism.&lt;/p&gt;

&lt;p&gt;For long cues this was one bad slice among several. For the camera shutter, which is 0.14 s long, there was only one slice. The whole cue therefore measured −120 dB, the mixer concluded it was inaudible, and it lifted the cue all the way to the +12 dB cap. The stamp slam was over-amplified by +12 dB in the same way.&lt;/p&gt;

&lt;p&gt;The fix was to use &lt;code&gt;round&lt;/code&gt; in both places. This is the slicer after the fix (docstring and an internal comment omitted):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;sound_slices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t_s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dur_s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;asset_s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;span&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dur_s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asset_s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;asset_s&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dur_s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;a0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t_s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;SOUND_SLICE_S&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;total &amp;lt;= k&lt;/code&gt; branch is the single-slice case the shutter fell into. The regression test puts an event 0.6 of a sample past a boundary and asserts that the first slice starts where the placement would put the cue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_sound_slices_start_on_the_sample_the_cue_is_placed_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;48000&lt;/span&gt;
    &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.6&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;reactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sound_slices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A second test, &lt;code&gt;test_short_reaction_cue_is_not_lifted_by_a_slice_before_its_first_sample&lt;/code&gt;, checks the consequence instead of the index. I come back to it below, because the first version of it was too weak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defect 2: the check measured a different sound
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;shotfilm.cue_asset_id&lt;/code&gt; wrote every cue of kind &lt;code&gt;reaction&lt;/code&gt; as a &lt;code&gt;cue_reaction_*&lt;/code&gt; synthetic click. The real mix used the catalog sound for each reaction, and the mix itself was fine. But loudness measurement, sync measurement and the rights record were all looking at the synthetic click, a sound that was not in the mix.&lt;/p&gt;

&lt;p&gt;The fix maps a reaction cue to its catalog &lt;code&gt;asset_id&lt;/code&gt;. The test is &lt;code&gt;test_reaction_cue_asset_is_its_catalog_sound_not_a_synth_click&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defect 3: an audibility floor against a layer target
&lt;/h2&gt;

&lt;p&gt;The third failure was a rule conflict. The audibility floor said a reaction cue must be heard. The layer rule said each sound effect layer must sit within ±2 dB of its target. A light-bulb ding sat under a loud stretch of narration and needed to be at −5.2 dB to be heard, which the layer rule would not allow.&lt;/p&gt;

&lt;p&gt;The fix makes the boost explicit. Placement records a &lt;code&gt;lift_db&lt;/code&gt; for each cue. The lift has a ceiling of the layer above's target minus 3 dB (transition −5, ui −11, and for peak, target +2). The hierarchy check accepts a level raised by the recorded lift, but only up to that ceiling. If a cue would need more than the ceiling to be heard, the &lt;code&gt;reaction_sfx_masked&lt;/code&gt; check reports it.&lt;/p&gt;

&lt;p&gt;Two tests pin this: &lt;code&gt;test_reaction_lift_is_recorded_and_stops_at_the_layer_ceiling&lt;/code&gt; and &lt;code&gt;test_sfx_hierarchy_allows_a_recorded_audibility_lift_up_to_the_ceiling&lt;/code&gt;. A music-floor test also had its music changed to −12 dB relative to speech, which is the range of the real mix. After these three fixes the full suite was 1083 passed.&lt;/p&gt;

&lt;p&gt;(The same assembly also failed a separate visual craft check with 7 hard findings, such as stacked decoration dots and a camera move still accelerating at a cut. Those were fixed in the episode's script and are not part of this story.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The Codex review found the same shape again
&lt;/h2&gt;

&lt;p&gt;Before upload I gave the whole thing to Codex for a read-only final review. I adopted its findings, and the remaining items it checked needed no change. The ones that matter here were about sound:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Any cue could claim a &lt;code&gt;lift_db&lt;/code&gt; exemption, not only reactions. Now the lift counts only for items with kind &lt;code&gt;reaction&lt;/code&gt;, and the timeline and loudness measurement carry &lt;code&gt;kind&lt;/code&gt; and &lt;code&gt;reaction_id&lt;/code&gt; through. Test: &lt;code&gt;test_sfx_hierarchy_ignores_a_lift_on_a_non_reaction_cue&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Audibility was measured at the event time, which had 0.1 ms resolution. The compile step placed the cue at &lt;code&gt;at_s&lt;/code&gt; rounded to the millisecond. The two could be up to 24 samples apart. &lt;code&gt;measure_reaction_audibility(placed=)&lt;/code&gt; now measures at the actual placement times from the assembly report. The mix did not change.&lt;/li&gt;
&lt;li&gt;Placement times were recorded rounded to 0.1 ms, which showed up as 25600 against 25598 samples. Reaction &lt;code&gt;t_s&lt;/code&gt; is now recorded to 1 µs. The final sound effect stem was already placed from the exact time, so this changed the record and the offset measurement, not the mix.&lt;/li&gt;
&lt;li&gt;The short-cue test from defect 1 still passed with the lift removed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 24-sample case is defect 1 again at a larger scale: the measurement was taken at one time and the sound was placed at another. Its test builds a 24-sample burst and an event time that does not land on it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_audibility_is_measured_where_the_cue_was_placed_not_at_the_unrounded_event_time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;48000&lt;/span&gt;
    &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;
    &lt;span class="n"&gt;sfx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;zeros&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;burst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;default_rng&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sfx&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;24000&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;24024&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;burst&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;axis&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;quiet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;zeros&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;evs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"E1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"sfx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"camera_shutter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"t_s"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.50049&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"dur_s"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"shot_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"A"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;placed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"reaction_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"E1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"asset_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"camera_shutter"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"t_s"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;stems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"sfx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sfx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"music"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;quiet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"voice"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;quiet&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;measure_reaction_audibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;evs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stems&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"camera_shutter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"hard"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"reaction_sfx_masked"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;reactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;measure_reaction_audibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;evs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stems&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"camera_shutter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;placed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;placed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"hard"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured at the event time, the cue is reported as masked. Measured at the placement, it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making the weak test able to fail
&lt;/h2&gt;

&lt;p&gt;The last finding was the one I would most likely have missed myself. The consequence test for defect 1 compared lifts, but in its setup no lift was needed at all, so it could not tell a correct slicer from a broken one.&lt;/p&gt;

&lt;p&gt;The strengthened test raises part of the narration by ×1.3 so that a real lift is needed but stays under the ceiling, between 0.5 dB and 2.5 dB. It then places the same cue on a sample and 0.6 of a sample past one, and asserts the two lifts differ by less than 0.1 dB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;    &lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;qc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lift_ceiling_db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"transition"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;SFX_LAYER_DB&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"transition"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;on_sample&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;between&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;lift_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;lift_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.6&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="no"&gt;SR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;on_sample&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;room&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nb"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;between&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;on_sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the slicer is off by a sample, the between-sample placement climbs to the ceiling and the second assertion fails. I checked that directly by putting &lt;code&gt;int&lt;/code&gt; back: the test failed. That mutation check is the evidence the test now guards the bug and not just the happy path.&lt;/p&gt;

&lt;p&gt;After the review fixes the suite was 1086 passed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirming the mix did not move
&lt;/h2&gt;

&lt;p&gt;The fixes from that final Codex review were to measurement and records, and I wanted proof that they had not changed the mix. I reassembled the video through the final render, shot assembly, craft check, script and final reaction measurement. The SHA hashes of the final video file and the sound effect stem were identical before and after.&lt;/p&gt;

&lt;p&gt;On that reassembly the reaction measurement passed with 28 events. Loudness was −14.0 LUFS and −1.65 dBTP. All 15 reaction cues carried their &lt;code&gt;kind&lt;/code&gt;. Only two cues were lifted: the stamp slam by +0.64 dB and the bulb ding by +2.77 dB, both under the −5 dB ceiling. The stamp slam had been at +12 dB when the slicer was wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is still open
&lt;/h2&gt;

&lt;p&gt;Every automated gate passed except one, &lt;code&gt;human_review&lt;/code&gt;, which is my own watch-through of the finished cut. That is still ahead of the private upload and scheduling, and no gate result here says anything about whether the video is good to watch.&lt;/p&gt;

&lt;p&gt;The other open item is the one I flagged above. The record says the one-sample-early slice was empty and read −120 dB; it does not explain why a slice shifted by one sample came out empty rather than nearly full. The fix and the tests do not depend on that answer, but I have not confirmed the mechanism.&lt;/p&gt;

&lt;p&gt;The habit I am taking from this is narrow: when a measurement reports on a sound, check that it computes position, time and asset the same way the code that placed the sound did. Three of the defects in this one assembly were exactly that mismatch.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=python-int-vs-round-made-a-sound-cue-silent" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>testing</category>
      <category>debugging</category>
      <category>video</category>
    </item>
    <item>
      <title>Ollama Ignored My Modelfile TEMPLATE. A Pre-Registered Token Count Caught It.</title>
      <dc:creator>John</dc:creator>
      <pubDate>Sun, 15 Nov 2026 00:00:06 +0000</pubDate>
      <link>https://dev.to/hexisteme/ollama-ignored-my-modelfile-template-a-pre-registered-token-count-caught-it-406p</link>
      <guid>https://dev.to/hexisteme/ollama-ignored-my-modelfile-template-a-pre-registered-token-count-caught-it-406p</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://hexisteme.github.io/notes/ollama-ignored-modelfile-template-token-check.html" rel="noopener noreferrer"&gt;hexisteme notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 8 an overnight run on my local Qwen3.8 27B GGUF finished, and before looking at the score I checked one number per task: how many prompt tokens the server reported beyond the tokens of the message body. The pre-registration said that number should be about 14 on all 10 tasks. It was 52 on all 10. By the rule I had written two days earlier, the run was invalid and got no verdict.&lt;/p&gt;

&lt;p&gt;The variable I was testing was a prompt change made through the Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt;. The template change was real: the new model had a different template blob. The prompt the server built did not change. This note is about how that was caught, what the cause appears to be, and what I am doing differently for the retry, which has not run yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;The experiment sits inside a small benchmark I run on this Mac with Ollama: the same 10 build-fix tasks, the same decoding (temperature 0.6, top_p 0.95, max_tokens 12,288, fixed seed), and a pass threshold fixed in advance. Applicable patches at 5/10 or more support the hypothesis, under 5/10 rejects it, and no adjustment after the fact.&lt;/p&gt;

&lt;p&gt;In the baseline run, 8/10 tasks ended with &lt;code&gt;finish_length&lt;/code&gt;: the model ran out of budget before producing an edit. The next step, pre-registered on November 6, had two parts. First, save the raw reasoning text for the two shortest failing tasks and classify it. Second, pick exactly one variable from that classification and rerun the same 10 tasks overnight.&lt;/p&gt;

&lt;p&gt;The classifier is a function called &lt;code&gt;classify_reasoning&lt;/code&gt; with fixed thresholds. In the last 25% of the reasoning (minimum 2,000 characters), if any line of 40+ characters repeats 5 or more times, or the zlib compression ratio is under 0.15, it is &lt;code&gt;loop&lt;/code&gt;. Otherwise, if the reasoning contains a &lt;code&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; SEARCH&lt;/code&gt; marker, it is &lt;code&gt;drafting&lt;/code&gt;. Otherwise &lt;code&gt;progress&lt;/code&gt;. The rule for the variable: any &lt;code&gt;loop&lt;/code&gt; means try a presence penalty of 1.5; anything else means try &lt;code&gt;no_xhigh&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;no_xhigh&lt;/code&gt; meant
&lt;/h2&gt;

&lt;p&gt;The GGUF ships a chat template that inserts an extra paragraph into the system prompt about reasoning effort, at the &lt;code&gt;xhigh&lt;/code&gt; level. Before the run I confirmed that this paragraph really was in the baseline prompts. On all 10 baseline tasks, &lt;code&gt;usage.prompt_tokens&lt;/code&gt; minus the message body tokens came out to 52. Tokenizing the first task with candidate renderings and comparing: renderings that included the xhigh paragraph were off by −1 to +3, renderings without it by −35 to −39. The paragraph is 38 tokens. Whether it made the model think longer, I did not know.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;no_xhigh&lt;/code&gt; was the plan to remove exactly that paragraph and nothing else. I built it as a second Ollama model: same weights blob, same stop tokens, same context size, and a Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt; equal to the baseline template minus the paragraph. The run script checked that the new template was byte-identical to "baseline template minus paragraph" before starting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The validity condition, written before the run
&lt;/h2&gt;

&lt;p&gt;On the same day I ran a control on a different model family, qwen3:4b. Applying the same template there, the prompt token count stayed the same as the original model's. My note at the time was that Ollama seems to treat templates differently per model family, so the &lt;code&gt;no_xhigh&lt;/code&gt; run needed its own check that the paragraph was really gone.&lt;/p&gt;

&lt;p&gt;That check went into the pre-registration as a validity condition:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All 10 tasks should show &lt;code&gt;usage.prompt_tokens&lt;/code&gt; minus body tokens ≈ 14 (the baseline's 52 minus 38).&lt;/li&gt;
&lt;li&gt;If it is near 52, the paragraph did not come out. The run is void, no verdict, and the cause is recorded.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is a cheap check. The server already returns &lt;code&gt;prompt_tokens&lt;/code&gt;, and the body token count comes from the same tokenizer. It also checks the thing the experiment is about, the prompt the model actually saw, and not the configuration I believed I had sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The run
&lt;/h2&gt;

&lt;p&gt;The first attempt started at 00:49:02 on November 7 and stopped itself at 00:51. The start guard passed with 22GB free on the internal disk, but loading the 27B model pushed swap from 8 to 13.4GB and free space fell to 16GB, below the 20 GB safety line, so the script aborted. Zero generations were written. I added disk re-measurement after model load and before phase two, and kept the configuration, tasks and thresholds unchanged.&lt;/p&gt;

&lt;p&gt;The second attempt ran from 01:42:16 to 10:14:42 on November 8. The diagnosis part was valid:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;task&lt;/th&gt;
&lt;th&gt;class&lt;/th&gt;
&lt;th&gt;reasoning chars&lt;/th&gt;
&lt;th&gt;tail chars&lt;/th&gt;
&lt;th&gt;max same-line repeats&lt;/th&gt;
&lt;th&gt;tail zlib ratio&lt;/th&gt;
&lt;th&gt;finish&lt;/th&gt;
&lt;th&gt;completion tokens&lt;/th&gt;
&lt;th&gt;wall s&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A&lt;/td&gt;
&lt;td&gt;progress&lt;/td&gt;
&lt;td&gt;46,417&lt;/td&gt;
&lt;td&gt;11,604&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;0.347&lt;/td&gt;
&lt;td&gt;length&lt;/td&gt;
&lt;td&gt;12,288&lt;/td&gt;
&lt;td&gt;2,270&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;progress&lt;/td&gt;
&lt;td&gt;45,405&lt;/td&gt;
&lt;td&gt;11,351&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;0.302&lt;/td&gt;
&lt;td&gt;length&lt;/td&gt;
&lt;td&gt;12,288&lt;/td&gt;
&lt;td&gt;2,305&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both were far from the loop thresholds and had no SEARCH markers. The reasoning was not repeating; it kept going and was cut off at the 12,288 budget. So the rule picked &lt;code&gt;no_xhigh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The experiment part failed validity. Prompt overhead was 52 on 10/10 tasks, the same as the baseline.&lt;/p&gt;

&lt;h2&gt;
  
  
  A second, independent signal
&lt;/h2&gt;

&lt;p&gt;Same seed, same decoding, and the outputs were byte-identical to the baseline on 10/10 tasks. The two tasks that passed even had the same completion token counts, 7,965 and 859. That is independent evidence that the server received the same prompt as in the baseline. It also means the numbers the run produced (applicable 2/10, pass@1 2/10, &lt;code&gt;finish_length:edit_no_blocks&lt;/code&gt; 8/10) are a replay of the baseline and say nothing about &lt;code&gt;no_xhigh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I had looked only at the score, I would have seen "no change from removing the paragraph" and could easily have written that the effort paragraph does not matter. The token check said the variable was never applied.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the registration check missed
&lt;/h2&gt;

&lt;p&gt;The model registration was different. The new model used the same weights blob as the baseline, but its template blob was 201 B against the baseline's 410 B. My script compared that registered template against the expected bytes, and it passed, because the registered template was correct. What it did not check was whether the server used that template to build the prompt. The token count on the actual requests is what caught it.&lt;/p&gt;

&lt;p&gt;The qwen3:4b control two days earlier, where changing the template left the prompt tokens unchanged, was an early sign of the same thing. I recorded it and used it to justify the validity check, but I did not follow it further at the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause, as far as I confirmed it
&lt;/h2&gt;

&lt;p&gt;From reading the static files: the jinja &lt;code&gt;tokenizer.chat_template&lt;/code&gt; embedded in the GGUF inserts the paragraph into the system message through &lt;code&gt;reasoning_effort|default('xhigh')&lt;/code&gt;. With &lt;code&gt;medium&lt;/code&gt; there is no paragraph; with &lt;code&gt;low&lt;/code&gt; there is a shorter one.&lt;/p&gt;

&lt;p&gt;Removing the paragraph from the Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt; did not change the server's prompt. So Ollama 0.32.14 renders this model's /v1 requests (its &lt;code&gt;model_family&lt;/code&gt; is &lt;code&gt;qwen35&lt;/code&gt;) through some path other than the Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt;. My guess is that it uses the embedded jinja template. I did not confirm which component does the rendering.&lt;/p&gt;

&lt;p&gt;If that is right, editing the template is the wrong lever. The effort level has to change on the request side: either &lt;code&gt;chat_template_kwargs: {"reasoning_effort": "medium"}&lt;/code&gt; or the OpenAI-compatible &lt;code&gt;reasoning_effort&lt;/code&gt; field. Whether Ollama 0.32 forwarded either one to the template was also unknown, so the next step was a probe and not another overnight run.&lt;/p&gt;

&lt;h2&gt;
  
  
  The daytime probe
&lt;/h2&gt;

&lt;p&gt;At 10:41 on November 8 I sent the same short message several ways and read the server's &lt;code&gt;prompt_tokens&lt;/code&gt; each time:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;request&lt;/th&gt;
&lt;th&gt;prompt_tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;baseline, no effort field&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/v1&lt;/code&gt;, top-level &lt;code&gt;reasoning_effort: medium&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/v1&lt;/code&gt;, top-level &lt;code&gt;reasoning_effort: low&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;49&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;chat_template_kwargs&lt;/code&gt; with &lt;code&gt;reasoning_effort&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Medium dropped 38 tokens: the 37-token paragraph plus 1 separator. Low dropped 12, recorded as 37 minus 25, which fits the shorter paragraph that &lt;code&gt;low&lt;/code&gt; inserts. &lt;code&gt;chat_template_kwargs&lt;/code&gt; changed nothing, so on this setup it is ignored. The native &lt;code&gt;/api/chat&lt;/code&gt; with &lt;code&gt;think&lt;/code&gt; behaved the same as the top-level field.&lt;/p&gt;

&lt;p&gt;So the working lever is the top-level &lt;code&gt;reasoning_effort&lt;/code&gt; on the &lt;code&gt;/v1&lt;/code&gt; request. Adding &lt;code&gt;reasoning_effort: medium&lt;/code&gt; there is a valid implementation of &lt;code&gt;no_xhigh&lt;/code&gt;, the same variable the rule picked, not a new one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The retry, pre-registered the same day
&lt;/h2&gt;

&lt;p&gt;The retry runs the same 10 tasks with the same model, blob, template and parameters as the baseline. The only difference is &lt;code&gt;RunConfig.reasoning_effort = "medium"&lt;/code&gt;, which enters the config hash and the request only when set, so the baseline's hash does not move. Because invalid runs stay in the generation cache and a rerun with the same config hash would read only the cache, the retry had to be a new configuration anyway.&lt;/p&gt;

&lt;p&gt;Two checks are built in this time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After loading the model, the script reruns the same probe and refuses to start unless the top-level medium request is effective.&lt;/li&gt;
&lt;li&gt;Validity is the same token condition, tightened: all 10 tasks at ≈ 14 ±3. If any one task is near 52, the run is void. The count of outputs byte-identical to the baseline is reported as a second signal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thresholds stay where they were: 5/10 applicable patches to support, under 5/10 to reject. If it is rejected and &lt;code&gt;finish_length&lt;/code&gt; is still the majority, the write-up stops at "removing the effort paragraph did not get the reasoning inside the budget", and the next candidates (&lt;code&gt;think: false&lt;/code&gt;, &lt;code&gt;low&lt;/code&gt;) get their own pre-registration.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from it
&lt;/h2&gt;

&lt;p&gt;For any experiment that changes the prompt, I now confirm the change with the server's &lt;code&gt;prompt_tokens&lt;/code&gt; on the real requests. A check on the configuration I registered can pass while the prompt the model sees stays exactly the same, and that is what happened here.&lt;/p&gt;

&lt;p&gt;What is still open: as of November 12 the retry has not run, so I have no result on whether removing the paragraph changes anything. I have not confirmed which component inside Ollama renders this model's prompt, only that the Modelfile &lt;code&gt;TEMPLATE&lt;/code&gt; was not used on this path. And the qwen3:4b control suggests this is not limited to one model, but I have checked it on only those two.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email list for these notes: &lt;a href="https://hexisteme.beehiiv.com/?modal=signup&amp;amp;utm_source=devto&amp;amp;utm_campaign=notes-engineering&amp;amp;utm_content=ollama-ignored-modelfile-template-token-check" rel="noopener noreferrer"&gt;hexisteme.beehiiv.com&lt;/a&gt; — no issue has gone out yet, so you would be on it before the first one. No welcome sequence, no course, no upsell.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More notes at &lt;a href="https://hexisteme.github.io/notes/" rel="noopener noreferrer"&gt;hexisteme.github.io/notes&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ollama</category>
      <category>llm</category>
      <category>testing</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
