justinmclean opened a new pull request, #254:
URL: https://github.com/apache/airflow-steward/pull/254

   > **Generated by the spec-driven build loop.** This tool was produced by an
   > autonomous run of `tools/spec-loop` (`./loop.sh` — one work item, one 
branch,
   > one PR). Authored by Claude (see the `Generated-by` commit trailer) and
   > reviewed + tested by a human before submission.
   
   ## What
   
   Adds `tools/spec-status-index/` — a small stdlib-only `uv` tool 
(`spec-status`)
   that reads the YAML frontmatter of `tools/spec-loop/specs/*.md` and prints 
the
   specs grouped by status:
   
   - `--ready` — only actionable specs (`proposed` + `experimental`)
   - `--status <value>` — filter to a single status
   - `--json` — machine-readable output
   
   The point is to let build iterations select the next work item mechanically
   rather than eyeballing the specs.
   
   ## Why
   
   The spec-loop needs a deterministic way to enumerate spec status; this 
provides
   one, with a stable table and JSON contract.
   
   ## Changes
   
   - `tools/spec-status-index/` — the tool, README, `pyproject.toml`, `uv.lock`,
     and a unit-test suite (plus the regression test described below).
   
   ## Testing — and a bug it shipped with
   
   The unit suite was green, **but the green tests hid a tool that didn't work 
at
   all.** Run against the real specs, it returned **"(no specs matched)" — zero
   specs**. Root cause: `parse_frontmatter` matched `^---` with `.match()`
   (anchored at byte 0), but every spec opens with an SPDX licence HTML comment
   before the `---` block, so the frontmatter was never found and every spec was
   skipped — defeating the tool's entire purpose.
   
   Why the 24 tests missed it: every fixture puts frontmatter at position 0 (no
   SPDX comment), and the one real-specs smoke test (`assert len(entries) >= 3`)
   *skips* on this branch because `tools/spec-loop/specs/` isn't present here. 
So
   the loop shipped a non-functional tool behind a passing suite — caught only 
by
   running it for real.
   
   Fix: strip leading HTML comments before matching, plus a regression test that
   mirrors the real SPDX-prefixed format. Re-verified via the tool's real 
default
   code path against the actual specs — it now lists all 11 specs, an **exact
   match** to an independent parse of their `status:` fields, and `--ready` 
returns
   the correct 5-spec subset. Full suite: **28 passed, 0 skipped**.
   
   ## Notes
   
   - Stdlib-only (`dependencies = []`); `uv.lock` is the tool's own lockfile.
   - The bug/fix is flagged deliberately: the loop shipped code its own test 
suite
     reported as passing — a data point that the loop needs a check exercising
     tools against real inputs, not just fixtures.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to