feat/server-mode-init #58

Merged
xavier merged 7 commits from feat/server-mode-init into dev 2026-11-18 06:34:47 +01:00
Owner
No description provided.
The migration bridge's corrective code (ADR-028 point 5): a re-run
naming a different base URL than the binding's, a server init on a
local-mode repo, and a re-init naming a mode other than the bound one
— repointing and mode-moving are export/import's, never a re-init.
Constant + allCodes + the audited contract list.

Fold-in (1): the test-comment sites saying 'five prose-divergent
families' aligned — the verified count is four (E_DUPLICATE_AGENT,
E_UNKNOWN_AGENT, E_DUPLICATE_VERSION, E_UNKNOWN_VERSION); the count
dropped where the list already names the families.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
ADR-028 points 1-4, on the serving half:

- registry: the entry grows the birth metadata {issuer, seed}
  (omitempty — a v0.8.0 record reads birthless, the loud reader
  absorbing the missing keys; facts, never authorization); Register
  renames Initialize(proposed, issuer, actor) per the vocabulary
  ruling, a collision returning the typed *Collision CARRYING the
  existing record — the completion window's raw material (the
  registry stays engine-blind).
- server: Initialize evaluates the window on a collision — the
  recorded issuer matching the caller's authenticated subject, the
  proposal's acronym and founding actor matching, no items, the
  roster the seed alone (StoreFor's lazy seed converging the
  unmaterialized file into the window's shape first) — the binding
  record returns un-rejected; any divergence answers E_ACRONYM_TAKEN,
  the foreign answer, named. committed rides the seam: a completion
  answers the record having written NOTHING (the audit row exists to
  record a change; completion records none).
- serve's StoreFor: the seeded materialization — a BORN registered
  project (the entry carries metadata) whose config is absent
  materializes on first open: one engine transaction, the config
  identity (format 1, MODE SERVER — the design call resolved per
  ADR-028 point 3's own text: the ADR names the seeded config's mode;
  the wire round-trips it (WireConfig carries mode verbatim) and the
  engine's read gates no mode vocabulary, the tracker-side copy
  load-inert («mode is a repo fact» — the repo file is the fact)) and
  the roster seed (the founding actor, owner). Idempotent by the
  absent-config precondition. boltstore untouched.
- protocol: /register renames /initialize, the handler carrying the
  subject as the birth's issuer and auditing only COMMITTED
  initializations.
- httpstore: /initialize is a mutating exchange (outcome-unknown —
  a broken initialization may have committed the birth; the window
  closes it in band).

Test-side fallout adapted mechanically: the harnesses compose their
fresh fixtures BIRTHLESS (the direct registry seam, no metadata — the
suite's fresh contract 'no config, no roster, no items' is the
birthless shape; the born state's own pins ride the server-init
battery), the wire seeds overlay the materialized state through
Update, the registration-race probe asserts the ruled window
semantics (both same-details proposals answer; one commit, one
completion — one audit row), and the bootstrap live flow's seed
commit updates the materialized founder instead of re-adding it.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
ADR-028 point 5, on the client half:

- app.InitServerProject: the server birth's ruled order — grammar
  local-first (E_ACRONYM whole), the proposal over the initializer
  port (the composition wires the wire adapter with the RESOLVED
  token; nothing proposed without one), then the idempotent local
  writes (artifacts ensured before any .skuld byte and restored on a
  config-write failure — a local failure after the committed
  initialization leaves no partial state; the completion window
  closes it in band). The thin config written from the binding
  record's canonical answer: mode server, the base URL, no
  data-location member. The bound re-run: the ensure — the binding
  corners first (server-on-local, mode-other-than-bound,
  different-origin ⇒ E_REPOINTED naming the export/import bridge; a
  differing acronym the local ensure's immutable-identifier
  rejection), the owner gate reading the roster THROUGH the bound
  store (client-side as ever), artifacts to template.
- app.NormalizeOrigin: the origin grammar's home moves to the
  application layer (the binding comparison is use-case logic; the
  token store's entries share the one vocabulary — tokenstore wraps
  it). domain's purity untouched (net/url stays out of the domain's
  closed whitelist).
