Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

[Bug] v2.5 INSTALL.ts generates settings.json with hardcoded v2.4 version strings

Open fayerman-source opened this issue 10 months ago • 2 comments

Summary

The PAI v2.5 release's install wizard (INSTALL.ts) contains hardcoded "2.4" version strings, causing fresh installs to report version 2.4 instead of 2.5.

Impact

  • Users installing v2.5 from Releases/v2.5/ get paiVersion: "2.4" and pai.version: "2.4" in settings.json
  • Statusline shows "v2.4" even though they have v2.5 components (28 skills, v2.5 documentation)
  • Confusing user experience - users think they have v2.4 when they actually have v2.5 files

Root Cause

Release packaging error: Version strings in INSTALL.ts were not updated from "2.4" to "2.5" before creating the v2.5 release archive.

Affected Lines

`Releases/v2.5/.claude/INSTALL.ts`:

  • Line 298: `"paiVersion": "2.4",` (should be "2.5")
  • Line 333: `"version": "2.4"` (should be "2.5")

Fix

```diff --- a/Releases/v2.5/.claude/INSTALL.ts +++ b/Releases/v2.5/.claude/INSTALL.ts @@ -295,7 +295,7 @@ function generateSettingsJson(config: InstallConfig): object {

return { "$schema": "https://json.schemastore.org/claude-code-settings.json",

  • "paiVersion": "2.4",
  • "paiVersion": "2.5", "env": { "PAI_DIR": `${HOME}/.claude`, "PROJECTS_DIR": config.PROJECTS_DIR || "", @@ -330,7 +330,7 @@ function generateSettingsJson(config: InstallConfig): object { }, "pai": { "repoUrl": "github.com/danielmiessler/PAI",
  •  "version": "2.4"
    
  •  "version": "2.5"
    
    }, "techStack": { "browser": "arc", ```

Reproduction Steps

  1. Start from clean slate (no existing `~/.claude/`)
  2. Copy `~/PAI/Releases/v2.5/.claude` to `~/.claude`
  3. Run `cd ~/.claude && bun run INSTALL.ts`
  4. Check `~/.claude/settings.json`
  5. Observe: `paiVersion` and `pai.version` both show "2.4" instead of "2.5"

Verification After Fix

  1. Applied fix to `INSTALL.ts`
  2. Re-ran wizard
  3. Confirmed `settings.json` now shows:
    • `"paiVersion": "2.5"` ✓
    • `"version": "2.5"` ✓

Prevention Recommendations

  1. Automated pre-release check: Add CI step that validates version strings in `INSTALL.ts` match the release version
  2. Single source of truth: Consider extracting version from a `VERSION` file that both `settings.json` and `INSTALL.ts` read from
  3. Release checklist: Add "Update INSTALL.ts version strings" to the release preparation checklist

Environment

  • Release: v2.5.0
  • File: `Releases/v2.5/.claude/INSTALL.ts`
  • Platform: Linux (WSL2)
  • Bun version: 1.3.8

Notes

  • This aligns with the CI/CD improvements mentioned in discussion #500
  • I have the fix tested locally and can submit a PR if helpful, or you can apply the 2-line change directly
  • Happy to help given the v3.x work in progress

✅ Fix tested and verified working
📦 Ready for v2.5.1 patch or v2.6 release

fayerman-source avatar Jan 31 '26 17:01 fayerman-source

Thanks for reporting this! We've been doing a major restructuring of PAI's core systems, including a complete redesign of the hook architecture (consolidated from 22 to ~19 hooks), a rewritten Algorithm (now v0.5.1 with PRD-based verification), removal of the observability system, and numerous path/configuration fixes.

This specific issue is addressed by those changes. We're targeting a v3.0 release soon that will include all of this. We appreciate your patience and your help in identifying these issues — it directly informed our redesign work. Stay tuned!

danielmiessler avatar Feb 10 '26 21:02 danielmiessler

Thanks for catching this! This was a v2.5 installer issue. v3.0 (now released) has a completely rewritten installer. Please upgrade to v3.0.

kaimagnus avatar Feb 15 '26 17:02 kaimagnus