Skip to content

feat(trace-topology): IdentityUnknown reconciliation check (v0.11.0)#239

Open
avrabe wants to merge 1 commit into
mainfrom
feat/v0.11.0-reconciler-identity-unknown
Open

feat(trace-topology): IdentityUnknown reconciliation check (v0.11.0)#239
avrabe wants to merge 1 commit into
mainfrom
feat/v0.11.0-reconciler-identity-unknown

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 22, 2026

Summary

First of the five v1 deterministic checks — the start of the v0.11.0
reconciliation engine (design docs/designs/v0.10.0-trace-topology.md
§4.1; contract docs/contracts/spar-trace-topology-v1.md).

  • New engine module:
    • DeclaredModel — the declared-identity index, built once by walking
      an instantiated AADL SystemInstance and reading every component's
      Spar_Identity::MAC_Address / LLDP_Chassis_Id.
    • check_identity_unknown — flags any unicast MAC observed in a PCAPNG
      capture, or any LLDP neighbor chassis-id, that no AADL component
      declares. Emits ReconcileFinding::IdentityUnknown.
    • parse_mac / ReconcileError — the MAC-normalisation primitive and
      the engine's input-failure error type (CLI exit code 2).
  • Group-addressed (multicast / broadcast) MACs are exempt — they are
    reconciled against Multicast_Group, a connection-borne surface, not
    MAC_Address. Without this filter every capture would flood findings
    for LLDP / gPTP / broadcast protocol traffic.
  • Findings are deterministic: PCAPNG findings then LLDP findings,
    each ascending, each distinct identity reported once — finding order
    is a pure function of input content.

Deliberately deferred (documented in the module + commit)

  • Connection-borne identities (Stream_Handle, Multicast_Group,
    VLAN_ID) — declared on AADL connections, not components, so not
    reachable through the component property-map surface this module uses.
  • The other four checks (TopologyMissingWiring, ConfigDrift,
    GptpOutOfBudget, BinaryMismatch), the orchestrating reconcile(),
    and SARIF / in-toto emission — sibling v0.11.0 / v1.0 commits.

Artifacts: REQ-TRACE-TOPOLOGY-008 + TEST-TRACE-TOPOLOGY-IDENTITY-UNKNOWN.

Test plan

  • cargo test -p spar-trace-topology --lib -- engine::tests — 11 unit tests
  • cargo test -p spar-trace-topology --test identity_reconcile — 3 integration tests (instantiated AADL)
  • cargo clippy -p spar-trace-topology --all-targets — clean
  • cargo fmt --check — clean
  • rivet validate — 0 broken cross-refs; error/warning totals byte-identical to baseline

🤖 Generated with Claude Code

@avrabe avrabe enabled auto-merge (squash) May 22, 2026 20:45
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

Rivet verification gate

20/20 passed

count
Passed 20
Failed 0
Skipped (no steps) 0

Filter: (and (= type "feature") (or (has-tag "v093") (has-tag "v0100")))

Failed artifacts

(none)

Updated automatically by tools/post_verification_comment.py. Source of truth: artifacts/verification.yaml.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 96.23431% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-trace-topology/src/engine.rs 96.23% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

First of the five v1 deterministic checks (design §4.1). Adds the
`engine` module with `DeclaredModel` — the declared-identity index
built by walking an instantiated AADL SystemInstance — and
`check_identity_unknown`, which flags any unicast MAC observed in a
PCAPNG capture, or any LLDP neighbor chassis-id, that no AADL
Spar_Identity property declares.

Group-addressed (multicast / broadcast) MACs are exempt — they
reconcile against Multicast_Group, a connection-borne surface.
Findings are deterministic: PCAPNG findings then LLDP findings, each
ascending, each distinct identity once.

Connection-borne identities (Stream_Handle, Multicast_Group, VLAN_ID)
and the other four checks are deferred to sibling v0.11.0 commits;
they need the connection-property surface this module does not yet
reach. 11 unit tests + 3 instantiated-AADL integration tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avrabe avrabe force-pushed the feat/v0.11.0-reconciler-identity-unknown branch from 7185ee6 to d2aff49 Compare May 23, 2026 06:24
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