Skip to content

sminos 1.27.8: queued operator events released in the order said, and named after a leave (#158, #156) - #429

Merged
SSFSKIM merged 2 commits into
mainfrom
sminos-queue-release-order
Oct 28, 2026
Merged

SSFSKIM merged 2 commits into
mainfrom
sminos-queue-release-order

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

What

Two follow-ups to #425's operator-writer queue (sminos 1.27.3), one in the release path and one in what is said after a leave. Board tickets #158 and #156.

#158: release order on a ts tie (a CI flake in test_heads.py)

sminos.release_queued sorted what waited across this machine's operator queues by ts alone. ts carries milliseconds only, so two appends in one millisecond tied, and the tie fell to the order glob listed the queues in. That is why test_heads.py's rename case went red on #426's PR CI (run 40677330561): renamed sorts before testhost.

sminos.said_order now merges the queues instead of sorting them:

  • Within one queue, its file order holds, whatever the clock says. Appends to a queue are serialized by its writer's locks, so the file order is the order they were said in.
  • Across queues the order is by ts. On a tie, a former name's event goes before a later name's (former names oldest first, the name now last), because the rename that made the later name came between them.

Each name has one queue and one rank, so no tie is left to the order the queues were found in. Nothing else in the release changes: the locks, the dedup against every drained writer's log, and the removal are as #425 left them.

#156: queued operator events after leaving the hub

A machine that leaves its hub (hub leave) before the first have has nothing left to release what waits. Before this change, daemon owed stopped counting it, because it read queued only for an upstream's projects. Appending the events locally is not an option: the hub still holds history for <name>/human, so a local append could take a seq the hub holds, which is the fork #147 prevents. So the events stay queued:

A leave after the first have finds the events already in the log and says nothing extra.

daemon owed's exit code still means "something is owed" (exit 1). A machine that left with events queued now exits 1 where it used to exit 0, and that is the point of #156. devcloud's departure reads only hub leave's exit code, which is unchanged.

Tests

New tests in test_heads.py:

  • Two appends with an equal ts as the former name, then two as the name now, land in the order said. On main this fails as [renamed 1, renamed 2, testhost 1, testhost 2].
  • Within one queue the file order holds against a clock stepped back. On main this fails.
  • A leave before the first have: hub leave and daemon owed name the queued event and print no body, nothing lands in the log, and a re-enrolment releases it at seq 3, above the hub's 1..2.
  • A leave after the first have: the event is in the log at seq 1, and daemon owed says nothing owed.

Docs: scripts/CLAUDE.md (#147's paragraph) and references/setup.md (hub leave).

sminos 1.27.8 (1.27.5 on its first commit, re-bumped above main at the merge).

Validation Evidence

Residue

None. #425's other residue, an operator append made before enrolment, is unchanged and still stands as #425 stated it.

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

… named after a leave

#158: release_queued sorted what waited across queues by ts alone, and two
appends in one millisecond fell to the queues' glob order (test_heads.py's
rename case, red on #426's PR CI). said_order now merges the queues: each
keeps its file order, and on a ts tie a former name's event goes before a
later name's, since the rename came between them.

#156: a machine that leaves its hub before the first `have` keeps what
waits queued (appending it could take a seq the hub holds; an enrolment
under the name again releases it). `hub leave` names it per project and
`daemon owed` counts it in any project, upstream or not.

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

sminos 1.27.8 for this branch's #156 and #158, above main's 1.27.7.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit f8718cb into main Oct 28, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T12:52:22.516413Z 3dc9170 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