Skip to content

squabble relock --gather: take the evidence from each record's own repository - #166

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/sq-lock-01-gather
Nov 14, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/sq-lock-01-gather

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The second step of the SQ-LOCK-01 executor (#164). squabble relock could repair a lock only from an evidence TSV that a person gathered by hand. --gather asks each flagged record's own repository instead, so the executor can run from a lock and its workflows alone. Still read-only on every repository, and still a dry run unless --write is given and the guards say Apply.

Live check, no hand-made evidence:

  • ZeroInflatedCounts.jl's hyperpolymath/cicd-suite@0da816c0… (no tags; the commit is on main) gives main, byte-identical to the hand repair in ZeroInflatedCounts.jl#22.
  • ResidualEvidenceTypes.jl's actions/upload-artifact@bbbca2dd… (one tag at that SHA) gives v7.0.0.

Changes

  • crates/squabble-cli/src/relock_gather.rs (new): git ls-remote --tags for the tags whose commit is the SHA (an annotated tag by its peeled ^{} commit). Only when there is no tag: a blob-less fetch of all branch heads into a private temporary directory (removed on drop) and for-each-ref --contains. Also the default branch from ls-remote --symref. It never writes to the repository it asks and never to the lock. Tests run real git against a local fixture repository (annotated tag found by its peeled commit; branches named when there is no tag; a commit no branch holds is no evidence, not an error; an unreachable remote is an error).
  • crates/squabble-cli/src/relock.rs: --gather and --remote-base, exactly one of --evidence or --gather. A failed lookup prints gather-failed and leaves the record without evidence, so it is a referral, never a guess.
  • docs/decisions/0004-first-line-rule-catalogue.adoc: the executor section's evidence bullet, and the proof.

Not in this PR

Opening the fix PR is still a separate step that is not built. Nothing has been run on any repository other than as the read-only comparisons above, and no applier wave is widened by this.

RSR Quality Checklist

Required

  • Tests pass (cargo test: 106 in the CLI crate, 215 in squabble-core)
  • Code is formatted (cargo fmt --check)
  • Linter is clean (cargo clippy --all-targets -- -D warnings)
  • No banned language patterns
  • No unsafe blocks
  • No secrets, credentials, or .env files included
  • SPDX headers present on the new file; no licence edits

As Applicable

  • Documentation updated (ADR 0004)

Generated by Claude Code

…pository

Read-only: git ls-remote for the tags whose commit is the SHA (annotated tags by
their peeled commit); only when there is none, a blob-less fetch into a private
temporary directory for the branches that contain it, plus the default branch.
A failed lookup is reported and the record stays a referral; a commit no branch
holds is no evidence, not an error. Tests run real git against a local fixture
repository. Live: the ZeroInflatedCounts.jl cicd-suite leaf gives main
(identical to #22) and ResidualEvidenceTypes.jl's upload-artifact record gives
v7.0.0, with no hand-made evidence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7Zmiut2nCcbtEx25HAU
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 330a6b03-f67c-45ce-8499-2dbe89d3acb3
Commits

Reviewing files that changed from the base of the PR and between 0b36101 and 14dce21.

Files selected for processing: 4

  • crates/squabble-cli/src/main.rs
  • crates/squabble-cli/src/relock.rs
  • crates/squabble-cli/src/relock_gather.rs
  • docs/decisions/0004-first-line-rule-catalogue.adoc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T09:55:48.559664Z
We couldn’t complete this review. Comment @codex review to try again.
14dce21 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit e34a7dc into main Nov 14, 2026
72 checks passed
@hyperpolymath
hyperpolymath deleted the claude/sq-lock-01-gather branch November 14, 2026 10:28
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.

3 participants