research: reconstruct ChatGPT import provenance for #60 - #61
research: reconstruct ChatGPT import provenance for #60#61Skywind5487 wants to merge 11 commits into
Conversation
|
Stage 3 provenance-shape explorer added in Purpose: test the remaining pre-2026-06-16 lineage anomaly with independent fingerprints rather than more keyword archaeology:
This was smoke-tested against a synthetic DB before commit. It retains the same pinned-SHA, Important evidence motivating this pass: stage 2 already exposes pre-cutoff sessions such as |
Summary
Research-only evidence for #60: reconstruct how the ChatGPT export/history was merged into an already-existing Hermes
state.db, including earlier partial/test import generations, final-pass behavior, message replay side effects, native-row preservation, and final fidelity limits.Ground truth: Hermes runtime began 2026-05-29; 2026-06-16 is the ChatGPT history import/merge date, not Hermes adoption.
Refs #60 #58 #54.
Added
Read-only, fail-closed evidence tools:
research/chatgpt-import/extract_issue60_evidence.pyresearch/chatgpt-import/extract_issue60_stage2.pyresearch/chatgpt-import/extract_issue60_stage3.pyresearch/chatgpt-import/extract_issue60_stage4.pyresearch/chatgpt-import/extract_issue60_stage5.pyDurable public artifacts include:
research/chatgpt-import/issue60/README.mdresearch/chatgpt-import/issue60/evidence-locators.mdresearch/chatgpt-import/issue60/evidence-manifest.jsonresearch/chatgpt-import/issue60/recovered-import_final.pyresearch/chatgpt-import/issue60/import-final-run-output.txtresearch/chatgpt-import/issue60/stage4-findings.mdresearch/chatgpt-import/issue60/stage5-run.mdRaw historical transcripts/evidence bundles remain private/local because this repo is public; exact locators and SHA identities are retained instead.
PROVEN so far
Existing Hermes DB
Historical representative-import evidence records
discord=620 / cron=252 / cli=15 / chatgpt-export=57, proving the migration was into a populated Hermes DB. Stage 3 independently places the first surviving ChatGPT message atmessages.id=92691, after messages from 883 distinct native sessions.Exact final importer
Historical message
188425contains the exact/tmp/chatgpt-export/import_final.py;188428contains its exact final run output.The final importer linearizes only the active ChatGPT branch:
Final recorded run:
The one remaining v1 orphan
20231013_125540_0041efa3is subsequently repaired from the export.Earlier importer generations survive final dedup
Stage 4 proves all 5,447 final imported sessions have a conversation ID and all satisfy
session.id == UTC(started_at) + conversation_id[:8].Surviving field shape splits exactly:
That matches the historical final-pass count of 792 newly inserted sessions versus 4,654 existing conversation IDs + the subsequently repaired orphan. Treat this as strong importer-generation provenance; the final script's field mapping is not the field mapping of every final row.
Legacy pre-final metadata survives widely, including:
Native-row collision/relabel path: not observed
Stage 3 finds zero
chatgpt-exportrows carrying audited native Hermes fingerprints (lineage/end/cwd/routing/tool/Discord-platform shapes). Stage 4's apparent 4,655 residuals are all onlyuser_id_mismatch; there are zero generated-ID, missing-conversation-ID, native-field, or tool residuals.There is therefore no surviving evidence that the final importer's
IntegrityError -> UPDATE source='chatgpt-export'path relabelled a normal populated Hermes-native session. This is strong negative evidence, not a claim of logical impossibility.Message replay side effect — PROVEN
1,174 imported sessions have stale stored
message_count. Every affected session is an exact replay multiple:Physical excess over stored counts = 14,367 message rows.
Duplicate ChatGPT UUID accounting explains it exactly:
So the final DB has 89,434 physical imported message rows versus 75,067 summed stored session counts because some import passes replayed entire message sequences.
The only empty/non-UUID imported platform IDs are two rows in the repaired v1 orphan with placeholder timestamps
1.0and2.0.Final DB-only closure pass
Stage 5 is intentionally narrow. It only:
It does not restart broad provenance archaeology.
Remaining source-side fidelity question
The exact importer structurally drops or transforms source data it does not map, including alternate branches, non-string
content.parts, content references/attachments/tool structures, and null/non-message mapping nodes. Quantifying data that never entered Hermes requires the original ChatGPT export or equally strong historical source evidence.Canonical DB safety
Expected counts: 7,268 sessions / 231,513 messages / 78 gateway-routing rows.
All extractors use immutable/query-only access and verify source identity/hash before and after.
Merge status
Still draft until Stage 5 resolves the last DB-only duplicate/orphan questions and #60 records the remaining source-side fidelity limits. No production code is changed.