Skip to content

O18 residue (D5): sminos restates a session's own snapshot the hub withheld #492

Closed

Description

@SSFSKIM

O18 residue (D5), not built in M3/M4. The spec says "a withheld own snapshot counts as unpublished, so publish_owners writes the session's snapshot again" (D5, docs/doperpowers/plans/2026-11-05-p5-o18-message-reach.md). Nothing does that. HubLog.withhold_own keeps the withheld event in its writer file, and every publisher reads the writer file: publish_state (sminos_daemon.py:611) compares against the log's last state, and publish_owners (sminos.py:3214) against the log's last publishing joined. So a withheld own joined or state counts as published, and the hub's registry row for the session stays where it was until the session's state word or record next changes. For an idle session that never happens.

When an own snapshot is withheld (judge, apps/desk-hub/src/objects/project.ts:2039):

  • the session is bound to another machine. This is permanent by design, since the binding never moves, so republishing can't fix it;
  • a provenance reference (by, a former session) names a session whose row is private, and the reference reached the hub unredacted. This is a race: the parent narrowed between sminos writing the child's snapshot and the hub judging it;
  • its attested owners aren't inside its own audience. Not expected, since the audience is built from the same record.

An unknown provenance reference is admitted, and state-unavailable is retried at its position, so neither withholds.

What a stale row costs:

  • Unknown session. A session is unknown to the registry only when it is unlisted and its first snapshot was withheld. A listed session's RL6 listing gives it a listed row (Policies.listed). While it is unknown, the hub refuses every message naming it, its owner's own traffic included.
  • Widening withheld. The members the change added are refused at the hub. This fails closed, but it breaks the share.
  • Narrowing withheld (its unlisted notice admitted, the snapshot after it withheld). The hub's row stays wide. Only the recipient endpoint's reach? keeps the withdrawn members out (defense in depth).

None of this can happen on production until some session there is private. Until then every session is listed, and nothing writes a narrower provenance row.

The fix (doperpowers sminos, next version after M4's 1.36.0):

  1. When withhold_own settles a position that holds the session's own joined or state (the event's session is the writer's session), it records a restatement as owed for that session and kind.

  2. The daemon's next tick for the project writes it, provided no later own snapshot of that session has been written since. Writing it goes through lifecycle, as the publishers do:

    • a joined takes the fields from the session's last joined, as publish_owners builds them;
    • a state takes the member's current word.

    It is written from the record as it is now (audience, policyRev, redaction), so the endpoint signs it against its current cache.

  3. Its position is recorded as a restatement. If the hub withholds a restatement again, nothing more is owed: a line in daemon.log names the session, and the session's next natural snapshot is the next try. Each natural snapshot therefore costs at most one extra position. A permanently misbound session doesn't loop.

The bound:

  • A transient withhold is repaired one daemon tick after the refusal reaches sminos. The refusal comes on the upload's own answer, or, when a disconnect lost it, from the next archive have's withheld list (ARCHIVE_EVERY, 15 min).
  • A permanent cause is never repaired by republishing, and daemon.log says so.

Acceptance:

  • Repair. Against a hub stand-in that withholds a session's joined once, the daemon's next tick writes the session's joined again, and the hub admits it.
  • No loop. A restatement withheld again is not restated; daemon.log names it, and no third snapshot is written.
  • Nothing owed after a newer snapshot. A withheld state followed by a newer own state owes nothing.
  • Records. The O18 spec's D5 sentence is corrected to this mechanism (a MAWS records line, at landing).

Precondition (DL 229). Before the production hub deploy, every enrolled machine's sminos daemon must run this version or later, alongside the M2-everywhere rule (DL 227). Strictly, the regression needs a private session on production. The precondition is written against the deploy because that is the simpler thing to check.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)

Activity

  1. SSFSKIM commented on Nov 6, 2026

    @SSFSKIM
    OwnerAuthor

    [board] ready-for-implementer: precondition of the production hub deploy (DL 229) until every enrolled machine's sminos carries it; built by the desk track after M4

  2. added
    bug
    status:ready-for-implementer
    priority:P2
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 6, 2026
  3. SSFSKIM commented on Nov 6, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: desk track building it in doperpowers (branch o18-d5-restate, stacked on O18 M4's o18-m4-sminos); PR after M4 merges

  4. removed
    status:in-progress
    on Nov 7, 2026
  5. SSFSKIM commented on Nov 7, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed in doperpowers as PR #465 (merge 2cd36862, sminos 1.37.0): sminos restates a session's own snapshot the hub withheld, and a restatement's debt and identity outlive an interrupted write. GREEN on 8075989f (run 42323353120). The O18 spec's D5 sentence will be corrected to this mechanism in the O18 records PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions