Expand description
Anchor resolution for nmbrs report --add (SRD-64 §6.1).
Decides where in the workload YAML a promoted report item
should live: workload root, a named scenario / phase /
op-template, or — when --contextual <mode> is used — a
scope derived from the session’s emitted data.
§Inputs
- The active session’s
metrics.db(label vocabularies +session_metadatarows). - The
nmbrs_workload::report::ReportItemthe user is promoting, with itswhere/byfilter clauses parsed out. - The CLI anchor flag — none /
--at/--contextual.
§Output
A nmbrs_workload::edit::Anchor plus a human-readable
diagnostic string the dispatcher prints before the
YAML write.
§Levels supported today
| Level | Source | Phase D status |
|---|---|---|
| root | always available | shipped |
| scenario | session_metadata.scenario | shipped |
| phase | label_key.key='phase' | shipped |
| op | requires schema extension | hard error |
Op-template anchoring needs an op_template label key
that the runtime doesn’t currently emit. When it does,
adding it here is one match arm + one query.
Structs§
- Anchor
Resolution - Resolved anchor + a diagnostic line describing how the resolver decided.
Enums§
- Anchor
Flag - CLI anchor flag, pre-parsed from the
--at/--contextualcommand-line surface. Mirrors the SRD-64 §6.1 grammar.
Functions§
- resolve
- Resolve an anchor for
itemindb_path’s session, honouringflag. Returns the chosen anchor + a one-line diagnostic the dispatcher prints before writing.