Repository navigation
Conversation
…ify-Labs#2790) Permission-gated hosts deny `rm` and `find -delete`, so Step 9 left stale .graphify_chunk_*.json files that the next --update would merge. `graphify clean` unlinks the same files in Python.
There was a problem hiding this comment.
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 replaces the shell-based cleanup of Step 9 build intermediates (rm/find -delete) with a Python/pathlib implementation, motivated by permission-gated hosts that deny those shell verbs. It adds a cleanup_build_intermediates helper in paths.py, a new clean [dir] CLI subcommand (with help text and dispatch handling), updates skill.md to call graphify clean instead of the shell commands, and adds unit tests covering the new cleanup function. The surface area touches graphify/__main__.py (help output), graphify/cli.py (command dispatch), graphify/paths.py (new constant and function), graphify/skill.md (documentation), and a new tests/test_cleanup_intermediates.py.
No blocking issues surfaced. 5 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 1534 functions depend on the 116 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 463 callers, 41 callees - new:
_rebuild_code()— 95 callers, 51 callees - new:
build_from_json()— 151 callers, 18 callees - new:
build_merge()— 41 callers, 14 callees - new:
save_manifest()— 34 callers, 11 callees - new:
to_obsidian()— 29 callers, 12 callees - new:
to_wiki()— 41 callers, 7 callees - new:
to_json()— 44 callers, 6 callees - …and 38 more
Verification — 1534 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: 1197 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify dispatch\_command.
The verifier did not have enough to check dispatch\_command, 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: not verifiable: all 23 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)
No difference found (not proven): No behavior difference found in \_run\_cli (not a proof).
The verifier ran both versions of \_run\_cli 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.
· 1 grounded finding(s) anchored inline below; 45 more finding(s) on lines outside this diff (see the check run).
| @@ -803,6 +803,19 @@ def _reenter_main() -> None: | |||
|
|
|||
|
|
|||
| def dispatch_command(cmd: str) -> None: | |||
There was a problem hiding this comment.
dispatch_command()
fans out to 118 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
|
Heads up on the skillgen-check failure @hudsonwa — Worth knowing while you're in there: the same One thing to watch on the windows render: gen.py's POSIX->PowerShell translator is strict and raises on any bash line it doesn't recognise, so it's worth checking I'd been working on the same issue from the fragments side and have it passing all five validators — happy to hand that over or close mine in favour of your |
|
Thank you for this, and I'm sorry I walked across work you already had going. I hadn't realised Please don't close #2801 on my account. If the maintainers prefer yours, I'll happily close this. Thank you for offering either way. |
skill.md is generated, so the earlier edit there showed as drift. The rm/find lines live in the core fragments and the devin/aider platform bodies; source-of-truth now teaches graphify clean graphify-out, which also stops the devin/aider recipe from deleting the .graphify_labels.json that the current pipeline keeps as an input. Regenerated the platform skills from the fragments and re-blessed expected/.
|
Thank you for the fragments pointer: skill.md being generated explained the drift immediately. I have pushed f66d134 which moves the cleanup lines into fragments/core/core.md and the devin/aider platform bodies, regenerates the platform skills and re-blesses expected/. It also drops the labels.json removal from the devin/aider recipes, since the current pipeline keeps that file as an input. skillgen --check is green and the cleanup tests pass (3/3). The 'Clean up after: rm .graphify_old.json' lines were left alone, being a post-merge cleanup with different semantics. Thank you again for the handover offer; happy to defer to maintainers on which call site stands. |
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Formal verification. 1 change(s) tested, no difference found (not proven).
Graphify review — findings
Adds a graphify clean [dir] subcommand that deletes Step 9 build intermediates through cleanup_build_intermediates, a new pathlib helper that removes the known .graphify_* temp/chunk files and needs_update markers within the target output folder without following symlinks out of it. dispatch_command resolves a bare scan root to its nested graphify-out folder, reports the count removed, and exits. Replaces the rm -f/find -delete cleanup lines across every skill variant with this command so permission-gated hosts that block those shell verbs can still clean up.
Worth a look
- Part B cleanup deletes semantic output needed by Part C —
graphify/skill-amp.md:354· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Part B cleanup deletes semantic output needed by Part C —
graphify/skill-claw.md:357· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Part B cleanup deletes semantic output needed by Part C —
graphify/skill-copilot.md:357· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Part B cleanup now deletes inputs needed by Part C —
graphify/skill-devin.md:415· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Part B cleanup now deletes inputs needed by Part C —
graphify/skill-droid.md:354· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 2431 functions depend on the 1013 functions this change touches.
Health — this change adds coupling hotspots:
- new:
extract()— 463 callers, 41 callees - new:
_rebuild_code()— 95 callers, 51 callees - new:
build_from_json()— 151 callers, 18 callees - new:
build_merge()— 41 callers, 14 callees - new:
save_manifest()— 34 callers, 11 callees - new:
to_obsidian()— 29 callers, 12 callees - new:
to_wiki()— 41 callers, 7 callees - new:
to_json()— 44 callers, 6 callees - …and 38 more — each is listed as a finding
Verification — 2431 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit 33362d9 (diverged from this PR's base — delta is approximate).
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: 2094 function(s) in the blast radius were not formally verified this run
Formal verification
Could not verify: Could not verify dispatch\_command.
The verifier did not have enough to check dispatch\_command, 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: not verifiable: all 23 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)
No difference found (not proven): No behavior difference found in \_run\_cli (not a proof).
The verifier ran both versions of \_run\_cli 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.
· 1 grounded finding(s) anchored inline below; 45 more finding(s) on lines outside this diff (see the check run).
| @@ -803,6 +803,19 @@ def _reenter_main() -> None: | |||
|
|
|||
|
|
|||
| def dispatch_command(cmd: str) -> None: | |||
There was a problem hiding this comment.
dispatch_command()
fans out to 118 callees (efferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
Summary
Step 9 told the agent to
rm/find -deleteintermediates. On permission-gated hosts those verbs are denied, so.graphify_chunk_*.jsonsurvived and the next--updatecould merge stale chunks.Cleanup now runs in Python (
Path.unlink), same as the rest of the pipeline.Related
Fixes #2790
Type
Changes
graphify/paths.py:cleanup_build_intermediates()graphify clean [dir]CLIskill.mdStep 9 (and the mid-pipeline temp cleanup) callgraphify clean graphify-outHow to Test
3 passed. Does not delete
graph.json. Does not walk into subdirs.Notes
Did not regenerate every
skill-*.mdhost file in this PR — source of truth isskill.md(what most installs copy). Happy to run skillgen in a follow-up if you want the platform clones updated in the same change.