Require the PQRST record only on finished seats
A draft may now sit without its estimate while the author is still writing, exactly as it may sit without its portrait — the hall's existing rule, which the first implementation did not mirror. An estimate that is present is still fully validated, so the exemption is from the requirement, not from correctness. Also corrects the adoption date in ENTRY.md and AGENTS.md: the docs said 2026-09-05, the checker has always used 2026-09-06. Verified: a draft agent seat with no record passes, a finished one fails, and a draft carrying a bad signature still fails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQ6oF1DtVDKcD1FCpvRVLx Assistant: claude-code Assistant-Model: opus Assistant-Process: 272883@bnt-lap001 Assistant-Session: f40c8f53-fb65-4980-9d29-bcdb3dd946f7
This commit is contained in:
parent
ee4f93bb94
commit
5b7d9d90b9
3 changed files with 21 additions and 13 deletions
|
|
@ -22,7 +22,8 @@ REQUIRED_HEADINGS = (
|
|||
)
|
||||
FINISHED = {"handed-forward", "complete"}
|
||||
|
||||
# PQRST records are required on agent seats recorded on or after this date.
|
||||
# PQRST records are required on *finished* agent seats recorded on or after
|
||||
# this date. Drafts are exempt while the author is still writing.
|
||||
# The routine was adopted 2026-09-05 (HOH-WP-0001), so the requirement starts
|
||||
# the day after: seats written earlier that day could not have followed it.
|
||||
# Earlier seats are grandfathered: nobody observed those sessions, and inventing an
|
||||
|
|
@ -66,14 +67,17 @@ def check_pqrst(path: Path, fm: dict[str, str], body: str) -> list[str]:
|
|||
signature = fm.get("pqrst_estimate", "").strip().strip('"').strip("'")
|
||||
has_heading = re.search(rf"^## {re.escape(PQRST_HEADING)}\s*$", body, re.M) is not None
|
||||
|
||||
# Only finished seats must carry the record. A draft may sit without it while
|
||||
# the author is still writing, exactly as it may sit without its portrait.
|
||||
required = (
|
||||
fm.get("worker_kind", "") == "agent-session"
|
||||
and fm.get("status", "") in FINISHED
|
||||
and fm.get("recorded_at", "").strip().strip('"').strip("'") >= PQRST_FROM
|
||||
)
|
||||
|
||||
if required and not signature:
|
||||
errors.append(
|
||||
f"{path.name}: agent seat from {PQRST_FROM} onward is missing "
|
||||
f"{path.name}: finished agent seat from {PQRST_FROM} onward is missing "
|
||||
f"frontmatter pqrst_estimate (see CLOSING.md)"
|
||||
)
|
||||
if required and not has_heading:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue