Repository navigation
sminos 1.27.8: queued operator events released in the order said, and named after a leave (#158, #156) - #429
Merged
Merged
Conversation
… 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)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_queuedsorted what waited across this machine's operator queues bytsalone.tscarries milliseconds only, so two appends in one millisecond tied, and the tie fell to the ordergloblisted the queues in. That is whytest_heads.py's rename case went red on #426's PR CI (run 40677330561):renamedsorts beforetesthost.sminos.said_ordernow merges the queues instead of sorting them: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 firsthavehas nothing left to release what waits. Before this change,daemon owedstopped counting it, because it readqueuedonly 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:hub leaveprints one line per project with events still queued, and namesdaemon owed.daemon owedcountsqueuedin any project, upstream or not. Without an upstream, the reference reads(no upstream releases it).have, as sminos: the operator writer waits for its upstream's head on a new enrolment (#147) #425's path does. A test pins this.A leave after the first
havefinds 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 onlyhub leave's exit code, which is unchanged.Tests
New tests in
test_heads.py:tsas 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].have:hub leaveanddaemon owedname 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.have: the event is in the log at seq 1, anddaemon owedsaysnothing owed.Docs:
scripts/CLAUDE.md(#147's paragraph) andreferences/setup.md(hub leave).sminos 1.27.8 (1.27.5 on its first commit, re-bumped above main at the merge).
Validation Evidence
python3 -B -I runtest.py sminos/tests/test_heads.pyruns 23 tests, OK.[(1, 'renamed 1'), (2, 'renamed 2'), (3, 'testhost 1'), (4, 'testhost 2')] != [(1, 'testhost 1'), …]and['second', 'first'] != ['first', 'second'].Renamed.test_what_waited_under_a_former_name_lands_under_the_name_now, a 50-run loop with no FAIL).Dx2.test_a_leave_before_the_first_have_leaves_what_waits_namedfailed before the change ('work: 1 operator event' not found in 'left the hub as testhost') and passes with it.test_owed.pystill passes all 42 tests.ci-gateon 3dc9170 (the PR head, main merged) is GREEN: https://github.com/SSFSKIM/doperpowers/actions/runs/40688625420. The first gate on 3a08c4a was RED only on test-sync.sh's rejoin flake (run 40680605663), which sminos 1.27.7: test-sync.sh's former-name rejoin no longer races the uplink (#157) #428 fixed.doperpowers:reviewer-highon 3a08c4a, one round, no material findings, verdict correct. Since then the branch has only taken main in a merge commit (sminos 1.27.6: daemon/sends.json drops the sessions gone (#159) #427, sminos 1.27.7: test-sync.sh's former-name rejoin no longer races the uplink (#157) #428) and the version bump; its own diff is unchanged.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)