Repository navigation
feat: diagnose root overlap and registry state - #142
appvia-agentic-writer[bot] wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Final verificationF1. Story compliance — fail
F2. Code quality — pass
F3. Test evidence — fail
F4. Spec fidelity — pass
agentic-pr-verify: {"run":"46968712149","sha":"222607f9dca51dd8b00f20c14726f140f2d0ad5e","verdict":"pass","acs":2,"mapped":[{"ac":"AC-9","proof":"test","test":"TestDiagnoseRootPoolsAC9ReportsDeterministicOverlaps; TestDiagnoseRootPoolsAC9AC10HasNoFalsePositives; TestDoctorAC9AC10RendersRootDiagnosticsWithoutRegistryWrites","check":"test (ubuntu-latest)"},{"ac":"AC-10","proof":"test","test":"TestDiagnoseRootPoolsAC10ReportsRegistryInconsistency; TestDiagnoseRootPoolsAC10RejectsCorruptStoredStateWithoutWrites; TestDoctorAC10RendersRegistryUncertaintyAsWarning; TestDoctorAC10RedactsRegistryReadAndDecodeFailures","check":"test (ubuntu-latest)"}],"finals":{"F1":"fail","F2":"pass","F3":"fail","F4":"pass"}}
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
Final verificationF1. Story compliance — fail
F2. Code quality — pass
F3. Test evidence — pass
F4. Spec fidelity — pass
agentic-pr-verify: {"run":"46975338863","sha":"d03ab65641778f74e7b596a2a7426cacf4aa4394","verdict":"pass","acs":2,"mapped":[{"ac":"AC-9","proof":"test","test":"TestDiagnoseRootPoolsAC9ReportsDeterministicOverlaps; TestDiagnoseRootPoolsAC9AC10HasNoFalsePositives; TestDoctorAC9AC10RendersRootDiagnosticsWithoutRegistryWrites","check":"test (ubuntu-latest)"},{"ac":"AC-10","proof":"test","test":"TestDiagnoseRootPoolsAC10ReportsRegistryInconsistency; TestDiagnoseRootPoolsAC10RejectsCorruptStoredStateWithoutWrites; TestDoctorAC10RendersRegistryUncertaintyAsWarning; TestDoctorAC10RedactsRegistryReadAndDecodeFailures; TestDoctorRootDiagnosticsPerformZeroMutationCalls","check":"test (ubuntu-latest)"}],"finals":{"F1":"fail","F2":"pass","F3":"pass","F4":"pass"}}
|
Summary
Client.DiagnoseRootPoolsseam for usable-root overlap and registry consistency.root-overlapandroot-registrythrough doctor JSON and table output with explicit severity, static redacted details, and existing FAIL-before-WARN aggregation.Skills used: programming, go, spec-kit, ac-test-mapping
Final verification
Delivers AC-9 and AC-10 without repairing state or adding registry writes.
root_diagnostic.gois outside the Story hints and adds the required public read-only diagnostic seam plus explicit severity.root_diagnostic_test.gois outside the Story hints and supplies deterministic overlap, false-positive, registry-state, severity, and zero-write fixtures.cmd/ipam/doctor_fragmentation_test.gois outside the Story hints and updates the existing unsupported-schema doctor assertion to include the newroot-registryFAIL while preserving fragmentation WARN aggregation.cmd/ipam/doctor.go,cmd/ipam/doctor_test.go, andcontracts/doctor-root-pools.mdare updated within the hinted surfaces to preserve output and aggregation while proving pending and deleting WARN behavior. TheListPoolsrefactor inpool.goremoves duplicated usable-document scanning and keeps listing and diagnosis aligned.make testpassed with the race detector across all packages on headd03ab65641778f74e7b596a2a7426cacf4aa4394.make lintpassed with zero lint findings and a clean license-header check.make buildpassed. Review confirmed diagnostic severity no longer depends on display-text wording, unknown severities fail closed, and root diagnosis remains read-only and redacted.TestDiagnoseRootPoolsAC9ReportsDeterministicOverlapscovers 12 equal, nested, enclosing, and partial same-family overlap fixtures with both IDs.TestDiagnoseRootPoolsAC9AC10HasNoFalsePositivescovers 12 disjoint, adjacent, empty, and cross-family sets.TestDiagnoseRootPoolsAC10ReportsRegistryInconsistencyandTestDiagnoseRootPoolsAC10RejectsCorruptStoredStateWithoutWritescover absence, unsupported or corrupt state, missing membership, active mismatch, duplicates, pending/deleting severity, and zero writes.TestDoctorAC9AC10RendersRootDiagnosticsWithoutRegistryWrites,TestDoctorAC10RendersRegistryUncertaintyAsWarning,TestDoctorAC10RedactsRegistryReadAndDecodeFailures, andTestDoctorRootDiagnosticsPerformZeroMutationCallsprove JSON/table severity, aggregation, exit behavior, redaction, and zero mutations. The uncertainty test covers pending and deleting for both formats. These tests and the package race suite passed on the current head.The implementation matches
contracts/doctor-root-pools.md: usable roots are compared independently from registry state, child pools are excluded, pending/deleting uncertainty is WARN, confirmed inconsistencies and overlaps are FAIL, details remain static and redacted, and doctor performs no repair operations. The linked specification's AC-9 and AC-10 are covered by behavioral tests at the public diagnostic and CLI boundaries.TestDiagnoseRootPoolsAC9ReportsDeterministicOverlaps;TestDiagnoseRootPoolsAC9AC10HasNoFalsePositives;TestDoctorAC9AC10RendersRootDiagnosticsWithoutRegistryWritestest (ubuntu-latest)TestDiagnoseRootPoolsAC10ReportsRegistryInconsistency;TestDiagnoseRootPoolsAC10RejectsCorruptStoredStateWithoutWrites;TestDoctorAC10RendersRegistryUncertaintyAsWarning;TestDoctorAC10RedactsRegistryReadAndDecodeFailures;TestDoctorRootDiagnosticsPerformZeroMutationCallstest (ubuntu-latest)Closes #136