chore(canon): sync work-record identifier grammar
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a02b22-9638-76d2-bbff-b7ea1770b118
This commit is contained in:
parent
762fa919db
commit
2f74cbd3dd
2 changed files with 11 additions and 2 deletions
|
|
@ -6,14 +6,15 @@ status: active
|
|||
kinds:
|
||||
- kind: workplan
|
||||
id_patterns:
|
||||
- "^[A-Z]+-WP-[0-9]{4}$"
|
||||
- "^[A-Z][A-Z0-9]*(?:-[A-Z][A-Z0-9]*)*-WP-[0-9]{4}$"
|
||||
- "^ADHOC-[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
||||
legacy_patterns:
|
||||
- pattern: "^MASON-0001$"
|
||||
source: ops-mason bootstrap workplan created before WP infix convention
|
||||
grandfathered: true
|
||||
- kind: task
|
||||
id_patterns:
|
||||
- "^[A-Z]+-WP-[0-9]{4}-T[0-9]{2,3}$"
|
||||
- "^[A-Z][A-Z0-9]*(?:-[A-Z][A-Z0-9]*)*-WP-[0-9]{4}-T[0-9]{2,3}$"
|
||||
- "^ADHOC-[0-9]{4}-[0-9]{2}-[0-9]{2}-T[0-9]{2}$"
|
||||
legacy_patterns:
|
||||
- pattern: "^[A-Z]+-WP-[0-9]{4}-T[0-9]$"
|
||||
|
|
|
|||
|
|
@ -46,6 +46,14 @@ def test_grandfathered_mason_identity_is_loaded_from_canon_registry() -> None:
|
|||
assert classify_record_id("task", "MASON-0001-T01") == "grandfathered"
|
||||
|
||||
|
||||
def test_current_canon_accepts_repository_and_ad_hoc_workplan_forms() -> None:
|
||||
assert classify_record_id("workplan", "RAPP-OPENBAO-WP-0002") == "canonical"
|
||||
assert classify_record_id("task", "RAPP-OPENBAO-WP-0002-T01") == "canonical"
|
||||
assert classify_record_id("workplan", "ADHOC-2026-08-23") == "canonical"
|
||||
assert classify_record_id("task", "ADHOC-2026-08-23-T01") == "canonical"
|
||||
assert classify_record_id("workplan", "RAPP--OPENBAO-WP-0002") is None
|
||||
|
||||
|
||||
def test_same_id_and_uuid_indexes_once_with_cleanup_diagnostic(tmp_path: Path) -> None:
|
||||
_write_mason_workplan(tmp_path, "ede1aa62-fc42-494a-9984-3190a52481af")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue