Sync ps-modules, migrate do-linux → do-unix, add PR skills - #257
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the provisioning/tooling ecosystem to use the cross-platform do-unix PowerShell module (replacing do-linux), refreshes synced PowerShell modules (notably do-common v2.0.0 with expanded cert/Python helpers), and adds/updates internal .claude PR-automation skills and lint ergonomics.
Changes:
- Migrate all install/reference sites from
do-linuxtodo-unix(WSL + Linux setup + Vagrant + user profile setup). - Sync
do-commontov2.0.0, including revised certificate retrieval/chain handling and improved certifi fix behavior. - Add new PR skills (
prepare-pr,address-pr-review) and updatePREK_RUNto use a disposable git index.
Reviewed changes
Copilot reviewed 31 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wsl/wsl_setup.ps1 | Install do-unix instead of do-linux |
| vagrant/virtualbox/ubuntu/Vagrantfile | Copy do-unix module in provision step |
| vagrant/virtualbox/fedora/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/ubuntu/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/opensuse/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/fedora/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/debian/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/arch/Vagrantfile | Copy do-unix module in provision step |
| vagrant/libvirt/alpine/Vagrantfile | Copy do-unix module in provision step |
| vagrant/hyperv/ubuntu/Vagrantfile | Copy do-unix module in provision step |
| vagrant/hyperv/fedora/Vagrantfile | Copy do-unix module in provision step |
| vagrant/hyperv/debian/Vagrantfile | Copy do-unix module in provision step |
| vagrant/hyperv/arch/Vagrantfile | Copy do-unix module in provision step |
| modules/do-unix/Functions/completers.ps1 | Add Makefile target tab-completer |
| modules/do-unix/Functions/common.ps1 | Expand Get-SysInfo to macOS |
| modules/do-unix/do-unix.psm1 | New module root; exports functions/aliases |
| modules/do-unix/do-unix.psd1 | New module manifest (do-unix) |
| modules/do-common/Functions/python.ps1 | Improve certifi chain fix behavior |
| modules/do-common/Functions/certs.ps1 | Add host:port parsing + presented-chain TLS retrieval; macOS roots |
| modules/do-common/do-common.psm1 | Export Split-UriHostPort |
| modules/do-common/do-common.psd1 | Bump to v2.0.0; export Split-UriHostPort |
| Makefile | Run prek using scratch GIT_INDEX_FILE |
| ARCHITECTURE.md | Document PowerShell module sync + install sites |
| .claude/skills/second-opinion/SKILL.md | Update usage to uv run --frozen |
| .claude/skills/second-opinion/scripts/review_brief.py | Prune vendored dirs; adjust check exit code; uv shebang |
| .claude/skills/prepare-pr/SKILL.md | Add end-of-branch “prepare PR” skill doc |
| .claude/skills/prepare-pr/scripts/extract_signals.py | Add prepare-pr helper CLI (sync-trunk, signals, staleness, etc.) |
| .claude/skills/address-pr-review/SKILL.md | Add review-state machine skill doc |
| .claude/skills/address-pr-review/scripts/pr_review.py | Add GH-driven review state/trigger/wait/resolve script |
| .claude/prepare-pr.toml | Add per-repo config for prepare-pr skill |
| .assets/scripts/modules_update.ps1 | Sync list updated to do-unix |
| .assets/scripts/linux_setup.sh | Install do-unix instead of do-linux |
| .assets/provision/setup_profile_user.ps1 | Remove stale user do-linux; reference do-unix completer |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 39 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
modules/do-unix/Functions/common.ps1:63
- If
Get-SysInfois invoked on a non-Linux/non-macOS platform,$sysPropis never initialized but is still indexed below, which results in a confusing runtime error. Add an explicitelseto throw a clear “unsupported platform” message.
a89a965 to
2e871fe
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 42 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
modules/do-unix/Functions/common.ps1:64
Get-SysInfoassigns$sysProponly under$IsLinux/$IsMacOS, but it is used unconditionally afterwards. Importing/running this function on any other platform will throw a confusing null-indexing error. Add an explicitelsethat throws a clear, supported-platform message.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 42 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
modules/do-unix/Functions/common.ps1:64
- $sysProp is only initialized for $IsLinux/$IsMacOS. On other platforms, the subsequent $sysProp[...] assignments will throw (null/uninitialized). Add an explicit else branch that errors clearly before using $sysProp.
Ubuntu 26.04 libicu install
UV_SYSTEM_CERTS (uv 0.11.0+) supersedes the deprecated UV_NATIVE_TLS. Setting both unconditionally printed a deprecation warning on current uv. Gate UV_NATIVE_TLS behind a version compare; an empty/unparseable VER is treated as a newer uv (format changed) and skips the deprecated var. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
szymonos/ps-modules:do-commonrefreshed tov2.0.0(newSplit-UriHostPort, expanded certs/python helpers).do-linux→do-unixmigration:do-unixis the cross-platform (Linux + macOS) successor — same module GUID, supersetGet-SysInfo. Every provisioning path (linux_setup.sh,wsl_setup.ps1, 12 Vagrantfiles,setup_profile_user.ps1) now installs/referencesdo-unix, and the sync list inmodules_update.ps1is updated.setup_profile_user.ps1removes any stale user-scopedo-linuxbefore setup — install scripts onlyrm -rfthe module being installed, so an already-provisioned distro would otherwise keep both and get duplicated function/alias names.wsl_certs_add.ps1,vg_cacert_fix.ps1,vg_certs_add.ps1follow the syncedGet-Certificate-BuildChain→-PresentedChainrename (would throw at runtime otherwise).fix(uv):install_uv.shsets the deprecatedUV_NATIVE_TLSonly for uv< 0.11.0onself update;0.11.0+usesUV_SYSTEM_CERTSalone, silencing the deprecation warning. Empty/unparseable version is treated as newer uv and skips the deprecated var.fix(sh):install_pwsh.shselects thelibicupackage by Debian codename (trixie → libicu76, resolute → libicu78) instead of hardcoding libicu76.refactor(hooks):align_tables.pyandgremlins.pypre-commit hook implementations improved.chore(lint):PREK_RUNrewritten to run hooks against a disposable scratch index (GIT_INDEX_FILE) instead of round-tripping the user's staging.chore(ci):repo_checksworkflow installs Pester so the Pester hook runs in CI.chore(second-opinion): run scripts viauv run --frozen, prune vendored trees from the discovery walk, fix thecheckexit code.prepare-prandaddress-pr-review(+.claude/prepare-pr.toml).design/lessons.mdgains a lesson on synced-module public-surface renames breaking external call sites.Test plan
make lint-diff— all 13 pre-commit hooks greendo-uniximports cleanly under pwsh (5 functions + 5 aliases export)install_uv.shversion gate verified at boundaries (empty / 0.9.0 / 0.11.0 / 0.11.31 / 1.0.0)Get-SysInfo/gsiafter the do-linux cleanupmodules_update.ps1pullsdo-unix(notdo-linux) fromps-modulesvg_certs_add.ps1/wsl_certs_add.ps1and confirm-PresentedChainreturns the expected chainlibicuinstalls🤖 Generated with Claude Code