Skip to content

sminos: the session record — owners, origin, route, claimed at launch (P5-O12 M1, 1.18.0) - #402

Merged
SSFSKIM merged 5 commits into
mainfrom
p5-o12-m1
Oct 27, 2026
Merged

SSFSKIM merged 5 commits into
mainfrom
p5-o12-m1

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 27, 2026

Copy link
Copy Markdown
Owner

P5-O12 M1, the session record. Every session sminos joins now has a machine-local record, $SMINOS_HOME/session-records/<session>.json (mode 0600), that says who owns it, how it started and what inference it runs on. The spec is MAWS docs/doperpowers/plans/2026-10-27-p5-o12-sminos-owners.md (M1, Interfaces §A), and the binding contracts are RL6, RL9 and the remote layer's Decision Log 17.

  • Provenance. origin, owners, ownersProof, principal, inference and created are written once. controller {lane, since} is the current state, and M3 writes it through set_session_controller. source/basis record how the provenance was established.
  • A spawned child's provenance travels with the launch.
    • spawn_fresh writes pending/<launch-id>.json and always writes the merged launch settings with env.SMINOS_LAUNCH.
    • The child's first startup SessionStart binds the launch to its own session id with a lock-free atomic create, then claims it. Every later claim, the spawner's after poll_uuid included, is honoured only for the bound session.
    • launch_env drops SMINOS_LAUNCH.
  • Evidence precedence. A record is replaced only by strictly stronger evidence: launch > lineage > hook > default, and final over provisional at the same basis. Lineage evidence comes only from predecessors, and every change republishes.
  • Publication. joined carries owners and origin only for a final record, and never the token @machine, which stays on the machine (RL6, DL17). Owners are either ["@machine"] or member ids, never a mix. lifecycle writes every joined's provenance from the record under the writer file's lock. Readers take the latest publishing joined, so an older binary's joined erases nothing. principal, inference, controller, source and basis appear in no log event and no --org output.
  • What each path writes.
    • A sminos spawn copies the caller's owners, principal and inference, with origin {kind: sminos-spawn, spawnerSession}; a seat with non-empty settings gets a route naming the merged launch file.
    • A desk-RPC spawn writes owners: [<member>] and origin {kind: maws, requester}.
    • The hook path writes terminal, or maws when member_mark marks a MAWS engine, with a slot or a base-url: route.
  • Listing. list --json shows owners and origin for every member, plus principal, inference and controller for local ones, except under --org.
  • sminos 1.18.0 (main carries M2 at 1.17.0, merged in).

Validation Evidence

  • python3 -B sminos/tests/test_records.py: 35/35. This covers Acceptance 1, every item on M1's Proves list, and a test for each review finding; each review fix was RED before it landed.
  • python3 -B sminos/tests/test_rpcs.py: 130/130 on the merged head.
  • Core suite (SMINOS_PART=core bash sminos/tests/run-sminos-tests.sh), run locally: 2260 assertions, all pass. test_records.py is wired into it.
  • ci-gate on c556cb8: GREEN https://github.com/SSFSKIM/doperpowers/actions/runs/40440584972
  • Review: doperpowers:reviewer-high, three rounds. Round 1 found a P1 (a failed claim could be stolen by a descendant) and four P2s. Round 2 found a P1 (a record promoted itself on its own publication) and two P2s. All were fixed. Round 3 found no P1 and one P2, below.

Unresolved Review Findings

  • [P2] Publication isn't serialized across a session's writer names (sminos.py lifecycle/_append, ~2427-2433).
    • The race: while a machine is renamed by re-enrollment, an older invocation still holding the former name can append a stale publication under <former>.<session>.jsonl after a newer one published launch provenance under the new name. In a git-mirrored project, remote readback then shows the older value.
    • Why it's left: it needs a rename mid-write and git transport (hub replication excludes former-name writers). The next publication pass repairs it, because that pass's guard reads the session's events under its former names too and republishes when the latest publication differs from the record.
    • A session-keyed lock independent of the machine name would close it.

