<?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: aoligesszz</title>
    <description>The latest articles on DEV Community by aoligesszz (@aoligesszz).</description>
    <link>https://dev.to/aoligesszz</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%2F4273453%2F91ada8e8-6c1c-4d3c-808d-f94d3fe4348a.png</url>
      <title>DEV Community: aoligesszz</title>
      <link>https://dev.to/aoligesszz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aoligesszz"/>
    <language>en</language>
    <item>
      <title>The Demo Recording That Caught Our Own Bug</title>
      <dc:creator>aoligesszz</dc:creator>
      <pubDate>Mon, 30 Nov 2026 06:12:43 +0000</pubDate>
      <link>https://dev.to/aoligesszz/the-demo-recording-that-caught-our-own-bug-2jni</link>
      <guid>https://dev.to/aoligesszz/the-demo-recording-that-caught-our-own-bug-2jni</guid>
      <description>&lt;p&gt;Hours before the code freeze, during my final walkthrough recording, I reached the kill-switch segment: stop a live run mid-flight, then resume it.&lt;/p&gt;

&lt;p&gt;The stop worked. The resume did not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ python3 -m src resume --run-dir runs/live1
KeyError: &lt;span class="s1"&gt;'path'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;src resume&lt;/code&gt; is printed right in the README's quick start for my Agentware 2026 entry — a research watch agent that fetches sources, screens them for prompt injection, and files a claim only when two independent domains agree. Had I skipped that segment and recorded only the happy path, the first judge to follow the README would have hit that traceback instead of me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Near miss 1: the resume command that only worked in the mode nobody used
&lt;/h2&gt;

&lt;p&gt;The root cause was embarrassingly simple. &lt;code&gt;resume&lt;/code&gt; reloads a run's saved &lt;code&gt;sources.json&lt;/code&gt; to continue it, but hardcoded &lt;code&gt;mode="local"&lt;/code&gt;. A live run's sources carry a &lt;code&gt;url&lt;/code&gt; and no local file &lt;code&gt;path&lt;/code&gt;, so on the first unfinished source the pipeline took the local-file branch and died (&lt;code&gt;src/pipeline.py&lt;/code&gt;, &lt;code&gt;KeyError: 'path'&lt;/code&gt;). The equivalent &lt;code&gt;run --resume&lt;/code&gt; worked because it re-enters with the original &lt;code&gt;--live&lt;/code&gt; flag — which is why the bug survived: every manual test I ran used the form that worked.&lt;/p&gt;

&lt;p&gt;The fix was to stop guessing. &lt;code&gt;resume&lt;/code&gt; now reads the run's JSONL trace, finds &lt;code&gt;RUN_STARTED&lt;/code&gt;, and recovers the mode and live flag the run started with — letting the audit trail speak for the run itself. To verify it, I stopped a second live run mid-flight and resumed it both ways. &lt;code&gt;src resume&lt;/code&gt; and &lt;code&gt;run --resume&lt;/code&gt; matched item for item: 69 items in, 69 filed to the appendix, 0 verified — the honest steady state for five real feeds that never cover the same event. All 118 unit tests stayed green, and the fix landed on the remote a few hours before the freeze.&lt;/p&gt;

&lt;p&gt;The uncomfortable part: my unit tests thoroughly covered local and fixture resumes, yet the one path I had never tested — standalone &lt;code&gt;resume&lt;/code&gt; against a &lt;em&gt;live&lt;/em&gt; run — was the one in the README.&lt;/p&gt;

&lt;h2&gt;
  
  
  Near miss 2: one line of string handling that almost undid the allowlist
&lt;/h2&gt;

&lt;p&gt;That was a bug my tests missed. Earlier in the build, in commit &lt;code&gt;0377357&lt;/code&gt;, they had already paid for themselves by catching the most dangerous bug in the project — one line in the fetcher's host normalisation:&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;host&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lstrip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"www."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python's &lt;code&gt;str.lstrip&lt;/code&gt; does not strip a prefix; it strips a &lt;em&gt;character set&lt;/em&gt; — any leading combination of &lt;code&gt;w&lt;/code&gt; and &lt;code&gt;.&lt;/code&gt;. A look-alike host starting with those characters could be normalised into matching an official, allowlisted host. That is the exact P2 near-domain spoof my injection screener exists to catch, quietly reopened by a "boring" helper in the one component every fetch passes through.&lt;/p&gt;

&lt;p&gt;No attacker found it. &lt;code&gt;tests/unit/test_fetcher_hosts.py&lt;/code&gt; did: it pins host matching with adversarial cases and failed the moment the normalisation was written. Exact prefix removal fixed it in one line. The lesson I keep re-learning: in a security pipeline, the fatal bug rarely lives in the clever rule engine. It lives in the string call too trivial to review — which is why those host-matching tests existed before there was a bug to catch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Near miss 3: the day the allowlist refused Nature
&lt;/h2&gt;

&lt;p&gt;Keeping an allowlist strict against bugs is one thing; keeping it strict when a real source trips it is another. On 2026-11-28, during the first live rounds against real sources, the Nature feed kept failing — not at random, but roughly one fetch in three. &lt;code&gt;nature.com&lt;/code&gt; was redirecting to &lt;code&gt;idp.nature.com&lt;/code&gt;, its bot wall. Because that host is not on the fetch allowlist, the hardened fetcher refused the hop, isolated the source for that round, and after two consecutive failures raised a &lt;code&gt;SOURCE_ALERT&lt;/code&gt; trace event instead of failing silently. The other four sources — arXiv twice over, NSF, and Science — completed normally.&lt;/p&gt;

&lt;p&gt;Nothing was broken, and that is the point. At the fetch layer, a legitimate publisher's anti-bot redirect is &lt;em&gt;indistinguishable&lt;/em&gt; from a hostile one: same 3xx, same unexpected host. The tempting fix was to add &lt;code&gt;idp.nature.com&lt;/code&gt; to the allowlist and move on. The right behaviour was to refuse, log it, and let the source recover on the next round — because an allowlist that widens under pressure for a famous name will eventually widen for the wrong one. The system treated one of the world's largest science publishers like a trap file. That is also why I believe the result — 20/20 Trap Pack files contained or clean, 0 canary tokens in any output — is real and not a demo effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the three have in common
&lt;/h2&gt;

&lt;p&gt;Across all three near misses, every discipline I built into the agent ended up applying to the agent itself. Dual-source verification — requiring two independent domains for a claim — is the same instinct as testing a fix two ways before trusting it. Evidence snapshots for every dropped item are the same instinct as a trace that can testify about how a run started. Clean-room reproduction — re-verifying the pipeline from a fresh checkout — is the same instinct as recording the demo end-to-end instead of assuming the commands in the README still work.&lt;/p&gt;

&lt;p&gt;In the end, the demo recording was an acceptance test I ran on my own work with a camera on. Hours before the freeze, it caught the one bug all 118 unit tests had missed, in the one command a judge was most likely to type. Build the agent to verify everything. Then verify the agent.&lt;/p&gt;




&lt;p&gt;Project: agentware-research-agent — &lt;a href="https://github.com/aoligesszz/agentware-research-agent" rel="noopener noreferrer"&gt;https://github.com/aoligesszz/agentware-research-agent&lt;/a&gt; · Demo video: &lt;a href="https://www.youtube.com/watch?v=btkWdwuEmBM" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=btkWdwuEmBM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Written for the Hackathon Raptors Agentware 2026 "Near Miss" side quest: &lt;a href="https://agentwarehack.com/" rel="noopener noreferrer"&gt;https://agentwarehack.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>ai</category>
      <category>agents</category>
      <category>python</category>
    </item>
  </channel>
</rss>
