ai_code_commit_file_sessions

Join table linking commit files to raw tool/session-external-ID pairs, including before sessions arrive. Preparation retains the old file+external-ID uniqueness restriction alongside the additive logical-pair index; multiple tools sharing an ID reject atomically until later activation.

id

Primary key
Unique identifier for the row.

ai_code_commit_file_id

Foreign key
ID of the associated AI code commit file.

session_external_id

Foreign key
External (daemon-provided) UUID of the AI session that contributed to this file. Matches ai_sessions.external_id when the session has been upserted.

ai_tool

string
Explicit tool, or tool inferred from one usable stored session for legacy input. NULL, PostgreSQL whitespace-only strings and __unqualified__ share one logical unknown identity in the pair index and reconciliation, using the column's collation as the existing backfill does. New unknown writes use __unqualified__; equivalent older values can remain untouched on replay. Real tool labels remain verbatim.

row_created_at

date
Timestamp when the record was created.

row_updated_at

date
Timestamp when the record was last updated.