Skip to content

fix(star): self uninstall removes only the extensions it installed - #919

Merged
David-Noble-at-work merged 5 commits into
developfrom
fix/917-uninstall-removes-only-what-it
Sep 22, 2026
Merged

David-Noble-at-work merged 5 commits into
developfrom
fix/917-uninstall-removes-only-what-it

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lane 14 of NobleFactor/noblefactor-ops#217. star self uninstall promises manifest-driven removal -- "removes only
files that have not been modified since installation" -- and its extensions hook broke that promise on both sides of
the manifest.

  • Install over-claimed. After copying its extensions, installStarExtensions returned
    cli.CollectFiles(prefix, targetExtDir): every file in the shared extensions directory, whoever put it there. Those
    entered star's manifest as star's own.
  • Uninstall ignored the manifest, calling os.RemoveAll on the whole directory.

The directory is shared by design: the loader probes one path, so writ's deployment of the base layer's
com.noblefactor.ops.GitHub lives beside star's own extensions. Either defect alone deleted it, leaving writ
believing it had deployed and star gh issues report unable to resolve.

The fix is mostly deletion. Install now lists what it copied, walking the source. The post-uninstall hook is gone:
with an honest manifest the generic uninstall removes exactly star's files, skips any that changed, and prunes the
directories that empty.

Also here: #903's Phase 3 record, owed since lane 7. The release from develop carries star and its 23
extensions in all six archives, and install.ps1 installed it on DANOBLE-WD11-3. star devlore resolves;
star gh issues report does not, because the base layer's extension calls shell.exec, which runs sh -c on a host
that keeps no sh on PATH -- the rewrite #799 and #801 describe.

Next, in lane 15: #918, star's data belongs under devlore/ like writ's. With an honest manifest that move
cannot take another installer's extensions with it.

Test plan

  • Three new tests in cmd/star/star/root_test.go: install records only its own files; a real self install then
    self uninstall leaves a foreign extension in place and removes star's; a checkout with no extensions installs
    and claims nothing
  • Those tests fail against develop's root.go -- the manifest claims
    share/star/extensions/com.noblefactor.ops.GitHub/extension.yaml, and the uninstall deletes it -- and pass
    against this change
  • make vet, make lint and make test pass locally; lint caught a gofmt slip, now formatted
  • CI on this PR

Plans: docs/plans/fix/917-uninstall-removes-only-what-it.md, docs/plans/fix/903-dist-packs-every-product.md

Resolves #917

Time

Marker UTC Elapsed
opened (first commit) 2026-09-22T20:43:19Z —
submitted (PR opened) 2026-09-22T20:59:12Z 0.3 h after opened
merged 2026-09-22T21:10:22Z 0.2 h after submitted; 0.5 h in all

Computed by the algorithm of noblefactor-ops#188 at merge.

)

The extensions directory is shared -- the loader probes one path, so writ's deployment of the base layer's
com.noblefactor.ops.GitHub lives beside star's own. installStarExtensions reported every file in that directory as
installed, so star's manifest claimed files it never placed, and the post-uninstall hook then removed the whole
directory with RemoveAll, manifest or no manifest. Either one deleted another installer's extensions.

The install now lists what it copied, walking the source. The uninstall hook is gone: with an honest manifest the
generic uninstall removes exactly star's files, skips any that changed, and prunes the directories that empty.
Three tests cover it, and they fail against the old hooks.
The release from develop carries star and its extensions in all six archives, and install.ps1 installed it here.
star gh issues report is blocked by the shell provider's sh -c, which #799 and #801 replace with argv execution.
@David-Noble-at-work
David-Noble-at-work merged commit c303307 into develop Sep 22, 2026
13 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the fix/917-uninstall-removes-only-what-it branch September 22, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

star self uninstall deletes the whole share/star/extensions directory, including extensions it never installed

1 participant