Skip to content

basou: Let a registered component on a board name the files that mark it - #366

Merged
takashi-matsuyama merged 2 commits into
board/shape-v3from
board/registry-marker
Oct 18, 2026
Merged

takashi-matsuyama merged 2 commits into
board/shape-v3from
board/registry-marker

Conversation

@takashi-matsuyama

Copy link
Copy Markdown
Member

Summary

A directory no built-in marker finds, such as one of content or of scripts, could be registered under a board's components, but it was then gone at every measure and fired the axis review's (a) each time. From board_version: 3, a registered component can name the files that mark it.

  • components.<key>.marker is a glob from the component's directory, in the dialect of an include (* does not cross /), and is checked as an include is: an absolute path, a .. segment, a leading : and a control character are refused (the message says it must be relative to the component's directory).
  • When a file the working tree lists under that directory matches it, the component is found, with marker among its kinds (beside any kind a built-in marker finds there). When none does, it is gone, as before. The directories the built-in markers skip (such as node_modules) are not skipped for a marker.
  • A key that is a repo itself (no /, or nothing after the first /) takes no marker: the declaration is refused. A key's path is read as written, neither as a glob nor normalized, so a key that names a file, one git would not write (app//x, a trailing /) and one that is not well-formed text find nothing.
  • A board of version 1 or 2 with a marker is told that version 3 reads it, on a line of its own; the key is still held against the rest of the board.
  • The components method stays 2: a registry without a marker measures as before. A component the built-in markers already found has marker added to its kinds once it is given one, which the next measure reports as a change of kinds.
  • basou board guide says when to give a gone component a marker (and not only to silence (a)), and the comment basou board init writes above components says so too. The record version comment and CHANGELOG (Unreleased) say what came in.

This is part of the board's version 3 and targets the integration branch board/shape-v3; nothing is released from it.

Checks

  • pnpm -r build, pnpm typecheck, pnpm -r test:coverage (core 2908 passed and 1 skipped, sdk 67, cli 1564), pnpm test:scripts, pnpm lint, pnpm lint:lang, pnpm lint:paths: all exit 0.
  • Mutation run on a copy: 37 mutations of the new code and text, all caught.
  • One round of review: five low findings, all fixed in the second commit (a key with a lone surrogate no longer finds a directory named U+FFFD, an empty key with a marker is told only that it is empty, and tests pin how a key's path is read and the order of a component's problems).

A directory no built-in marker finds, such as one of content or of
scripts, was gone at every measure and fired the axis review's (a) each
time. From board_version 3, components.<key>.marker is a glob from the
component's directory, written and checked as an include is. When a file
the working tree lists under that directory matches it, the component is
found with the kind marker; when none does, it is gone, as before.

A key that is a repo itself takes no marker. A board of version 1 or 2
with a marker is told that version 3 reads it. The components method
stays 2: a registry without a marker measures as before. The guide and
the comment board init writes say when to give a component a marker.
…d pin how a marker key is read

A registered key whose path holds a lone surrogate named no directory,
yet its bytes read as U+FFFD, so a marker found it under a directory of
that name: it is now gone. An empty key with a marker is told only that
it is empty, not also that it is a repo itself.

Tests now pin that a key's path is read as written (not as a glob, not
normalized, so 'app//x' and a trailing '/' find nothing and are not
refused), that a name that is not valid UTF-8 is matched as its bytes
are, that a repo itself takes no marker whatever the marker is, and the
order of the problems with one component.
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