Skip to content

Commit fc3c61f

Browse files
authored
fix(repo): pythinker-cli rename sweep + feat(installer): hosted Windows uninstaller (#252)
* fix(repo): update all repository URLs after rename to pythinker-cli The GitHub repository was renamed from Pythoughts-labs/pythinker-code to Pythoughts-labs/pythinker-cli, and the old name's redirect no longer applies. Update every repo-slug constant and URL: install scripts (all copies), the in-app updater, the default feedback repo, the docs-pages repository guard, winget/homebrew/scoop workflow links, README, docs, and matching tests. * feat(installer): add hosted Windows uninstaller one-liner Add scripts/uninstall.ps1, served at https://pythinker.com/uninstall.ps1 mirroring the installer bootstrap (irm ... | iex). It runs the registered Inno uninstaller silently, sweeps validated install dirs, PATH entries (user + system, kind-preserved), Start Menu shortcuts, uninstall registry keys (32/64-bit views), and stale installer temp dirs, then verifies the final machine state with fail-closed semantics and a structured summary. Safety: registry-provided paths are never deleted or executed without validation (leaf named Pythinker plus on-disk evidence, no reparse-point component, trusted unins<N>.exe only); processes are stopped per-PID only when rooted in a validated install dir with StartTime/Path revalidation; the script never self-elevates and never calls exit, so piping through iex cannot close the host session. User data is kept unless PYTHINKER_PURGE_DATA=1. Ship byte-identical copies in docs/public and web/public with matching _headers cache entries, document the one-liner in the README Windows section and the getting-started guide, and cover sync/parsing/README assertions in test_installation_docs.py. * refactor(installer): harden Windows uninstaller deletion and execution policy Replace the removal engine with a snapshot-based design (Get-SafeTreeSnapshot + Remove-SafeSnapshotNow): complete-or-fail-closed tree inspection, per-entry non-recursive deletes that never rely on PS 5.1 reparse traversal, and re-inspection before reboot scheduling. Tighten policy: recursive sweeps run only against known install dirs (LOCALAPPDATA + ProgramFiles x2); registry-selected custom installs are never swept or executed automatically - they get exact PATH-token removal and a manual-action report. Inno uninstallers execute only non-elevated, user-scope, from a known dir, as a trusted unins<N>.exe; no registry selected binary ever runs with an elevated token. Also: canonicalize all registry-provided paths (reject roots, UNC/device, drive-relative, reparse components), re-read PATH under the writable handle before SetValue, broadcast WM_SETTINGCHANGE only on actual change, prove installer-temp ownership via AppId marker or verified SHA-256, handle 32-bit registry views natively, dedupe warnings, and bound the uninstaller run with a 10-minute timeout. Uses DirectorySeparatorChar in path-prefix checks (identical to '\' on Windows; keeps the logic testable cross-platform). * fix(installer): replace -ine operator flagged by the typos workflow Use [string]::Equals(..., OrdinalIgnoreCase) for the Pythinker leaf-name check; identical semantics, and the repo has no typos config to suppress the PowerShell -ine operator being flagged as a misspelling. * fix(repo): address CodeRabbit review findings on the rename sweep - issue template: make the discussions link label match its pythinker-cli target - README: fix 'cd pythinker-code' after cloning pythinker-cli.git - feedback: migrate saved Pythoughts-labs/pythinker-code repo values (the pre-rename bundled default) to pythinker-cli, with a regression test - help skill: point documentation base/llms.txt/page URLs at the canonical pythinker-cli GitHub Pages path instead of relying on the rename redirect - tests: report a missing pwsh as pytest.skip instead of a silent pass * docs(skills): add language tag to llms.txt URL fence (MD040)
1 parent 582a394 commit fc3c61f

53 files changed

Lines changed: 4922 additions & 161 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/1-bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
value: |
1010
Thank you for submitting a bug report! It helps make Pythinker Code better for everyone.
1111
12-
If you need help or support using Pythinker Code, and are not reporting a bug, please post on [pythinker-code/discussions](https://github.com/Pythoughts-labs/pythinker-code/discussions), where you can ask questions or engage with others on ideas for how to improve Pythinker Code.
12+
If you need help or support using Pythinker Code, and are not reporting a bug, please post on [pythinker-cli/discussions](https://github.com/Pythoughts-labs/pythinker-cli/discussions), where you can ask questions or engage with others on ideas for how to improve Pythinker Code.
1313
1414
Make sure you are running the latest version of Pythinker Code (`uv tool upgrade pythinker-code` to upgrade). The bug you are experiencing may already have been fixed.
1515

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: true
22
contact_links:
33
- name: Questions and General Discussion
4-
url: https://github.com/Pythoughts-labs/pythinker-code/discussions
4+
url: https://github.com/Pythoughts-labs/pythinker-cli/discussions
55
about: Have questions? Welcome to open a discussion!

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Thank you for your contribution to Pythinker Code!
33
Please make sure you already discussed the feature or bugfix you are proposing in an issue with the maintainers.
44
Please understand that if you have not gotten confirmation from the maintainers, your pull request may be closed or ignored without further review due to limited bandwidth.
55
6-
See https://github.com/Pythoughts-labs/pythinker-code/blob/main/CONTRIBUTING.md for more.
6+
See https://github.com/Pythoughts-labs/pythinker-cli/blob/main/CONTRIBUTING.md for more.
77
-->
88

99
## Related Issue
@@ -18,7 +18,7 @@ Resolve #(issue_number)
1818

1919
## Checklist
2020

21-
- [ ] I have read the [CONTRIBUTING](https://github.com/Pythoughts-labs/pythinker-code/blob/main/CONTRIBUTING.md) document.
21+
- [ ] I have read the [CONTRIBUTING](https://github.com/Pythoughts-labs/pythinker-cli/blob/main/CONTRIBUTING.md) document.
2222
- [ ] I have linked the related issue, if any.
2323
- [ ] I have added tests that prove my fix is effective or that my feature works.
2424
- [ ] I have run `make gen-changelog` to update the changelog.

.github/workflows/docs-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
jobs:
2222
build:
2323
# Only run on the original repository, not on forks
24-
if: github.repository == 'Pythoughts-labs/pythinker-code'
24+
if: github.repository == 'Pythoughts-labs/pythinker-cli'
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout repository

.github/workflows/homebrew-tap.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ jobs:
158158
cat > README.md <<EOF
159159
# homebrew-pythinker
160160
161-
Homebrew tap for [Pythinker Code](https://github.com/Pythoughts-labs/pythinker-code).
161+
Homebrew tap for [Pythinker Code](https://github.com/Pythoughts-labs/pythinker-cli).
162162
163163
\`\`\`sh
164164
brew install Pythoughts-labs/pythinker/pythinker-code
165165
\`\`\`
166166
167167
This tap is auto-updated by the
168-
[homebrew-tap.yml](https://github.com/Pythoughts-labs/pythinker-code/blob/main/.github/workflows/homebrew-tap.yml)
168+
[homebrew-tap.yml](https://github.com/Pythoughts-labs/pythinker-cli/blob/main/.github/workflows/homebrew-tap.yml)
169169
workflow on every \`v*.*.*\` tag. Do not hand-edit \`Formula/*\` — your
170170
edits will be overwritten on the next release.
171171
EOF

.github/workflows/scoop-bucket.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ jobs:
129129
cat > README.md <<'EOF'
130130
# scoop-pythinker
131131
132-
Scoop bucket for [Pythinker Code](https://github.com/Pythoughts-labs/pythinker-code).
132+
Scoop bucket for [Pythinker Code](https://github.com/Pythoughts-labs/pythinker-cli).
133133
134134
```pwsh
135135
scoop bucket add pythinker https://github.com/Pythoughts-labs/scoop-pythinker
136136
scoop install pythinker-code
137137
```
138138
139139
This bucket is auto-updated by the
140-
[scoop-bucket.yml](https://github.com/Pythoughts-labs/pythinker-code/blob/main/.github/workflows/scoop-bucket.yml)
140+
[scoop-bucket.yml](https://github.com/Pythoughts-labs/pythinker-cli/blob/main/.github/workflows/scoop-bucket.yml)
141141
workflow on every semver release tag. Do not hand-edit `bucket/*` — your
142142
edits will be overwritten on the next release.
143143
EOF

.github/workflows/winget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
if (-not $env:WINGET_TOKEN) {
4646
throw "WINGET_SUBMIT_TOKEN is not configured"
4747
}
48-
$installerUrl = "https://github.com/Pythoughts-labs/pythinker-code/releases/download/v$env:VERSION/PythinkerSetup-$env:VERSION.exe"
48+
$installerUrl = "https://github.com/Pythoughts-labs/pythinker-cli/releases/download/v$env:VERSION/PythinkerSetup-$env:VERSION.exe"
4949
$wingetCreateUrl = "https://github.com/microsoft/winget-create/releases/download/v1.12.8.0/wingetcreate.exe"
5050
$wingetCreateSha256 = "8BD738851B524885410112678E3771B341C5C716DE60FBBECB88AB0A363ED85D"
5151
Invoke-WebRequest -Uri $wingetCreateUrl -OutFile wingetcreate.exe

0 commit comments

Comments
 (0)