Skip to content

basou: compare a board with its previous record in basou board measure and record - #328

Merged
takashi-matsuyama merged 3 commits into
mainfrom
board/record-readers
Oct 7, 2026
Merged

takashi-matsuyama merged 3 commits into
mainfrom
board/record-readers

Conversation

@takashi-matsuyama

Copy link
Copy Markdown
Member

Summary

basou board measure and basou board record (experimental) now compare a board with its previous record.

  • The previous record: for a declaration named board.yaml, the last by name of the files in the records/ beside it named as a ULID with .json. Other files are passed over, and a declaration of another name reads no records.
  • diff in the measurement:
    • Lists each value that moved, by where it is (repos["../basou"].commits), a number with its change, marked method_changed when its section's method changed.
    • Lists the methods that changed, and the values there only now or only then.
    • Entries are told apart by what names them (repos by path, open tracks by id, not_found by where). Unacknowledged and gone components are compared as sets. Values are compared with their keys sorted.
    • Not compared: the clock, the freshness, the axis and its not_found entries, measured_with, and the effort's daily rows.
    • The diff is left out of the digest, and the text summary puts it first.
  • Components: the section holds the kinds that changed since the previous record, and counts as gone a component only it found (methods.components is 2).
  • Axis:
    • The section judges trigger (e), a built-in section's method that changed.
    • It takes the last review from the last record with an axis review, dated in the effort section's time zone (UTC when none can be named), before the declaration's seed (methods.axis is 2).
  • A record that cannot be read is never taken as no record: the diff, what only it found and the triggers it bears on are null or not judged, with a reason under not_found. A component the declaration registers that was not found still fires (a).
  • basou board record:
    • Says what moved right after where the record is, in the measurement, the cells and the observations, also under diff with --json.
    • Lists what the measurement recorded could not measure, also under not_found with --json.
    • The record itself does not hold the diff.
    • What a previous record holds is shown with its control characters escaped.

Verification

  • CI steps run locally with exit codes, after the last change: pnpm -r build, pnpm typecheck, pnpm -r test:coverage, pnpm test:scripts, pnpm lint (the existing warnings only), pnpm lint:lang, pnpm lint:paths, and pnpm audit --prod: all 0. Board tests pass under TZ=UTC, Asia/Tokyo and America/New_York.
  • On a real workspace, against a record written by the previous build:
    • The diff shows components and axis methods 1 -> 2, and (e) fires.
    • The last review comes from the record.
    • Recording again and measuring at once shows nothing moved.
    • After the fixes, no axis entry reaches the diff.
    • Nothing new under .basou/.
  • Mutations: 61, all caught. These cover the reader, the diff, components, the axis, measure, record, the CLI and the escaping. The first 49 were applied again on the final code.
  • Review: one round of convergent review (review only).
    • The reviewer read a record written by the previous build with this one.
    • Seven findings, all fixed: the axis's not_found entries reaching the diff; (a) not firing on a registered component gone when the previous record cannot be read; the wording on when complete turns false; the summary calling measured components unmeasured; where record shows its diff and why there is none; key order in compared values; and two missing tests.

🤖 Generated with Claude Code

takashi-matsuyama and others added 3 commits October 7, 2026 13:08
…e and record

For a declaration named board.yaml, the last record in the records/ beside
it (by name, of the files named as a ULID with .json) is the previous one.
basou board measure now says what moved since it under diff: each value
that moved, a number with its change, marked when its section's method
changed; the methods that changed; and the values there only now or only
then. The clock, the freshness, the axis, measured_with and the effort's
daily rows are not compared, and the diff is left out of the digest. The
text summary puts it first.

The components section holds the kinds that changed since the previous
record and counts as gone a component only it found (methods.components
is 2). The axis section judges trigger (e), a built-in section's method
that changed, and takes the last review from the last record with an axis
review, its day in the effort's time zone, before the declaration's seed
(methods.axis is 2).

A record that cannot be read is never taken as no record: the diff, what
only it found and the triggers it bears on are null or not judged, with a
reason under not_found. basou board record reports the same, with the cells
and the observations that moved, in its text and under diff with --json;
the record itself does not hold the diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cell's state and a method's section are read from the previous record,
and were shown as they were written: a record holding a control character
could act on the terminal. They now go through displayPath like the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is known

The diff no longer compares the axis's not_found entries, which the digest
leaves out, and compares values with their keys sorted. When the previous
record cannot be read, a component the declaration registers and that was
not found still fires trigger (a), and the text summary shows the
components measured, the gone ones as not known. basou board record shows
what moved right after where the record is, says when the previous record
could not be read, and lists what the measurement recorded could not
measure, also as not_found with --json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takashi-matsuyama
takashi-matsuyama merged commit 0dcee99 into main Oct 7, 2026
8 checks passed
@takashi-matsuyama
takashi-matsuyama deleted the board/record-readers branch October 8, 2026 05:22
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