Repository navigation
fix(seed): use DEFAULT_USER_UNIQUE_IDS.PRIMARY_HUMAN ('owner') instead of hardcoded 'joel' — chat-probe root cause - #1014
Merged
Conversation
…d of hardcoded 'joel' — chat-probe root cause
The Carl-OOTB chat-probe failure ("Room not found: general") traces to
a single-source-of-truth violation: seed-in-process.ts hardcoded
'joel' as the human owner uniqueId; SessionDaemonServer.findSeeded-
HumanOwner returns whichever type=human row appears first; rooms get
created with owner_id pointing at the seed's 'joel' user, but jtag CLI
sessions authenticate as the canonical 'owner' user; DataList rooms
returns 0 because owner_id doesn't match session-user.id.
scripts/seed-continuum.ts has been using DEFAULT_USER_UNIQUE_IDS.
PRIMARY_HUMAN correctly the whole time — even has an explicit comment
acknowledging the divergence (line 197-200): "find them even when the
DB has uniqueId='joel' but we look for 'owner'." That's a workaround,
not a fix; this PR is the fix at the source.
Single-source-of-truth: both seeders + session-daemon now agree the
canonical primary human uniqueId is whatever PRIMARY_HUMAN is. Change
the constant in DefaultEntities.ts → all paths follow.
Net diff: 1 import + 1 hardcoded literal → constant + comment block
explaining the failure mode (so the next debugger doesn't have to
re-derive it). 18-line addition mostly comments.
Verified locally: postgres on existing stack has BOTH 'owner' (id
0653f2b3) and 'joel' (id ac689024); rooms.owner_id all point at
'joel'; jtag's SessionDaemon picks 'owner'; data/list users returns
1 row (the 'owner' user). Post-fix, the seeder will create the owner
as 'owner' from the start, rooms own to 'owner', everything matches.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause of carl-install-smoke chat-probe "Room not found: general"
seed-in-process.ts:341hardcodedfindOrCreateUser('joel', 'Developer', 'human').SessionDaemonServer.findSeededHumanOwner()returns the FIRSTtype='human'row. When the seed wrote rooms withowner_idpointing at the'joel'user but the session-daemon picked the canonical'owner'user (fromDEFAULT_USER_UNIQUE_IDS.PRIMARY_HUMAN),DataList roomsreturned 0 because owner_id didn't match session-user.id.Postgres state on the running stack confirms the divergence:
'owner'(id0653f2b3-...) AND'joel'(idac689024-...) — two human users from two seed pathsowner_id = ac689024-...(the'joel'user)findSeededHumanOwner()returns the'owner'userdata/list --collection=roomsreturns 0 itemsRoom not found: generalFix
seed-in-process.tsimportsDEFAULT_USER_UNIQUE_IDSand usesPRIMARY_HUMANfor the human owner uniqueId — same constantscripts/seed-continuum.tshas been using correctly all along (line 182, 386). Single source of truth.scripts/seed-continuum.ts:197-200already had a comment acknowledging this divergence: "find them even when the DB has uniqueId='joel' but we look for 'owner'." That was a workaround; this PR is the fix at the source.Diff
1 import, 1 hardcoded literal → constant + comment block explaining the failure mode (so the next debugger doesn't have to re-derive it).
Validation path
After merge + carl-install-smoke runs the seed, the rooms get
owner_idmatchingfindSeededHumanOwner()'s returned user →DataList roomsreturns 8 →chat/send --room=generalresolves → chat-probe passes.Pairs with #1013's post-write verify: that PR surfaces the divergence loudly; THIS PR removes the divergence so the verify (and chat-probe) succeed.
🤖 Drafted with Claude Opus 4.7 (1M context)