From 4cf84d80cf88e411450ee557bf0dc63bda5fb402 Mon Sep 17 00:00:00 2001 From: Sinity Date: Fri, 31 Jul 2026 15:15:50 +0200 Subject: [PATCH] fix(storage): restore blocks.signature DDL dropped in the #3451 merge Problem: master could not render. `devtools render all --check` failed with sqlite3.OperationalError: table blocks has no column named signature, which also fails `devtools verify --quick` and therefore every branch's pre-push hook. Cause: resolving #3451's conflict against master, I took the PR branch's index.py wholesale and merged only its header comments. That branch predates #3447, so it never had the blocks.signature column added by polylogue-vf9x -- the column that carries the provider attestation for empty-body THINKING blocks. The v50 header comment describing the column survived; the column itself did not. What changed: restores the 11-line signature column definition and its comment. No other difference from master. Verification: devtools render all --check clean (was OperationalError); devtools lab policy schema-versioning intact; blocks DDL contains 'signature TEXT' at the expected position. Co-Authored-By: Claude Opus 5 --- polylogue/storage/sqlite/archive_tiers/index.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/polylogue/storage/sqlite/archive_tiers/index.py b/polylogue/storage/sqlite/archive_tiers/index.py index a765c54093..f2eb3b94fe 100644 --- a/polylogue/storage/sqlite/archive_tiers/index.py +++ b/polylogue/storage/sqlite/archive_tiers/index.py @@ -484,6 +484,17 @@ -- an unknown reason". tool_result_outcome_unknown_reason TEXT CHECK ({nullable_check("tool_result_outcome_unknown_reason", ToolResultUnknownReason)}), + -- polylogue-vf9x (v49): provider-issued cryptographic attestation for a + -- THINKING block (Claude's extended-thinking `signature`; Gemini's + -- `thoughtSignatures` are the same construct). Populated whenever the + -- wire carries one -- notably including the empty-body thinking blocks + -- Claude Code has shipped since ~2026-06, where this is the only + -- surviving evidence besides the block's existence. Deliberately + -- excluded from content_hash below and from the lineage prefix + -- signature (write.py): providers re-sign on every replay, so including + -- it would break fork-prefix/citation-anchor matching for otherwise- + -- identical replayed content. + signature TEXT, -- svfj: the citation anchor atom. Hashes canonical block EVIDENCE only -- (type, text, tool_name, canonical tool_input, semantic/media/language, -- is_error, exit_code) -- deliberately EXCLUDING session_id/message_id/