- cmd/skuld initServerComposition: the matrix's adapter-facing
  corners — the inferred form (--server, no --mode: the resolvable
  token the evidence; none ⇒ E_NO_TOKEN naming both outs, never a
  silent local birth), the resolution before any proposal
  (E_TOKEN_CONFLICT nothing proposed), the URL grammar (usage exit 2,
  the token verbs' precedent), the wire adapter and the bound store
  wired behind the use case.
- cli/init.go: the flags (--mode/--server/--acronym — the server path
  names its proposal with --acronym; a positional beside the server
  flags is a usage corner), the birth declaration through ParseMode
  (the write-time caller — fold-in 2), the cross-flag E_MODE corners,
  the routing (a repo bound to a server re-runs as the server ensure;
  the migration corners reject at the composition).
- Fold-in (3): the configVerbErr comment's mirror clause. The
  mode-flag audit amended to its ruled exception (init alone).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
The server-init proof battery through the REAL run path against the
composed production host:

- TestServerInitHappyBirthAndIdempotentRerun: the ruled invocation —
  the thin config's exact bytes (three members, no data-location), the
  artifacts ensured, the founding owner materialized from the
  proposal's actor, the birth's one audit row (subject the machine,
  actor the founder), and the plain re-run byte-identical with no new
  server-side fact (the ensure sends no proposal).
- TestServerInitModeMatrix: every corner loud — server-without-URL,
  local-with-URL, a banana value (ParseMode's write-time gate), the
  twin on the server path, a positional beside the server flags, the
  birth without an acronym — and the INFERENCE: --server with no
  --mode births server on a tokened machine.
- TestServerInitGrammarFirst: -- / 'a b' / a_b reject E_ACRONYM
  against a DEAD base URL — grammar first, never a network answer.
- TestServerInitTokenShapes: E_NO_TOKEN documenting the bootstrap
  order (machine first) with nothing proposed; E_TOKEN_CONFLICT
  nothing proposed; the unknown-token wire answer rendered as the
  auth family at exit 1 (the reconstruction gap the battery caught —
  KindAuth now reconstructs typed, httpstore.md's auth-family clause
  made true).
- TestServerInitTaken: machine B's foreign proposal is
  E_ACRONYM_TAKEN naming the acronym, nothing local written.
- TestServerInitInterruptedBirth: the stranded birth completes on the
  issuing machine's same-details re-issue (one birth, one row —
  completion writes nothing); an item written and a divergent actor
  turn it into the foreign collision.
- TestServerInitRepointedCorners: a different-origin re-run
  E_REPOINTED (naming the bridge, preceding any wire attempt), the
  same-origin path spelling FOLDED (the origin is the binding), a
  server init on a local repo, a mode-mismatch re-run, a differing
  acronym the local ensure's rejection.
- TestServerInitBootstrapOrderDocumented: the --server help carries
  the fork gotcha and the --mode help the inference rule, in operator
  words.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
Finding 1 (tester, non-blocking): the Registration doc said a
birthless record 'materializes its config identity without a roster
seed' — a false clause left from an earlier draft of the
materialization. The built guard (StoreFor) writes NOTHING for a
birthless record: a BORN record (the entry carrying birth metadata)
materializes config identity + roster seed at first open; a birthless
v0.8.0-era record's first open answers a fresh, empty project — the
v0.8.0 flows' compatible shape, pinned by the conformance Fresh
contract and the tester's probe. The clause now states the built
behavior.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
server-mode-init: the review's three nits — the dead carriage, the tokenless ordering pin, the discarded host
All checks were successful
/ secrets-scan (gitleaks 8.28.0, all refs, redacted) (pull_request) Successful in 8s
/ test (linux/amd64, full suite) (pull_request) Successful in 1m31s
/ build darwin/amd64 (pull_request) Successful in 49s
/ build linux/amd64 (pull_request) Successful in 50s
/ build windows/amd64 (pull_request) Successful in 1m25s
/ build darwin/arm64 (pull_request) Successful in 1m25s
/ build linux/arm64 (pull_request) Successful in 49s
/ build windows/arm64 (pull_request) Successful in 48s
/ release (six binaries + checksums.txt, tag pushes only) (pull_request) Has been skipped
5c4400b649
1. InitServerFlags.Positional dropped — set by the verb, never read
   (the composition consumes req.Acronym, which already carries the
   flag-over-positional fold; the use case's request never carried a
   positional).
2. The ordering asymmetry RESOLVED AS A PIN (the PM's ruling,
   concurring with the reviewer's preference — behavior stays): the
   mode-mismatch re-run evaluates POST-resolution, in the use case,
   so a tokenless machine meets E_NO_TOKEN — the honest diagnosis,
   the credential that vanished being the bound server's own. The
   battery pins the tokenless shape beside the tokened corner, and
   the composition's pre-emption block documents the third corner's
   deliberate ordering.
3. The grammar-first probe's discarded host dropped (the dead base
   URL needs no server).

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
xavier deleted branch feat/server-mode-init 2026-11-18 06:34:47 +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!58
No description provided.