feat: add machine-readable run interface for herdr-board - #70
Merged
Merged
Conversation
aorumbayev
force-pushed
the
feat/board-run-interface
branch
from
September 25, 2026 18:47
8f19e17 to
42418a3
Compare
Add `hwf runs list --json`, `hwf runs get <uuid> --json`, and `hwf run <name> --detach --json`. Every response is one JSON object with schema_version 1 and stable error codes. History reads open SQLite read-only and never create or migrate the database. ListRuns pages with a keyset cursor on (started_at desc, id desc), default 40, max 200. Summary gains heartbeat_at and a current_step object. Detail embeds Summary and carries JSON tags. The launch payload gains requireHistory so a detached child exits before step 1 when history is unavailable or the claim is rejected. The parent reports launch_rejected. Picker launches are unchanged. --input parse errors no longer echo the raw value.
Stat history.db before the ACL checks so a read on a fresh install no longer creates the state directory. Drop the query_only pragma that duplicated mode=ro. Rename ListResult.SchemaVersion to IncompatibleSchema so it does not read like the response schema_version. Rename Detail.CurrentStep to ActiveStep so it stops shadowing the embedded Summary.CurrentStep that serializes as current_step.
aorumbayev
force-pushed
the
feat/board-run-interface
branch
from
September 26, 2026 19:57
42418a3 to
0986e41
Compare
aorumbayev
marked this pull request as ready for review
September 26, 2026 20:02
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.
Adds
hwf runs list --json,hwf runs get <uuid> --json, andhwf run <name> --detach --jsonso herdr-board can start and observe runs without readinghistory.dbor importing HWF packages.What changed
schema_version: 1and stable error codes:invalid_request,history_unavailable,run_not_found,incompatible_history,launch_rejected. Failures exit 1.history.dbis an empty list. A wronguser_versionisincompatible_history.ListRunspages with a keyset cursor on(started_at desc, id desc), default 40, max 200. Console and runs browser keep page one at 40.Summarygainsheartbeat_atand acurrent_stepobject.DetailembedsSummaryand carries JSON tags.requireHistory. A detached child exits before step 1 when history is unavailable or the claim is rejected, and the parent reportslaunch_rejected. Picker launches are unchanged.--inputparse errors no longer echo the raw value.## Runssection indocs/reference.md, README command rows.Acceptance
Covers the twelve acceptance tests from the brief: claim before UUID, list and get show the same state, restart safety, paging past 40 without loss or duplication, cursor stability when a newer run arrives, distinguishable empty, unavailable, incompatible, and missing results, malformed row warning, concurrent reads during a run, no input leak in any output, attached run and picker unchanged, help and docs.
Compatibility
Console and runs browser no longer rebuild an old-schema database on open. The next writer does.
Summary.CurrentLabelis gone (never serialized before).go tool verifypasses.