Skip to content

Audit only the newest commit of a published main - #9

Merged
renezander030 merged 1 commit into
mainfrom
fix/audit-published-tip
Oct 11, 2026
Merged

renezander030 merged 1 commit into
mainfrom
fix/audit-published-tip

Conversation

@renezander030

Copy link
Copy Markdown
Owner

Makes the CI workflow green on main. Since 0.6.0 every push to main has failed at the release audit step (latest: https://github.com/renezander030/graphiti-local/actions/runs/38053609016) with git metadata: sensitive author identity. Ruff and pytest pass in those runs.

Cause

On a push to main, the checked-out HEAD is the published base itself, so identity_revision() has no unpublished range. It returned "HEAD", and git log HEAD walks the whole history. The comment there says "Check its tip". Four September commits in the public history carry a personal address. They are published and cannot change, so the step failed on every push.

Fix

identity_revision() returns the git log arguments to audit:

checkout audited before
branch / PR, ahead of origin/main every commit since the merge base same
published main (HEAD is the base) the newest commit (-1 HEAD) whole history
no remote base whole history same

So a push still cannot introduce a personal identity on main, and branch commits are still all checked.

Verification

  • 3 new tests in tests/test_release_audit.py run the audit against a real temporary git repo:
    • a published tip with older personal history passes; this test fails on main's audit and passes here;
    • a personal identity on the published tip is still refused;
    • every unpublished commit on a branch is still checked.
  • The CI command on a checkout at 3f05407 (HEAD = origin/main), the exact state of the red run: main's audit fails, this audit passes.
  • uv run ruff check .: pass. uv run pytest: 172 passed. The audit on this branch's range passes.

main turns green with the push of the merge commit, since the newest commit is then the squash under the GitHub noreply address.

On a checkout whose HEAD is already the remote default branch, the release audit
checked every author identity in the public history, so each push to main failed on
commits that are published and cannot change. It now checks the newest commit there,
as its comment said. Branches still have every commit since the published base
checked, and a repository with no remote base still has its whole history checked.
@renezander030
renezander030 merged commit c96d704 into main Oct 11, 2026
3 checks passed
@renezander030
renezander030 deleted the fix/audit-published-tip branch October 11, 2026 07:10
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.

1 participant