Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Contracts and edge cases

Platform spec article

Contracts and edge cases

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Document contracts and edge cases for the Console Capabilities feature: role-specific normative detail beyond the feature hub.

  • Feature hub: Console Capabilities
  • Sibling articles in this bundle (design model, contracts, flow, examples, verification)
IDRequirement
CAP-001ShouldStripColor must return true when colorDisabled is true.
CAP-002When colorForced is true, ShouldStripColor must return false regardless of TTY.
CAP-003When neither forced nor disabled, non-TTY must strip color.
CAP-004ShouldEmitAnsi() must be consistent with ShouldStripColor(ProbeStdout()).
CAP-005EffectiveColorModel must return Basic16 whenever ShouldStripColor is true.
VariableEffect
NO_COLORDisables color (CAP-001)
FORCE_COLOREnables color even if not TTY
COLORTERMUpgrades model toward truecolor when color allowed
TERM=dumbForcePlainText true
TERM=xterm-256colorIndexed256 probe
  • Empty vs unset env: EnvFlagSet treats any non-empty value as set; NO_COLOR= may still disable per CAP-001.
  • stderr styling: v1 probes stdout only for ShouldEmitAnsi; stderr diagnostics use the same predicate today.
  • CI logs: Piped stdout suppresses escapes unless FORCE_COLOR=1 in job env.

See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.