An active-branch list is an array of names, trimmed and lower-cased
The rule
Normative: this is the rule
- A source's active-branch list is an array of strings.
- A bare string MUST be read as one branch name, taken verbatim, and MUST NOT be split on commas or any other separator.
- An entry that is not a string MUST be dropped.
- Each surviving entry MUST be trimmed of surrounding whitespace and lower-cased, which is the form BR-1 compares a port name against.
What it means
A bare string is not a shorthand for several names — it is one name, taken
exactly as written, commas included. Splitting it would corrupt the
legitimate case: a branch genuinely named a, b is one port, and splitting
its name on the comma produces two names that match no port at all. Only an array has several entries; a string never does.
Example
"a, B ,c"["a, b ,c"]An array entry that is not a string is dropped rather than turned into one:
["keep", 5, null, ""]["keep"]Why
Recorded under OPEN-25.
Fixtures
Test cases whose outcome this rule decides. A case compares absent, null and empty members exactly; the fixtures README defines each operation. Where a case and the rule disagree, the rule is right.
A named branch is matched after trimming and lower-casing gate-edge
{ "given": { "branches": [ "yes", "no" ], "output": { "active_branches": [ " Yes " ] }, "port": "yes" }, "expect": { "follow": true } }
Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · BR-3 · changed in spec 1.0