Skip to content

Fix: v3.6.0 migration writes _messages to course, not config#370

Open
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-migration-schema-issue
Open

Fix: v3.6.0 migration writes _messages to course, not config#370
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-migration-schema-issue

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown

Fixes #369

Fix

  • Retargeted the to v3.6.0 migration from getSpoorConfig() (config doc) to a new getSpoorCourse() helper (course doc), so _messages: {} is written to the correct document

Update

  • Test fixtures for the to v3.6.0 block updated from { _type: 'config', _spoor: ... } to { _type: 'course', _spoor: ... } to match the corrected target

Testing

  1. Verify a legacy course bundle (spoor <3.6.0) without _messages on the course migrates successfully and the course doc gains _spoor._messages: {}
  2. Verify a course already containing _spoor._messages stops (no-op) as expected
  3. Verify a course without _spoor stops as expected

Copilot AI changed the title [WIP] Fix migration to match schema for _messages field Fix(migrations): v3.6.0 migration writes _messages to course, not config Jun 11, 2026
Copilot AI requested a review from taylortom June 11, 2026 11:59
@taylortom taylortom changed the title Fix(migrations): v3.6.0 migration writes _messages to course, not config Fix: v3.6.0 migration writes _messages to course, not config Jun 11, 2026
@taylortom taylortom marked this pull request as ready for review June 11, 2026 17:48
@taylortom taylortom moved this from New to Needs Reviewing in adapt_framework: The TODO Board Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

migrations/v3.js "to v3.6.0" writes _messages to config, but the schema declares it on course

2 participants