Repository navigation
feat: track OMP sessions as per-pane rows with tab-title labels - #7
Merged
Merged
Conversation
The coordinator now builds rows (host, pane, mode, label) from complete snapshots, deduplicated across windows, and hands them to the transport. The hook-event transport reduces rows to its single combined mode, so SidePulse still sees exactly what 0.1.0 sent. Labels are sanitized at parse time and never reach logs, status, doctor.json, acks, or the SidePulse payload.
…shot Each OMP observation carries a host key and a label (the user-given tab name, else the pane's own title), cut at a UTF-8 boundary. Snapshots are encoded under pcall and kept under 192 KiB by dropping labels. The window harness moves into tests/luau and runs against the real window.luau in CI.
The window now reads OMP panes' titles and user-given tab names as labels. Every owned surface says what is read, that labels stay in coordinator memory, and that SidePulse still receives one combined status until the SidePulse #72 adapter ships.
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.
Direction B, transport-independent part. SidePulse still receives exactly what 0.1.0 sends; the SidePulse #72 adapter and the 0.2.0 release stay held until inteliwear/sidepulse#72 merges and a SidePulse release ships it.
What changes
(host, pane)and deduplicated across windows: the highest-priority mode wins, and the label comes from the newest snapshot that has one. It hands the whole row list to the transport. The hook-event transport reduces the rows to its one combined mode (combined_mode, the oldaggregate), so events, timing and the constantOMP in Terntitle are unchanged. Every pre-existing coordinator test asserts the same sent modes as before.window.luaulabels each OMP pane with its user-given tab name, else the pane's own title, never the title of whichever pane is focused in a split tab. It reads them through onecx.session:panes()call and onecx.session:tabs()call per 5 s pass, made only when the window has an OMP pane. The coordinator sanitizes each label: whitespace is collapsed; controls, lone surrogates and private-use characters (OMP's status glyph) are dropped; the result is capped at 96 characters. Labels and host keys stay in coordinator memory. They never reach the log,doctor.json,status, acknowledgements or the SidePulse payload.statusanddoctorshow only row counts.pcall, so an encode failure can no longer leave a call marked in flight for ever. Snapshots stay under 192 KiB: labels are dropped if needed and counted aslabels_dropped. The coordinator's request cap rises to 1 MiB, because the helper re-escapes non-ASCII text up to 3×.tests/luau/runs the realwindow.luauheadlessly. It covers backoff, interpreter replacement, the latch and role scenarios (A–G), labels and host keys (L1–L12), and the snapshot budget and encode failure (B1–B3). CI'sluaujob installs Luau 0.745 and requires it.Unreleasedsection.test_documented_test_count_is_current. It pinned test counts written in prose, including the historical 0.1.0 changelog entry, to the live suite size.Evidence
python3 -B -m unittest discover -s tests -t .→Ran 155 tests … OK (skipped=1), withluaupresent andTERN_SIDEPULSE_REQUIRE_LUAU=1.luau-lsp analyze --definitions=types/tern.d.luau window.luauis clean.drive_labelsfails at L1 againstmain'swindow.luau, anddrive_budgetfails at B1;drive_backoffpasses on both.panes()andtabs()cover every session, including attached remote hosts, at about 0.03 ms each.PaneInfo.tabequalsTabInfo.id.tern.json.encodereplaces invalid UTF-8 rather than raising.Review docs DOCS,RepoPrompt ROWS,Context and Task Briefs V0211. After unlinking, the leases expired, the rows were cleared, and the coordinator exited drained.SidePulse #72 spike
The branch
spike/pr72-adapter(never merged) plugs a per-rowProgramStatusTransportinto this PR's transport boundary without changing it.spike/FINDINGS.mdcovers:workingorblocked_errorrow stays until SidePulse restarts.