Source identity
| Field | Recorded value |
|---|---|
| Source type | archive member |
| Original record | learner_integration_probes.py |
| Date | Not specified in source |
| Path or archive member | archives/libsrc-b5cb90ed4bd7/AI_DEEP_SCAN_2026-10-14_v2/checks/learner_integration_probes.py |
| Original SHA-256 | 9e4bf1d866d3ef63ba577217dfe497db531129165f8b66d5f39551461a4ebfb4 |
| Reading-copy SHA-256 | 9e4bf1d866d3ef63ba577217dfe497db531129165f8b66d5f39551461a4ebfb4 |
| Archive source | {"sourceId": "libsrc-b5cb90ed4bd7", "member": "AI_DEEP_SCAN_2026-10-14_v2/checks/learner_integration_probes.py"} |
Recovered source transcript
Download complete source text ↓56 lines · 2.3 KB
"""Audit-authored minimal reproductions, not execution of the learner/daemon.
Schema column definitions and increment semantics are copied from the inspected
Go knowledge_graph.go and Bash active_learner.sh. Only in-memory databases and
an isolated three-statement Bash subprocess are used.
"""
from __future__ import annotations
import json
import sqlite3
import subprocess
from pathlib import Path
# These reduced schemas preserve all column names relevant to the collision.
GO_REPETITION = '''CREATE TABLE IF NOT EXISTS repetition (
id INTEGER PRIMARY KEY AUTOINCREMENT,
concept_id INTEGER UNIQUE NOT NULL,
repetition_number INTEGER DEFAULT 0,
easiness_factor REAL DEFAULT 2.5,
interval_days REAL DEFAULT 1.0,
next_review DATETIME, last_review DATETIME,
last_quality INTEGER DEFAULT 3
);'''
SHELL_REPETITION = '''CREATE TABLE IF NOT EXISTS repetition (
concept_id INTEGER PRIMARY KEY,
repetition INTEGER DEFAULT 0,
easiness REAL DEFAULT 2.5,
interval REAL DEFAULT 1,
next_review TEXT, last_review TEXT,
last_quality INTEGER DEFAULT 3
);'''
results = {'method': 'Minimal reproductions of recorded operations; not full-application execution', 'schema_collision': []}
for first, second, first_sql, second_sql, query in [
('go', 'bash', GO_REPETITION, SHELL_REPETITION,
'SELECT repetition, easiness, interval FROM repetition'),
('bash', 'go', SHELL_REPETITION, GO_REPETITION,
'SELECT repetition_number, easiness_factor, interval_days FROM repetition')]:
db = sqlite3.connect(':memory:')
db.executescript(first_sql)
db.executescript(second_sql)
try:
db.execute(query).fetchall()
outcome = {'query_ok': True}
except sqlite3.Error as e:
outcome = {'query_ok': False, 'error': str(e)}
results['schema_collision'].append({'first_creator': first, 'second_reader': second, **outcome})
db.close()
proc = subprocess.run(['/bin/bash', '--noprofile', '--norc', '-c',
'set -euo pipefail; ticks=0; ((ticks++)); printf "saved=%s\\n" "$ticks"'],
capture_output=True, text=True, timeout=5,
env={'PATH':'/usr/bin:/bin', 'HOME':'/tmp'})
results['zero_postincrement'] = {'exit_code': proc.returncode,
'after_increment_reached': 'saved=' in proc.stdout,
'stdout': proc.stdout, 'stderr': proc.stderr}
print(json.dumps(results, indent=2))