Skip to content

Fix: Delegate block tracking ID assignment to spoortracking#119

Merged
taylortom merged 1 commit into
masterfrom
fix/duplicate-tracking-ids
Jun 9, 2026
Merged

Fix: Delegate block tracking ID assignment to spoortracking#119
taylortom merged 1 commit into
masterfrom
fix/duplicate-tracking-ids

Conversation

@taylortom

@taylortom taylortom commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #118

Fix

  • Remove the bulk-clone _trackingId pre-allocation and the per-payload override from clone(). Tracking IDs are now owned entirely by adapt-authoring-spoortracking, which assigns them via content's preInsertHook (fired once per clone payload). The content module no longer references _trackingId.

Breaking

  • None.

Testing

  • Updated the clone regression test to assert the new contract: preInsertHook fires per cloned payload and clone() assigns no IDs itself. 131/131 pass; standard clean.

⚠️ Release ordering: depends on adapt-security/adapt-authoring-spoortracking#37. Must not ship before it — with the current released spoortracking, cloned blocks would keep their source IDs and collide.

clone() no longer pre-allocates _trackingId; cloned block payloads are
assigned IDs by content's preInsertHook (tapped by the spoortracking
module), so the content module holds no tracking-ID logic. Requires the
matching spoortracking release.

Refs cgkineo/adapt-authoring#201
@taylortom
taylortom merged commit 056f82e into master Jun 9, 2026
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Jun 9, 2026
## [3.0.6](v3.0.5...v3.0.6) (2026-06-09)

### Fix

* Delegate block tracking ID assignment to spoortracking (fixes #118) (#119) ([056f82e](056f82e)), closes [#118](#118) [#119](#119)
@taylortom
taylortom deleted the fix/duplicate-tracking-ids branch June 9, 2026 12:19
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove tracking ID allocation from clone (now owned by spoortracking)

1 participant