# ADR-0114: ADR-0114-an-identifier-is-read-outside-comments-and-a-strict-green-requires-a-row-the-gate-verified.md # ADR-0114 — An identifier is read outside comments, and a strict green requires a row the gate verified **Date**: 2026-11-05 **Status**: accepted (2026-11-05) **Deciders**: an agent delegate, under class D of `runward/delegation.md`, on the maintainer's instruction of 2026-11-05. Under ADR-0088 decision 4 the agent's writing is disclosed throughput, not independent review; the pull request that carries this record changes pre-merge paths and waits for the maintainer **Method**: both defects reproduced on a fresh clone of `stranxik/runward` at `main@8ffdf7c` (0.46.0) before any change, each beside its control, then re-measured on the change. Read: `src/lib/evidence.ts` (`symbolPresent` and its callers), `src/lib/conformance.ts` (`PATH_TOKEN`), `src/lib/verdict.ts`, `src/lib/check-contract.ts`, `src/commands/check.ts`, `src/commands/verify.ts`, `docs/spec/witness.md`, `runward/contracts/port-contract.md`, `action.yml`, ADR-0019, ADR-0051, ADR-0053, ADR-0060, ADR-0083 **Relates to**: [ADR-0019](ADR-0019-typed-evidence-pointers-verified-at-the-gate.md) and [ADR-0051](ADR-0051-the-gate-is-made-as-strong-as-its-headline.md) decision 1 (the symbol depth, refined by decision 1 here), [ADR-0060](ADR-0060-a-vacuous-green-is-disclosed-not-refused.md) (the vacuous green, refined by decision 2: the refusal it described), [ADR-0030](ADR-0030-agent-operates-runward-neutral-baseline-best-effort-detection.md) and [ADR-0083](ADR-0083-exit-code-two-carries-several-meanings-say-which-before-splitting-it.md) (the exit code contract, which gains 5), [ADR-0053](ADR-0053-the-construction-gate-certifies-a-declared-horizon.md) (a prefix verdict), [ADR-0054](ADR-0054-the-runtime-boundary-is-explicit.md) (nothing is executed), RWD-2026-0194 in [known-defects.md](../compliance/known-defects.md) ## Context **A comment kept a renamed symbol green (RWD-2026-0194).** The README's two-minute demo renames `guardFields` to `validateFields` throughout `code/src`, and `check --strict` exits 1 on the two rows that still cite `file:code/src/core/domain/guard.ts#guardFields`. Measured on 2026-11-05: append one line, `// validateFields was called guardFields before the rename.`, and the same command exits 0, "all gates passed", over a floor note and a threat model that cite a function that no longer exists; the same with a `/* … */` comment. The check was the one ADR-0019 decided, "the symbol occurs in the file (deterministic substring, language-neutral)", at the identifier boundary ADR-0051 added. A comment holds the name. **Where runward resolves a symbol.** Three readers search a whole file: the gate (`evidenceReport`), `spec-check` (`specConformance`) and the `rules --for` reminder (`citationsForPaths`). Two locators read line by line: the witness's `symbolAt` and the ratification excerpt. Each reads any file that is not a report an adapter routes (SARIF, ESLint, CycloneDX, k6 or JMeter, LCOV or Cobertura). runward has no notion of a language for a symbol; the languages it knows by extension are the evidence layer's `PATH_TOKEN`: `ts tsx js jsx mjs cjs py md json yml yaml toml go rs java rb php sql sh css scss html txt`. Measured on 2026-11-05, the 52 `#SYMBOL` pointers of runward's own mission and of the shipped example sit in `.md` (20), `.ts` (18), `.json` (8), `.yml` (4) and `.js` (2) files. **A mission where nothing was verified exited 0 (case c4 of the 2026-11-05 witness).** The example mission, every one of its 46 manifest rows set to `n/a` with one generic sentence: `check --strict` prints `0 applied · 0 deviated · 46 n/a`, "! nothing was verified mechanically", then "all gates passed", exit 0; `--json` says `verdict: "clean"`, `exitCode: 0`. ADR-0060 decided that a vacuous green is disclosed, not refused, and wrote what a refusal would be if one came: "it takes Jest's shape: a named opt-in flag, never a silent pass". Its precedent list already held the exit code: pytest exits 5 when no test was collected. **What the exit code contract says.** `runward/contracts/port-contract.md` publishes 0 clean, 1 gaps, 2 "the question could not be asked", and its evolution rule: "existing exit-code semantics ... never change meaning"; a breaking change "would ship alongside the old shape". No runward command exits 5 today (`grep` of `src/` on 2026-11-05). ## Options considered For the symbol: - **A. Remove the comments, by a lexer per known language, before the search; keep the strings.** A file of another language is read whole, as before. - **B. Remove the comments and the strings.** runward's own architecture note cites `file:eslint.config.js#no-restricted-imports`, a name that lives only in string literals, as do config keys, routes and rule ids everywhere: B reds honest evidence. - **C. Resolve symbols by syntax tree or language server.** ADR-0019 discarded it: language machinery, dependencies, false precision. - **D. Keep the textual reading and say so** (RWD-2026-0194's workaround: grep the old name after a rename). For the vacuous green: - **A. Under `--strict`, a level of proof is required; `mechanical` by default, refused with exit 5; `--require traced` accepts by name.** Jest's shape, pytest's code. - **B. Refuse with exit 1.** It says "gaps", and the payload's counts (RWD-2026-0146: what stands between a run and a green) would hold a gap that is no row. - **C. Keep the disclosure** (ADR-0060 as it stands): the case c4 green stays the default. - **D. An opt-in refusal, the default unchanged.** The vacuous green stays the default, and the operator who needs the refusal is the one who never asks for it. - **E. A deprecation window: warn for one release, refuse in the next.** The contract's "expand then contract"; the default stays vacuous for the length of the window. ## Decision **A** for both, on the maintainer's instruction of 2026-11-05. **1. A `#SYMBOL` of identifier form is looked for outside the file's comments.** `withoutComments` (`src/lib/evidence.ts`) replaces every comment of a file by spaces, its line breaks kept, so no two tokens are glued and every line keeps its number; `symbolPresent(content, symbol, path)` searches what remains for a symbol of the form ADR-0051 matches at an identifier boundary (`^[A-Za-z_$][A-Za-z0-9_$]*$`). The three whole-file readers pass the path; the two locators do not, and keep the text. - **The languages**: those of `PATH_TOKEN`, plus `.mts`, `.cts` and `.markdown`. JavaScript and TypeScript (`//`, `/* */`; strings, template literals with `${…}`, regular-expression literals after an operator or a keyword), Python (`#`; triple-quoted strings), Markdown and HTML (``; in Markdown a backtick run opens code that a run of the same length closes), JSON (`//`, `/* */`, as tsconfig and JSONC write them), YAML (`#` at the start of a word; quotes open a string where a value starts; block scalars are strings), TOML (`#`), Go (`//`, `/* */`; raw strings, runes), Rust (`//`, nested `/* */`; raw strings, characters, lifetimes), Java (`//`, `/* */`; text blocks), Ruby (`#`, `=begin` … `=end`), PHP (`//`, `#` except `#[`, `/* */`), SQL (`--`, `/* */`), shell (`#` at the start of a word), CSS (`/* */`), SCSS (`//`, `/* */`). `.txt` has no comment, and any other file is read whole, as before this record. - **Strings, decided**: a string literal is code that ships and runs, so a name in a string counts, and a comment marker in a string (`"https://…"`, `'#'`, `'a--b'`) opens nothing. A Python docstring is a string: it counts (stated below as a limit). - **Other symbols, decided**: a quoted sentence, a dotted name or an operator keeps the textual reading. It names no identifier, ADR-0051 already reads it as text, and a sentence's natural home is a comment or a document: runward's own suite cites `#"the guard fails closed"` from a code comment (`test/unit/evidence-bytes-and-boundaries.test.js`). - **An unterminated comment** runs to the end of the file in a programming language (what follows it is not code), and is text in Markdown and HTML, where an unclosed `