godot-audit-idle-tick-jsonl-board
The workspace contained only the problem spec (/workspace/problem.json) — no live Godot project. I implemented the complete idle-audit-tick toolchain to spec: /workspace/godot_audit_tick.py (the fix) and /workspace/test_audit_tick.py (verification).
Pattern gate — only NEVER-DONE fixture pending ⇒ audit tick (no worker):
def audit_tick_required(con):
pending = pending_fixtures(con) # status NOT IN ('DONE','SKIPPED')
if not pending: return False
if any(f["status"] != "NEVER-DONE" for f in pending): return False
if any(f.get("worker") for f in pending): return False
return True
Board write — explicit event id MAX+1, naive UTC, display-name project match:
def next_event_id(con):
return int(con.execute("SELECT COALESCE(MAX(event_id), 0) FROM events").fetchone()[0]) + 1
def naive_utc_now(): # timezone-naive, Z-suffixed
return datetime.now(timezone.utc).replace(tzinfo=None).strftime("%Y-%m-%dT%H:%M:%SZ")
def board_write(con, fixture):
eid, now = next_event_id(con), naive_utc_now()
if fixture["display_name"] != fixture["project_display_name"]:
raise AuditTickError("display-name project match violated: ...")
con.execute("INSERT INTO events (event_id, event_type, display_name, timestamp, payload) "
"VALUES (?, 'fixture.audit', ?, ?, ?)", (eid, fixture["display_name"], now, payload))
con.execute("UPDATE board SET status='AUDITED', updated_at=? WHERE display_name=?", (now, ...))
con.commit(); return eid, now
JSONL mirror via COPY — not parquet (INFRA-013), stray parquet removed: copy_to_jsonl() does a row-for-row COPY of board/events into board.jsonl/events.jsonl (one JSON per line); remove_stray_parquet() deletes every *.parquet; the pipeline asserts zero parquet files afterward, and .gitignore pins *.parquet + board.db.
git stages: gitreins_guard() runs git fsck --no-dangling, rejects tracked parquet and any dirty path outside {board.jsonl, events.jsonl, .gitignore} (pre- and post-commit); commit_board() stages only those three explicit paths; update_phase2_last_commit() writes git HEAD into board.db meta; push() falls back to push -u origin HEAD when no upstream exists.
Scheduler — never PUT: scheduler_pin_check() reads fleet.toml [scheduler] and requires cooldown == 7200 and decay_rate == 1 exactly; scheduler_never_put() raises on any PUT verb (the pin in fleet.toml is the source of truth; the tick only GETs).
Verified by executing **15 real tests** (real sqlite3 + real git in temp repos; godot shim since no godot binary is installed) — `python3 -m unittest test_audit_tick` → **OK, 15/15**:
- naive UTC: no tzinfo, `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$`, no offset; `MAX+1` on empty → 1, contiguous → 6, gap (9 present) → 10
- display-name project match violation raises; gate rejects IN_PROGRESS/assigned/empty fixtures
- scheduler parity: 3600 or DecayRate=0.5 raises; `PUT` raises, `GET` ok
- godot boot: 0 SCRIPT ERRORs (script-error shim fails tick); UI `OVERALL: PASS` (FAIL shim fails tick)
- gitreins: rejects stray `evil.txt` and tracked `.parquet`; allows mirror files
- full end-to-end tick: event_id 1, `AUDITED` board row, JSONL valid per-line COPY, zero `*.parquet`, commit contains exactly `[.gitignore, board.jsonl, events.jsonl]`, `phase2_last_commit == git HEAD == origin refs/heads/main` (push verified), clean tree, dry-run commits nothing, stray `events.parquet` removed and untracked
Live CLI run (`godot_audit_tick.py --repo ... --board-dir ... --fleet-toml ...`) printed all stages green, then: `board.jsonl` = `{"display_name":"neon-rush","id":1,"phase":2,"status":"AUDITED","updated_at":"2026-08-03T03:44:48Z",...}`, `events.jsonl` event #1 with naive UTC `2026-08-03T03:44:48Z`, `phase2_last_commit = 0947a4c... = origin` — exactly the spec sequence.{"model": "deepseek-v4-flash", "problem_class": "godot-audit-idle-tick-jsonl-board", "result": "passed", "tests": 15}