Skip to content

basou: Draw a board record's observations as their kind reads, every measure, its repos and components, and say where the declaration changed - #381

Merged
takashi-matsuyama merged 7 commits into
mainfrom
board/page-readability
Oct 20, 2026
Merged

takashi-matsuyama merged 7 commits into
mainfrom
board/page-readability

Conversation

@takashi-matsuyama

Copy link
Copy Markdown
Member

The second of the two changes for 0.72.0 of basou board (experimental). It changes neither board_version 3 nor record_version 3, nor the JSON basou board measure --json and basou board record --json print: only their text, and the board page of basou view.

The text of basou board measure and basou board record says where the declaration changed since the previous record (diffDeclarations), under Since the previous record: declaration stages.03.look: changed, declaration lanes["web"].notes: added, declaration observe["site.top"]: removed, declaration lanes: the order changed. Both declarations are compared with their defaults filled in; what the value diff already shows (the title, a measure's unit and lane, a ratio's numerator and denominator, the effort's start, a time zone both declare, a measure or a ratio added or removed) is left out. A previous declaration that cannot be compared gives declaration: not compared (...), and never fails a record: it is compared before the record is written, and not for --json.

The board page reads each observation outside as its kind gives it: an http value as its status, redirects, where it ended and each word, count and capture, or that the body is not read; with the kind and what it looks at under its name, its notes under it, and a mark and the previous value, drawn by the previous record's own declaration, when it moved since (compared as the record's diff compares). A value now null keeps the previous value it showed, unmarked; nothing is marked when the previous record is missing, cannot be read or cannot be compared.

The board page draws every measure in a table of its own, with its value, the lanes it is drawn in and how much a number moved since the previous record, and a record's page draws the repos and the components it measured: a record of version 1 or 2 by behind_main, the keys it does not hold drawn as - with a note; the components by the lanes of the registry, with those found and not registered, and those gone, apart.

docs/spec/board.md, the CHANGELOG, basou board guide and basou board init (a measure with no lane is now on the page) say so.

Verification on e29f2d9: pnpm install --frozen-lockfile, pnpm -r build, pnpm typecheck, pnpm lint, pnpm lint:lang, pnpm lint:paths, pnpm test (core 2964 passed and 1 skipped, sdk 67, cli 1599) and pnpm test:scripts (21) all exit 0. A review (one round, review-only) ran the built CLI on records of version 1, 2 and 3 and drew the page in English and Japanese; it found a record written but reported as not written, and a page not drawn, when a previous record held a value nested thousands deep (both fixed), two overstatements in the docs (fixed) and 7 mutants the tests let through: tests were added, and the 7, with one for each fix, were run again and caught.

…ord, in the text of measure and record

- board measure and board record (without --json) list, under "Since the
  previous record", each place where board.yaml differs from the
  declaration the previous record holds: "declaration <where>: added",
  "removed" or "changed", and "declaration lanes: the order changed". The
  places are named as a diff names a value. Both declarations are compared
  as a record holds them, a measure's lane of one id as a list and a record
  of version 1 with no observations, so moving a board to version 3 lists
  nothing for that alone.
- What the measurement's diff shows already is not listed again: the title,
  a measure's unit and lanes, a ratio's numerator and denominator, the
  effort's start, a time zone declared in both, and a measure or a ratio
  added or removed.
- The JSON of both commands is unchanged.
- The guide says the top of measure.txt lists these, to write an axis
  review's summary from; the reference says the text lists them and the
  JSON does not.
…e, and the repos and components it measured on the board page

- The table of observations outside reads an http value in the shape its
  declaration gives it as its parts (status, redirects, where it landed,
  each word found or not, the count, the capture, or that the body was not
  read when the status is not 2xx); a value of another shape is drawn as
  before. Under each name, its kind and what it looks at; under each row,
  its notes, from the declaration the record holds.
- An observation that moved since the previous record, as record's diff
  compares them (its value or its error), is marked, with what that record
  held, drawn by that record's declaration. A value whose type alone moved
  ("12" and 12) is drawn as JSON. Nothing is marked when there is no
  previous record, or it cannot be read, which a line under the table says.
- A section lists every measure: its value with its unit (a string without,
  the paths of a file_paths by how many), the lanes it is drawn in, and,
  for a number, how much it moved since the previous record.
- A record's page draws the repos it measured, by its version (a record of
  version 1 or 2 measured no base, ahead or fetch time, and held behind as
  behind_main), and the components it found, by the lanes its registry
  counts them in, then those in no lane with their notes, those not
  registered, and those gone, a change of kinds marked.
- init's comment on measures, the guide and the reference say every
  measure is drawn in the page's table of measures.
…efore it is written and only for the text

- diffDeclarations never throws: a declaration nested deeper than the
  comparison goes (only a record written by hand holds one) gives null, and
  the text says "declaration: not compared". A record was written, then
  failed with "Nothing was written." and exit 1 when the previous record's
  declaration was nested some thousands deep, with --json too; board
  measure failed the same way.
- board record compares the declarations before it writes the record, and
  not at all with --json, which holds none of it.
- A measure's lane is left out of the comparison whole, so it is no longer
  read as a list first; the reference says so.
- Tests: the lanes' order is said only when the lanes both hold moved (not
  when a lane is added or removed), and never for measures, ratios or
  observations; record's text with only the declaration moved says it, with
  "the order changed", and not "nothing moved".
…ervations are too deep to compare

- The page compared each observation with the previous record's, and a
  value nested some thousands deep there (only a record written by hand
  holds one) threw, so a page drawn before 0.72.0 was not drawn at all. Now
  it is drawn with no observation marked as changed, and the rest of what
  the previous record gives (the cells that moved) as before.
- Tests: a status of 299 is 2xx, so its body is read; a record of version 1
  or 2 whose repos are not in its shape draws them as none rather than
  leaving one out.
…n the board page marks an observation in the changelog
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