Skip to content

🐛 fix: register the graph merge driver from the graphify hook - #111

Merged
nstarman merged 3 commits into
GalacticDynamics:mainfrom
nstarman:claude/graphify-hook-registers-driver
Dec 3, 2026
Merged

nstarman merged 3 commits into
GalacticDynamics:mainfrom
nstarman:claude/graphify-hook-registers-driver

Conversation

@nstarman

@nstarman nstarman commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

The graphify-update hook now registers the graph merge driver on every commit, so contributors no longer run the three git config lines once per clone. A conflict on graph.json needs a local commit that changed it, which has already run the hook.

  • The hook entry is a python -c call that sets the driver (pointing at the hook environment's own interpreter, with forward slashes on Windows) and then rebuilds with PYTHONHASHSEED=0. It does not need env.
  • CONTRIBUTING drops the setup lines and keeps them as the fallback for a clone that only ever commits with SKIP=graphify-update.
  • The drift workflow's milestone lookup falls back to an empty value when no milestone is open, instead of null.

Checked in a fresh clone: one prek run graphify-update registers the driver, the hook passes and leaves graph.json byte-identical. The same entry, in a clone with no manual git config, merged two branches that both changed the graph with no conflict. Not run on Windows.

🤖 Generated with Claude Code

The hook now registers the merge driver on every commit, so contributors
need no per-clone setup, and it no longer relies on `env`. The drift job
tolerates a repository with no open milestone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nstarman
nstarman requested a review from a team as a code owner December 3, 2026 05:32
Copilot AI lite review requested due to automatic review settings December 3, 2026 05:32
@nstarman nstarman added this to the v0.10.0 milestone Dec 3, 2026
@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (16dce75) to head (3f15d8b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          290       290           
=========================================
  Hits           290       290           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Approval is blocked because there are unresolved review findings that could let the pre-commit hook silently fail to register the merge driver (due to unchecked git config calls) and because the contributing docs currently understate the initial setup needed before the hook has run in a fresh clone.

2 open issues
What changed in this PR

Updates the repo’s graphify tooling so the graph merge driver is automatically configured via the existing graphify-update pre-commit hook, reducing per-clone manual setup and making the drift workflow’s milestone selection more robust.

Changes:

  • Update the graphify-update pre-commit hook to set merge.graphify.* config on each commit and then rebuild the graph with PYTHONHASHSEED=0.
  • Remove per-clone merge-driver setup steps from CONTRIBUTING, keeping them as a fallback for clones that always skip the hook.
  • Adjust the graph drift workflow milestone lookup to fall back to an empty value when no open milestone exists.
File Description
.pre-commit-config.yaml Extends the graphify-update hook to register the merge driver automatically before rebuilding the committed graph.
.github/​workflows/​graphify.yml Makes milestone selection resilient when there are no open milestones by emitting an empty output.
.github/​CONTRIBUTING.md Updates contributor guidance to reflect auto-registration of the merge driver and documents the manual fallback.

Review effort: Lite
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

Comment thread .pre-commit-config.yaml Resolved
Comment thread .github/CONTRIBUTING.md Resolved
nstarman and others added 2 commits December 2, 2026 21:37
…rge-driver fallback

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the first hook run registers it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nstarman
nstarman merged commit 2ea442f into GalacticDynamics:main Dec 3, 2026
20 of 21 checks passed
@nstarman
nstarman deleted the claude/graphify-hook-registers-driver branch December 3, 2026 05:49
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.

2 participants