Skip to content

Port the pkg/fidelity generic differ from archive/fidelity-batch-2026-07-25 #43

Description

@thesprockee

The 2026-07-25 fidelity effort is preserved as the pushed tag archive/fidelity-batch-2026-07-25 (tip 9b2471d, 6 commits, ~4545 insertions). It was not merged during the 2026-08-26 branch cleanup. Recovering it: git checkout -b <name> archive/fidelity-batch-2026-07-25.

What it contains

  • pkg/fidelity/{differ,keyscan,verdict}.go plus tests — a generic field-walking differ, roughly 2400 lines
  • pkg/conversion/fidelity.go, fidelity_verify_test.go, fidelity_bench_test.go
  • Four new audit tests: roundtrip_baseline_audit, roundtrip_baseline_keyset, roundtrip_v2_findings, roundtrip_baseline_audit_status
  • A rewritten cmd/tapedeck/verify.go

Why it did not merge

  1. Stale module path. 35 files import github.com/echotools/tape/pkg/.... The module is now github.com/echotools/tape/v4. The branch does not compile against main.
  2. It is an architectural swap, not a merge. It deletes ~610 lines of currently-green hand-rolled comparators in pkg/conversion/roundtrip_v2_test.go and routes that coverage through pkg/fidelity instead. Taking the branch side drops coverage that passes today; taking main's side discards the point of the branch.
  3. Mechanically the conflict surface is small — only BUGS.md (deleted on main, bugs now live here as issues) and roundtrip_v2_test.go. The remaining ~4300 lines are new files.

Why it is still worth doing

A generic differ that walks every field beats per-field comparators that have to be remembered and hand-extended — the recurring defect in this repo is a complete write path against a partial read path, and a field-walking differ catches exactly that class. The port is tractable; it just needs a dedicated pass with the suite green at the end, not a merge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions