feat: deploy shared LHP-v2 agentic coordination plane - #435
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2026c7c)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
Persistent review updated to latest commit 2026c7c |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2026c7c1d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c95e1e96d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - "[2a0c:b641:b50:2::d0]:9100" # ci (privileged runner) | ||
| - "[2a0c:b641:b50:2::e0]:9100" # netproxy | ||
| - "[2a0c:b641:b50:2::f0]:9100" # loop (Engineering Loop / Knowledge MCP) | ||
| - "[2a0c:b641:b50:2::100]:9100" # soc (dedicated SOC Agent) |
There was a problem hiding this comment.
Gate the SOC scrape target until node_exporter exists
When this dark scaffold merges before the SOC VM has been provisioned and applied, app-promotion-deploy sees configs/mon/prometheus.yml changed and deploys Prometheus immediately even though the SOC play is skipped until soc_agent_version is a 40-character SHA. This new node-infra target will have up == 0, which the existing NodeExporterDown critical rule in configs/mon/prometheus-rules/noc-tripwire.yml fires on after 2 minutes. Please add this scrape target only with the SOC promotion/apply path, or otherwise suppress it until SOC node_exporter is installed.
Useful? React with 👍 / 👎.
|
|
||
| network_flows_outbound: | ||
| - { to: loop, proto: tcp, port: 8771, purpose: "signed LHP-v2 coordination" } | ||
| - { to: loop, proto: tcp, port: 8770, purpose: "agent-core trace and insight emission" } |
There was a problem hiding this comment.
Allow SOC to reach the trace collector
When SOC insights or trace emission are enabled, this declares SOC will send to the loop collector on 8770, but the destination firewall in ansible/inventory/host_vars/loop.yml still allows that port only from loop, NOC, and mon. The SOC promotion flow even applies the loop firewall before SOC, so the SOC → agent-core collector path described in the runbook will be dropped and the InsightDecisionRecords needed for SOC promotion criteria cannot populate. Please add peers.soc.ipv6 to the loop 8770 allowlist or keep this egress disabled until the destination rule exists.
Useful? React with 👍 / 👎.
| and soc_redteam_enabled | bool | ||
| and soc_redteam_allow_active_probes | bool | ||
| and soc_redteam_max_tier | int == 2) | ||
| - not (soc_probe_timer_enabled | bool) or soc_mode in ['probe_dry', 'probe_live'] |
There was a problem hiding this comment.
Require coordinator approval before probe timers
When a later promotion sets soc_mode to probe_dry/probe_live and enables soc_probe_timer_enabled but forgets soc_coordinator_enabled, this assertion still passes and the role will start soc-probes.timer with SOC_REDTEAM_ALLOW_ACTIVE_PROBES=1 while SOC_COORDINATOR_ENABLED=0. The new probe service is a coordinator-polling worker and the runbook says probe rungs require central exact-scope senior approval, so the guard should require the coordinator to be enabled before any probe timer/probe rung can run.
Useful? React with 👍 / 👎.
| ansible.builtin.systemd: | ||
| name: noc-coordinator-worker.service | ||
| enabled: "{{ noc_coordinator_worker_enabled | bool }}" | ||
| state: "{{ 'started' if noc_coordinator_worker_enabled | bool else 'stopped' }}" |
There was a problem hiding this comment.
Restart the NOC coordinator worker on app upgrades
When noc_coordinator_worker_enabled is true and a later promotion changes noc_agent_version, the clone and uv sync tasks only notify restart noc-agent and restart noc-agent-bot; this new state task uses started, so an already-running noc-coordinator-worker.service keeps executing the old checkout until a manual restart or unrelated env render happens. Please include restart noc coordinator worker in the code/dependency-change notifications or otherwise force a restart when the pinned NOC app changes.
Useful? React with 👍 / 👎.
| enabled: "{{ knowledge_loop_coordinator_enabled | bool }}" | ||
| state: >- | ||
| {{ | ||
| 'started' |
There was a problem hiding this comment.
Restart the Knowledge coordinator on app upgrades
When knowledge_loop_coordinator_enabled is true and knowledge_loop_version changes, the checkout and dependency sync tasks notify only the Knowledge Loop timer, while this new coordinator service state remains started and does not restart an active hyrule-knowledge-coordinator.service. The long-running coordinator therefore keeps the old code after a promotion until a manual restart or template change occurs; please notify restart knowledge coordinator on runtime checkout/dependency changes too.
Useful? React with 👍 / 👎.
Outcome
Ships the dark-by-default production scaffold for the organization-wide LHP-v2 coordination plane and dedicated SOC Agent VM.
What changes
loopwith Postgres, Vault, overlay firewalling, health monitoring, and exact-SHA apply gates;socinventory/DNS/NoCloud/logging/monitoring/firewall surface;Deployment order
docs/runbooks/agentic-coordination-shadow-cutover.mdone reviewed stage at a time.No production apply or mode promotion is performed by this PR.
Validation
scripts/ci/iac-static.sh— 109 tests, DNS parsers, generated-flow freshness, deploy preflight: pass