Skip to content

feat(trace): Spar_Identity property set + spar-trace-topology crate skeleton (v0.10.0 foundation)#205

Open
avrabe wants to merge 1 commit intomainfrom
feat/v0.10.0-trace-topology-foundation
Open

feat(trace): Spar_Identity property set + spar-trace-topology crate skeleton (v0.10.0 foundation)#205
avrabe wants to merge 1 commit intomainfrom
feat/v0.10.0-trace-topology-foundation

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 3, 2026

Summary

v0.10.0 trace-topology foundation (Track G). Adds the Spar_Identity::* property surface and the spar-trace-topology crate skeleton so the v1 reconciliation contract has a published identity surface and future work has a home. Parsers (PCAPNG / LLDP / Qcc / gPTP) and the reconciliation engine ship in v0.10.x / v0.11.0 sibling commits per the new design doc.

  • Spar_Identity property set: 6 properties (MAC_Address, VLAN_ID, Stream_Handle, Multicast_Group, LLDP_Chassis_Id, LLDP_Port_Id); STANDARD_PROPERTY_SET_NAMES extended; predeclared count 131 → 137.
  • New crate spar-trace-topology (~600 LOC): identity typed accessors (typed + string-fallback per the existing Spar_TSN pattern), ingest placeholder traits (FrameSource, TopologySource, SwitchConfigSource, PtpTimeSource), reconcile ReconcileFinding enum (5 deterministic check kinds — IdentityUnknown, TopologyMissingWiring, ConfigDrift, GptpOutOfBudget, BinaryMismatch), report TopologyReport struct.
  • New design doc docs/designs/v0.10.0-trace-topology.md (445 lines / 2728 words) — input artefact set, 5 checks, SARIF + in-toto attestation predicate URL https://pulseengine.eu/spar-trace-topology/v1, implementation phasing (foundation → parsers → engine → signed attestation), minimum-viable v1 fixture.
  • New contract doc docs/contracts/spar-trace-topology-v1.md (222 lines / 1172 words) — external-integrator surface; v1 readers MUST refuse v2+ blobs per the variant-contract pattern.
  • Artefacts: REQ-TRACE-TOPOLOGY-001 / 002 + TEST-TRACE-TOPOLOGY-IDENTITY.

Out of scope for this PR: real PCAPNG / LLDP / Qcc parsing (v0.10.x), reconciliation engine + SARIF (v0.11.0), signed in-toto attestation (v1.0). Workspace version unchanged.

Test plan

  • cargo build --workspace — clean (new crate compiles)
  • cargo test -p spar-trace-topology — 6 accessor round-trip tests pass
  • cargo test -p spar-hir-def --lib -- standard_properties — 28/28 pass (count 137 + new Spar_Identity tests)
  • cargo test --workspace — 75 test result lines, no failures
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • rivet validate — PASS (99 pre-existing warnings)

🤖 Generated with Claude Code

…keleton (v0.10.0 foundation)

Adds the v0.10.0 trace-topology foundation (Track G): the Spar_Identity
property surface and the spar-trace-topology crate skeleton so future
work has a home and the v1 reconciliation contract has a published
identity surface. Parsers (PCAPNG / LLDP / Qcc) and the reconciliation
engine ship in v0.10.x / v0.11.0 sibling commits per the new design
doc.

Property set (crates/spar-hir-def/src/standard_properties.rs):
- New Spar_Identity::* with 6 properties (MAC_Address, VLAN_ID,
  Stream_Handle, Multicast_Group, LLDP_Chassis_Id, LLDP_Port_Id)
- STANDARD_PROPERTY_SET_NAMES + lookup_table arms + count test 131→137
- Two new tests (set membership + GlobalScope resolution); 28 total
  standard_properties tests pass.

Crate (crates/spar-trace-topology/, ~600 LOC):
- identity.rs: 6 typed accessors, typed-first / string-fallback per
  the existing Spar_TSN pattern. VLAN_ID rejects values outside
  0..=4094 on both paths.
- ingest.rs: 4 placeholder traits (FrameSource, TopologySource,
  SwitchConfigSource, PtpTimeSource) with TODO(v0.10.0+) markers
  pointing at the design doc.
- reconcile.rs: ReconcileFinding enum carrying the 5 deterministic
  check kinds (IdentityUnknown, TopologyMissingWiring, ConfigDrift,
  GptpOutOfBudget, BinaryMismatch) — type surface only, no engine.
- report.rs: TopologyReport struct aggregating findings.
- tests/identity_accessors.rs: 6 round-trip tests covering both
  typed and string-fallback paths for every accessor.

Docs:
- docs/designs/v0.10.0-trace-topology.md (445 lines / 2728 words):
  full v1 design — input artefact set, the 5 deterministic checks,
  SARIF + in-toto attestation predicate URL
  https://pulseengine.eu/spar-trace-topology/v1, implementation
  phasing (v0.10.0 foundation → v0.10.x parsers → v0.11.0 engine →
  v1.0 signed attestation), minimum-viable v1 fixture.
- docs/contracts/spar-trace-topology-v1.md (222 lines / 1172 words):
  external-integrator contract — predicate URL, input artefact list,
  SARIF rule ids, in-toto envelope shape, stability promise (v1
  readers MUST refuse v2+ blobs).

Artefacts:
- REQ-TRACE-TOPOLOGY-001 (Spar_Identity surface) +
  REQ-TRACE-TOPOLOGY-002 (crate skeleton) added to requirements.yaml
- TEST-TRACE-TOPOLOGY-IDENTITY added to verification.yaml linking
  both REQ-TRACE-TOPOLOGY-* entries.

Out of scope for this PR (v0.10.x / v0.11.0 / v1.0):
- Real PCAPNG / LLDP / Qcc parsing
- Reconciliation engine
- SARIF emission
- in-toto attestation signing

Workspace version unchanged.

Quality gates: cargo build/clippy/fmt clean across the workspace;
cargo test --workspace passes (75 test result lines, no failures);
rivet validate PASS (99 pre-existing warnings).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 83.20611% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-trace-topology/src/report.rs 0.00% 9 Missing ⚠️
crates/spar-trace-topology/src/reconcile.rs 0.00% 8 Missing ⚠️
crates/spar-trace-topology/src/ingest.rs 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

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