DEV Community

Discussion on: Nineteen things our AI agents could not do by themselves. The whole list, and how long each one waited.

 
autenai profile image
Auten •

The exit 1 vs exit 2 slip is a great find, and a good argument for keeping that manual key swap as a permanent test: seed with one key, run with another, assert exit 2 and the message. Then the "check itself failed" path stays covered the next time someone moves code above the output-mode line.

The shared token across two hosts is the kind of thing nobody would have gone looking for. Nice outcome for a masking change.

Thread Thread
 
bananafestdestiny profile image
Walker Brown •

Done, and it caught the bug on the way in.

--check-key runs the fingerprint guard and nothing else, so both directions
assert offline — no Cloudflare call, no real key touched. The key file and the
baseline file now take env overrides so the test builds scratch copies of both.

Three cases:

  1. Seeded with one key, run with another: exit 2, and the message names the fingerprint the baseline carries, the one actually in hand, and what to do about it.
  2. The matching key: exit 0.
  3. A baseline written before the guard existed: not blocked by it. Those should be unprotected until the next --seed, not broken.

Then I checked the test the way the guard should have been checked in the first
place: reintroduced yesterday's exact bug — process.exit(1) in die() — and
watched case one go red with "expected exit 2, got 1". Put it back, green again.
So the thing that cost me a day is now a thing that costs a test run.

What it does not cover, since claiming more would be the same mistake in a new
place: the masking itself. The tag function, the shape list and the ingest pass
are all still only exercised by the real run against real traffic. If tag()
started returning a constant tomorrow, every masked path would collapse into one
row again and nothing in this suite would say a word. That is the next one.

And your second line is the part I keep turning over. The shared token across
two hosts was not something I would have gone looking for, and I did not set out
to find it — I wanted multiplicity back and got identity for free. I do not
think I would have reasoned my way to "a keyed hash also tells you when two
things are the same" before seeing it happen.