Skip to main content

Module draft_resolver

Module draft_resolver 

Source
Expand description

Draft ID resolution — the single authoritative function for turning any user-supplied ID string into a concrete DraftPackage.

§Resolution order

  1. Exact UUID (cbda7f5f-4a19-4752-bea4-802af93fc020)
  2. Shortref/seq (6ebf85ab/1) — goal 8-char prefix + draft sequence number
  3. Legacy display_id (cbda7f5f-1)
  4. UUID prefix — unambiguous prefix of ≥4 chars (error if ambiguous)
  5. 8-char all-hex — resolves to the latest draft for that goal shortref
  6. Tag match

All draft subcommands route through resolve_draft so that every ID format surfaced in ta draft list is accepted as input by every command.

Enums§

DraftResolveError
Error returned when a draft ID cannot be resolved.

Functions§

draft_canonical_id
Return the canonical display ID for a draft — the string that resolve_draft will accept back as input.
resolve_draft
Resolve a user-supplied draft ID to the matching DraftPackage.