Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a305751
fix(installer): accept a renumbered volume device
av1155 Oct 2, 2026
5a020bf
fix(installer): recover journals across renumbering
av1155 Oct 2, 2026
8e52372
fix(installer): keep identity refresh off retirement and read errors
av1155 Oct 2, 2026
50bf7b8
docs(installer): state what the device mapping refuses
av1155 Oct 2, 2026
857f834
fix(install): tolerate macOS device renumbering safely
777genius Oct 2, 2026
bc0884d
fix(install): preserve consent revocation and repeated reboot recovery
777genius Oct 2, 2026
a54060c
test(setup): handle ownership fixture close errors
777genius Oct 2, 2026
7f88ef4
test(installruntime): use canonical registered runtime in revocation …
777genius Oct 2, 2026
cfdc8b0
fix(installruntime): validate active native bytes before policy replay
777genius Oct 2, 2026
7fbdebd
fix(installer): print durable native path for unchanged refresh
777genius Oct 2, 2026
2dacb68
fix(native): integrate current main before release qualification
777genius Oct 2, 2026
68ffd4b
test(install): capture fresh path identities across platforms
777genius Oct 2, 2026
cdb60e5
test(install): report missing entries without dereferencing metadata
777genius Oct 2, 2026
1f40809
test(install): satisfy pinned lint for native damage cases
777genius Oct 2, 2026
bf9918b
chore(ci): integrate main queue containment into recovery fix
777genius Oct 2, 2026
a56a630
fix(install): integrate current policy recovery with device renumbering
777genius Oct 3, 2026
e1ac6f2
fix(install): verify retained native before journal publication
777genius Oct 2, 2026
f1d4b5c
fix(install): preserve contributor recovery invariants with Local policy
777genius Oct 3, 2026
989cf93
fix(install): capture coherent reverse journal parent identities
777genius Oct 3, 2026
81b43c8
chore(install): integrate current main before recovery merge
777genius Oct 3, 2026
50ce476
fix(install): recover revoked policy through fixed root aliases
777genius Oct 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions cmd/claude-notifications/install_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func installRuntime(args []string, output io.Writer) error {
refresh := flags.Bool("refresh", false, "refresh files for existing consumers without adding a registration")
relocateCache := flags.Bool("relocate-versioned-cache", false, "move Claude hooks between versioned plugin caches")
purge := flags.Bool("purge-native", false, "explicitly remove retained callback on final uninstall")
printNativePath := flags.Bool("print-native-path", false, "print only the committed durable native generation path")
consumer := flags.String("consumer", "claude-hooks", "managed consumer identity")
if err := flags.Parse(args); err != nil {
return err
Expand Down Expand Up @@ -118,6 +119,37 @@ func installRuntime(args []string, output io.Writer) error {
}
files = changed
if len(files) == 0 {
if *printNativePath {
root := *control
if root == "" {
root, err = installruntime.ControlRoot()
if err != nil {
return err
}
}
// Observe retained ownership without committing or adopting utilities.
snapshot, err := installruntime.ReadInstalledSnapshot(root)
if err != nil {
return err
}
if snapshot.Recovery {
return installruntime.ErrPolicyRecovery
}
ledger := snapshot.Ledger
if ledger.ID != "" && ledger.Owner != "existing-installer" {
return fmt.Errorf("component owned by %s at %s; explicit takeover required", ledger.Owner, ledger.RuntimeRoot)
}
if ledger.Native != nil {
root, err = installruntime.CanonicalPath(root)
if err != nil {
return err
}
if ledger.Native.Path != filepath.Clean(ledger.Native.Path) || filepath.Dir(ledger.Native.Path) != filepath.Join(root, "native") {
return fmt.Errorf("native owner outside persistent directory")
}
}
return printRuntimeNativePath(output, ledger)
}
return nil
}
}
Expand Down Expand Up @@ -317,18 +349,36 @@ func installRuntime(args []string, output io.Writer) error {
}
ledger, err := installruntime.Commit(ctx, req)
if err == nil {
_, _ = fmt.Fprintf(output, "managed-runtime committed generation=%d\n", ledger.Generation)
if !*printNativePath {
_, _ = fmt.Fprintf(output, "managed-runtime committed generation=%d\n", ledger.Generation)
}
if !*remove {
regCtx, regCancel := context.WithTimeout(context.Background(), 10*time.Second)
warning := reconcileRuntimeNativeRegistration(regCtx, *control)
regCancel()
if warning != nil {
_, _ = fmt.Fprintf(output, "warning: runtime committed; native registration reconciliation incomplete: %v\n", warning)
warningOutput := output
if *printNativePath {
warningOutput = os.Stderr
}
_, _ = fmt.Fprintf(warningOutput, "warning: runtime committed; native registration reconciliation incomplete: %v\n", warning)
}
}
if *printNativePath {
return printRuntimeNativePath(output, ledger)
}
if *purge {
_, _ = fmt.Fprintln(output, "Callback entrypoint purge completed; pending notifications may no longer open targets. Running callbacks are not stopped.")
}
}
return err
}

func printRuntimeNativePath(output io.Writer, ledger installruntime.Ledger) error {
path := ""
if ledger.Native != nil {
path = ledger.Native.Path
}
_, err := fmt.Fprintln(output, path)
return err
}
Loading
Loading