13 KiB
Legacy Host Classification Audit
Date: 2026-03-05
Scope: pulse repo only, focused on v6-facing paths and release verification artifacts.
Verdict
No additional active v6 runtime leaks were found after fixing the agent-registration journey.
The remaining host references in v6-adjacent code fall into three intentional buckets:
- Compatibility boundaries that explicitly reject or normalize legacy input.
- Internal state or wire-format shims that still bridge older model names to v6-facing output.
- Non-resource semantics where
hostmeans hostname, SSH host key, backup type, or endpoint host.
Release Decision
Release can proceed on the host-type migration question.
Reasoning:
- canonical v6 request/resource surfaces now reject removed
hostaliases - the known release-facing registration leak has been fixed
- remaining
hostnaming is contained inside compatibility, ingest, topology, or DTO layers - added ratchets now pin the most important release-facing regression points
This audit does not claim that all host-era naming is gone.
It claims that the remaining naming debt is not evidence of canonical v6 behavior drifting back to the removed host resource type.
Must Remove
None found in active v6 runtime/read surfaces during this pass.
The previously-found leak is now fixed:
tests/integration/tests/journeys/04-agent-install-registration.spec.tstests/integration/evals/tasks/agent-registration.md
Those artifacts now require unified resources[] and agent.type = "unified".
Intentional Compatibility Boundaries
These are correct to keep because they harden v6 against old clients or old persisted inputs:
internal/api/resources_test.goConfirms/api/resources?type=hostis rejected.internal/api/org_handlers_test.goConfirms organization sharing rejectsresourceType: "host".internal/api/ai_handler_test.goConfirms legacy chat mention aliases likehost,container, andk8sare dropped.internal/api/ai_handlers_test.goConfirmstarget_type: "host"is rejected for run-command normalization.internal/monitoring/monitor_helpers.goKeeps explicit legacy-agent detection: onlyagent.type = "unified"is canonical.
Intentional Internal Shims
These are still legacy-shaped internally, but they are not evidence of v6 model leakage:
internal/monitoring/monitor.gomonitorLegacyResourceType()is the frontend wire-shape mapper for/api/statebroadcast payloads. It emits canonical v6-facing types likeagent,node, anddocker-host.internal/models/state_snapshot.goStateSnapshotandResolveResource()still model host-agent state for producer/wire compatibility. This is not the canonical read model;ReadStateand unified resources are.
Internal Models Follow-Up
The remaining internal/models host-era surface is still serving live compatibility and routing work.
It should not be treated as dead migration residue.
Must Remain For Release
internal/models/models.goHost,HostSensorSummary,HostDiskSMART,ClearAllHosts(),LinkHostAgentToNode(), andUnlinkHostAgent()still back the host-agent ingest and linking flow.internal/models/models_frontend.goHostFrontendand theStateFrontend.Hostsfield remain part of the internal/frontend wire DTO layer./api/statestrips that array for the canonical v6 contract, but the model still exists for compatibility, websocket shaping, mock data, and legacy-facing internal consumers.internal/models/converters.goHost -> HostFrontendconversion is still the compatibility bridge from host-agent state into the older frontend DTO family.internal/models/state_snapshot.goStateSnapshot.HostsandResolveResource()still support host-agent lookup/routing for compatibility flows.
Active Runtime Boundaries Still Using That Surface
internal/api/router.goMetrics/history and live metric fallback still readsnap.Hostswhen the canonical resource type isagent.internal/api/agent_ingest.goHost agent lookup and registration validation still scan the livesnap.Hostssnapshot.internal/monitoring/monitor_agents.goApplyHostReport()still writes intomodels.Hoststate before unified-resource ingestion layers consume it.internal/ai/chat/context_prefetch.goChat mention prefetch already usesReadState.Hosts()and maps those records to canonicalagentmentions. This is canonical at the read boundary even though the underlying source model is still namedHost.
API Runtime Follow-Up
The remaining host-era naming inside internal/api is concentrated in compatibility handlers and helper locals.
It is still part of the supported release path for agent install, lookup, and live metric fallback.
Must Remain For Release
internal/api/agent_ingest.goHostAgentHandlersis still the compatibility boundary for the Pulse Unified Agent runtime. It readsGetLiveStateSnapshot().Hoststo:- validate installer lookup requests
- resolve config fetch scope
- enforce token-to-agent ownership
internal/api/router.golive metric fallback still resolves canonicalagentresources throughsnap.Hostswhen building instant metric points for runtime reads.internal/api/host_agents_test.gokeeps the lookup/install compatibility behavior pinned while those handlers still exist.
Why This Is Not A V6 Leak
- The external resource type at the API boundary is still
agent, nothost. - The remaining host-era code is operating on compatibility storage names (
models.Host,snap.Hosts) after canonical request normalization has already happened. - Existing API tests already pin explicit rejection of removed
hostaliases in:- AI/chat
- org shares
- reporting
- metrics history
- resources/discovery
Post-Release Refactor Targets
These are the next cleanup candidates once the host-agent compatibility/state layer is intentionally renamed or retired:
internal/api/router.golocal helpers likefindHostand comments that still describe theagentpath in host-era termsinternal/api/agent_ingest.goHostAgentHandlersnaming, localhostvariables, andsnap.Hostscommentsinternal/api/host_agents_test.gotest names and fixtures that still describe the canonical agent flow ashostlookup/config management
These are naming/structure refactors, not release blockers.
Post-Release Rename Candidates
These look like rename-only cleanup once the host-agent compatibility/state layer is intentionally retired or renamed:
internal/models/models.goHost,HostSensorSummary,HostDiskSMART,HostCephClusterinternal/models/models_frontend.goHostFrontend,HostSensorSummaryFrontend,HostDiskSMARTFrontendinternal/models/converters.goToFrontend converts a Host to HostFrontendinternal/models/state_snapshot.gocomments likeCheck generic Hostsand thehostslocal variable naming
These are naming debt, not current v6 correctness bugs.
Monitoring Runtime Follow-Up
The remaining host-era surface in internal/monitoring is the active ingest and correlation bridge for
Pulse Unified Agent reports. It is still required for release.
Must Remain For Release
internal/monitoring/monitor_agents.goApplyHostReport()still ingests unified-agent reports intomodels.Hostcompatibility state before unified-resource ingestion and correlation layers consume them.internal/monitoring/monitor.gohelper paths likemergeHostAgentSMARTIntoDisks()and the live host snapshot readers still merge host-agent data into node/disk/runtime views.internal/monitoring/monitor_helpers.goisLegacyAgent()and the host sensor/Ceph/SMART conversion helpers still bridge agent payloads into the compatibility state model.internal/monitoring/host_agent_temps.gostill uses host-agent sensor data as the authoritative temperature source for linked nodes.internal/monitoring/monitor_host_agents_test.gopins host-agent offline/recovery behavior while this compatibility layer remains live.
Why This Is Not A V6 Leak
- At the canonical read boundary, those ingested records become unified
agentresources. - The remaining
Hostnaming is inside the producer/correlation layer, which is exempt from theReadStateconsumer-only bans. - Monitoring is still the write/ingest side of the architecture, not the canonical v6 read model.
Post-Release Refactor Targets
These are valid rename/structure candidates after the host-agent compatibility state is intentionally retired:
internal/monitoring/monitor_agents.gofunction names likeApplyHostReport,RemoveHostAgent,LinkHostAgent,UnlinkHostAgentinternal/monitoring/monitor.gocomments and helper locals that still describe canonicalagentdata ashostinternal/monitoring/host_agent_temps.gohelper names that still encodehost agentterminology even though the canonical resource type isagent
These remain naming debt, not release blockers.
AI And Service Discovery Follow-Up
The remaining host-era naming in internal/ai and internal/servicediscovery is mostly internal execution
and topology language, not canonical API/resource typing drift.
Must Remain For Release
internal/ai/chat/context_prefetch.goReadState.Hosts()is still used to discover unified-agent backed resources for chat mentions, but the emitted mention type is canonicalagent.internal/ai/tools/adapters.goandinternal/ai/tools/tools_storage.goAI tools still consumeunifiedresources.HostViewfor RAID/SMART/Ceph data exposed by unified agents. This is already on the canonical read model even though the view name still saysHost.internal/servicediscovery/service.gothe discovery service still materializes an internalStateSnapshot.Hosts []Hostrepresentation for topology analysis, hostname resolution, and redirecting scans to linked agents.internal/servicediscovery/deep_scanner.gocommand routing still talks about the agent running “on this host”, but the actual target type for canonical execution remainsagent.
Why This Is Not A V6 Leak
internal/aialready rejects removedhostaliases at the API boundary and works with canonicalagentexecution targets internally.internal/ai/toolsreads host-agent data through unified-resource views (HostView) rather than through legacystate.hostsAPI payload assumptions.internal/servicediscoveryuseshostas an internal topology concept for machines discovered via the unified agent, not as an exposed removed resource type token.
Post-Release Refactor Targets
These are rename/structure candidates once the compatibility naming debt is worth paying down:
internal/servicediscovery/service.gointernalHostandStateSnapshot.Hostsnaminginternal/servicediscovery/deep_scanner.gocomments and helper names that still talk about “host” instead of agent-backed machine resourcesinternal/ai/toolsuser-facing text strings like “host agents” and helper names keyed onHostView/toolHost*
These are naming debt, not release blockers.
Non-Resource Host Terminology
These are unrelated to the removed v5 resource type and should not be treated as migration debt:
internal/mock/generator.goBackup payloads useType: "host"to mean PMG host config backups, not unified resources.internal/monitoring/knownhosts.goSSH known-hosts management.- Node configuration and endpoint code using
hostas a network address or URL host field.
Ratchets Added
internal/unifiedresources/code_standards_test.goAddedTestV6AgentRegistrationArtifactsStayCanonicalto:- scan all
tests/integration/tests/**/*.{ts,tsx}andtests/integration/evals/**/*.mdfor legacy host-resource usage patterns - prevent regressions in:
tests/integration/tests/journeys/04-agent-install-registration.spec.tstests/integration/evals/tasks/agent-registration.md
- scan all
The ratchet bans:
state.hostshosts arraytype: 'host'agent.type = "host"resourceType: "host"/resourceType: 'host'/api/resources?type=host
And requires:
-
unified
resources[] -
unified agent marker
type: 'unified'/agent.type = "unified" -
internal/unifiedresources/code_standards_test.goAddedTestV6ReleaseFacingAPITestsCoverLegacyHostRejectionto pin release-facing API tests that explicitly reject removedhostaliases in chat, AI actions, org shares, reporting, and metrics history.
Post-Release Queue
Priority 1: unblock and finish executable guardrails
- restore a green compile/test surface around
internal/api,internal/ai/tools, andinternal/unifiedresources - land the blocked API-level normalizer ratchets for reporting and metrics history
Priority 2: rename compatibility-layer terminology
internal/api/agent_ingest.gointernal/monitoring/monitor_agents.gointernal/models/models.gointernal/models/models_frontend.gointernal/models/converters.gointernal/servicediscovery/service.go
Priority 3: collapse remaining compat storage when feasible
- retire
StateSnapshot.Hosts/models.Host*only after agent-ingest, monitoring, routing, and discovery no longer require the compatibility bridge - only do this alongside a deliberate compatibility-removal plan, not as opportunistic cleanup