Skip to content

Node Manager Phase 2a-2: acl ItemKind, verify pass & engine hardening#3954

Merged
Apollon77 merged 12 commits into
node-managerfrom
node-manager-phase2a2
Jun 22, 2026
Merged

Node Manager Phase 2a-2: acl ItemKind, verify pass & engine hardening#3954
Apollon77 merged 12 commits into
node-managerfrom
node-manager-phase2a2

Conversation

@Apollon77

Copy link
Copy Markdown
Collaborator

Sub-PR into node-manager (umbrella PR #3948 picks it up in CI). Phase 2a-2 makes the 2a-1 reconciler engine real end-to-end with the first concrete ItemKind.

What's in it

  • Verify pass re-pends drift for any mode (planActions): reconcile(verify:true) == JFDS RefreshNode. converge re-checked only on explicit verify; maintain auto-verifies on periodic passes.
  • ItemKind.verify?() added to the @matter/node Tier-1 interface — kinds own device read + match; engine builds driftedKeys from false results.
  • acl ItemKind (@matter/node-manager): per-entry intent, additive coexistence (never removes foreign/admin entries; appends our exact entry only when not covered; OMIT_FABRIC writes), per-(subject × target)-cell subsumption verify (tolerates device-side compression/split), capacity = accessControlEntriesPerFabric. Reads fabric-filtered. Compression deferred to Phase 4 (Tier-3 optimizer).
  • Engine: verify-wiring, acl auto-registration + public registerItemKind().
  • Hardenings (deferred from 2a-1): Add tlv schema for unsigned integer #3 capacity-read failure isolation, Update package name so it can be published to npm #4 in-flight reconcile coalescing (InFlightGuard), Add build and test before merging to main #5 start-after-dispose guard.
  • Logging (debug + a capacity-skip notice, docs/LOGGING.md-conformant; steady state quiet).
  • Priority bands (keyset/group/membership/acl, acl last).
  • Test harness promoted to @matter/node/testing (MockSite/MockServerNode/MockExchange/node-helpers), so @matter/node-manager (and future phases) can commission peers in tests. 65 node test files repointed.
  • ReconcilerBehavior.early = true so it initializes before subscription/peer events (matches NetworkBehavior/CommissioningClient).

Tests

  • Single-peer commissioning integration test (4 scenarios): apply intent → committed + admin intact; subscription down → pending → drains on reconnect; ACL full → AclCapacityExceededError; mutate ACL behind the engine → verify re-pends + re-applies.
  • build --clean, format-verify, lint green; @matter/node-manager 40/40; @matter/node 1223/1223.

Review

Whole-branch opus review: merge-ready, zero Critical/Important. ACL subsumption verified to have no false-positive (security-relevant direction); admin-ACL clobber-safety confirmed.

🤖 Generated with Claude Code

Apollon77 and others added 11 commits June 20, 2026 18:53
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rity bands

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ng, dispose race

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ting

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ard test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… tradeoff

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mergify

mergify Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

… unread

Pre-flight admission stays meaningful instead of failing open; the device
write remains the authoritative gate for over-capacity (RESOURCE_EXHAUSTED).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Apollon77 Apollon77 merged commit 6bccb13 into node-manager Jun 22, 2026
2 checks passed
@Apollon77 Apollon77 deleted the node-manager-phase2a2 branch June 22, 2026 11:43
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.

1 participant