Documentation
¶
Overview ¶
Package sources resolves requirement-ID prefixes to their origin: a local flatfile series (e.g. CBIN-105) or an external ticket system (JIRA, GitLab, GitHub) configured in .canary/project.yaml under `sources:`. CANARY: REQ=CBIN-201; FEATURE="TicketSources"; ASPECT=Engine; STATUS=TESTED; TEST=TestCANARY_CBIN_201_RegistryPattern; UPDATED=2026-08-28
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry answers ID-shaped questions for a set of sources.
func Default ¶
func Default() *Registry
Default returns the registry used when no sources are configured: the historical CBIN flatfile series.
func FromProjectConfig ¶
func FromProjectConfig(cfg *config.ProjectConfig) *Registry
FromProjectConfig builds a registry from a parsed project config. When the config declares no sources, a flatfile source is synthesized from project.key; if the key is empty or invalid, falls back to Default() (CBIN).
func LoadFromRoot ¶
LoadFromRoot reads .canary/project.yaml under root. Any error falls back to Default() — sources config must never break a scan.
func NewRegistry ¶
NewRegistry validates the sources and builds the combined ID pattern.
func (*Registry) ClaimPattern ¶
ClaimPattern matches "✅ <ID>" gap-analysis claim lines (ID in group 1).
func (*Registry) Normalize ¶
Normalize zero-pads flatfile IDs to at least 3 digits (CBIN-42 → CBIN-042). External ticket IDs and unknown prefixes are returned verbatim.