idstack icon indicating copy to clipboard operation
idstack copied to clipboard

Two sessions in one course folder can lose manifest updates

Open savvides opened this issue 3 weeks ago • 1 comments

Suspected; not reproduced. scripts/idstack-manifest-merge takes no lock. course-import and assessment-design read shared sections early and write them back much later. Also, the scratch names .idstack/.report-section.md and canvas-push/ are fixed, so two sessions overwrite each other's drafts.

First reproduce the problem with two concurrent merges. Then decide between an fcntl lock and an --expect-updated check, and give each session its own scratch name.

Found in the pre-share reliability review.

savvides avatar Nov 13 '26 13:11 savvides

Fixed in #196 and #197: idstack-manifest-merge takes a lock (before the lock, 4 of 5 reproduction rounds lost updates; after it, 0 of 5), --expect-updated makes a stale write fail with exit 8, course-import and assessment-design pass it, and the report draft is now .idstack/.report-section.<skill>.md. Limits that remain: two sessions that run the same skill in one folder share a draft, the canvas-push/ scratch folder keeps one name, and the lock needs fcntl (macOS and Linux).

savvides avatar Nov 13 '26 17:11 savvides