Skip to content

Delete the installer host wiring neither installer runs (#691) - #713

Merged
MongLong0214 merged 1 commit into
mainfrom
fix-691-dead-installer-blocks
Aug 17, 2026
Merged

Delete the installer host wiring neither installer runs (#691)#713
MongLong0214 merged 1 commit into
mainfrom
fix-691-dead-installer-blocks

Conversation

@MongLong0214

@MongLong0214 MongLong0214 commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Closes #691.

install.ps1   1171 -> 820 lines   (-351, everything after an unconditional exit)
install.sh    1211 ->  717 lines   (-494, has_/wire_ pairs nothing calls, and their helpers)

Why this is not the risky deletion the issue described

install.ps1:817-820 delegates and exits:

$hostSummary = & $dest installer-hosts --wrapper $dest --data-root $dataRoot --home $env:USERPROFILE --json
$hostExit = $LASTEXITCODE
$hostSummary | Write-Output
exit $hostExit

Unindented, unconditional, since 0d60c75 (#624). Everything after it is unreachable. install.sh:1035 delegates the same way and its wire_* functions are never called.

This issue's step 2 was gated on a Windows machine because the verification was framed as an install with those blocks removed must leave a machine wired the same way — which assumed the blocks take part in wiring. They cannot. No run can distinguish their presence from their absence, so the gate does not apply to deleting them. What still needs Windows is whether the enumeration wires a real machine correctly, and that ships either way.

What it was costing

#689 happened because install.sh read as the list of supported hosts. This issue's body records two more readers reaching the same conclusion the same day. Today I read install.ps1:881 as live behaviour and filed #712 on it, in response to an outside report, before checking control flow — three readers in three days, once past the repository boundary.

Guards that were asserting against the dead copies

Four moved to the code that runs:

guard was now
#689 host coverage compared install.sh pairs to the CLI calls inspectAndApplyHosts and requires every known host in notDetected
T-1121 parity asserted ps1 mirrors sh on wiring parity for what both still implement; wiring asserted against the enumeration
#660 plugin upgrade awk-extracted wire_claude_code from install.sh runs the enumeration with a fake claude on PATH
T-1123 config table required both installers to spell each path requires the enumeration to

The #689 rewrite is the one that mattered. With the shell gone, a host list read out of the module under test would shrink with it and report nothing — so the list is written down in the test and the check is behavioural. A branch that returns early without pushing is missing code: no text search can see it.

Negative control: removing the windsurf row from the enumeration fails the guard with windsurf appears in neither hosts nor notDetected — it was dropped, not skipped.

Verified

  • 142 cases pass across the seven installer suites; npx tsc --noEmit clean; sh -n install.sh clean
  • npm run build:canonical then artifact:verifyde9222c7…, dist unchanged — no src in this change
  • test/init.test.ts fails 6 cases on clean main here and on this branch alike; a local environment difference, not this change. CI is the authority and is green on main

Scope of this closing. #691 held two claims: that deleting these blocks cannot change an install (static — this PR), and that installer-hosts wires a real Windows machine (never verified). Only the first is closed here. The second moved to #714 and remains open, and is sharper after this change: with the shell copy gone, the unverified path is the only path.

install.ps1 delegates to `installer-hosts` at :817 and exits on its status. The 351 lines after that exit have been unreachable since #624, and every has_/wire_ pair in install.sh is defined and never called. Both files kept describing host support they had stopped performing.

That is not free. #689 was caused by reading install.sh as the list of supported hosts, its body records two more readers reaching the same wrong conclusion the same day, and today I read install.ps1:881 as live behaviour and filed #712 on it before checking control flow. Three readers in three days, once past the repository boundary.

Deleting unreachable code cannot change what an install does, which removes the Windows machine from this step: the verification recorded on the issue assumed the blocks participate in wiring, and they cannot.

Four guards were asserting against the deleted copies and now target the enumeration that runs. #689's coverage guard was the one that mattered: it compared install.sh's pairs to the CLI, and with the shell gone a list read out of the module under test would shrink with it. It now calls inspectAndApplyHosts with an empty PATH and home and requires every known host in notDetected -- a branch that returns without pushing is missing code, invisible to any text search.

Limit: install.ps1 line coverage is unchanged -- what ran before still runs
Ruled-out: keep the blocks until a Windows machine confirms wiring | they sit after an unconditional exit, so no run can distinguish their presence from their absence
Blast: system
Undo: easy
Certainty: firm
Record-Id: r-dead691
Provenance: authored
Verified: dropping the windsurf row from the enumeration fails the rewritten guard with 'windsurf appears in neither hosts nor notDetected'; 142 cases pass across the seven installer suites; npx tsc --noEmit clean; sh -n install.sh; npm run build:canonical then artifact:verify -> de9222c7187eb818ab20cfea63fa3e918e56f7eca1dc9fff654cae4bf39c0daf (dist unchanged, no src in this change); test/init.test.ts fails 6 cases on clean main here and in this branch alike -- a local environment difference, not this change
CommitLore-Version: 2.0.0
@github-actions

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 1 commit in origin/main..7c763d979ab6e24a6736a71c4d9f9204e2177aab
Active constraints: not read — commitlore: git log --follow accepts exactly one pathspec, so renames are not followed for 7 paths; query one path at a time to follow its rename chain (7 changed paths)

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

@MongLong0214
MongLong0214 merged commit 6680425 into main Aug 17, 2026
12 checks passed
@MongLong0214
MongLong0214 deleted the fix-691-dead-installer-blocks branch August 17, 2026 00:39
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.

install.sh carries seven has_/wire_ host pairs that nothing calls

1 participant