feat/boot-mode-switch #57

Merged
xavier merged 8 commits from feat/boot-mode-switch into dev 2026-11-17 21:15:57 +01:00
Owner
No description provided.
ADR-027 point 1, the data-location key's one-code-two-gates discipline
cashed for the mode fact: ErrBadMode (E_MODE) joins the audited
catalogue (constant + allCodes + wantDomainCodes, the ErrBadDataLocation
twin); app.ParseMode — absent ≡ local (every existing repo unchanged),
exactly local | server, E_MODE naming the offending value; ModeServer
joins ModeLocal. The thin config's schema grows the server member
(omitempty, after acronym — the ADR's listing order; written at
initialization alone, «repointing is a migration»); marshalConfig
carries it. parseConfig's load gate: the out-of-vocabulary value,
mode server without the server member, and a data-location member on a
server-bound config — all corrective E_MODE (exit 1) wrapped with the
file path, the E_DATA_LOCATION reader-wrap shape; structural damage
stays the canonical reader's exit-3 class. A stray server member on a
local config is inert — the ruled gate does not name it (documented).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
ADR-027 point 2 (boot.md responsibility 2 — ADR-021 L2's seam
cashed): bootstrap reads the deciding/bound config from the file both
modes share (the reader is mode-blind; the load gates ride its read, so
every verb rejects — explicit resolution included; bindImplicit's
redirect decision consumes the same validated read, and a server-bound
deciding config carries no data-location key by that gate, so the
redirect simply never fires server-side). The switch: local constructs
the filestore exactly as before — the default path byte-identical;
server constructs the wire client through serverStoreFor, the token
resolved before any request exists. The old 'unsupported mode' refusal
dies — out-of-vocabulary values never reach the switch (E_MODE fired at
load); the switch keeps a structural catch for a mode that bypassed the
gate (a bug, never a surface). The vertical pin superseding
TestWrongModeConfigExit3: server mode without the base URL is the
E_MODE gate's second corner — exit 1, member and file named.
Fold-in (1 of 2): serverStoreFor classifies NormalizeOrigin's grammar
error as usage (exit 2) — the token verbs' corner-4 precedent; ADR-027
names no URL-grammar corner, so the ruled classification stands.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
«thin config in server mode» (project-server-binding.md) + «data-
location write surface» (local-mode.md): the settable vocabulary is
LOCAL mode's — on a server-bound repo the config write surface is
empty, the binding facts (mode, acronym, server) written by
initialization alone. guardLocalWriteSurface fires E_MODE naming the
mode on any config set/unset — any flag, the flagless form included —
before the acting-agent resolution: the rejection is the repo fact's,
not a roster question, and must fire with no wire traffic (a
server-bound roster lives server-side; the refusal precedes the
request the way every load-gate rejection does). E_MODE's write gate,
the load gate's twin — one code, two gates (ADR-027 point 1).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The adapter review's inheritance, landed with the wiring that
annotates them: (1) client.go's Store doc carves the identity setters
out as construction-time moves — WithIdentity before the first
exchange, StageActor before the first mutating exchange, the handle
never re-resolving identity mid-flight; (2) the mid-flight READ
failure's message says 'no complete answer', not 'no answer' — the
wire carried the beginning of one, and the message must not overclaim
its emptiness; (3) the Stage field doc states that a caller deadline
beaten by a HELD answer lands as connect — the stage names what
reached the client, not what the server produced (delivered ≠
connected).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The proof battery for the switch, through the REAL run path:
- TestEModeLoadGateCorners: the three E_MODE corners (out-of-vocabulary
  value; server without the member; data-location on a server config)
  through three verbs each — every verb rejects at load, exit 1, the
  value or member named.
- TestBootSwitchServesServerBoundRepos: a server-bound repo runs reads
  and mutations through the production chain (resolver before any
  request, the actor stamped at --as), and the config write surface is
  empty — E_MODE naming the mode, the flagless form included, before
  the actor resolution (no wire traffic for the rejection).
- TestGoldenBatteryIdenticalOutputs: the same command battery (item
  list/show, claims, brief, release list, agent list) over
  identically-seeded state through both stores — byte-identical, and
  identical again on the repeat.
- TestPreconditionFamilyIdentityThroughBothStores: the FULL commit-
  guard catalog (every precondition site both engines carry, 20 rows)
  driven through filestore and the wire — code+family identity
  everywhere; byte-identity asserted ONLY on the item family's
  put-uniqueness row; the recode rows run their guards' honest race
  shape (the wire arm's competitor a fresh client, the local arm's
  raw beneath the held lock — the engines' dialects live in their
  arms).
- TestServerModeNetworkFailureShapeThroughTheCLI: the server stopped,
  reads and mutations alike fail E_NETWORK exit 1 naming the base URL.
- TestResolutionParityServerBound: a lane carrying no thin config
  adopts the main tree's binding, the notice naming the main root.
- TestModeFlagAudit: no mode flag anywhere in the help tree (init's
  birth declaration amends this when server-mode init lands).
- TestLocalModeUntouchedWriterBytes: bare init's bytes unchanged; a
  legacy no-mode config parses local and rewrites to the pre-change
  shape, no server key (omitempty).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Finding 1, ruled: the promise stands. Cobra fires the Args validator
before the boot hook (ValidateArgs precedes PersistentPreRunE), so the
partition's rejections answered pre-boot — the flagless config
set/unset forms on a server-bound repo answered E_CONFIG_FLAG, not the
E_MODE the empty-surface carve promises. The validators now DEFER their
semantic rejections onto the root state; RunE's head runs the mode
gate FIRST, then resurfaces the stashed rejection byte-identical (the
same error object) on local mode. Help routes pre-boot untouched
(ErrHelp returns from Args — no project needed); the no-project flagless
form now answers repo resolution's usage error (exit 2) — boot
preceding the verb grammar, the coherent order every other verb has.

ALL FOUR write forms (set/unset × flagged/flagless) now answer E_MODE
exit 1 naming the mode and the empty surface, wire-silent
(zero-traffic counting on each), pre-acting-agent-resolution; the
unknown-flag form rides the same gate.

Finding 2, riding the touch: ActingAgentProbe's doc comment names both
shapes — exit 3 the local corruption shape, over the wire the
propagated E_NETWORK at exit 1.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
boot-mode-switch: the re-verification probes — the flagless rows observe E_MODE, the deferral's byte-identity spot-check, the no-project corners, the tokenless ordering observation
All checks were successful
/ secrets-scan (gitleaks 8.28.0, all refs, redacted) (pull_request) Successful in 7s
/ test (linux/amd64, full suite) (pull_request) Successful in 1m54s
/ build darwin/arm64 (pull_request) Successful in 1m16s
/ build windows/amd64 (pull_request) Successful in 1m18s
/ build linux/amd64 (pull_request) Successful in 1m23s
/ build darwin/amd64 (pull_request) Successful in 1m26s
/ build linux/arm64 (pull_request) Successful in 1m14s
/ build windows/arm64 (pull_request) Successful in 1m13s
/ release (six binaries + checksums.txt, tag pushes only) (pull_request) Has been skipped
2fc9c7b48e
xavier deleted branch feat/boot-mode-switch 2026-11-17 21:15:57 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
assistant/skuld!57
No description provided.