Repository navigation
Conversation
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
6 times, most recently
from
September 20, 2026 23:01
f497ce1 to
0bfa30a
Compare
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
from
September 21, 2026 05:49
0bfa30a to
8615434
Compare
5 tasks done
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
from
September 28, 2026 01:10
8615434 to
fed0895
Compare
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
2 times, most recently
from
October 7, 2026 16:34
2dfbe3f to
58b5c56
Compare
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
2 times, most recently
from
October 19, 2026 22:37
3382937 to
fa7fde9
Compare
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
from
October 31, 2026 13:26
fa7fde9 to
67ef054
Compare
This was referenced Nov 1, 2026
Follow-up to rtk-ai#3707. The ownership sidecar could not protect the case it exists for, and an edited extension could not be uninstalled at all. Ownership: - Record ownership for an extension that pre-dates the sidecar, marking the record partial instead of claiming sole ownership. Without this the sidecar is never created for an upgrading user, so shared-file protection is inert for everyone who already had the extension. - Merge into an existing record rather than resetting it: deleting the file does not unconfigure an agent that still resolves to that path. - Re-read the record immediately before writing, since a confirmation prompt sits between the caller's read and the write. - Work out once, up front, whether the Pi and OMP paths resolve to the same file, so reading the record and warning act on one answer; an install checks again before recording, since creating the directory can make the paths meet. Uninstall: - Give uninstall the same Ask/Auto/Skip policy as install, so a hand-edited or fork-built extension stays removable with --auto-patch instead of being permanently stuck. The question says the edits are discarded. - That question, and the advice to rerun with --auto-patch when it is declined, say whether the other agent loads the same file, since removing it removes it for both. The shared-file decision re-reads the record after the question. - Make --dry-run describe what the real run does. - Install's question before overwriting a non-stock extension says the same, since the overwrite reaches the other agent too. - Pi and OMP share one install and one uninstall path instead of near-copies. `rtk init --show --agent pi` reports the Pi extension instead of the generic configuration. The Pi README no longer says the extension blocks commands on a pipeline rule; it only rewrites. Co-Authored-By: Claude Opus 5.5 <[email protected]>
KuSh
force-pushed
the
fix/pi-omp-ownership-lifecycle
branch
from
November 28, 2026 14:14
67ef054 to
1111bb6
Compare
This was referenced Nov 28, 2026
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.
Follow-up to #3707.
#3707 added the
.rtk-agentsownership record so that uninstalling one of Pi or OMP does not delete an extension file the other agent shares. As merged, the record is never created for an extension that existed before it, so the protection is inert for every upgrading user, and an extension with local edits can never be uninstalled.Ownership record
unknown-prior): RTK cannot tell who installed that file, so it no longer claims sole ownership of it. Example, with both agents' paths resolving to one file: install OMP over an existing Pi extension, thenrtk init --agent pi --uninstallnow asks before removing the file OMP uses, where it used to delete it and exit 0.Install and uninstall
--dry-runpreview, say when the other agent loads the same file, or may load it, since the overwrite reaches both.rtk init --agent pi --uninstall --auto-patchremoves it. The prompt says the edits are lost; no backup is kept.--dry-runpreview, and the refusal that suggests--auto-patchsay when the other agent loads the same file, or may load it, since removing it removes it for both. The shared-file decision re-reads the record after the prompt.--dry-runpreviews that prompt instead of the old refusal.rtk init --show --agent pishows the Pi extension instead of the generic configuration.The Pi README no longer says the extension returns
{ block: true, reason }on a pipeline rule: since 2b96061 pipeline rules act on Claude Code only, and the extension only rewrites.Where a write lands through symlinks, keeping project writes inside the project, and backups are left to #4269, which routes every init write through one guarded path.
Tests
tests/omp_init_test.rscovers the partial record and its completion, merging, the repair of an unreadable record, the single report of a bad record, the uninstall policy for both agents, the other-agent sentence for a shared, partial and missing record in both directions, an install whose own write makes the paths meet, and that a declined shared install is not announced; each new test was checked by reverting the code it pins.test_global_uninstall_detects_shared_pi_omp_extensionno longer creates an empty.omp/in the checkout it runs from.Verification
cargo fmt --all --check,cargo clippy --workspace --all-targetsandcargo test --allclean, also with--no-default-features;cargo doc --no-depsclean; type-checked forx86_64-pc-windows-gnuwith--all-targets.🤖 Generated with Claude Code