Skip to content

Sync ps-modules, migrate do-linux → do-unix, add PR skills - #257

Merged
szymonos merged 12 commits into
mainfrom
rfr/update
Jul 22, 2026
Merged

Sync ps-modules, migrate do-linux → do-unix, add PR skills#257
szymonos merged 12 commits into
mainfrom
rfr/update

Conversation

@szymonos

@szymonos szymonos commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Module sync from szymonos/ps-modules: do-common refreshed to v2.0.0 (new Split-UriHostPort, expanded certs/python helpers).
  • do-linuxdo-unix migration: do-unix is the cross-platform (Linux + macOS) successor — same module GUID, superset Get-SysInfo. Every provisioning path (linux_setup.sh, wsl_setup.ps1, 12 Vagrantfiles, setup_profile_user.ps1) now installs/references do-unix, and the sync list in modules_update.ps1 is updated.
  • Duplicate-command fix: setup_profile_user.ps1 removes any stale user-scope do-linux before setup — install scripts only rm -rf the module being installed, so an already-provisioned distro would otherwise keep both and get duplicated function/alias names.
  • Certs call-site migration: wsl_certs_add.ps1, vg_cacert_fix.ps1, vg_certs_add.ps1 follow the synced Get-Certificate -BuildChain-PresentedChain rename (would throw at runtime otherwise).
  • fix(uv): install_uv.sh sets the deprecated UV_NATIVE_TLS only for uv < 0.11.0 on self update; 0.11.0+ uses UV_SYSTEM_CERTS alone, silencing the deprecation warning. Empty/unparseable version is treated as newer uv and skips the deprecated var.
  • fix(sh): install_pwsh.sh selects the libicu package by Debian codename (trixie → libicu76, resolute → libicu78) instead of hardcoding libicu76.
  • refactor(hooks): align_tables.py and gremlins.py pre-commit hook implementations improved.
  • chore(lint): PREK_RUN rewritten to run hooks against a disposable scratch index (GIT_INDEX_FILE) instead of round-tripping the user's staging.
  • chore(ci): repo_checks workflow installs Pester so the Pester hook runs in CI.
  • chore(second-opinion): run scripts via uv run --frozen, prune vendored trees from the discovery walk, fix the check exit code.
  • New skills: prepare-pr and address-pr-review (+ .claude/prepare-pr.toml).
  • Docs: ARCHITECTURE.md § 6 documents the PowerShell modules + upstream sync; design/lessons.md gains a lesson on synced-module public-surface renames breaking external call sites.

Test plan

  • make lint-diff — all 13 pre-commit hooks green
  • do-unix imports cleanly under pwsh (5 functions + 5 aliases export)
  • install_uv.sh version gate verified at boundaries (empty / 0.9.0 / 0.11.0 / 0.11.31 / 1.0.0)
  • Re-provision an already-set-up WSL distro and confirm no duplicate Get-SysInfo/gsi after the do-linux cleanup
  • Confirm modules_update.ps1 pulls do-unix (not do-linux) from ps-modules
  • Run vg_certs_add.ps1 / wsl_certs_add.ps1 and confirm -PresentedChain returns the expected chain
  • Provision pwsh on Debian trixie and resolute; confirm the correct libicu installs

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-linux to do-unix (WSL + Linux setup + Vagrant + user profile setup).
  • Sync do-common to v2.0.0, including revised certificate retrieval/chain handling and improved certifi fix behavior.
  • Add new PR skills (prepare-pr, address-pr-review) and update PREK_RUN to 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

Comment thread modules/do-common/Functions/certs.ps1
@szymonos szymonos added the test:integration Trigger integration test (test_linux.yml) on this PR label Jul 21, 2026
@szymonos
szymonos requested a review from Copilot July 21, 2026 04:37
@szymonos szymonos removed the test:integration Trigger integration test (test_linux.yml) on this PR label Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-SysInfo is invoked on a non-Linux/non-macOS platform, $sysProp is never initialized but is still indexed below, which results in a confusing runtime error. Add an explicit else to throw a clear “unsupported platform” message.

@szymonos
szymonos force-pushed the rfr/update branch 3 times, most recently from a89a965 to 2e871fe Compare July 22, 2026 05:12
@szymonos
szymonos requested a review from Copilot July 22, 2026 08:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-SysInfo assigns $sysProp only 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 explicit else that throws a clear, supported-platform message.

Comment thread .github/workflows/repo_checks.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/hooks/gremlins.py
Comment thread .assets/provision/install_uv.sh
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>
@szymonos
szymonos merged commit d1d3d7f into main Jul 22, 2026
3 checks passed
@szymonos
szymonos deleted the rfr/update branch July 22, 2026 11:51
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.

2 participants