Repository navigation
feat!: report each OMP session to SidePulse's program-status socket - #9
Merged
Merged
Conversation
SidePulse removed the hook-event sockets tern-sidepulse 0.1.0 wrote to (inteliwear/sidepulse#72, merged 2026-11-10 as ad4a5217; SidePulse desktop installs from main, so `sidepulse update` ships it). 0.2.0 talks only to the new program-status protocol and shows one SidePulse row per OMP session, named after its tab or pane. - transport.py: SidePulseTransport sends one acknowledged program_status report per row (at most 32, most urgent first) under a salted scope, clears rows that leave, refreshes active rows every 300 s, backs off 2-30 s, retries at once when a socket appears, and resubmits rows (except done) when SidePulse restarts. A write-ahead ledger of scope hashes lets the next coordinator clear a crashed one's rows after one lease, overwriting rows that are still open instead of clearing and re-adding them. Rejections log fixed text only. - Labels go to SidePulse by default; `"labels": false` in config.json sends an empty title and "OMP in Tern" instead. cwd is never read or sent. - config `program_sockets`, TERN_SIDEPULSE_PROGRAM_SOCKETS and --program-socket replace the ui/service socket settings; doctor's `receiver` check tells a pre-#72 SidePulse to `sidepulse update`. - Tests: transport units, doctor checks, migrated coordinator and subprocess suites, and a contract test against SidePulse's own server (CI pins ad4a5217). Docs and site describe the new contract and the laptop checks. BREAKING CHANGE: requires a SidePulse build that includes inteliwear/sidepulse#72; use tern-sidepulse 0.1.0 with older SidePulse.
Findings from the focused review of 07cceee, each with a regression test that fails at 07cceee and passes here: - disable stops the coordinator once its rows are cleared, so the coordinator that enable lets the next snapshot start reads config.json and a changed "labels": false takes effect - an exiting coordinator keeps clearing rows for up to 2 s, stopping at the first failed send, instead of giving up after one 0.3 s tick - SidePulse coming back on another socket candidate gets every row resubmitted, idle rows included - rows left by a crashed coordinator are cleared at once when they would push this install past its 32-row cap - doctor finds a pre-#72 relay socket in SidePulse's state directories, including its /tmp fallback for long paths - window: a title of UTF-8 continuation bytes cuts to an empty label instead of passing through whole - bridge.py resync requires a data dir, like register and disable
This branch was successfully deployed
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.
SidePulse merged inteliwear/sidepulse#72 on 2026-11-10 (
ad4a5217). It removes the hook-event sockets tern-sidepulse 0.1.0 writes to:relay-events.sockis gone, andevents.socknow ignores everything exceptopen-settings. SidePulse desktop installs frommain(setup.sh,sidepulse update), so anyone who updates SidePulse now gets no OMP status from 0.1.0.0.2.0 switches to the new program-status protocol and shows one SidePulse row per OMP session, named after its tab or pane.
What changes
tern_sidepulse/transport.py): one acknowledgedprogram_statusreport per row, at most 32 rows (most urgent first), each under a salted scopetern-sidepulse-<24 hex>. Rows that leave are cleared. Active rows are refreshed every 300 s; delivery backs off 2–30 s; a socket that appears during backoff is tried at once. When SidePulse restarts, its rows are resubmitted, exceptdonerows.program-scopes.json) lets the next coordinator clear a crashed coordinator's rows after one 15 s lease. Rows that are still open are overwritten in place, not cleared and re-added. A graceful exit clears every row."labels": falseinconfig.jsonsendsOMP in Terninstead. Program-status only: on an older SidePulse,doctorsays to runsidepulse update. cwd is never read or sent.program_sockets/TERN_SIDEPULSE_PROGRAM_SOCKETS/--program-socketreplace the ui/service socket settings.doctor'sreceivercheck replacesreceiver_uiandreceiver_service.main, released here: per-pane rows and labels (feat: track OMP sessions as per-pane rows with tab-title labels #7) and the luau-lsp config (feat: register luau-lsp for omp sessions with the tern definitions #8). Version 0.2.0.Verification
b016915. The opt-in 20 s timing test also passes.tests/test_sidepulse_contract.py) drives the transport against SidePulse's ownProgramServer. It passes against thead4a5217source and against the installed0.2.4.dev36+gad4a5217f. A new CI job pinsad4a5217and fails if the test is skipped.0.2.4.dev36+gad4a5217f):version_mismatch, and a 0.2.0 coordinator took over the same runtime directory.kill -9, the next coordinator overwrote the still-open row in place and cleared the closed one when the grace ended.SIGTERMcleared every row.07cceee(review-daybreak-blue and review-gemini-argon; review-gpt-astra supplemental) returned 10 items:b016915, each with a regression test that fails at07cceee. The fixes:disablenow stops the coordinator, so a changed"labels": falsetakes effect afterdisable+enable; an exiting coordinator keeps clearing rows for up to 2 s; rows are resubmitted when SidePulse comes back on another socket candidate; a predecessor's leftover rows count toward the 32-row cap; doctor's pre-#72 detection covers the/tmpfallback; the window's UTF-8 cut handles invalid titles;resyncrequires a data dir.donerow is current state, not a replayed completion.Details:
docs/compatibility.md.Not exercised with 0.2.0
Sleep/wake, Tern quit/relaunch and remote disconnect: the window, lease and clock code they cover is unchanged since the 0.1.0 checks. Also not run against a real SidePulse: the
/tmpfallback for socket paths longer than 96 bytes.