Skip to content

fix(init): route channel-seed installs to first-run wizard - #2192

Open
syf2211 wants to merge 1 commit into
netclaw-dev:devfrom
syf2211:fix/init-channel-seed-routing
Open

syf2211 wants to merge 1 commit into
netclaw-dev:devfrom
syf2211:fix/init-channel-seed-routing

Conversation

@syf2211

@syf2211 syf2211 commented Sep 17, 2026

Copy link
Copy Markdown

Summary

Route netclaw init to the first-run wizard when only a channel-seed netclaw.json exists (e.g. from install.sh --channel beta), instead of the existing-install action menu.

Fixes #2084

Motivation

Non-stable installs pre-seed ~/.netclaw/config/netclaw.json with only Daemon.UpdateChannel. The init route decision previously keyed off netclaw.json existence alone, so a fresh beta install incorrectly opened the "Existing Netclaw install detected" menu — a dead end for a box that never finished setup.

Changes

  • Add NetclawPaths.HasCompletedSetup() — true when wizard-owned identity files (SOUL.md), legacy personality files (soul/PERSONALITY.md), or secrets.json exist
  • Use HasCompletedSetup() for init routing in Program.cs instead of File.Exists(netclaw.json)
  • Update init-existing.tape smoke seed to include SOUL.md so the existing-install menu test remains valid
  • Add unit tests covering channel-seed config, identity/secrets markers, and legacy personality layout

Tests

  • dotnet test src/Netclaw.Configuration.Tests/Netclaw.Configuration.Tests.csproj --filter "FullyQualifiedName~HasCompletedSetup" — 3 passed
  • Reviewed with composer-2.5 subagent; legacy PersonalityPath detection added per review feedback

Notes

  • WizardConfigBuilder.PreserveExistingUpdateChannel() already preserves the installer channel seed through first-run init, so routing seed-only installs to /init is safe

Fixes netclaw-dev#2084

Beta-channel installs pre-seed netclaw.json with only
Daemon.UpdateChannel. Treat init as completed only when identity
files, legacy personality files, or secrets.json exist, not merely
when netclaw.json is present.
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.

netclaw init shows existing-install menu on clean non-stable install

1 participant