Issue Draft: Entity Loom cannot commit updates after finalization strips platform column
Repository: PsycherosAI/Psycheros
Suggested title:
[bug] Entity Loom update commits fail after finalized chats.db strips platform column
What package is affected?
What happened?
After a package has been finalized, Entity Loom strips the platform column from
chats.db for Psycheros compatibility. If the user later resumes that package
and commits an updated thread reimport through staging, commit can fail with:
table conversations has no column named platform
Observed with a finalized Windows package whose conversations table had only:
id, title, created_at, updated_at
The updated thread export parsed correctly and staged correctly, but commit
failed when writing to chats.db.
What did you expect?
Entity Loom should support both conversation table shapes:
- Active/importing schema with
platform
- Finalized Psycheros-compatible schema without
platform
Committing a changed same-ID reimport into a finalized package should update the
conversation row and replace its messages without requiring a package rebuild.
Likely cause
packages/entity-loom/src/writers/db-writer.ts assumes conversations.platform
exists when writing conversations:
INSERT INTO conversations (id, title, created_at, updated_at, platform)
That is not true after stripPlatformColumn() has finalized a package.
There are two related schema assumptions:
getConversationPlatform() queries SELECT platform ... even when the
column has already been stripped.
stripPlatformColumn() can be called on an already-stripped database and
should no-op cleanly.
Proposed solution
Make DBWriter detect the current conversations schema before platform-aware
operations:
- Add a small
hasConversationColumn(name) helper using
PRAGMA table_info(conversations).
- In
writeConversation(), use the existing platform-aware upsert only when
platform exists.
- Otherwise, upsert only
id, title, created_at, and updated_at.
- In
getConversationPlatform(), return null when the column does not
exist.
- In
stripPlatformColumn(), return early when platform is already absent.
Local patch touches:
packages/entity-loom/src/writers/db-writer.ts
Local verification
Patched the revamp repo and installed local source:
H:\Psycheros Program Files\entity-loom-v0.3.5
Verified:
deno task check
deno test src/
Tested against a throwaway copy of a finalized chats.db; writing the updated
thread changed the stored message count from 1 to 31 while preserving the
platformless conversation schema.
Then restarted the installed Entity Loom server, resumed the existing package,
re-ran the live parse/populate/commit path, and verified the live package:
{
"conversation_id": "6a2889f8-7b64-83ea-87f8-270fbdf487bc",
"updated_at": "2026-06-13T19:10:00.810Z",
"message_count": 31,
"conversation_columns": ["id", "title", "created_at", "updated_at"]
}
Issue Draft: Entity Loom cannot commit updates after finalization strips platform column
Repository:
PsycherosAI/PsycherosSuggested title:
What package is affected?
packages/psycheros(the harness daemon)packages/entity-core(MCP identity/memory server)packages/entity-loom(import wizard)packages/launcher(installer/dashboard)What happened?
After a package has been finalized, Entity Loom strips the
platformcolumn fromchats.dbfor Psycheros compatibility. If the user later resumes that packageand commits an updated thread reimport through staging, commit can fail with:
Observed with a finalized Windows package whose
conversationstable had only:The updated thread export parsed correctly and staged correctly, but commit
failed when writing to
chats.db.What did you expect?
Entity Loom should support both conversation table shapes:
platformplatformCommitting a changed same-ID reimport into a finalized package should update the
conversation row and replace its messages without requiring a package rebuild.
Likely cause
packages/entity-loom/src/writers/db-writer.tsassumesconversations.platformexists when writing conversations:
That is not true after
stripPlatformColumn()has finalized a package.There are two related schema assumptions:
getConversationPlatform()queriesSELECT platform ...even when thecolumn has already been stripped.
stripPlatformColumn()can be called on an already-stripped database andshould no-op cleanly.
Proposed solution
Make
DBWriterdetect the currentconversationsschema before platform-awareoperations:
hasConversationColumn(name)helper usingPRAGMA table_info(conversations).writeConversation(), use the existing platform-aware upsert only whenplatformexists.id,title,created_at, andupdated_at.getConversationPlatform(), returnnullwhen the column does notexist.
stripPlatformColumn(), return early whenplatformis already absent.Local patch touches:
packages/entity-loom/src/writers/db-writer.tsLocal verification
Patched the revamp repo and installed local source:
Verified:
Tested against a throwaway copy of a finalized
chats.db; writing the updatedthread changed the stored message count from 1 to 31 while preserving the
platformless conversation schema.
Then restarted the installed Entity Loom server, resumed the existing package,
re-ran the live parse/populate/commit path, and verified the live package:
{ "conversation_id": "6a2889f8-7b64-83ea-87f8-270fbdf487bc", "updated_at": "2026-06-13T19:10:00.810Z", "message_count": 31, "conversation_columns": ["id", "title", "created_at", "updated_at"] }