Skip to content

fix(skills): prune excluded files during update - #2909

Open
hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/2908-excluded-files
Open

fix(skills): prune excluded files during update#2909
hopstreax wants to merge 1 commit into
Graphify-Labs:v8from
hopstreax:fix/2908-excluded-files

Conversation

@hopstreax

Copy link
Copy Markdown
Contributor

Summary

Fixes #2908.

The --update skill flow previously passed only deleted_files to
build_merge(). When a file remained on disk but left the active scan
scope (for example, after being added to .graphifyignore), it was reported
as excluded_files but was not pruned from the graph.

The manifest was still updated to remove the excluded file, leaving stale
graph nodes behind. On subsequent incremental runs, the file was no longer
present in the manifest and the stale nodes could not be discovered.

What changed

  • Include excluded_files alongside deleted_files when constructing
    prune_sources.
  • Prevent the --update early-exit when an update contains only excluded
    files.
  • Regenerate the affected skill runbooks and skillgen expected snapshots.
  • Add a regression test covering exclusion, graph pruning, manifest cleanup,
    subsequent clean updates, and re-inclusion.

The resulting flow is:

excluded_filesprune_sourcesbuild_merge() → graph cleanup →
manifest cleanup

Validation

  • Regression tests pass.
  • Relevant build, extraction, detection, watch, and skillgen tests pass.
  • python -m tools.skillgen --check passes.
  • git diff --check passes.

The fix is intentionally limited to the skill --update flow; no changes
were made to detect_incremental(), save_manifest(), or build_merge().

@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).


Graphify review — findings

Adds excluded-file pruning to the incremental update skill across all agent variants (agents, amp, claude, claw, codex, copilot, …) and their skillgen expected fixtures: reads excluded_files from the incremental result, factors it into the no-op short-circuit, prints an excluded-count line, and folds it into prune alongside deleted. Updates the build_merge/prune test suite to cover the excluded-file cases.

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

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 140 functions depend on the 140 functions this change touches.

Health — this change adds coupling hotspots:

  • new: test_skill_update_prunes_excluded_files_and_preserves_reinclusion() — 0 callers, 10 callees

Verification — 140 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: 140 function(s) in the blast radius were not formally verified this run

· 1 grounded finding(s) anchored inline below.

Comment thread tests/test_build_merge_hyperedges_and_prune.py
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.

--update leaves stale graph nodes when files leave scan scope

1 participant