oak/oak

Version control for agents

Mark logs

What was done with a mark at each commit, as free text.

A mark log is what was done with a mark at one commit: its follower checked or deployed the commit, or someone has something to say about it. It is free text, usually Markdown, with an optional link. The first line is the headline, and the rest opens under it. A body over 64 KiB keeps its start and its end. A mark has one log per commit, and the next one there replaces it, so a follower's "checking" becomes "passed" and then "live".

oak mark log web                                          # web's logs, newest first
oak mark log web 3f2a8b1c                                 # its log at one commit, in full
oak mark log web --body "held: waiting on the migration"  # at the mark's commit
oak mark log web main --body-file notes.md                # `-` reads stdin
oak mark log web main --body "live" --url https://ops.example/deploys/7

A commit is main, a full hash or a unique prefix; without one, a new log goes on the mark's commit. oak mark log takes --repo OWNER/NAME, --server URL and --json, and -n says how many to list. --move-id ID ties a log to one of the mark's moves; oak mark follow writes its "deploying", "live" and "failed" logs that way. While its script runs, the follower replaces its log every few seconds with the step, the time so far and the end of the output, and open pages showing it update on their own. oak mark moves lists the mark's moves, each with the headline of its log.

There are no fixed states. Whether a commit passed is the mark's move: a follower moves the mark when its check passes, and says what went wrong in the log when it fails.

Where they show

A mark's page on the History tab lists the commits it has been at, each with the mark's log there. A commit's page lists every mark's log at that commit.

Who can write one

Anyone who can write the repository can write mark logs, with a key that has the write scope. A mark's followers can write its logs for its moves and checks with a read-only key, but never replace a log someone else wrote. Everyone who can read the repository can read them.

API

RequestWhat
POST /api/:owner/:name/marks/:mark/logsWrite one: {"commit", "body", "url", "move_id"} (commit defaults to the move's, then the mark's). A follower adds progress (kind, state, step, steps, started_at, estimate_seconds), which the mark's page and …/marks/:mark/now read
GET /api/:owner/:name/marks/:mark/logs?limit=N&before=IDThe mark's logs, newest first, with next_before for the next page; commit=C for its log at one commit. Each has mark, commit, headline, body, url, move_id, author, updated_at
GET /api/:owner/:name/commits/:commit/logsEvery mark's log at a commit: commit, and logs as above