Repository navigation
feat(installer): tag-triggered Windows installer, plus a dry run that publishes nothing - #2
Merged
Merged
Conversation
…mpts Pushing a v* tag freezes agent-audit with PyInstaller on windows-latest, wraps it in Inno Setup, and attaches the result to that tag's release. The installer lands in Program Files, appends that directory to the machine PATH (HKLM, removed again on uninstall) and registers itself in Add/Remove Programs. workflow_dispatch runs the same build and keeps the installer as an artifact instead of publishing it, so the Windows-only steps can be proven without a public release. --collect-data agent_audit is the part that is specific to this repo. The analysis-pass prompts are markdown loaded through importlib.resources, which PyInstaller's import analysis cannot see. A build without the flag succeeds, answers --help, and then dies with FileNotFoundError on the first real audit, so the smoke test runs an actual `skills scan` over an empty directory rather than trusting --help. agent-audit needs the Claude Code CLI on PATH for its model-backed passes and the installer does not bundle it. The finish page and the README say so; the deterministic commands still work without it. The [Registry] PATH line stays one long line on purpose, the .iss stays pure ASCII because Inno reads a BOM-less script as ANSI, and AppVersion has no default so a build that forgets it fails instead of shipping 0.0.0-dev.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the reviewed installer pattern from
keycut(#2/#3), with two deviations that a faithful portwould have got wrong.
--helpwas a lying smoke test hereagent-audit loads its analysis-pass prompts as packaged markdown through
importlib.resources(
src/agent_audit/prompts/__init__.py:32, declared atpyproject.toml:42-43). PyInstaller's importanalysis cannot see data loaded that way and does not collect it.
The keycut-identical build command was run first, deliberately. It succeeded, and:
A faithful port would have shipped an installer that passes its own release-gate smoke test and is
broken for every real user. Two changes close it:
--collect-data agent_auditon the PyInstaller line — the bad artifact becomes unbuildablerather than merely detectable.
skills scanover an empty directory withAGENT_AUDIT_CLAUDE_BINpointed at a nonexistent name. A missing CLI is recorded as a coveragegap rather than raising, so this exercises prompt loading and report writing end to end with no
CLI, no network and no spend.
--helpstays as the first assertion.After the rebuild that scan exits 0 and writes
2026-08-03-skill-audit.md.The external requirement is the
claudeCLI — not "none"The brief guessed this might be the dependency-free port. It is not, and the distinction matters:
dependencies = []means no third-party Python packages, which is a different claim.src/agent_audit/runner.py:23—CLAUDE_BIN = os.environ.get("AGENT_AUDIT_CLAUDE_BIN", "claude")runner.py:93-107— every pass is aclaude -p … --json-schemaargvrunner.py:124-129—subprocess.run, withFileNotFoundError→ "install the Claude Code CLI,or set $AGENT_AUDIT_CLAUDE_BIN"
The finish page and README state it, along with the counterweight the README already documents at
106-108:
skills manifest,skills diffand--focus structuralwork without the CLI. No installone-liner was invented — it cites
https://www.anthropic.com/claude-code, matching the existingREADME. No ffmpeg wording leaked from the reference:
grep -rin 'keycut|ffmpeg|ffprobe|Gyan'overevery changed file is clean.
Test plan
--collect-data→ broken as shown above; with it →skills scanexits 0pytest→ 160 passed, re-run unpiped by the dispatcher;ruff check .→ all checks passed;ruff format --check .→ 22 files already formatted_scproxy(macOS-only) and fivemultiprocessing.<attr>non-module entries. No--hidden-importneeded. Grepped forimport_module/plugin discovery —importlibis used for data only.isspure ASCII, no BOM,[Registry]PATH on one line; freshAppIdGUID, not keycut'sif:gates presentUnverified until a real Windows run
ISCC compiling the
.iss, the HKLM PATH add/remove Pascal, the Windows freeze,choco install innosetup, thegh releasebranch, and SmartScreen on the unsigned binary.Merge after keycut's dry run goes green.
Diff 281 sum (cap 300).
src/,tests/andci.ymluntouched.