Skip to content

fix(node): pushes to mirrors of sha256-format origins parse zero ref updates (64-hex oids rejected) #511

Description

@Gravirei

Recorded from review of #384 (round 5), explicitly kept out of that PR as a pre-existing concern worth tracking on its own.

parse_ref_updates (crates/gitlawb-node/src/api/repos.rs) accepts only 40-hex command SHAs (parts[0].len() == 40 && parts[1].len() == 40). Repos mirrored from sha256-format origins carry 64-hex object ids, so every push to such a repo parses to zero updates:

  • no receive_pack_requests / pending_ref_transitions intent rows are written,
  • the refs/gitlawb/* internal-namespace gate never sees the ref names,
  • the request proof is acked as vacuous (empty command stream),
  • while git itself still lands the refs on disk.

This predates #384 (the parser had the same width check on main), but it means the durable post-receive tracking premise that PR establishes does not apply to that repo class — reconcile, quarantine scans, and proof-gated retention simply never see those pushes.

Suggested shape (not implemented): accept the oid width git advertises for the repo's object format (40-hex for sha1, 64-hex for sha256), or key the width off the repo's advertised object-format, plus tests for a64-hex command line both parsed and refused on a sha1 repo.

Activity

  1. added
    kind:bugDefect fix — wrong or unsafe behavior
    sev:lowCosmetic, cleanup, or nice-to-have
    subsystem:apiNode REST API request/response surface
    on Oct 11, 2026
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

    kind:bugDefect fix — wrong or unsafe behaviorsev:lowCosmetic, cleanup, or nice-to-havesubsystem:apiNode REST API request/response surface

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions