Repository navigation
fix(manifest): detect same-second writes and keep the home profile - #228
Merged
Merged
Conversation
--expect-updated missed a second merge in the same second because updated had a one-second resolution, and --create left a new manifest when that check then failed. A symlinked .idstack could also write into the home profile, and the lock sat beside the symlink rather than the real file. Migration from 1.3 no longer replaces an explicit findings count of 0. Co-authored-by: Philippos Savvides <savvides@users.noreply.github.com>
…dings_summary takes old counts fresh_updated could go back to an earlier stamp on a coarse clock, so a stale --expect-updated matched again. An all-zero findings_summary is the v1.2 seed; the PR kept it and dropped the real counts in the old summary. Also fix two stale lock-path lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Review (pushed 40de886, all CI green incl. windows and mutation): Fixed:
Checked, fine: skills pass no Deferred: #235 (case-variant |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The manifest write path could drop a section, leave a file behind on a refused save, or write into the home profile.
updatednow has microseconds, so a second merge in the same second changes the stamp.--expect-updatedthen exits 8 and the first section stays. Before, the stamp had a resolution of one second, so that second merge replaced the section.--createwith a stamp that does not match a missing manifest exits 8 and makes no file. Before, it wrote a seed and then exited 8..idstackthat points at the home profile, and a manifest whose real path is that profile, exit 9 and write nothing.idstack-migratekeeps an explicit0inred_team_audit.findings_summarywhen it moves an oldsummary. An absentfindings_summarystill takes the old counts.Skill templates were not edited.
needs-analysisandlearning-objectivesstill omit--expect-updatedon shared sections. That fix belongs in the templates: #226idstack-migratestill prints a traceback whenimport_metadatais not an object. The file does not change: #227No existing issue.
VERSIONis unchanged.Tests
./test/test-manifest-merge.sh(the suite for this path)./test/smoke-test.sh./test/integration-test.shscripts/idstack-gen-skills --dry-runis clean (if a template changed) — no template changedReal result of
./test/test-manifest-merge.sh:The new checks failed on the old code first (7 failures: same-second overwrite, missing
fresh_updated, exit 8 leaving a file, explicit zero replaced, home-profile symlink for merge and migrate, symlink lock not shared). They pass after the fix.Note
Medium Risk
Changes core manifest persistence (timestamps, locking, home-path guards, and migration merge rules); incorrect behavior could drop sections or write to the wrong profile, though tests were added for the reported failure modes.
Reviewed by Cursor Bugbot for commit e60938b. Bugbot is set up for automated code reviews on this repo. Configure here.