Skip to content

kb v0.52.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 01:41
· 187 commits to main since this release
8218c72

kb v0.52.1 — terminal tier fixes

A patch release on v0.52. It fixes what the first real-host deploy of the
terminal tier turned up and closes the review follow-ups of the terminal build.
There is no new feature, no new route, no new config key and no schema change.

Before you upgrade

  • Schema: none. There is no migration since v0.52 (the newest stays V0047),
    so a rollback to v0.52 needs no kb backup first.
  • Nothing changes unless [terminal] enabled = true. If you do not run the
    terminal tier, this release changes nothing you can see.
  • kb-code is unchanged at v9.2. Between v0.52 and this release the only
    change under kb-code is a flake fix in its end-to-end test
    (web-code/e2e/presence.spec.ts, #297); the daemon, CLI and SPA are the same.
    There is no new kb-code image to roll out.

Upgrading an existing v0.52 terminal host

  1. Re-run scripts/install-kb-term.sh from this release. It replaces
    kb-termd, kb-term, kb-tap and the unit files, and now also prints (never
    writes) the runner environment drop-in, pre-filled from your shell.
  2. Restart kb-termd only (systemctl --user restart kb-termd.service). Do not
    restart the kb-term@* holder units: that ends every live session.
  3. Give the runner its environment if you have not (docs/kb-term-install.md,
    "Give the runner its environment"): a kb-termd.service.d/env.conf drop-in
    with a PATH that holds the directory of kb and of each harness, and
    KB_SESSIONS_DIR. Without it a harness installed in a per-user directory
    exits 127 in the pane, and the capture and beat hooks do nothing, so a
    launched session gets no beat, no binding and no capture.
  4. Run systemctl --user enable kb-termd.service. This now works: the unit has an
    [Install] section (it had none, so enable failed and kb-termd did not
    start after a reboot). Already-running sessions are unaffected.
  5. Run kb-term doctor. It now reads the running runner's environment and
    checks that kb-termd is enabled.
  6. Update the kb daemon image to this release for the relay changes below.

Fixes in the terminal tier

  • Live-pane grid (#299, FXHOST). A live pane was listed with the wrong size
    because tmux's empty exit-status field collapsed the parsed line. The runner
    now reads tab-separated pane facts, so kb-term ls and the SPA see the real
    columns and rows.
  • kb-termd starts on boot (#299, FXHOST). The unit has [Install]
    WantedBy=default.target; systemctl --user enable works.
  • kb-term doctor checks the runner's environment (#299, FXHOST; refined in
    #304).
    It reads the environment of the running kb-termd: a missing
    KB_SESSIONS_DIR is a FAIL; kb or a harness not on the runner's PATH
    is a WARN, as is a harness that is missing, fails, times out or prints
    nothing when probed, each told apart. The runner is found through systemd's
    MainPID, and a /proc scan is only the fallback.
  • kb-term kill <id> (#304, FXTERMCLI). A new host-local verb that ends a
    session through the runner, and also reaps the files of a stale entry (a session
    whose tmux is gone), so it disappears from kb-term ls. It refuses a malformed
    id or a symlinked entry and removes nothing in that case. It is a kb-term
    verb, not a kb verb.
  • Installer drop-in (#304, FXTERMCLI). The printed drop-in now includes the
    directory kb resolves from, and quotes each value the way systemd requires
    (spaces, %, backslash, quote).
  • Runner client (#298, FXRUNNER2; #302, FXSTREAM). A reply arriving after
    its call timed out can no longer be taken for the answer to the next call on
    that session; the connection is dropped and re-dialled. A call cancelled
    mid-flight no longer poisons the connection either.
  • Viewer limit (#298, #302). A stream open now reserves its viewer slot, so
    two simultaneous opens cannot both take the last one, and a browser that hits
    the per-session limit gets a specific 409 terminal-conflict ("too many
    viewers") instead of a generic failure. Stream viewers are marked by
    construction, not by a name prefix, so a viewer a user happened to name ws-...
    is persisted like any other.
  • Relay (#295, FXRELAY; #302). The retry of a join the tap deferred with
    "busy" keeps its 150/300/600 ms schedule while the browser keeps typing, a seed
    or hello frame counts as a live join, and a re-open that is cancelled
    mid-flight is replayed without losing input. One epoch grammar now governs
    kb-server, kb-term and the tap.
  • Doctor pins (#298). kb-term doctor's xterm_pins check expected the
    SPA's pins from the tap and reported a false FAIL; it now expects the tap's
    own set.
  • Tests and CI (#296, FXTESTS; #301, FXE2E2; #297, FXFLAKES; #303,
    FXHANG).
    The terminal-stack end-to-end lane now proves its timing joins,
    covers the whole gate matrix (every /api/terms route refuses a missing
    intent and a wrong or absent Origin) and cleans up after a failed bring-up;
    the long segmented-capture hook test is split into groups with deadlines.
    The semantic-zoom ladder follows the URL when a step is superseded from outside
    (#301, a change in the web app, not only a test). These are mostly
    invisible to an operator.

Fix in the kb-memory plugin

  • omp slate wakes keep their order (#297, FXFLAKES). The omp hook looked
    up each resolution of an ask in its own concurrent process, so the wake for
    an answer could arrive after the wake for the later done. Lookups now run
    one at a time. Update the kb-memory plugin to get it; without the update
    nothing breaks.

Known limits still open

  • T4 local-mirror tail re-check is still pending. The scrollback result for
    the local mirror was measured once; the re-check of its tail has not been done.
  • --graphics is not wired in kb-term attach; the kitty graphics core has
    never run against a real Ghostty or kitty.
  • Real-device phone checks are still pending. Read and Drive modes are
    covered by unit and end-to-end tests, not by a pass on physical phones.
  • A same-pid, same-terminal start beat from another session can steal a
    terminal's binding.
    This is recorded and pinned as a known limit by the
    end-to-end lane, not fixed.
  • Within one epoch a full join does not tell the SPA the tap's current marker
    sequence,
    so a later resume may resend markers already folded into the join.
    It is unchanged from v0.52.
  • The viewer cap (8 per session) is shared by SPA and CLI viewers. A ninth
    viewer is refused with the specific error above.
  • Linux x86_64 only for the kb-term archive; the terminal tier is not exposed on
    a public mirror, and none may be added.