Skip to content

ci-verify: chunter seed-target fix#14

Closed
MichaelUray wants to merge 1 commit into
developfrom
ci-verify/seed-fix
Closed

ci-verify: chunter seed-target fix#14
MichaelUray wants to merge 1 commit into
developfrom
ci-verify/seed-fix

Conversation

@MichaelUray

Copy link
Copy Markdown
Owner

Fork-interner CI-Runner. Verifiziert build+formatting+test+svelte-check des Seed-Target-Fixes (d1e6552) gegen aktuelle develop. Kein Upstream-PR.

… not the message

OnChatMessageCreated seeds a target doc's default collaborators when the doc
has none yet. The seed passed the ChatMessage create tx's own identity
(tx.objectId / tx.objectClass / tx.objectSpace) to getAddCollaboratTxes, so
the Collaborator records were attached to the ChatMessage instead of the
target doc. Two consequences:

- The target doc was never actually seeded: currentCollaborators stayed empty,
  so the defaults were lost and the seed re-evaluated on the next message.
- For provideSecurity classes the seed re-fired on every message and littered
  the message with Collaborator records.

Pass targetDoc._id / targetDoc._class / targetDoc.space instead.

This wrong-target is long-standing (pre-existing); hcengineering#9217 only mechanically
inherited the line and did not introduce the bug.

Adds a from-scratch jest harness (chunter-resources shipped no tests). It
drives ChunterTrigger with a TxCreateDoc<ChatMessage> on an empty target and
asserts the seeded Collaborator attaches to the target doc
(attachedTo / attachedToClass / objectSpace). getAddCollaboratTxes runs for
real — only getDocCollaborators and createCollaboratorNotifications are
stubbed — so the assertion exercises the actual wiring: red before the fix
(attachedTo = message id), green after.

A sibling of this bug lives in server-notification-resources collectionCollabDoc
(the createCollabDocInfo seeding path); left out of scope here.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
@MichaelUray
MichaelUray deleted the ci-verify/seed-fix branch July 12, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant