Skip to content

WSL install: add no-start mode and host port allocation - #1180

Merged
seathatflowsinourveins merged 9 commits into
mainfrom
codex/install-plan-no-start-ports-20261015
Oct 16, 2026
Merged

seathatflowsinourveins merged 9 commits into
mainfrom
codex/install-plan-no-start-ports-20261015

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

WSL distributions share one network namespace. This PR lets a new distro install the selected stack without activating services and gives provisioning, clients and acceptance one complete host allocation. A selective install now refuses a requested port change for an unselected owner; later consumers cannot silently use an allocation different from the installed snapshot.

The decision-preservation guard now accepts append-only additions while requiring every byte from the frozen8053f14e decisions to remain an unchanged prefix. This fixes the CI failure caused by #1158's legitimate append. Original digests are retained with their original byte lengths; source exports still need no Git history. The delegated wave5 negative control now changes an original byte instead of calling an append a rewrite.

  • Base: 8053f14e7e0817d2502dff2bb284bfb7e1b0152f; lane: lane:foundation.
  • Owned paths: install-plan artifact, host/client inputs and tests, plus authorized runtime/research/dashboard readers, citation repins, recipe/checklist/handbook consumers and mechanical evidence registration. Handbook receipt grant186741 preserves existing history and appends regenerated bindings.
  • This is the existing non-draft PR. The implementation fold was one normal commit on c231aebcc29d70f88aeac0ae92385e25d1b6c241, authorized by196445/196662 and confirmed by197743. CC200867 subsequently authorized the landing rebase onto main 24f3e7827b47c4bb95c63096ea2accb7800aafda, preserving the reviewed change.
  • CC202609 authorizes one normal corrective commit on d4253c8cdf3dd69329d176c340dc3ca7a247a058 for the prefix guard, its regressions and registered evidence. Decision documents and production code are unchanged in this correction.

install.sh --no-start installs units and reloads systemd without enabling or starting them. Dagu uses its documented no-service mode. Docker package activation is masked before package work and rootless setup is skipped, including Compose/Harbor dependencies. MinerU prepares Standard models through its standalone kit; the recipe and checklist require a normal --only mineru --host-file rerun without --no-start before activation to disable telemetry and configure managed mode. Existing enabled/running state is preserved.

Complete host port keys drive provisioning, readiness, acceptance, telemetry, gateway and client rendering through the plan's renderer. Client configuration also requires the target distro identity. Optional ports remain reserved against collisions. Grafana gRPC is required only when enabled; codebase-memory's optional UI has an explicit disabled native configuration. Both Promptfoo predicates compare the effective HTTP port, including80. The original default host rendering remains byte-identical within the recorded historical asset scope.

For example, if the committed gateway is41128 and a host file requests51128, installing only memory-owner now refuses before writing row assets. Acceptance, both public client APIs, runtime telemetry/providers and MCP consumers refuse that same disagreement. A selected-owner update followed by publication allows every consumer to use the new allocation. Client checks use the target HOME/config root; inherited XDG_CONFIG_HOME applies only when rendering for the current HOME.

Research-only installation writes the selected gateway into GPT Researcher's existing native JSON LLM_KWARGS.base_url. Later invocations retain it after the temporary installer selector disappears, as does a subsequent memory-only install. A conflicting explicit allocation is refused. Research publishes no listener ownership snapshot and creates no additional consumer-state file. The default research JSON remains byte-identical.

Prior corrections remain: source-derived custody for31 copied assets across13 portless rows; idempotent memory bind/provider migration, including49374; exact Dagu vendor-unit/drop-in preflight; Grafana operator-edit preservation; Prometheus install-time working-directory creation; and normal MinerU telemetry-before-download ordering. Publication retains staged intent, prior-snapshot comparison and advisory locking. These controls protect snapshot publication; they do not provide rollback for every earlier asset write. Recovery is documented in NO_START_PORTS.md.

The live recipe/checklist and generated handbook require complete host input, no-start provisioning, separate activation and a fresh listener-ownership check. The dated addendum supersedes historical commands without rewriting the original decisions. The frozen nine-field template, image experiment and sealed critic remain unchanged; template extension is deferred. Handbook publication uses dated attributed paraphrases and preserves source evidence/history under189041. Private originals retain name/custody only, with no digest.

Landing dependency: #1161 and #1179 overlap the handbook receipt/current output. Any later overlapping landing takes a rebase and native regeneration, preserving append-only receipt history. Never hand-merge receipt.json. The CC-ordered rebase onto 24f3e782 encountered no handbook/input conflict; handbook bytes and bindings remain unchanged. It claims no future merged-tree validation.

The landing rebase preserves all eight implementation commits. Six patches are identical; the remaining two differ only in manifests/evidence.json. One conflict was the hash/size registration for the automatically merged tests/test_provenance_digest_custody.py, refreshed with the native registration helper. The other was adjacent additions: both the main-branch Nautilus RC5 decision and this PR's WSL host-allocation addendum were retained in sorted order. No production or test code required manual conflict resolution. The final reviewed 6315ebbfb patch is identical after replay. The two subsequently identified P2s are assigned to a separate follow-up from main after this PR merges, required before NativeHorizonNY normal-mode activation.

Rebase verification at d4253c8cdf3dd69329d176c340dc3ca7a247a058: scripts/validate.py passes12,246 hashed files/71 components/4 profiles/240 receipts; all33 convergence records pass; the full24-test provenance-custody module passes with0 failures/errors/skips. These checks run detached with idle CPU priority and individual exit files. The direct old-tip/new-tip comparison also contains main's automatically merged provenance-test additions; the PR's test patch is unchanged in the range-diff.

The co-op published that rebase from a native WSL shell with the full gate passing at10:59:39Z–11:00:56Z. Earlier detached-service attempts omitted required WSL context or were interrupted; their reports remain retained and are not successful-gate evidence. Subsequent long checks use detached scopes that inherit the native caller context without manually setting identity selectors.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
Original decision prefixes survive appends but reject in-prefix changes synthetic frozen-prefix-receipt.json:6 tests/5 assertion failures before;35 focused tests pass after, including both append cases, six mutation controls and current-main exported files
Original no-start/host-port regressions fail on8053f14e7 and pass after correction synthetic no-start-test-receipt.json; default rendering comparison retained
Conflicting selective install, acceptance and client inputs are refused synthetic review-wave-7-receipt.json; unchanged c231aeb gives4 failures across the initial four cases, including research
Both public client APIs reject committed-allocation conflicts synthetic Corrected exact-c231aebc-function replay gives2 assertion failures before, no errors; final shared-consumer tests pass
Research keeps its selected gateway after installer exit and later memory staging synthetic Installed wrapper with stand-in Config/CLI; no provider/network call
MinerU recipe and checklist require the normal configuration rerun synthetic One guard fails both documents before; passes after; generated handbook checks pass
ai-memory2.6.6 fresh defaults support two migrations at29374/49374 while preserving auth source_review + synthetic Parsed active-template fixture, synthetic pepper, extracted command twice; native init unrun
29 historical assets/all6 dashboards preserve default bytes synthetic Historical comparison in retained receipts; new research JSON default also compared byte-for-byte
Native no-start package/bootstrap and disabled-unit/listener acceptance unrun native-agent-stack-51 owns NativeHorizonNY execution

Local commands run

All heavy checks use systemd-run --user --scope -p CPUWeight=idle --quiet --. The temporary runner invokes native unittest suites and emits only counts/test IDs/code locators; it adds no skips.

Latest prefix correction: the full wave3/wave5 modules plus tests.test_install_plan_frozen_prefix pass35 tests with0 failures/errors/skips. Its fail-first run against unchanged d4253c8 ran6 tests with5 assertion failures and0 errors/skips. Both current documents were independently compared with main9d5bc9f9 and the original8053 blobs: the client decision has828 appended bytes, and both original blobs remain intact prefixes. check_plan.py passes84/198/113. Required pre-commit validation passes12,247 hashed files/71 components/4 profiles/240 receipts; all33 convergence records pass.

The following larger wave7 runs predate the landing rebase and prefix-only correction; their recorded scopes are retained:

python3 -B /tmp/install-nostart-safe-tests-velo.py tests.test_install_plan_no_start_ports tests.test_install_plan_review_wave3 tests.test_install_plan_review_wave5 tests.test_install_plan_review_wave6 tests.test_install_plan_review_wave7 tests.test_runtime_profiles.StrictHostConsumerTests tests.test_harbor_currency_contracts tests.test_research_entry tests.test_wsl_new_distro_recipe tests.test_new_wsl_handbook tests.test_new_wsl_handbook_privacy
exit0:328 tests,0 failures,0 errors,0 skips

python3 -B evidence/artifacts/new-wsl-install-plan-20261002/check_plan.py
exit0:84 rows,198 commands,113 acceptance entries

python3 scripts/validate.py
exit0:12,160 hashed files,71 components,4 profiles,240 receipts

python3 -B scripts/validate_convergence.py --all-recorded
exit0:all33 records valid

git diff --check
exit0

