feat: add Linux official evidence drift audit#139
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds deterministic official distro evidence matrices and summaries, plus drift detection that compares generated Linux distro evidence records with configured override metadata. Tests cover Debian rows, aggregate counts, clean drift checks, and URL mismatches. ChangesOfficial distro evidence validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DriftCheck as linux_official_distro_evidence_drift_errors()
participant Resolver as _generated_official_distro_evidence_record()
participant Provisioning as Linux provisioning evidence generation
participant Comparator as _official_distro_evidence_record_drift_errors()
DriftCheck->>Resolver: resolve override row to policy
Resolver->>Provisioning: generate canonical distro evidence record
Provisioning-->>Resolver: generated evidence record
Resolver-->>DriftCheck: record or resolution error
DriftCheck->>Comparator: compare generated record with expected row
Comparator-->>DriftCheck: field mismatch errors
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary
Add deterministic Linux official evidence drift audit helpers.
This PR is audit-only. It does not add new official evidence records, does not promote new mappings, and does not change generated evidence semantics.
What changed
Added helper APIs in
scripts/f4_linter_linux_provisioning.py:linux_official_distro_evidence_matrix()linux_official_distro_evidence_summary()linux_official_distro_evidence_drift_errors()The helpers make the configured official evidence registry visible as a deterministic contract surface and compare official override records against generated distro evidence.
Official evidence matrix
linux_official_distro_evidence_matrix()returns deterministic rows for the current official override registry.Each row includes:
Current matrix contains exactly six rows:
Official evidence summary
linux_official_distro_evidence_summary()reports deterministic counts for the official override registry.Current expected state:
Drift audit
linux_official_distro_evidence_drift_errors()compares official override rows against generated distro evidence records.Current expected result:
The drift helper detects contract mismatches including:
This is a contract drift audit between the configured official evidence registry and generated ECLI evidence. It is not a live network audit of Debian web pages.
Behavior preserved
Exactly six generated Debian evidence records remain
verified-official-source:deb/yamllintdeb/shellcheckdeb/clang-tidydeb/cppcheckdeb/clang-formatdeb/checkstyleNo Docker helper record is promoted.
No non-Debian mapping is promoted.
All Docker DEB helper records remain
repository-local-policy/current-policy-baseline.RPM/openSUSE/Arch/Slackware mappings remain unchanged.
Tests
Added tests for:
Existing promotion, Docker baseline, generated manifest, and negative tamper tests remain passing.
Scope controls
This PR does not:
OS_PACKAGE_NAMESValidation
Passed locally / by agent report:
Observed results:
Safety:
Next work
A follow-up PR can add a release-facing report/check entry point for this audit helper, still without promoting additional distro families.
Summary by CodeRabbit
New Features
Tests