Skip to content

S7.A: phase2-conditions-ssa-leader — stable SSA field managers (first sub-slice) - #72

Merged
Pal Lakatos-Toth (pallakatos) merged 1 commit into
devfrom
phase2-conditions-ssa-leader
Apr 28, 2026
Merged

Pal Lakatos-Toth (pallakatos) merged 1 commit into
devfrom
phase2-conditions-ssa-leader

Conversation

@pallakatos

Copy link
Copy Markdown
Collaborator

Slice: S7.A — first of the §10.4 #1 SSA / Conditions / leader-election train.

Central field-manager registry, eliminates the five bare \"azureclaw-controller\" / \"azureclaw-mesh-peer\" literals scattered across reconciler call sites.

Surfaces

  • New controller/src/field_managers.rs — single source of truth for every SSA fieldManager the controller emits. 13 named constants + an ALL_FIELD_MANAGERS registry slice.
  • 4 new invariant tests (uniqueness, namespaced-format, no bare-controller-reuse, legacy-string match) keep the registry honest.
  • All 19 bare-string SSA sites across reconciler/mod.rs, pairing*.rs, mesh_peer/* migrated to named constants. Every site already used .force() so field-ownership transition is transparent.
  • mesh_peer/* constants kept the legacy string verbatim — zero migration.
  • providers::field_managers preserved as backwards-compat re-export.

Tests

Controller test count 324 → 328 (+4 invariant tests). Workspace clippy + fmt clean.

Audit

docs/security-audits/2026-04-28-phase2-conditions-ssa-leader.md

S7 sub-slice train

Remaining: B Conditions matrix (Progressing step-wise) → C leader election + predicated informers → D backoff + reconcile-DAG → E workqueue metrics + reconcile spans → F VAP/MAP expansion.

Pre-authorized to skip Container Image Scan check; admin-merge.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

… sub-slice)

§10.4 #1 ("Server-Side Apply on every emitted object with stable
field managers") landing in sub-slices. This is the first: central
field-manager registry + replacement of every bare-string SSA site.

- New `controller/src/field_managers.rs` — single source of truth.
  CLAWSANDBOX, PAIRING, MESH_PEER, MCP_SERVER, TOOL_POLICY, A2A_AGENT,
  INFERENCE_POLICY, CLAW_MEMORY, CLAW_EVAL constants + ROUTER_RECONCILER,
  PROVIDER_BRIDGE, MESH, RECONCILER. ALL_FIELD_MANAGERS registry +
  4 invariant tests (uniqueness, namespaced-format, no bare-controller,
  legacy-string match).

- 13 sites in `reconciler/mod.rs` and 3 in `pairing*.rs` previously
  used bare `"azureclaw-controller"` — now use namespaced constants.
  All sites had `.force()` so the field-ownership transition is
  transparent on existing clusters.

- 3 sites in `mesh_peer/{offload,pair}.rs` previously used bare
  `"azureclaw-mesh-peer"` — now use the constant `MESH_PEER` whose
  value is the legacy string verbatim (zero migration).

- 6 per-CRD `FIELD_MANAGER` constants in their respective reconciler
  files re-export from the central registry — same string, central
  source of truth.

- `providers::field_managers` preserved as backwards-compat re-export.

Controller tests: 324 → 328 (+4 invariant tests).
Workspace clippy + fmt clean.

Audit: docs/security-audits/2026-04-28-phase2-conditions-ssa-leader.md
S7 sub-slices remaining: B (Conditions matrix), C (leader election +
predicated informers), D (backoff + reconcile-DAG), E (workqueue
metrics), F (VAP/MAP expansion).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pallakatos
Pal Lakatos-Toth (pallakatos) merged commit 3e7bd3f into dev Apr 28, 2026
12 of 13 checks passed
@pallakatos
Pal Lakatos-Toth (pallakatos) deleted the phase2-conditions-ssa-leader branch April 28, 2026 21:57
Pal Lakatos-Toth (pallakatos) added a commit that referenced this pull request May 12, 2026
… sub-slice) (#72)

§10.4 #1 ("Server-Side Apply on every emitted object with stable
field managers") landing in sub-slices. This is the first: central
field-manager registry + replacement of every bare-string SSA site.

- New `controller/src/field_managers.rs` — single source of truth.
  CLAWSANDBOX, PAIRING, MESH_PEER, MCP_SERVER, TOOL_POLICY, A2A_AGENT,
  INFERENCE_POLICY, CLAW_MEMORY, CLAW_EVAL constants + ROUTER_RECONCILER,
  PROVIDER_BRIDGE, MESH, RECONCILER. ALL_FIELD_MANAGERS registry +
  4 invariant tests (uniqueness, namespaced-format, no bare-controller,
  legacy-string match).

- 13 sites in `reconciler/mod.rs` and 3 in `pairing*.rs` previously
  used bare `"azureclaw-controller"` — now use namespaced constants.
  All sites had `.force()` so the field-ownership transition is
  transparent on existing clusters.

- 3 sites in `mesh_peer/{offload,pair}.rs` previously used bare
  `"azureclaw-mesh-peer"` — now use the constant `MESH_PEER` whose
  value is the legacy string verbatim (zero migration).

- 6 per-CRD `FIELD_MANAGER` constants in their respective reconciler
  files re-export from the central registry — same string, central
  source of truth.

- `providers::field_managers` preserved as backwards-compat re-export.

Controller tests: 324 → 328 (+4 invariant tests).
Workspace clippy + fmt clean.

Audit: docs/security-audits/2026-04-28-phase2-conditions-ssa-leader.md
S7 sub-slices remaining: B (Conditions matrix), C (leader election +
predicated informers), D (backoff + reconcile-DAG), E (workqueue
metrics), F (VAP/MAP expansion).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants