Repository navigation
Description
Problem
Current main at 689a4515f15870d3c0ae9ee66c2f2021b34c0e2b has two entries for session metadata migration version 30 in packages/storage/src/sqlite-session-metadata-schema.ts:
- feat: durable message lifecycle from admission to execution #3721 / merge
24a97c54e: createsmessage_admissionsandcancelled_message_admissions; - feat(workhub): add coordination session lifecycle #3764 / merge
f9d960d8c: createssession_metadata_one_workhub_coordination_session.
MIGRATIONS is constructed as a JavaScript Map, so the later [30, ...] silently replaces the earlier one. A fresh database advances session_metadata_schema to version 30 after creating only the coordination index. The message-admission store then fails with no such table: message_admissions.
Reproduction
On current main after building @maka/core and @maka/storage:
node@24 --test --test-concurrency=1 \
--test-name-pattern="materializes an accepted steering draft" \
packages/storage/dist/__tests__/sqlite-session-metadata-store.test.js
Result:
Error: no such table: message_admissions
The complete session metadata file reports five failures in the admission/handoff/reorder tests. I reproduced the same failure after stashing an unrelated Windows-baseline branch and rebuilding pure upstream/main, so it is not introduced by that branch.
Merge interaction
Both PR heads could be green independently because each owned version 30 on its own base. The conflict is semantic rather than textual and appeared only after both merges.
Required compatibility
Simply renumbering the latest source entry is insufficient because version-30 databases may already exist in three shapes:
- feat: durable message lifecycle from admission to execution #3721 head: message-admission tables exist, coordination index absent;
- feat(workhub): add coordination session lifecycle #3764 head: coordination index exists, message-admission tables absent;
- current main: same as (2), with schema version recorded as 30.
Recommend bumping the current schema to 31 and making migration 31 converge every version-30 shape with guarded creation of both authorities. Add tests for all three starting shapes and a contract that prevents duplicate migration-version declarations from being silently collapsed by Map construction.
This is a current-main storage migration blocker, independent of #2624.
Activity
liugddx commentedon Aug 25, 2026
Fixed by #3796. The PR advances the schema to 31, converges admissions-only / coordination-only / complete version-30 shapes, adds duplicate-or-missing migration-key enforcement, and passed required test on exact head 1b59330: https://github.com/apache/maka/actions/runs/32847030767/job/97799005876