Skip to content

docs: Reserve - for stdin, guarantee review record's input shape, and say what a signal's exit code means across platforms - #353

Merged
takashi-matsuyama merged 2 commits into
mainfrom
docs/compat-reservations-and-signals
Oct 15, 2026
Merged

takashi-matsuyama merged 2 commits into
mainfrom
docs/compat-reservations-and-signals

Conversation

@takashi-matsuyama

Copy link
Copy Markdown
Member

What

Policy text in docs/spec/compatibility.md (what 1.0 freezes), following #351 and #352:

  • A value a flag refuses (new section). Within 1.x a flag may come to accept a value it refuses today, as an addition, only when every invocation accepted before parses and behaves as before; making an option's value optional does not qualify (--file --json reads a file named --json today). Accepting a refused value is the one way an invocation crosses zero within 1.x.
  • - is reserved for standard input on every input-file flag: --file (decision capture, review record, note), --from-file (task new, session note), --from (session import), and any added later. If one comes to accept -, it reads stdin, never a file named -.
  • Input shapes. basou review record's JSON input joins basou decision capture's. For both, the contract is the Input format section of --help: fields, JSON types, required fields, enumerated values. Whether a repos entry names a repository root follows the rule basou review-gaps binds with. basou session import's envelope is named too, under its existing version rule.
  • Exit codes of exec / run for a signal-ended child. Five fixed values on every POSIX platform (129/130/131/137/143); any other signal gives 128 plus its number on the platform, as a POSIX shell reports it, comparable only on that platform, with the recorded command_executed.signal / received_signal naming it. Only a SIGINT or SIGTERM sent to basou counts as basou's own; any other ends basou before the run is recorded. A signal Node has no name for (macOS SIGEMT, Linux real-time signals) reaches basou as exit 0; today's behaviour is described, not promised.
  • Deprecation policy. Since the policy was adopted (0.31.0), refusing - is the one exception to a flag keeping what it accepts through 0.x; no warning release, because the input is a file that stays on disk and is read as ./-.

Also: docs/spec/schemas.md notes the unnamed-signal case for command_executed; docs/spec/terminal-and-import.md links session import's refusal of --from - to the reservation; the README mentions the exception to the 0.x freeze; the CHANGELOG entry for #352 no longer says only five values are promised.

Verification

  • pnpm test, pnpm lint, pnpm lint:lang, pnpm lint:paths: exit 0.
  • Every compatibility.md#... anchor used in the changed files exists.
  • On macOS with a built CLI: SIGEMT gives exit 0, status: completed, exit_code: 0 and no signal; SIGSEGV records signal: SIGSEGV; 138 is SIGBUS there. received_signal is in the published event.schema.json. The JSON Schemas are unchanged.

…ecord's input shape, and say what a signal's exit code means across platforms

compatibility.md now says that a flag coming to accept a value it refuses is
additive within 1.x, and fixes the meaning of one such value now: if one of
the six input-file flags comes to accept -, it will read standard input,
never a file named -. The deprecation policy records refusing - before 1.0,
with no warning release, as its one exception to a flag keeping what it
accepts through 0.x: the file stays on disk and is read as ./-.

basou review record's JSON input joins basou decision capture's as a
documented input shape.

For a child of exec or run that a signal ended, the five fixed values are
spelled out, any other signal is promised 128 plus its number on the
platform basou runs on, comparable only there, with the recorded signal
names saying which it was, and a signal Node has no name for is stated to be
outside the promise: Node reports that child as having exited 0, so basou
exits 0 too.

terminal-and-import.md points session import's refusal of --from - at the
reservation.
…omise, and say what review record's shape covers

A refused value becomes accepted as an addition only when every invocation
accepted before parses and behaves as before; making a value optional does not
qualify (--file --json reads a file named --json today). Accepting one is the
one way an invocation crosses zero within 1.x. The reservation of - covers an
input-file flag added later too.

review record's documented shape is the Input format section of its --help:
fields, types, required fields and enumerated values. Whether a repos entry
names a repository root follows the rule review-gaps binds with. session
import's envelope is named among the input shapes, under its own rule.

For a signal-ended child, only a SIGINT or SIGTERM sent to basou counts; any
other ends basou before the run is recorded. The values are for POSIX
platforms and a POSIX shell such as sh, bash or zsh. A signal Node has no
name for is described as today's behaviour, not promised, and schemas.md says
the same of command_executed.

The 0.x exception names - and dates from the policy's adoption in 0.31.0. The
README mentions it, and the CHANGELOG entry for the signal fix no longer says
only the five values are promised.
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