Repository navigation
golive: journal the measured handover delay; load-proof gap timing test (#534) - #554
Conversation
…st (#534) The kit lets go of the owner lock at its first look after the launcher's claim of the serving lock (#548 already replaced the 100 ms hold with the main-process check). The verify step now journals handoverMs (an upper bound on claim -> let-go) and handoverLate when it reached the 250 ms the server waits for the owner lock. The probe-loop test no longer bounds wall-clock time: it checks that the kit let go at its first look that began after the claim, which a slow runner cannot break. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review (lens A)No blocking findings. Checked: On the brief's question: does the let-go still beat an SSH probe and the server's 250 ms wait under load? Yes. A probe can never pass, because the check is "the service's main pid holds the serving lock" in MINOR
State question: a rerun (the second |
Review (lens B)Head No blocking findings. Brief question, "does the hold still beat an SSH probe and the server's 250 ms under load?":
MINOR
State question: a rerun resets Verdict: SAFE. |
…st (#534) (#554) The kit lets go of the owner lock at its first look after the launcher's claim of the serving lock (#548 already replaced the 100 ms hold with the main-process check). The verify step now journals handoverMs (an upper bound on claim -> let-go) and handoverLate when it reached the 250 ms the server waits for the owner lock. The probe-loop test no longer bounds wall-clock time: it checks that the kit let go at its first look that began after the claim, which a slow runner cannot break. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…cks is blind (#530) Lens round on #556: - The handover keeps the holder for every outcome but the launcher's claim while the service is not active: a `t3 update` that exits non-zero or times out, and a target that never comes up, no longer free the home. - hold_home starts no holder when /proc/locks cannot be read (it could never be found, adopted or stopped); the run holds the home itself and journals why. status and check name an active holder unit they cannot see there. - A reboot ending the holder is a known gap, documented; status now says the home is free then. - The switch guard's fail-open start leaves a disabled T3 (its W1 holds it) stopped and held. - holder_said: do not start T3 by hand while it holds. - #554's look-order test stamps the claim before BEGIN EXCLUSIVE (no GIL race); `looked` is set before the watcher starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cks is blind (#530) Lens round on #556: - The handover keeps the holder for every outcome but the launcher's claim while the service is not active: a `t3 update` that exits non-zero or times out, and a target that never comes up, no longer free the home. - hold_home starts no holder when /proc/locks cannot be read (it could never be found, adopted or stopped); the run holds the home itself and journals why. status and check name an active holder unit they cannot see there. - A reboot ending the holder is a known gap, documented; status now says the home is free then. - The switch guard's fail-open start leaves a disabled T3 (its W1 holds it) stopped and held. - holder_said: do not start T3 by hand while it holds. - #554's look-order test stamps the claim before BEGIN EXCLUSIVE (no GIL race); `looked` is set before the watcher starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…530) (#556) * golive: keep the home owned after a W1 or switch that stops T3 ends (#530) A W1 (and a switch) may fail or be killed with T3 stopped on purpose (the home may be half-restored). The owner lock it took after the stop was held by the run's own process, so it was gone with the run: the next SSH launch of the desktop app found the home free and started its own server on it. Right after the stop the kit now starts a holder, a transient unit of its own (t3-golive-hold-<hash of the home>, running `t3-golive hold --home <home>`), that takes the owner lock and keeps it until stopped; the run adopts it as its lock. Every start the kit makes goes through the handover, so the new launcher gets the home from the holder. A failure before the start, a failed start or a kill leaves the holder holding. The same back's rerun takes it over (no free moment, one unit name per home); a resumed verify lets a leftover holder go once the service runs T3; status and check name it; settle stops it; a reboot ends it. It is found by its live process in /proc/locks, never by a file. Where no transient unit starts, the run holds the lock itself, as before, and says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * golive: format the README table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * golive: keep the holder until T3 really runs; no holder when /proc/locks is blind (#530) Lens round on #556: - The handover keeps the holder for every outcome but the launcher's claim while the service is not active: a `t3 update` that exits non-zero or times out, and a target that never comes up, no longer free the home. - hold_home starts no holder when /proc/locks cannot be read (it could never be found, adopted or stopped); the run holds the home itself and journals why. status and check name an active holder unit they cannot see there. - A reboot ending the holder is a known gap, documented; status now says the home is free then. - The switch guard's fail-open start leaves a disabled T3 (its W1 holds it) stopped and held. - holder_said: do not start T3 by hand while it holds. - #554's look-order test stamps the claim before BEGIN EXCLUSIVE (no GIL race); `looked` is set before the watcher starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #534
What
/proc/locks). So the kit already lets go at its first look after the launcher's claim. Looks run every 20 ms, well under a 60 ms target and well inside the server's 250 msbusy_timeout. An SSH probe is a separate process, so it can never pass that check, whatever the timing.Gap.starting()measures how long the owner lock was kept after the claim. The count runs from the start of the last look that did not find the launcher to the let-go, so it is an upper bound. The verify step journals it ashandoverMs. When it reaches the server's 250 ms wait, the step also writeshandoverLate, which names a server that may have idled on a very busy host.gap.test.pyusedassertLess(free, 0.25)in wall-clock time, which a slow runner can break. It now checks the order of the kit's looks instead: every look that began after the claim found the launcher, and there was exactly one. The wait for the free lock is a condition with the suite's 300 s cap, not a fixed number of sleeps.State question (tests)
starting()on the same gap resetshandover_ms. A later timeout carries no old delay.start failed, nohandoverMs, and the owner lock is free.served()returns{'marker': None}. Atimeouthandover has nohandoverMs.General vs project
Everything here is general to the kit: upstream's 250 ms owner-lock wait (pinned in
contract.test.py) and its serving lock. Nothing is specific to one machine or project.Old code
main'shandoff.pytest_the_handover_delay_is_measured_and_journalledSERVER_LOCK_WAIT_MS/handoverMsmissing)test_a_probe_loop_on_the_serving_lock_is_not_the_launcherhandover_msmissing); its look-order check passes, as the old let-go was already prompt. Only the timing bound was flakyI ran both against
main'shandoff.py. All golive suites pass locally: back, check, contract, copy, gap, journal, rehearse, switch.🤖 Generated with Claude Code