<?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: scott</title>
    <description>The latest articles on DEV Community by scott (@boxofrecycling).</description>
    <link>https://dev.to/boxofrecycling</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%2F4090196%2Feb953179-d6a2-4bc4-a47a-1e02a177e03d.jpg</url>
      <title>DEV Community: scott</title>
      <link>https://dev.to/boxofrecycling</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/boxofrecycling"/>
    <language>en</language>
    <item>
      <title>When Every Internal Check Passes and the Handoff Is Still Wrong</title>
      <dc:creator>scott</dc:creator>
      <pubDate>Sat, 22 Aug 2026 22:18:43 +0000</pubDate>
      <link>https://dev.to/boxofrecycling/when-every-internal-check-passes-and-the-handoff-is-still-wrong-bfe</link>
      <guid>https://dev.to/boxofrecycling/when-every-internal-check-passes-and-the-handoff-is-still-wrong-bfe</guid>
      <description>&lt;p&gt;A handoff can be perfectly valid and still describe the wrong branch.&lt;/p&gt;

&lt;p&gt;The failure that made this concrete for me was deliberately boring. In a&lt;br&gt;
deterministic fixture, a producing agent reads the wrong Git branch. It records&lt;br&gt;
an authentication provider and a row count that are both wrong for the working&lt;br&gt;
tree being handed off. The JSON is valid. Its provenance graph is connected.&lt;br&gt;
Its commitments recompute. Two separately implemented encoders produce the same&lt;br&gt;
semantic world.&lt;/p&gt;

&lt;p&gt;Seven checks accept the artifact. The only rejection comes from evidence that&lt;br&gt;
looked at the repository instead of the handoff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;FAIL  examples/common-mode-handoff.json
      7 verified · 1 FAILED
  structure ............. verified   contract 0.1, 4 objects
&lt;/span&gt;&lt;span class="gp"&gt;  identity .............. verified   agent-b -&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;agent-c
&lt;span class="go"&gt;  checkpoint ............ verified   cp-4412-02
  provenance ............ verified   4 objects to repo@a1b2c3d4
  retained constraints .. verified   2 MUST, 1 SHOULD
  conflicts ............. verified   none, 1 open
  authority agreement ... verified   3 encodings agree
  external truth ........ FAILED

  EXTERNAL_RECEIPT_REJECTED
    repository working tree at repo@a1b2c3d4 rejected this world
      - auth.provider is okta-oidc in the tree, not auth0-oidc
      - legacy.sessions counted 1843 rows, not 12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a production incident, and it says nothing about how often agents&lt;br&gt;
make this mistake. No language model produced the result. The agents and the&lt;br&gt;
known-answer oracle are deterministic fixtures built to isolate one boundary:&lt;br&gt;
agreement inside an artifact is not observation of the world outside it.&lt;/p&gt;

&lt;p&gt;That boundary becomes easier to reason about when “verified” is split into the&lt;br&gt;
different claims hiding inside it.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Valid format is not true content
&lt;/h2&gt;

&lt;p&gt;A schema check can prove that required fields exist, values have the expected&lt;br&gt;
types, and the document has a legal shape. Those are useful guarantees. They&lt;br&gt;
make malformed or incomplete input fail before later checks try to interpret&lt;br&gt;
it.&lt;/p&gt;

&lt;p&gt;They cannot prove that any value corresponds to reality. In the fixture, the&lt;br&gt;
wrong provider and wrong row count fit the schema just as well as the correct&lt;br&gt;
ones. False content does not become malformed merely because it is false.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Connected provenance is not a correct root source
&lt;/h2&gt;

&lt;p&gt;A provenance check can prove that each assertion reaches a declared authority&lt;br&gt;
root through connected, acyclic edges. It can detect a missing edge, a broken&lt;br&gt;
reference, or a claim with no path to the root.&lt;/p&gt;

&lt;p&gt;It cannot prove that the declared root is the source the producer actually&lt;br&gt;
inspected. The fixture is consistent about the wrong branch, so its provenance&lt;br&gt;
graph is clean. It proves where the artifact &lt;em&gt;says&lt;/em&gt; its facts came from. It does&lt;br&gt;
not prove that the producer looked there.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. A recomputed commitment is not correct state
&lt;/h2&gt;

&lt;p&gt;A commitment binds bytes or structured state to an identifier. Recomputing it&lt;br&gt;
can prove that the state has not silently changed since the commitment was&lt;br&gt;
made. Retained-constraint checks can likewise prove that a required statement&lt;br&gt;
survived the handoff.&lt;/p&gt;

&lt;p&gt;Neither check can improve the input it binds. The wrong-branch fixture carries&lt;br&gt;
its incorrect state faithfully, so the checkpoint and retained constraints&lt;br&gt;
both verify. Integrity protects a false value from mutation just as effectively&lt;br&gt;
as it protects a true one.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Independent encoders are not independent observers
&lt;/h2&gt;

&lt;p&gt;Two implementations can encode the same artifact and agree on its semantic&lt;br&gt;
meaning. That is stronger than trusting one implementation: disagreement can&lt;br&gt;
expose ambiguity or a bug in one encoder.&lt;/p&gt;

&lt;p&gt;But implementation independence is not observational independence. Both&lt;br&gt;
encoders read the same handoff. In the fixture, they agree on the wrong provider&lt;br&gt;
and row count because those values are unambiguous. Their shared input creates a&lt;br&gt;
common-mode failure that a second encoding cannot remove.&lt;/p&gt;

&lt;p&gt;The precise conclusion is “this artifact has one stable interpretation,” not&lt;br&gt;
“this interpretation describes what happened.”&lt;/p&gt;
&lt;h2&gt;
  
  
  5. An external receipt moves trust
&lt;/h2&gt;

&lt;p&gt;The outside receipt is different because it consults another evidence source.&lt;br&gt;
Here, a repository check rejects the provider and row count recorded in the&lt;br&gt;
handoff. It is the only check in this run capable of distinguishing the coherent&lt;br&gt;
artifact from the working tree it claims to describe.&lt;/p&gt;

&lt;p&gt;That does not eliminate trust. The receipt might inspect the wrong checkout,&lt;br&gt;
use a stale test result, or encode its own mistake. External evidence moves the&lt;br&gt;
trust root to a smaller, named checker. It does not make the trust root disappear.&lt;/p&gt;

&lt;p&gt;There is also a useful edge case. If a correct predecessor exists, a semantic&lt;br&gt;
diff can flag that the provider or decision changed. A first handoff has no&lt;br&gt;
predecessor. If the first recorded world is already wrong, no historical&lt;br&gt;
comparison is available. The external source is doing work that local&lt;br&gt;
consistency cannot do.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I changed in the verifier design
&lt;/h2&gt;

&lt;p&gt;I stopped treating verification as one verdict.&lt;/p&gt;

&lt;p&gt;Each layer now reports separately. A strong schema result cannot compensate for&lt;br&gt;
a missing receipt, and agreement cannot vote external evidence down. A check&lt;br&gt;
that did not run reports &lt;code&gt;not established&lt;/code&gt;, not &lt;code&gt;passed&lt;/code&gt;. Receipts keep their own&lt;br&gt;
provenance because “external” names a boundary, not an automatic guarantee of&lt;br&gt;
quality.&lt;/p&gt;

&lt;p&gt;Those rules apply beyond agent handoffs. Whenever a system validates a signed&lt;br&gt;
manifest, a build attestation, a migration record, or a structured report, it is&lt;br&gt;
worth writing down the narrow sentence each check earns—and the tempting larger&lt;br&gt;
sentence it does not.&lt;/p&gt;
&lt;h2&gt;
  
  
  Reproduce the boundary
&lt;/h2&gt;

&lt;p&gt;I built a small verifier called Babel Context Integrity to make this failure&lt;br&gt;
executable. It checks structured agent handoff contracts; it is not an&lt;br&gt;
arbitrary-text truth checker or a hallucination detector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install &lt;/span&gt;babel-context-integrity&lt;span class="o"&gt;==&lt;/span&gt;0.2.0
babelci demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The demo is offline and includes the wrong-branch fixture above. The &lt;a href="https://github.com/boxofrecycling/babel-context-integrity" rel="noopener noreferrer"&gt;fixture&lt;br&gt;
and verifier are public&lt;/a&gt;,&lt;br&gt;
and the &lt;a href="https://github.com/boxofrecycling/babel-context-integrity/blob/5279bfa05484b97d83880b196f5cdcef294f2479/docs/LIMITS.md" rel="noopener noreferrer"&gt;full limitation table&lt;/a&gt;&lt;br&gt;
states what every passing layer is—and is not—entitled to conclude.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I built Babel Context Integrity. I used an AI coding assistant to&lt;br&gt;
help edit this article, then checked the technical claims and command output&lt;br&gt;
against the public 0.2.0 package.&lt;/em&gt;&lt;/p&gt;

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