The nine new wave7 tests all pass. Initial unchanged-c231aebc evidence is4 tests/4 failures/0 errors. A separate corrected replay of the exact prior public function ASTs gives1 test/2 expected assertion failures/0 errors. It is an isolated function replay, not a full baseline checkout. MinerU's documentation test gives1 test/2 failing subcases before correction. Incomplete-input draft replay/XDG errors are explicitly excluded from fail-first evidence. The corrected XDG test is positive regression coverage.

Latest finding Closure
Local P2-1: selective provisioning and consumers disagree Unselected-owner conflict refused before row writes; acceptance, direct Claude/Codex, runtime telemetry/providers and MCP/drift paths check the committed allocation; aligned publication succeeds
Local P2-2: research-only install loses gateway Existing native JSON persists the endpoint; subsequent invocation/memory staging retain it, without a listener snapshot; explicit disagreement refused
CC P3: MinerU prerequisite missing from recipe/checklist Normal configuration rerun required before activation; native handbook regenerated and append-only receipt refreshed
CC unchecked ai-memory2.6.6 init Pinned active-default fixture plus synthetic auth passes two migrations at both allocated ports; native init remains unrun
GPT q1067 micro ACK at c231aeb; no new findings to fold

Repository source/AST/grep inspection covers direct and indirect consumers in strict-host-consumer-audit.json. Graph transport was unavailable; no graph-completeness claim is made. Candidate checks intentionally validate proposed host allocations; runtime readers validate committed state. runtime_profiles.py needs no further edit in this fold.

Pre-edit install/accept citation inventory retained78 hits/37 files. The research command changes on its existing shell line; install line count and accept bytes remain fixed. All8 current anchors remain valid. The renderer's current receiver selector is repinned to523–536; runtime locators43 and1027–1034 and research wrapper line27 remain fixed.

Evidence registration uses the native register/normalize functions. Compared with8053,59 existing entries change only hash/size,21 entries are added and none are removed; top-level/extra metadata and five frozen inputs remain intact. A protected-prefix scan of93 inputs covering changed/new files and the PR body reports0 matches at lengths7/8/12/16/64, using previously published metadata in memory only. No private original was opened or hashed.

Prior validation remains historical: wave6 passed112 focused tests and111 recipe/documentation cases (two overlap); wave5 passed198. Full-shard results and baseline controls remain in review-wave-4-receipt.json, including baseline-matched failures and native-environment skips. They are not new full-shard or native acceptance claims. No production CI skip was added.

Decision record

frozen-prefix-receipt.json records the current CI correction, unchanged original hashes/lengths, before/after controls, pinned sources and execution boundaries. The prior records below retain their historical scopes.

NO_START_PORTS.md, review-wave-7-receipt.json, review-wave-6-receipt.json, preceding receipts, the host-allocation addendum, and the consumer/citation audits. Current review sources are filename-only: review_output.json, MICRO-delta-c231aebc.md, GPT-VERDICT-c231aebcc.md.

Host evidence

native-agent-stack-51 runs install.sh --no-start --only memory-owner with the complete NativeHorizonNY host file, then verifies that the unit is disabled and no new listener appeared. This lane has not performed that acceptance. All wave7 execution uses disposable fixtures, extracted commands and fakes; no full installer, full acceptance script, native init, service activation or model download ran.

An early broad legacy run invoked accept.sh with disposable HOME/stub curl and included a synthetic native-collector harness. That exceeded the requested local boundary and was disclosed in the retained receipts. Subsequent local checks exclude complete-script/native-daemon cases; they remain in GitHub CI.

Follow-ups and verification boundaries

  • CC/GPT delta reviews apply to the newly published head. Fresh CI and merged-tree verification belong to the landing pass.
  • NativeHorizonNY owns package/bootstrap, disabled-unit/listener and lifecycle/recovery acceptance. Foreground observability lifecycle remains a proposal until measured there.
  • Handbook overlap requires the landing rebase and native regeneration described above. Source evidence/history remains preserved under189041; the proposed source-cleanup follow-up was cancelled.
  • Frozen template extension, needs_owner handling, static --list, recovery and later UI recheck remain the previously recorded deferred work. Current controls do not claim whole-install rollback.
  • Earlier Collector source-pointer mirror availability and a dedicated fail-first wording guard remain recorded evidence follow-ups.

Checklist

  • No new workflow or scripts/*.py file; existing generator source-policy grant retained.
  • No new required secret or paid service; no private-original digest published.
  • Peer-owned files/worktrees, frozen inputs and historical decision/receipt content preserved.
  • Exact non-empty SOTA section and pinned source mechanisms included.
  • Required validation before the single authorized normal commit; configured no-reply identity and normal push only.

seathatflowsinourveins added a commit that referenced this pull request Oct 16, 2026
The command center's follow-up of 2026-10-16: #1167 and #1180 each held the nas landing lock
for about 45-50 minutes, waiting for checks a DIRTY pull request never completes, and #1180's
lander stopped with 6, a CI timeout. In the CI-wait loop, after the head-follow step, a
mergeStateStatus of DIRTY ("The merge commit cannot be cleanly created.", github/docs@be38ec5d
src/graphql/data/fpt/schema.docs.graphql:26528-26530) now stops at once with 10, the exit
merge_validate gives a merge that does not apply cleanly, nothing merged; the lock ends with the
script. The header's exit codes and the README's exit list name it.

Fail-first: the new test (a DIRTY pull request with a check still running) exited 6 after the
25 polls against this pull request's previous nas_land.sh, whose CI wait is main's; now 10 before
any sleep 120, with the lock free after it. Its control (CLEAN, a check running) still waits and
times out with 6. tests.test_landing_scripts: 215 tests OK (1 skipped); validate.py and
evidence_manifest.py --check pass; README digest rows and evidence rows refreshed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the codex/install-plan-no-start-ports-20261015 branch from 6315ebb to d4253c8 Compare October 16, 2026 11:00
@seathatflowsinourveins
seathatflowsinourveins merged commit 21c61a5 into main Oct 16, 2026
34 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the codex/install-plan-no-start-ports-20261015 branch October 16, 2026 14:54
seathatflowsinourveins added a commit that referenced this pull request Oct 17, 2026
* fix(guard): cover the host's allocated OmniRoute gateway ports

The secret-path guard refused gateway management requests only on the
fixed ports 20128, 20129, 21128 and 21129. A host's port allocation
(#1180) can move the gateway: this host's gitignored adoption/hosts
file sets NS_PORT_GATEWAY=23128, NS_PORT_GATEWAY_WS=23129 and
NS_PORT_GATEWAY_EMBED_WS=23131, so management requests to 23128 passed
unchecked.

The guard now reads the allocation once at start from the maps the port
tooling reads (observability_config.py load_service_ports()): every
adoption/hosts/*.json under CLAUDE_PROJECT_DIR and the guard's own
checkout, NS2604_HOST_FILE, and the installed
new-wsl-native-stack/.service-ports.json. Every NS_PORT_GATEWAY* port
is covered; NS_PORT_GATEWAY takes the rows of 21128, the other gateway
keys none, and a fixed port keeps its own rows (a host file never adds
a row to it). It fails closed: sources only add ports, a non-JSON file
still covers its "NS_PORT_GATEWAY*": "D" pairs, and an unreadable,
non-regular or absent file leaves the fixed ports covered.

docs/secret-storage.md names the source; the shifted
upstream-surface-dispositions locators, SHA256SUMS and the evidence
manifest are updated. Regression tests fail on caf9ad7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(guard): fold #1244 review: per-source tests, read caps, exact rows

Folds the CC verdict CHANGES_REQUESTED at 3dd235c (B1-B3, C-G).

- B1: test_each_allocation_source_covers_its_port shows each source alone
  (CLAUDE_PROJECT_DIR, the guard's own checkout, NS2604_HOST_FILE,
  XDG_CONFIG_HOME, the HOME/.config fallback), each with its own port and
  config root, with every other source's port uncovered, then removed.
- B2: the docs and guard comment state both read caps (first 64 *.json
  per directory in sorted order, first 1 MiB per file) and that what lies
  past them covers nothing; test_read_caps_are_the_documented_ones.
- B3: test_allocated_gateway_port_has_exactly_21128s_rows checks an
  allocated port against every frozen policy row, including the 20129-only
  preview and the provider-limits and call-logs <id> rows.
- C: the docs and comment describe the tooling's one-file-per-run order
  and why the guard reads all candidates; the table note names the
  other-key caveat.
- D: each source has its own try, so a failing source drops no later one
  (test_a_failing_source_drops_no_later_source fails on 3dd235c).
- E: the bound (130 files, 65,535 ports) and the import-time fail-closed
  path under onFailure: block are recorded; no hardening.
- F: the in-process import with the runner's environment is recorded and
  pinned (test_import_state_is_the_runners_allocation).
- G: the docs say every checkout covers the committed example.json's
  ports (21131 added, serving no row); a real-import test in an isolated
  process pins it.

Each new test is shown failing with the line it pins deleted (11 of 11
mutants killed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant