Skip to content

feat(herdr-core): bundle hc 0.1.23, warn when a PC stops programs at logout, and date agent states from the core - #5153

Merged
devswha merged 16 commits into
mainfrom
chore/bundle-hc-0.1.23
Dec 1, 2026
Merged

devswha merged 16 commits into
mainfrom
chore/bundle-hc-0.1.23

Conversation

@devswha

@devswha devswha commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Bundles herdr-core 0.1.23 in the desktop app and the Settings installer, and adopts two facts 0.1.23 reports. #5158 is merged into this branch (same area, one PR for the 0.5.14 beta).

1. herdr-core 0.1.23 (was 0.1.17)

  • app/electron/scripts/runtimes.ts, server/herdr-core/install.ts: version and SHA-256 per target, from releases.herdr.dev/core/0.1.23/manifest.json.
  • CI's herdr-core live contract runs 0.1.23 too (0.1.17 and 0.1.18 stay; nothing removed).
  • scripts/hc-schema.json and server/herdr-core/hc-api.generated.ts regenerated from 0.1.23's hc schema, run against an isolated core (hc schema answers for the session's running core).
  • The fake core follows 0.1.23's stop: it sends the terminal's finished event and the attach CLOSE apart, in either order (0.1.18 always closes first). The live stop test compares them unordered and still requires both before the line ends; it failed 7 of 30 runs on 0.1.23 before, 30/30 after.
  • Docs, THIRD_PARTY_NOTICES and a changelog fragment name 0.1.23.

macOS packaging: the standalone herdr-core, not Herdr Core.app

Since 0.1.18 hc's macOS archive holds both Herdr Core.app and a standalone herdr-core. The app keeps shipping the standalone one:

  1. Nothing new for the user to see: no second app, and the core stays where it is (the app's data folder), not hc's shared ~/.local/share/herdr-core, which hc update --from <.app> would also switch for a user's own hc.
  2. Signing and notarization stay as they are: the build re-signs ovis/bin/herdr-core with the app's identity, while Herdr Core.app must keep Herdr's own signature (hc refuses another team's) and would need a signIgnore carve-out.
  3. App updates work as today: installCore runs hc update --from <bundled herdr-core>, which hc keeps supporting for non-bundled installs, and the running core moves to 0.1.23 with its terminals kept.

Trade-off: programs in Ovis's terminals do not get Herdr Core's own macOS privacy identity (same as today). Linux ships the same single herdr-core; Windows the same herdr-core.exe with conpty\ beside it.

2. Programs stop at logout (hc 0.1.21+)

hc reports keeps_running_after_logout and logout_linger_user in hello, server.status and machine.list. When a core says keeps_running_after_logout: false (systemd ends the user's programs when the account's last login ends), the PC's name gets a small warning mark where it is already shown (the sidebar's PC header, or with a single PC the desktop status bar and the phone top bar); its tooltip, and the PC menu's description, give the command that fixes it (sudo loginctl enable-linger -- <user>). No new rows, buttons or blocks. Older cores leave the fields out and nothing shows; a failed refresh keeps the last answer.

3. Agent state ages from the core (hc 0.1.23)

Status events and terminal records carry status_ms, the time the agent's status last changed. The agent list and the inbox already show "since when"; they now prefer the core's time when it describes the same state Ovis shows, so the age survives an Ovis server restart. For another machine only when both this PC's hc and that machine's are 0.1.23+ (an older relaying hc keeps the first timestamp). States Ovis infers itself (background waits, Antigravity's plan review) keep Ovis's own timer.

Contract changes are additive: optional logout_warning on SessionSnapshot and Machine, optional core_status_time on HerdrPane and the pane-status frame.

Checks

  • Linux, isolated core: installCore with a running 0.1.17 core and a live terminal, then with 0.1.23: restarted: true, same core id, 0.1.23, the terminal still live.
  • macOS (eamac, fresh clone, Developer ID signed build, not notarized: no notary key there): the app's ovis/bin/herdr-core says hc 0.1.23 and is signed by the app's team; codesign --verify --deep --strict passes; no .app inside Resources. The same 0.1.17 -> 0.1.23 update keeps the terminal, writes no bundle-upgrade-notice and makes no ~/.local/share/herdr-core.
  • Windows (winvm, desktop session): checksums match; the app's install layout with 0.1.17, then update --from 0.1.23: same core id, terminal kept, conpty\ kept, a new PowerShell terminal answers.
  • Regression tests that fail on main: the stop order (both versions), the logout warning and status-time gating (local hc 0.1.22 + remote 0.1.23, single-PC layouts, first-load clock, Antigravity plan review).
  • Review round: omo + Codex on both parts; their MEDIUMs are fixed (details in the comments here and on feat(herdr-core): warn when a PC stops programs at logout, and date agent states from the core #5158).
  • UI: before/after screenshots (desktop 1280, phone 390, several PCs and one PC) are with the lead.

The desktop app and the Settings installer pin hc 0.1.23 (was 0.1.17). On macOS the app keeps shipping the standalone herdr-core from the archive, signed with the app, not Herdr Core.app. CI's live contract adds 0.1.23, the hc types are regenerated from its schema, and the fake core follows 0.1.23's stop order (finished before the attach CLOSE).
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Updated the desktop app and installer to herdr-core 0.1.23, with fixes for recovery, state conflicts, Windows PATH discovery, and older Linux systems.
    • Added support for chunked file transfers and expanded terminal and session capabilities.
  • Bug Fixes
    • Improved core shutdown behavior across supported versions.
  • Documentation
    • Updated installation guidance and release notes for herdr-core 0.1.23.

The pull request updates herdr-core references and checksums to version 0.1.23, expands its OpenRPC schema, and adjusts fake-core stop ordering and tests to account for the version-specific event sequence.

Changes: herdr-core 0.1.23 Upgrade

Layer / File(s) Summary
Release pins and validation
.github/workflows/ci.yml, app/electron/..., server/herdr-core/install.ts, THIRD_PARTY_NOTICES.md, changelog.d/..., docs/...
Runtime and installer pins and checksums update to 0.1.23. CI adds 0.1.23 to the release checks. Notices, changelog, and installation documentation also refer to the new version.
Session and restart contracts
scripts/hc-schema.json
The schema adds login-session and logout-linger fields, updates restart and recovery contracts, and changes its version to 0.1.23.
Terminal operation contracts
scripts/hc-schema.json
The schema updates terminal operation errors and timing descriptions, and adds framed chunked file-transfer methods.
Event and machine contracts
scripts/hc-schema.json
The schema adds document subscription filtering and expands the machine.add via description.
Version-specific stop ordering
server/herdr-core/core.fake.ts, server/herdr-core/core.fake.test.ts
The fake core uses version-dependent ordering for stream CLOSE and the finished event. Tests cover the expected order for versions 0.1.18 and 0.1.23.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#4372: Updates the live contract checks for hc versions and schema comparison, and includes stop-ordering changes.
  • devswha/ovis#2671: Establishes the schema-based client type generation and drift-check pipeline used by this update.

Suggested reviewers: pt-act

Merge Risk: Minimal · previous review 388ff · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the three main changes: bundling hc 0.1.23, warning when a PC stops programs at logout, and dating agent states from the core. The changeset covers all three, although the title is lon…
Description check Passed The description follows the template's Change and Validation sections. Change describes the herdr-core 0.1.23 bump, the logout warning, and the status-time behavior, and it links the related PR #5158.…
Full details: Title check

Explanation

The title names the three main changes: bundling hc 0.1.23, warning when a PC stops programs at logout, and dating agent states from the core. The changeset covers all three, although the title is long and packs several changes into one line. It is not vague or unrelated.

Full details: Description check

Explanation

The description follows the template's Change and Validation sections. Change describes the herdr-core 0.1.23 bump, the logout warning, and the status-time behavior, and it links the related PR #5158. Validation lists the Linux, macOS, Windows, and regression checks, and it names the unit and live test results. It does not state whether the standard repo checks (bun run check fast or full) ran, and it does not link an issue. It also does not mention whether the contract tests cover the new HTTP/WS fields, which the template asks for.

Resolution

Optionally add the repo check command results (bun run check fast or full) and state which were skipped. For the new optional contract fields (logout_warning, core_status_time), state whether contract-test coverage exists. Link the issue for the logout warning and status-time features if a maintainer agreed to them.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0321c9e and 388ff5d.

Files ignored due to path filters: 1

  • server/herdr-core/hc-api.generated.ts is excluded by !**/*.generated.*, !server/herdr-core/hc-api.generated.ts
Files selected for processing: 11

  • .github/workflows/ci.yml
  • THIRD_PARTY_NOTICES.md
  • app/electron/README.md
  • app/electron/scripts/runtimes.ts
  • changelog.d/desktop-herdr-core-0-1-23.md
  • docs/guide.md
  • docs/runtime-move.md
  • scripts/hc-schema.json
  • server/herdr-core/core.fake.test.ts
  • server/herdr-core/core.fake.ts
  • server/herdr-core/install.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Review round (omo + Codex), head before this push 0dbb43e:

  • omo MEDIUM (chat send vs hc 0.1.23's draft hold): already fixed on main by fix(herdr-core): ask hc to drop a chat send its draft hold keeps, and trust only its own answer #5142 (send cancelled on hc's side when Ovis gives up, cancelled mapped to the draft error); this branch now contains it.
  • Codex MEDIUM (0.1.23 sends a stopping core's finished and attach CLOSE apart, in either order): reproduced, the live stop test failed 7 of 30 runs on 0.1.23. The live test now compares what comes before the line's end without its order, and still requires both before it: 30/30 on 0.1.23, 10/10 on 0.1.18.
  • Fixed LOWs: the fake core's header comment; changelog and docs no longer claim "no new permission prompt" or that Settings installs exactly as hc's installer (on macOS it takes the standalone herdr-core, not Herdr Core.app).
  • Left as LOW: the fake ignores events.subscribe's new docs filter (Ovis does not send it); the fake still defaults to 0.1.18; no automated 0.1.17 -> 0.1.23 desktop upgrade test (done by hand on Linux and macOS, see the PR body).

@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Windows check (winvm, the desktop session through Invoke-InSession, as the app runs; a run over plain SSH is refused by hc 0.1.23: "refusing to start an elevated Windows core over SSH while this user has a desktop session"):

  • 0.1.17 and 0.1.23 herdr-core-windows-x86_64.zip checksums match the pins.
  • The app's first install by hand (conpty\ first, then herdr-core.exe, as installCore does) with its own HC_SESSION; core 0.1.17 started, a terminal t1 running ping -t.
  • herdr-core.exe update --from <0.1.23 herdr-core.exe>: restarted: true, server.status 0.1.23 with the same core id, t1 still live, conpty\ still in place (5 files).
  • A new PowerShell terminal on 0.1.23 ran Write-Output (40 + 2) and its screen read 42.
  • Core stopped and the scratch folder removed afterwards.

@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit reviewed the first head (no actionable comments) and is rate limited for the later commits: it did not review head 888b18c. That head passed omo + Codex's review round, check fast in the CI runner image (28388 pass, 0 fail) and every CI check.

@devswha devswha changed the title chore(desktop): bundle herdr-core 0.1.23 and type against it feat(herdr-core): bundle hc 0.1.23, warn when a PC stops programs at logout, and date agent states from the core Dec 1, 2026
…reading it

start answers once the task is sent; the replay agent writes its prompt line when it takes it. CI's Rust PTY host job read the replay before that line three times on first attempts (setMode only).
@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Combined head review (omo, CLEAR at bc7a903; Codex inside it). Left as LOW, not fixed here:

  • src/lib/agentStateSince.ts reportedSince: right after a background wait ends, the age counts from before the wait (the core's time is right that the agent was resting that long; only the shown age differs from Ovis's own inference).
  • MachineLogoutMark / HeaderPcSwitch: the fix command is in a title tooltip, so a phone with a single PC has no way to read it by touch (DESIGN.md keeps it tooltip-only, no new control).
  • readCore asks server.status once more per snapshot read on 0.1.21+ cores (1 s cap, the last answer kept on failure).
  • statusTimeSupported treats a pre-release like 0.1.23-rc.1 as unsupported.
    Since then: c73e4a3 waits for the kimi child's task line in server/agent-tools/child.contract.test.ts (CI's Rust PTY host read the replay before it on three first attempts); check fast in the CI runner image at c73e4a3: 28412 pass, 0 fail.

…nt core does not end every attach

A 1 s server.status that ran out while hc sent nothing ended the shared line ("hc stopped answering"), and every attach on it with connection_lost. It now waits as the read's other calls do; a failed probe still keeps the last answer.
@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Review at c73e4a3 (omo with Codex): BLOCK on one reproduced HIGH, fixed in d818f57 (head now 48b0e70 with main merged):

  • HIGH, server/herdr-core/layout-ops.ts: the logout probe called server.status with a 1 s timeout on the shared line; a call that runs out while hc has sent nothing ends the whole line (connection.ts, "hc stopped answering"), so a core silent for more than a second dropped every attach. The probe now waits as the read's other calls do (the line's default); a failed probe still keeps the last answer. New test: a read with every answer held 1.5 s keeps the line and returns the warning (fails before the fix).
    Left (not blocking, not reproduced by the reviewer itself):
  • MEDIUM (Codex, isolated DOM): the warning's text and command are tooltip-only, so a phone with one PC cannot open them by touch. DESIGN.md keeps it tooltip-only with no new control; a tap-to-open would be a new control for the maintainer to decide.
  • LOW: with one PC and no selected pane the mark shows nowhere; done then idle (same shown state) restarts the age; a pre-release core (0.1.23-dev) is treated as unsupported.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 01f622f
Status: ✅  Deploy successful!
Preview URL: https://9d59be11.ovis.pages.dev
Branch Preview URL: https://chore-bundle-hc-0-1-23.ovis.pages.dev

View logs

@devswha
devswha merged commit fa904f2 into main Dec 1, 2026
24 checks passed
@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 01f622fdd. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main had moved since the checks of 48b0e7048: pr-merge --update merged it in (4447e8ea5), and every required check was green at this head.

main moved but untouched: merged without update. Its new commits up to 241dff425 change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.

Merged by the merge-0514 runner on the lead's (Dori) word for the v0.5.14 cut (owner 2026-12-02: v0.5.15 items go in now). Head 48b0e70: hc 0.1.23 + #5158, READY from the hc-bundle-update lane; omo + Codex review round fixed, combined head omo CLEAR, Windows check on winvm; CodeRabbit is rate limited and did not review this head.

@devswha
devswha deleted the chore/bundle-hc-0.1.23 branch December 1, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant