Skip to content

basou: Count a board's behind against origin's default branch, name a record by its own time, and say how to hand over a manual observation and write ids in full - #359

Merged
takashi-matsuyama merged 2 commits into
mainfrom
board/fourth-report-fixes
Oct 16, 2026

Conversation

@takashi-matsuyama

Copy link
Copy Markdown
Member

Fixes from a report on a fourth board moved to basou board (experimental). The shapes of board.yaml and the record (board_version 2, record_version 2) do not change.

What changes

  • board measure: behind_main counts against origin's default branch. It read only refs/remotes/origin/main, so a repository whose default branch is master never had a count, and the measurement still said it was complete. It now counts against the branch of origin that refs/remotes/origin/HEAD names, and against origin/main when origin/HEAD names none (not set, or not a symbolic ref), as before. When origin/HEAD names a branch that is not there (as after the default branch is renamed and a fetch prunes the old one), names a ref outside refs/remotes/origin/, or cannot be read, the value is not measured and not_found says why, rather than falling back to origin/main. The repos method is 2. The field keeps its name; which branch was counted is not added to the record (that would change its shape). board measure and the board page say "behind origin's default branch".
  • board record: the record's ULID carries recorded_at. The ULID took the time the record was written, after measuring again, while recorded_at took the time the command started, so the record list and the guide gave a later time than the heading. Record names come from a monotonic factory of their own: apart from basou's other ids (whose later times would carry over), and monotonic so records with the same recorded_at sort in the order written. Records written before keep their names.
  • board guide: how to ask for a manual observation, and ids in full. Ask for one thing the operator can do as written (the line to run and where, or the page to open, and what to send back); when the operator says to make it, make it and say so in the source. Write decision and task ids in full in the prose and in a milestone's ref; init's comment on milestones says so too.

Verification

  • pnpm -r build, pnpm typecheck, pnpm lint, pnpm lint:lang, pnpm lint:paths, pnpm test:scripts, node scripts/check-changelog-history.mjs 60d302a, pnpm -r test: exit 0 (core 2800 passed / 1 skipped, sdk 67, cli 1555).
  • New tests: seven for behind_main (a default branch of master with an origin/main HEAD already has; no origin/HEAD and no origin/main; origin/HEAD naming a branch that is not there; naming a pruned origin/main; not a symbolic ref; naming a ref outside origin; unreadable or not valid UTF-8), three for record names (time equals recorded_at after basou's shared factory gave out a later time; a retried name; ten records with the same recorded_at in write order), three for the guide's text, one for init's comment.
  • Mutations caught by the tests (14): not reading origin/HEAD; a missing branch read as no count, whether named or not; no origin check; every non-zero exit falling back to origin/main; no UTF-8 check; the shared monotonic factory; no seed; a fresh factory per name; no seed on a retry; the repos method back to 1; each guide sentence removed; init's comment addition removed.
  • With the new build, in a scratch repository whose default branch is master: behind origin's default branch 0, then 1 after the remote moved one commit and was fetched, Complete: yes. After a rename to master and fetch --prune (origin/HEAD left on a gone origin/main): v0.70.0 printed (no origin/main) and Complete: yes; the new build prints not measured with the reason and Complete: no. A record written in a scratch workspace has a ULID whose time equals its recorded_at to the millisecond.
  • One convergent review (review-only, one round); its seven findings (one medium: the pruned origin/main case) are applied in the second commit.

… record by its own time, and say how to hand over a manual observation and write ids in full

- board measure: behind_main counts against the branch
  refs/remotes/origin/HEAD names, and against origin/main when it is not
  set. A repository whose default branch is master never had a count and
  the measurement still said it was complete. When origin/HEAD names a
  branch that is not there, the value is not measured and not_found says
  why. The repos method is 2.
- board record: the record's ULID carries recorded_at, so the record list
  and the guide give the same time as the record's heading.
- board guide: ask for a manual observation as one thing the operator can
  do as written, and when the operator says to make it, make it and say so
  in the source. Ask for decision and task ids in full, in the prose and in
  a milestone's ref; init's comment on milestones says so too.
… a missing or foreign ref, and records written in the same millisecond

- behind_main: tell origin/HEAD naming origin/main from no origin/HEAD, so
  an origin/HEAD left on a pruned origin/main is not measured with a reason
  instead of read as the meaningful null. An origin/HEAD naming a ref
  outside refs/remotes/origin/ is not measured either. The descriptions
  say "names no branch" (not set, or not a symbolic ref).
- Tests for an origin/HEAD git cannot read and one whose name is not valid
  UTF-8, with an origin/main beside it; the CHANGELOG says such a value is
  not measured.
- Record names come from a monotonic factory of their own, so records with
  the same recorded_at sort in the order written; tests for that, for the
  time of a retried name, and for init's milestone comment.
- CHANGELOG says what the guide says about ids in a milestone's ref.
@takashi-matsuyama
takashi-matsuyama merged commit 4f5e894 into main Oct 16, 2026
8 checks passed
@takashi-matsuyama
takashi-matsuyama deleted the board/fourth-report-fixes branch October 16, 2026 16:32
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