witnessed
python-tabulate, upstream c327d6c

Witnessed finds the functions a change touched that nobody has ever seen running, and sends IBM Bob to write a witness for each one: a small script that calls the real function and must pass a six-rule gate.

Before Bob

2 of 6

changed functions never seen running

After Bob

0 of 6

changed functions never seen running

2 witnessed by Bob, gate accepted

The 6 functions this change touched

used in real runs 0only by tests 4never ran, now witnessed by Bob 2never seen running 0
tabulate._read_jsonl_filenever ran, now witnessed by Bob
change
added
file
sample/tabulate/tabulate/__init__.py
seen by
an IBM Bob witness that passed the gate
witness file
witnesses/tabulate._read_jsonl_file.py
gate verdict
accepted
import sys
sys.path.insert(0, "sample/tabulate")

from tabulate import _read_jsonl_file

import io
fobject = io.StringIO('{"id": 1, "name": "Alice"}\n{"id": 2, "name": "Bob"}\n')
result = _read_jsonl_file(fobject)

assert len(result) == 2
assert result[0]["name"] == "Alice"
Gate rules
  • exits with code 0 within 30 seconds
  • executes the function body4 of 4 body lines ran (lines 3054 to 3057)
  • does not modify any file in the package directory
  • contains a call to the target
  • does not patch the target module
  • asserts a comparison or isinstance/len check on the return value, and the assert runs

How Bob closed the gap

01

Witness mode

A custom Bob mode whose file edits are restricted to witnesses/*.py.

02

2 subagents in parallel

One per function nobody had seen running. Each follows the witness-hunt skill.

03

2 of 2 accepted by the gate

Each witness had to pass all six rules before the function was promoted.

1.601 Bobcoins for the whole hunt, 0.80 per witnessIncludes a first attempt the gate rejected (nonzero_exit) and the subagents' fixes.Bob session screenshots
What the change said
implement support of JSONL and CSV input formats in command line utility

fix #173

New CLI parameter:

--headers HEADERS
  where HEADERS can be "firstrow", "keys", "HEADER1,HEADER2,...", "KEY1:HEADER1,KEY2:HEADER2,..."

--read FILEFORMAT
  where FILEFORMAT can be "rsv" (default), "csv", "jsonl"
Show the rest of the message, 25 more lines
Deprecated CLI parameter:

--header

Usage examples:

cat ./examples/people.csv | tabulate -r csv --headers firstrow
  id  name    email              "favorite" fruit
----  ------  -----------------  ------------------
   1  Alice   alice@example.com  apple, kiwi
   2  Bob     bob@example.com    banana,
                                 orange,
                                 lychee
   3  Carol                      pear

cat ./examples/people.jsonl | tabulate -r jsonl -f grid --headers 'id:ID,name:First Name,email:Email'
+------+--------------+-------------------+
|   ID | First Name   | Email             |
+======+==============+===================+
|    1 | Alice        | alice@example.com |
+------+--------------+-------------------+
|    2 | Bob          | bob@example.com   |
+------+--------------+-------------------+

(Upstream python-tabulate c327d6c, applied unchanged to sample/tabulate.)
What actually ran
levelbefore Bobafter Bob
used in real runs00
only by tests44
never ran, now witnessed by Bob02
never seen running20
total changed66

Across the project's history

101 commits replayed, 0 skipped

2 of 88

commits changed a function their own tests never ran

4 of 301 changed functions never ran under the suite of their own commit.

Flagged: c327d6c, b47acc1. Every other commit raised nothing. This counts alarms; the history has no ground truth for gaps nobody noticed.

Measured with Witnessed's own library by bench/history.py, written by Claude (Anthropic), not by Bob.