Residue

  • $SMINOS_HOME/settings/ gets a merged launch settings file per spawn, since each carries its own SMINOS_LAUNCH, and nothing sweeps them.
  • A bg job that has a final hook record and no lineage re-reads the project's retirements on each of its hooks. This is bounded by the one-pass index, but it isn't free.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)

… launch (1.16.0)

Each session sminos joins gets a machine-held record (RL6) at
$SMINOS_HOME/session-records/<session>.json, mode 0600, kept by the new
sminos_records.py: owners, ownersProof, origin, principal, inference,
created, former and source, written once by whichever path first joins
the session, with controller {lane, since} beside it as current state.

- A spawn fixes its child's provenance before the child exists: a pending
  record under a launch id the merged settings carry (SMINOS_LAUNCH, the
  merged file now written under the default home too), claimed by one
  rename at the child's first SessionStart before the hook does anything
  else, else by the spawner once the harness names the child.
- A desk RPC's spawn is its member's; a sminos spawn inside a session
  copies that session's owners, proofs, principal and inference; a hook
  reads a session's own environment (maws when marked, the route from
  ANTHROPIC_BASE_URL, else the slot); a continuation inherits its
  predecessor's record; otherwise provisional defaults, replaced once
  final evidence appears.
- joined carries owners and origin once the record is final; list --json
  shows owners and origin for every member and principal, inference and
  controller for local ones, reading owners as `by` is read.
- launch_env drops SMINOS_LAUNCH; the daemon sweeps unclaimed launches
  after a day; set_session_controller is M3's writer.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…r mix it

RL6 and the remote layer's Decision Log 17 bind: the @machine token never
leaves the machine. A final record's joined still carries its origin, but
carries owners only when they name members; readers take a member that
publishes none as the machine's, the same value, so the token appears in
no log event, hub frame or --org output. The first joined that publishes
(origin or owners) is what the readback and the lineage recovery read.

That is lossless only for exactly ["@machine"], so it is now an invariant:
every record writer (establish, write_pending, claim) refuses an owners
list that mixes @machine with member ids.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
….18.0

Conflicts: the version manifests (taken from main, then bumped to 1.18.0
above it), and scripts/CLAUDE.md (M1's record paragraph kept beside M2's
rewrite of the module list). sminos.py, sminos_rpc.py and the tests
merged clean: M2's rpc-query dispatch and M1's launch claim both run
before migrate, in separate verbs.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…e, publication on every pass

The reviewer's five findings on M1:
- A claim the records' lock held off could be stolen by a descendant. The
  first startup SessionStart under SMINOS_LAUNCH now binds the launch to
  its session id with no lock (pending/<launch>.session, created whole by
  a link), and every claim (a later hook's, or the spawner's after
  poll_uuid) is honoured for the bound session alone.
- A provisional intermediate hid a final ancestor: along the lineage the
  first final record wins, then the latest publishing joined, and the
  first provisional record is only the fallback.
- Hook evidence finalized what a launch or a lineage speaks for. A record
  now rests on a basis (launch > lineage > hook > default) and is replaced
  only by strictly stronger evidence (rank, then final over provisional):
  a claimed spawn keeps its launch, a job whose hook ran before its
  hand-off takes its lineage, and equal evidence never flips a record.
- A final record whose joined never published never would: publication is
  checked on every pass, against the latest publishing joined, so every
  replacement and every failed append is published once; readers take
  the latest publishing joined.
- list --org --json carried principal, inference and controller on local
  rows: the org's view carries the public fields alone.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…lock, one pass per tick

The re-review of fix 2:
- A record promoted itself on its own publication: the lineage read
  included the session's own joined, so a hook-owned job became
  `lineage` with no former and a real hand-off could no longer correct
  it. Lineage evidence now comes from predecessors alone.
- A writer that prepared a joined, paused, and resumed after another
  writer published fresher provenance appended the older value. Every
  joined now takes its owners and origin from the record as it is under
  the session file's lock (lifecycle), and publish_owners skips when the
  latest publication already carries it.
- The publication check scanned the whole log once per member per tick.
  The log's one-pass index (identity and length keyed) now also carries
  each session's latest membership, so a member whose publication is
  current costs no scan.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 40cb572 into main Oct 27, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T03:10:56.520151Z c556cb8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant