Per pythia python#80 python#4 [chat 2026-04-22 19:12Z] + supervisor [chat L2105]
python#4 assignment: count_emit_methods.sh closes /144 vector specifically;
no analogous script for §1b TU counts (the count that lapsed
4 times today: /144, /38 INVOKE_*, /24 §1b, /5 §1a).
This script anchors W25 §1b TU baseline mechanically:
- Enumerates TUs in Python/jit/hir/ that include hir_basic_block_c.h
- Categorizes each as "with extern decls" (Step B cleanup target) vs
"type-only" (no-op for Step B)
- Uses the narrow lint pattern from spec §3 Step C — same pattern
Step B's lint gate will install
Reference values verified at HEAD e6a8a2d (post-W25-Step-A, push 65):
TOTAL: 17 §1b TUs
WITH extern decls (lint-pattern match): 7 (Step B cleanup targets)
TYPE-ONLY: 10 (no-op for Step B)
DISCREPANCY from spec §1b table (9 with externs / 8 type-only at
b808cda): spec used BROADER grep (any "extern.*hir_") which counts
non-API externs (e.g. hir_liveness_* in refcount_env_c.c). This script
uses the NARROW lint-pattern grep matching spec §3 Step C — the actual
gate Step B will install. refcount_env_c.c + refcount_pass_c.c
correctly classified as type-only-for-Step-B (their non-API externs
won't fail the lint gate).
This shifts Step B planning: 7 cleanup-target TUs (not 9), still 5-10
small commits per spec §3.
Pythia python#80 python#4 + python#1 substance closed:
- python#1 stale 17/9/8 count post-Step-A: re-verified 17/7/10 at HEAD
- python#4 method-specific scripts: pattern broadened — now 2 baseline
scripts (count_emit_methods.sh + count_w25_b1b_tus.sh). Future
consolidation to scripts/count_phoenix_baselines.sh dispatcher
possible if more baselines accrue.
Authorization chain:
- pythia python#80 python#4 surfaced gap: chat L2104
- supervisor python#4 assignment: chat L2105
Add a paragraph at the top for users, not builders, of Python.
Use nicer rst url syntax to avoid borking paragraphs in the plain text.
Contributed by Ned Batchelder @nedbat
(cherry picked from commit 3cdbd68)