fix(cli): protect plugin activation and approval rollback from concurrent commands #439
No reviewers
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index!439
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/serialize-project-plugin-mutations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two daemonless CLI
plugin updatecommands for the same project could retire each other's live generation. A failed command then restored a stale approval snapshot, erasing the other update's approval; the other process could subsequently promote a generation that the record no longer approved (#438).Hold a nonblocking OS lock across the complete CLI approval snapshot, planning, mutation, activation and rollback operation. A competing mutator reports
plugin_mutation_busybefore reading approvals and tells the operator to retry. Coordination uses canonical installation/project identities in a private directory beside the user store, outside project and approval/package data, so unsigned/declined operations preserve those roots and different TMP settings still coordinate. Process exit releases the guard; keeping the lock file avoids inode races. Status, doctor, check-only updates and dry-run GC remain available, with independent locks for independent projects. Announce foreground activation before its expensive work when no daemon owns the index.Validation: all81 tests in the affected add, displacement, registry, package-update and package-release-script suites passed, including unchanged-state refusals and bootstrap behavior. The complementary CLI nextest run completed446 tests:445 passed and one unchanged query log-level fixture returned
warming_upat its existing one-shot wait; that fixture passed in isolation without source/deadline changes (tracked on #301). CLI doctest, all-target Clippy with-D warnings, formatting and whitespace checks passed. New process regressions cover two different packages, root aliases, different TMP directories, no catalog fetch or approval write by the refused command, sequential retry preserving both upgrades, independent-project access and crash release. Bypassing the update guard was confirmed red, then restored.Closes #438 after normal CI qualification, including Windows. No package version or CI/deadline changes. Follow
docs/releasing.mdfor the version-only core release after source merge.Merged normally as169e91fdcf63f37d1c6774e1540909e20f4d7fc6 after all required final-head workflows passed on4390bb131f490bb7e423cd801621e7ead2b8f50d: Windows6548(2success), core6549(13success/3nightly skips), package6550(23success/2expected skips), pilots6551(5success). Native workspace4836 and Linux5058 tests passed; Linux timing44 passed; Windows timing/doctest/installer/shipped-profile/smoke steps completed normally. Source and merge trees botha99422a02b8ba43f30ee2fd2065bb0b78f63d042, and source is a merged ancestor.
Version-only release PR#440 (#440) is prepared directly on the qualified source head per docs/releasing.md; its four-site-only checker passes. Publication and independent signed-artifact/upgrade verification are still pending.