fed-sx-m2: Step 2a — Person/Service/Group genesis object-types
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 35s

Three new DefineObject artefacts in next/genesis/object-types/ for
the canonical actor object-types per design §9.1:

- Person: human-controlled identity (display name + handle + bio)
- Service: automated / programmatic actor (bot, feed, organisation)
- Group: multi-controller actor (member-set managed via Add/Remove)

Each is a small SX form with :name / :doc / :schema, identical
shape to existing object-types (note.sx, sx-artifact.sx etc) so the
existing bootstrap:populate_registry walk picks them up without
code changes. Manifest extended (object-types: 10 -> 13, total
entries: 31 -> 34).

Tests:
- genesis_parse.sh +7 cases (head form, :name, manifest membership);
  57/57.
- Hardcoded counts bumped in bootstrap_read.sh, bootstrap_load.sh,
  bootstrap_populate.sh, bootstrap_start.sh.
- bootstrap_build.sh 12/12 (bundle CID computed dynamically).

Conformance 761/761 preserved. 211/211 across 12 Step-2-adjacent
suites.
This commit is contained in:
2026-06-06 11:19:22 +00:00
parent 089d1445a1
commit 0c44a10c8f
10 changed files with 100 additions and 21 deletions

View File

@@ -158,21 +158,32 @@ publicKey rotation history, profile fields, follower counts, etc.
**Deliverables:**
- Genesis additions: `DefineObject{Person}` / `DefineObject{Service}` /
`DefineObject{Group}` — three object-type SX files.
- Actor-state projection fold (Erlang-fun stand-in, mirrors Step 5d-pure):
- On `Create{Person|Service|Group}`: register the actor's profile.
- On `Update{Person, patch}`: apply patch.
- [x] **2a** Genesis additions: `DefineObject{Person}` /
`DefineObject{Service}` / `DefineObject{Group}` — three new SX
files in `next/genesis/object-types/` plus manifest entries (now
13 object-types total, 34 total genesis entries). Each defines
`:name`, `:doc`, `:schema (fn (obj) (string? (-> obj :name)))`.
`next/tests/genesis_parse.sh` extended +7 cases (head form +
:name + manifest membership), now 57/57. Bootstrap suite
count assertions bumped (`bootstrap_read.sh` 15/15,
`bootstrap_load.sh` 15/15, `bootstrap_populate.sh` 14/14,
`bootstrap_start.sh` 10/10). `bootstrap_build.sh` 12/12 picks
up the new bundle CID dynamically.
- [ ] **2b** — Actor-state projection fold (Erlang-fun stand-in,
mirrors Step 5d-pure's `define_registry`):
- On `Create{Person|Service|Group}`: register the actor's profile
in `{ActorId => #{type, name, preferredUsername, summary, icon,
public_keys, created}}`.
- On `Update{Person|Service|Group, patch}`: deep-merge the patch.
- On `Move`: record `:movedTo` pointer.
- `nx_kernel:bootstrap_actor/4(ActorId, Profile, KeySpec, State)`
publishes `Create{Person{...}}` as the actor's first activity,
bootstrapping their own log.
**Tests:**
- `Create{Person}` registers the actor.
- Two actors created via lifecycle activities have independent state.
- Profile updates apply.
- `next/kernel/actor_state.erl` with `fold_fn/0` plugging into
`projection:start_link/3`. Pure-functional + gen_server-bridged
tests as a single `actor_state_pure.sh`.
- [ ] **2c** — `nx_kernel:bootstrap_actor/4(ActorId, Profile,
KeySpec, State)` — publishes `Create{Person{...}}` as the actor's
first activity, exercising the full pipeline. Integration test
in `actor_lifecycle.sh` ties 2a artefacts (SX files), 2b
projection, and 2c bootstrap together.
**Acceptance:** `bash next/tests/actor_lifecycle.sh` passes 10+ cases.
@@ -680,6 +691,17 @@ proceed.
Newest first.
- **2026-06-06** — Step 2a: genesis Person/Service/Group object-
types. Three new SX files in `next/genesis/object-types/` with
the same shape as `note.sx` / `sx-artifact.sx` (`:name`, `:doc`,
`:schema` checking `(string? (-> obj :name))`). Manifest extended
to 13 object-types / 34 total entries. `genesis_parse.sh` +7
cases (57/57). Hardcoded counts bumped in `bootstrap_read.sh`,
`bootstrap_load.sh`, `bootstrap_populate.sh`, `bootstrap_start.sh`
(66/66 across those four). `bootstrap_build.sh` 12/12 (bundle CID
computed dynamically). Conformance 761/761 preserved. 211 / 211
across 12 Step-2-adjacent suites.
- **2026-06-06** — Step 1b: gen_server multi-actor calls.
`nx_kernel` exports `add_actor/3`, `publish_to/2`, `log_tip_for/1`,
`actors/0`, `state_for/1`, `bucket_for/1`,