fix(registrar): register newly closed workplans
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a023c0-a0a3-7c03-b395-5a0d2757214d
This commit is contained in:
parent
833fa6e746
commit
69adfff48d
2 changed files with 31 additions and 5 deletions
|
|
@ -67,12 +67,21 @@ def _missing_identifiers(repo: Path) -> dict[str, list[str]]:
|
|||
parsed = parse_workplan_file(path, repo_root=repo)
|
||||
if parsed.frontmatter.get("type") != "workplan" or not parsed.id:
|
||||
continue
|
||||
# Closed records are frozen provenance under ADR-007. State Hub also
|
||||
# deliberately refuses to create missing task rows for them.
|
||||
if (parsed.status or "").strip().lower() in {"finished", "archived"}:
|
||||
continue
|
||||
if not parsed.state_hub_workstream_id:
|
||||
workplans.append(parsed.id)
|
||||
# C-06 creates a newly discovered workplan and its tasks as one
|
||||
# registration unit, including closed file-backed provenance.
|
||||
# Include those task gaps so post-verification cannot report a
|
||||
# false success after creating only the parent.
|
||||
for task in parsed.tasks:
|
||||
if task.id and not task.state_hub_task_id:
|
||||
tasks.append(task.id)
|
||||
continue
|
||||
# Once a closed workplan is linked, missing task identifiers are
|
||||
# frozen historical artefacts. State Hub's C-11 fixer deliberately
|
||||
# refuses to create them.
|
||||
if (parsed.status or "").strip().lower() in {"finished", "archived"}:
|
||||
continue
|
||||
for task in parsed.tasks:
|
||||
if task.id and not task.state_hub_task_id:
|
||||
tasks.append(task.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue