Skip to content

Commit 1842d2b

Browse files
Fix four obvious bugs from PR #230 review (#256)
* Fix four obvious bugs found in review of PR #230 - SKILL.md §6 Step 6: stale §5.4 cross-reference updated to §5.5 after the Rollout status heading was renumbered (§5.4 is now Pie chart row) - SKILL.md comp_req_cell(): trlc=True with both counts zero returned "✅ Available (0/0 comp_req [TRLC])" instead of "❌ Open" because the zero-guard only fired when parts was empty, but trlc forced a part entry; fix: check ct==0 and at==0 unconditionally before building parts - SKILL.md §6a.2: count_directives() was referenced but never defined; replaced with count_directives_with_status(...)[1] - quality_runners.py: zip() paired unit-test and coverage dicts by position, silently dropping rust coverage exit codes beyond the first module; replaced with a flat check over the merged dict * style: collapse any() to single line to satisfy ruff
1 parent 12e734a commit 1842d2b

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/skills/overall-status/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -807,13 +807,13 @@ def comp_req_cell(contents, *, trlc=False):
807807
for c in contents:
808808
v, t = count_directives_with_status(c, ('comp_req',)); cv+=v; ct+=t
809809
v, t = count_directives_with_status(c, ('aou_req',)); av+=v; at+=t
810+
if ct == 0 and at == 0: return "❌ Open"
810811
parts = []
811812
if ct or trlc: parts.append(f"{cv}/{ct} comp_req" + (" [TRLC]" if trlc else ""))
812813
if at: parts.append(f"{av}/{at} AoU")
813-
if not parts: return "❌ Open"
814814
body = " + ".join(parts)
815815
tot_v, tot_t = cv + av, ct + at
816-
if tot_t == 0 or tot_v == tot_t: return f"✅ Available ({body})"
816+
if tot_v == tot_t: return f"✅ Available ({body})"
817817
return f"🔄 {tot_v*100//tot_t}% ({body})"
818818
```
819819

@@ -885,7 +885,7 @@ Stop and investigate if:
885885
### Step 6 — Write the RST
886886

887887
Update each PA's module table and the **Rollout status** `raw:: html`
888-
block above it (see §5.4). Source links as in §5.2. Pie-chart row and the
888+
block above it (see §5.5). Source links as in §5.2. Pie-chart row and the
889889
`Process Status` rubric stay unchanged unless the sphinx-needs tag
890890
changes.
891891

@@ -1040,8 +1040,8 @@ contribute 0.
10401040
> Rationale: the charts visualise *scope growth* across releases, not
10411041
> validation maturity. Drafts and invalids count.
10421042
>
1043-
> Practical consequence: use `count_directives(...)` (returns total only),
1044-
> **never** `count_directives_with_status(...)` for chart numbers. This is
1043+
> Practical consequence: use `count_directives_with_status(...)[1]` (returns total only),
1044+
> **never** the full return value of `count_directives_with_status(...)` for chart numbers. This is
10451045
> particularly important for Lifecycle, whose feature-level requirements
10461046
> were largely `:status: draft` or `:status: invalid` in v0.5/v0.6 — a
10471047
> valid-only counter would report 0 instead of ~92.

scripts/quality_runners.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,7 @@ def main() -> bool:
339339
pprint(coverage_summary, width=120)
340340

341341
# Check all exit codes and return non-zero if any test or coverage extraction failed
342-
return any(
343-
result_ut["exit_code"] != 0 or result_cov["exit_code"] != 0
344-
for result_ut, result_cov in zip(unit_tests_summary.values(), coverage_summary.values())
345-
)
342+
return any(r["exit_code"] != 0 for r in {**unit_tests_summary, **coverage_summary}.values())
346343

347344

348345
if __name__ == "__main__":

0 commit comments

Comments
 (0)