Skip to content

fix: skip merge attribute for ignored graph output - #2701

Open
SomSamantray wants to merge 1 commit into
Graphify-Labs:v8from
SomSamantray:fix/2595-skip-ignored-graph-attribute
Open

fix: skip merge attribute for ignored graph output#2701
SomSamantray wants to merge 1 commit into
Graphify-Labs:v8from
SomSamantray:fix/2595-skip-ignored-graph-attribute

Conversation

@SomSamantray

Copy link
Copy Markdown

Summary

Fixes #2595.

  • Keep registering the local merge.graphify driver when graph output is ignored.
  • Skip the redundant .gitattributes mutation when Git reports the graph path is ignored.
  • Preserve existing behavior for tracked graph output.

Validation

  • uv run pytest tests/test_hooks.py -q — 79 passed
  • uv run ruff check graphify/hooks.py tests/test_hooks.py — passed
  • uv run pyright graphify/hooks.py — 0 errors
  • Full suite: 4243 passed, 42 skipped, 15 unrelated baseline failures (missing optional openai dependency and unavailable shallow-clone skillgen baseline refs)

Contributor

Som Samantray

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. 1 change(s) tested, no difference found (not proven).


Graphify review — findings

This PR adds a plan document and implements a guard in graphify/hooks.py so that hook installation skips adding the .gitattributes merge rule when the graph output path is ignored by Git, while still registering the local merge driver. It refactors the attribute-line helper by extracting a _merge_attr_path() function and introduces a _graph_path_is_ignored() helper that shells out to git check-ignore. A new test verifies that installation on a repo ignoring the graph output registers the driver but does not create .gitattributes.

No blocking issues surfaced. 2 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 304 functions depend on the 158 functions this change touches.

Health — this change adds coupling hotspots:

  • worse: install() — 26 callers, 6 callees

Verification — 304 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 165 function(s) in the blast radius were not formally verified this run

Formal verification

No difference found (not proven): No behavior difference found in \_merge\_attr\_line (not a proof).

The verifier ran both versions of \_merge\_attr\_line on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

Could not verify: Could not verify \_register\_merge\_driver.

The verifier did not have enough to check \_register\_merge\_driver, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: parameter `root` is annotated `Path` — outside the synthesizable primitive/collection set

· 1 more finding(s) on lines outside this diff (see the check run).

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.

hook install adds a merge attribute for gitignored graphify-out/graph.json

1 participant