Skip to content

Commit c0356df

Browse files
committed
ownership-lab: census witness key made composite (callable, pass id) with a collision report (harness sanity gate, erratum 3)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Am9eQwzNfbugH72eVKetC2
1 parent 23d04fd commit c0356df

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • corpus/ownership-lab/h23/scripts

‎corpus/ownership-lab/h23/scripts/e2.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@
8080
for l in open(f):
8181
try: j=json.loads(l)
8282
except Exception: continue
83-
WIT[j['id']]=j
83+
# harness sanity gate (harness-sanity-gate-v1): the witness key is COMPOSITE (callable, pass id); a truncated-name id
84+
# alone collided for NpgsqlDataSource.OpenConnection(Async) vs NpgsqlMultiHostDataSource (erratum 3)
85+
WIT[(j.get('callable'), j['id'])]=j
86+
_ids=collections.defaultdict(set)
87+
for (_c,_i) in WIT: _ids[_i].add(_c)
88+
_coll={i:sorted(c) for i,c in _ids.items() if len(c)>1}
89+
print('harness gate: witness records',len(WIT),'ids shared by several callables (kept apart by the composite key):',len(_coll),file=sys.stderr)
8490
wit_rows=collections.defaultdict(list)
8591
UNI={u['callable']:u['package'] for u in json.load(open(f'{S}/lab/sc/stagec-universe.json'))['universe']}
8692
# the tested PACKAGE binary per (package, tfm): the witness records the returned object's module MVID ('asm'); for rows

0 commit comments

Comments
 (0)