You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/09/13 13:16:58 UTC
(juneau) 20/29: Fire ready_but_has_open_questions on the READY- filename prefix too, not on the status phrase alone.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch juneau-release-manager
in repository https://gitbox.apache.org/repos/asf/juneau.git
commit 7d9035fc50a3d1fff274c7005a904d10a384afe9
Author: James Bognar <ja...@apache.org>
AuthorDate: Wed Aug 26 12:51:57 2026 -0400
Fire ready_but_has_open_questions on the READY- filename prefix too, not on the status phrase alone.
The check gated solely on a status starting with "Ready to execute", which made it
dodgeable by wording: a READY-*.md file whose status opened with anything else ("In
progress -- ...", "No open decision blocks this item.") carried its unresolved
"## Open questions" straight past the audit. The filename prefix, not the status prose,
is the board's structural declaration that nothing is left open, so it should stand on
its own as a trigger. The gate is now the union of the two -- the phrase condition stays
so an item that declares readiness in prose without the rename is still caught.
The neighboring ready_but_wave_already_accepted check is deliberately NOT widened the
same way, and the module docstring now says why: that one needs the item's own live claim
that it has not yet run, and a filename outlives that claim -- a READY- file whose status
has moved on to "Done." has run, and flagging it for sitting behind an accepted wave
would be noise. Four tests cover the widening and that asymmetry.
Carried change: lands here identically to the copy in the juneau tree, per the
byte-for-byte rule for the shared tracker scripts.
---
scripts/tests/test_todo_status_audit.py | 46 +++++++++++++++++++++++++++++++++
scripts/todo-status-audit.py | 36 +++++++++++++++++++++-----
2 files changed, 75 insertions(+), 7 deletions(-)
diff --git a/scripts/tests/test_todo_status_audit.py b/scripts/tests/test_todo_status_audit.py
index 97a8f2b9ce..0b4d9e19db 100644
--- a/scripts/tests/test_todo_status_audit.py
+++ b/scripts/tests/test_todo_status_audit.py
@@ -343,6 +343,52 @@ class TestLifecycleMismatchChecks:
assert "ready_but_has_open_questions" not in flags
+ def test_ready_prefix_with_non_conforming_status_and_open_questions_is_flagged(self, audit_module, next_id_module, tmp_path):
+ """The regression the READY- filename condition exists for. While the gate keyed off the status
+ phrase alone, a READY-*.md file whose status opened with any other words skipped the check
+ entirely, so its unresolved questions rode along invisibly under the READY- name -- the real
+ corpus carried eight of them that way behind an opening "No open decision blocks this item."."""
+ path = tmp_path / _plan_filename(next_id_module, "READY", 1)
+ body = "## Open questions\n\n1. Should this use approach A or B?\n"
+ _write_plan(path, status="No open decision blocks this item.", body=body)
+
+ flags = {code for code, _ in audit_module.audit_file(path)}
+
+ assert "ready_but_has_open_questions" in flags
+
+ def test_ready_prefix_with_non_conforming_status_and_resolved_questions_is_not_flagged(self, audit_module, next_id_module, tmp_path):
+ """The READY- prefix makes the check APPLY, it doesn't presume the answer: the file reaches the
+ resolved/unresolved test, which then finds nothing open."""
+ path = tmp_path / _plan_filename(next_id_module, "READY", 1)
+ body = "## Open questions\n\n1. Should this use approach A or B? Resolved: approach A.\n"
+ _write_plan(path, status="In progress -- step 2 of 6 outstanding.", body=body)
+
+ flags = {code for code, _ in audit_module.audit_file(path)}
+
+ assert "ready_but_has_open_questions" not in flags
+
+ def test_non_ready_prefix_with_ready_status_and_open_questions_is_still_flagged(self, audit_module, next_id_module, tmp_path):
+ """The filename condition is a UNION with the status-phrase condition, not a replacement: an
+ item that declares readiness in prose without the rename stays gated."""
+ path = tmp_path / _plan_filename(next_id_module, "TODO", 1)
+ body = "## Open questions\n\n1. Should this use approach A or B?\n"
+ _write_plan(path, status="Ready to execute.", body=body)
+
+ flags = {code for code, _ in audit_module.audit_file(path)}
+
+ assert "ready_but_has_open_questions" in flags
+
+ def test_non_ready_prefix_with_ordinary_status_and_open_questions_is_not_flagged(self, audit_module, next_id_module, tmp_path):
+ """The union widened the gate to READY- names, not to every file. An item claiming neither form
+ of readiness is still allowed to hold open questions -- that is what the section is for."""
+ path = tmp_path / _plan_filename(next_id_module, "TODO", 1)
+ body = "## Open questions\n\n1. Should this use approach A or B?\n"
+ _write_plan(path, status="Not yet started.", body=body)
+
+ flags = {code for code, _ in audit_module.audit_file(path)}
+
+ assert "ready_but_has_open_questions" not in flags
+
def test_need_input_prefix_is_exempt_from_lifecycle_mismatch_checks(self, audit_module, next_id_module, tmp_path):
"""NEED_INPUT files are scanned (structural checks apply) but deliberately not
subject to the TODO/READY-specific Parked-/On-hold-prefix-mismatch checks."""
diff --git a/scripts/todo-status-audit.py b/scripts/todo-status-audit.py
index f12ac0705f..a1a598bdad 100755
--- a/scripts/todo-status-audit.py
+++ b/scripts/todo-status-audit.py
@@ -46,9 +46,14 @@ Checks performed (each file may accumulate multiple flags):
the majority of files once the trackers settled on descriptive prose
instead of that enumerated set -- an enumeration is exactly what rots.)
- ready_but_has_open_questions
- Status starts with "Ready to execute" but the file still has a
- "## Open questions" section containing at least one numbered item
- whose text doesn't look answered/resolved.
+ The file declares itself ready -- either by its READY-*.md filename
+ prefix or by a status starting with "Ready to execute" -- but still
+ has a "## Open questions" section containing at least one numbered
+ item whose text doesn't look answered/resolved. The filename prefix
+ counts on its own because it, not the status prose, is the board's
+ structural declaration that nothing is left open; keying the check
+ to the phrase alone let a READY- file hide unresolved questions
+ behind different opening words.
- ready_but_wave_already_accepted
Status starts with "Ready to execute" and the file's header region
(everything before the first "## " heading) declares membership in a
@@ -191,7 +196,10 @@ absent (no board file, no wave reference, or a status that isn't a pre-kickoff c
merely mention another wave's members ("must be serialized against ...") reference the wave
deep in the body and are not flagged.
3. The item's status still starts with "Ready to execute" (the same narrow, already-documented
- prefix the ready_but_has_open_questions check uses) -- i.e. it still claims not to have run.
+ READY_TO_EXECUTE_PREFIX phrase) -- i.e. it still claims not to have run. Unlike
+ ready_but_has_open_questions, this check is NOT widened to the READY- filename prefix: what it
+ needs is the item's own live claim that it has not yet run, and the filename outlives that
+ claim (a READY- file whose status has moved on to "Done." has run).
Declared counts (counts_* checks)
--------------------------------
@@ -944,12 +952,26 @@ def _flag_status_placement(text: str, status_match: "re.Match", flags: list) ->
def _flag_open_questions_if_ready(prefix: str, normalized_status: str, text: str, flags: list) -> None:
- """Appends ready_but_has_open_questions if a Ready-to-execute file still has an unresolved '## Open questions'."""
- if prefix not in ("TODO", "READY") or not normalized_status.startswith(READY_TO_EXECUTE_PREFIX):
+ """Appends ready_but_has_open_questions if a file that declares itself ready -- by READY- filename
+ prefix or by status wording -- still has an unresolved '## Open questions'."""
+ if prefix not in ("TODO", "READY"):
+ return
+ # Union of the two declarations, not the status phrase alone. The READY- prefix IS the board's
+ # structural declaration that an item has no unresolved open questions left (see the prefix table
+ # above), so gating on the prose phrase instead made the check dodgeable by wording: a READY- file
+ # whose status opens with anything else ("In progress -- ...", "No open decision blocks this item.")
+ # carried its unresolved questions straight past this check. The phrase condition is kept so an item
+ # that declares readiness in prose without the rename is still gated.
+ declares_ready = prefix == "READY" or normalized_status.startswith(READY_TO_EXECUTE_PREFIX)
+ if not declares_ready:
return
oq_section = extract_section(text, "Open questions")
if oq_section is not None and open_questions_are_unresolved(oq_section):
- flags.append(("ready_but_has_open_questions", "Status says 'Ready to execute' but '## Open questions' still has unresolved item(s)."))
+ flags.append((
+ "ready_but_has_open_questions",
+ "File declares itself ready (READY- filename prefix, or a 'Ready to execute' status) but "
+ "'## Open questions' still has unresolved item(s).",
+ ))
def _flag_ready_but_wave_accepted(prefix: str, normalized_status: str, text: str, closed_waves: frozenset, flags: list) -> None: