Repository navigation
Let a board declare what to observe and what each stage is judged by - #336
Merged
Merged
Conversation
…ged by A board.yaml of board_version 2 may list, under observe, what a judge observes outside basou, each under the key its record holds it by, of seven kinds (npm_version, github_release, github_open_issues, github_open_prs, github_ci, page_version, manual), and may give each stage look and notes. basou makes none of these observations and sends nothing. Each value is held to a shape a command can be built from: a lowercase npm package name, owner/name, a workflow file name, a branch name that cannot start an option, an https:// URL with no credentials, quotes or whitespace. A version 1 board is read as before; one that has these keys is told that version 2 reads them. A board that declares observations is recorded with exactly those, one not made as null with its error, so a closed exit is never dropped unsaid and a mistyped key never loses the previous record's value. Records move to record_version 2, which holds the observations and the stages' look and notes in the declaration's snapshot. Version 1 records are still read, compared with and drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Say what an observation's value is safe as: one single-quoted shell word; a manual observation's how is never a word of a command. - Read a page's host as written: refuse https:///x, and any '@' before the host (https://@x, https://:pw@x), which the URL parser drops. - Take '_' in a GitHub owner, as a managed user's handle has. - Tell a version 1 file the keys version 2 reads on a line of their own, apart from keys no version reads. - Check the observations of a record input only when it is an object. - Test every shape rule the change states (branch '//' and trailing '.', the URL's quote characters, length limits, the workflow's case), and bring the comments and record's help up to date. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
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.
Summary
A board's
board.yamlmay now beboard_version: 2, which declares what a judge observes outside basou (observe) and what to look at when judging each stage (stages.<id>.lookand.notes). basou makes none of these observations; it reads them, holds each value to a safe shape, checks a record's observations against them, and keeps them in the record.observe: a list of observations, each with thekeyits record holds it by, of seven kinds:npm_version(package), the published version of an npm package;github_release,github_open_issues,github_open_prs(repoasowner/name);github_ci(repo,workflowas a file name,branch, by defaultmain), the conclusion of the workflow's latest run;page_version(url), the version a web page shows;manual(how, in words), one only a person can make.-),owner/name(an owner may hold_, as a managed user's handle does), a workflow file name ending in.yml/.yamlwith no leading-, a branch name with no leading-,..,//or trailing/or., and anhttps://URL in printable ASCII with no quotes, backslashes,<or>, and a host written right afterhttps://with no@before it (no user name or password, not even empty ones). A manual observation'showis words for a person, never a command word. Keys are ids and may not repeat.lookandnotesare optional lists of non-empty strings.observe(at the top) orlook/notes(in a stage) is refused, and told on a line of its own that version 2 reads them, apart from keys no version reads. An unknown version names both versions this basou reads.nullwith its error); one left out, or one the board does not declare, is refused and nothing is written. A board with no observations leaves the names free, as before.record_version: 2: the declaration's snapshot now holdsobserveand the stages'lookandnotes. Every new record is version 2; version 1 records are still read (previous record, axis review) and drawn bybasou view.basou boardstays experimental (no change tocompatibility.mdor the README).@basou/coreexportsBOARD_VERSIONS,BOARD_RECORD_VERSIONS,BOARD_OBSERVE_KINDS,BOARD_DEFAULT_CI_BRANCHand the typesBoardObserveandBoardObserveKind(Internal).Why
Today each workspace that wants a judged board also carries a skill of its own: a script that knows what to observe outside basou (npm, GitHub, a public site) and notes on what each stage is judged by. Declaring both in
board.yamlis the first step to a board that needs no per-workspace skill: the next change prints the judging steps from the declaration. Checking the observations a record gives against the declaration keeps a closed exit from dropping off the board unsaid, and a mistyped key from losing the previous record's value.Verification
pnpm -r build,pnpm typecheck,pnpm lint(the existing 4 warnings only),pnpm lint:lang,pnpm lint:paths,pnpm test:scripts,pnpm test:coverage: all 0. The board, view and orient tests pass underTZ=UTC,America/New_YorkandAsia/Tokyo.observe; version 1 still read, and refused with the hint when it has the new keys; unknown kind, missing and foreign keys, duplicate keys; each refused shape (packages, repositories, workflows, branches, URLs); emptylook; the record's exact set of observations (missing, undeclared, left out entirely, empty and__proto__names not reported twice, free names with none declared); the record's snapshot; version 2 records read after version 1 ones and drawn; the CLI refusing and then writing a version 2 record.measureof a version 2 board reportsboard_version: 2;recordrefuses a missing observation and writes nothing, then writes a version 2 record holding the declaration's observations and the stage'slookandnotes. A version 1 record written by the released 0.67.0 followed by a version 2 record from this build:recordprints the diff against it, andbasou view's/api/boarddraws both, with the previous value of an observation not made and the cells that moved.Review
One round of convergent review (review only), with the decided scope given as fixed. The reviewer read the diff and the readers, ran the board, view and CLI suites, probed about 70 declarations and 12 record inputs through the built package, ran measure, record and view in a scratch workspace, and applied 17 mutations to a copy. No high finding; 2 medium and 5 low, all fixed in the third commit:
$(...)or;is safe only single-quoted): the comment now states that contract;&stays allowed for query strings.//and trailing., the URL's quote characters, a password with no user name, the length limits, the workflow's case): tested now.record --help(which now names the rule onobserved).https:///xandhttps://@xwere taken (the URL parser drops what makes them wrong), and the host check could not fire: the host is now read as written._was refused.Not taken up, as design questions rather than defects: whether the digest should cover
observe,lookandnotes(it does not cover stage meanings either), the numeric deltaboard_version: 1 -> 2in a diff, an npm name rule stricter than npm's, and control characters inhow,lookandnotes(escaped wherever they are printed).Checklist
main.pnpm lint,pnpm typecheck, andpnpm testare all green locally.CHANGELOG.md## Unreleasedupdated.🤖 Generated with Claude Code