.agents/skills/project-writing-go-modules-framework-v2/go-v2-host-scope.md
This spec records the framework contract for Go collector v2 host-scope routing.
It applies to pkg/metrix, plugin/framework/jobruntime,
plugin/framework/chartengine, and v2 collectors that emit metrics for remote
or virtual-node targets.
metrix.HostScope{} is the default host scope.ScopeKey: stable scope partition key;GUID: Netdata host/vnode GUID;Hostname: Netdata host/vnode hostname when defining the host;Labels: deterministic host/vnode labels.Read() without ReadHostScope returns default-scope series only.Read(ReadHostScope(key)) returns only that scope's series.Reader.HostScopes() enumerates all scopes present in the snapshot and is not
filtered by the reader's active host scope.Reader.MetricMeta(name) is scope-local. A fresh reader may fall back to stale
metadata only in the active scope; neither fresh nor raw readers may return
peer-scope metadata.metrix.FreshVisibleHostScopesReader capability. It returns only scopes with a
series visible under freshness-filtered semantics.CommitCycleSuccess() error, not panics.chartengine.Engine is used per host scope for a job.postCheck requires FreshVisibleHostScopesReader; an incompatible metric
store fails before collection starts.metrix.HostScope GUID and host
metadata.metrix.CommitCycleSuccess() are still all-or-nothing.framework/vnoderegistry registry.HOST_DEFINE.chartengine.RuntimeAggregator.build_seq_violation_active is 1 when any observed engine reports a
sequence violation in the rollup, otherwise 0.meter.WithHostScope(scope) or equivalent scoped vec/instrument
bindings._vnode_type=<source> when a
collector creates virtual nodes from an internal mechanism rather than a
user-defined vnode entry. The value must identify the mechanism or source
without embedding high-cardinality target values._vnode_type=azure_workload.
Their GUID and ScopeKey are the deterministic SHA1 UUID of
azure_monitor: plus the trimmed, case-preserved tag value.