Repository navigation
Conversation
|
Thanks for the pull request, @smngvlkz. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Rewords the graphify hook reminders (_SEARCH_NUDGE, _READ_NUDGE, and the strict _READ_DENY) to state facts about the knowledge graph instead of commanding the agent ("MANDATORY", "You MUST", "include this in every subagent prompt"). Because they arrive in the tool-result stream, the old wording reads like a prompt injection and gets ignored or flagged (#2202). The strict deny no longer asks the agent to pass the rule on to subagents, since each subagent already gets its own nudge budget. Existing hook tests now match on "knowledge graph at" instead of "MANDATORY", and a new test_hook_nudge_wording.py fails if any nudge, including the emitted output of _run_hook_guard, reintroduces command-style phrasing.
No blocking issues surfaced. 1 lower-confidence candidate did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 443 functions depend on the 188 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
_run_hook_guard()— 5 callers, 14 callees
Verification — 443 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: 398 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
36 of 454 test file(s) selected (8%) via static blast radius.
tests/test_affected_cli.py— impacttests/test_agents_platform.py— impacttests/test_cli_export.py— impacttests/test_cloud_cta.py— impacttests/test_codebuddy.py— impacttests/test_compact_graph_json.py— impacttests/test_dedup_shrink_refuses_force_write.py— impacttests/test_devin.py— impacttests/test_explain_cli.py— impacttests/test_explain_same_file_tie.py— impacttests/test_extract_cli.py— impacttests/test_global_add_tag_inference.py— impacttests/test_god_nodes_cli.py— impacttests/test_hollow_chunks_arm_shrink_guard.py— impacttests/test_hook_guard.py— impact, changed-testtests/test_hook_guard_token_match.py— impacttests/test_hook_nudge_wording.py— impact, changed-testtests/test_hook_out_of_project_paths.py— impact, changed-testtests/test_hook_strict.py— impact, changed-testtests/test_incomplete_build_guard.py— impacttests/test_install.py— impacttests/test_install_references.py— impacttests/test_lookup_exit_codes.py— impacttests/test_merge_chunks_validation.py— impacttests/test_multigraph_diagnostics.py— impacttests/test_no_dedup_flag.py— impacttests/test_opencode_plugin_refresh.py— impacttests/test_partial_cache.py— impacttests/test_path_cli.py— impacttests/test_query_cli.py— impacttests/test_query_induced_edges.py— impacttests/test_query_seeds.py— impacttests/test_skill_auto_refresh.py— impacttests/test_stale_prune.py— impacttests/test_truncation_full_answer.py— impacttests/test_unverified_semantic_shrink.py— impact
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 1 more finding(s) on lines outside this diff (see the check run).
|
Landed in v0.9.96, now on PyPI (pip install graphifyy==0.9.96). Hook reminders are worded as facts, not orders. Thanks for the fix, @smngvlkz. |
Fixes #2202.
What this fixes
The graphify hook adds a reminder before searches and file reads. It was written as an order: "MANDATORY... You MUST run graphify", and the read one also said "include it in every subagent prompt". That shows up in the middle of the agent's tool output, so it looks just like a prompt injection. Agents in the issue flagged it as one and ignored it, which means the reminder did nothing.
What changed
graphify query/explain/pathusually gets you the right files in far fewer tokens than grepping or reading files one by oneNew reminders, as the hook prints them:
How I tested it
v8and pass with this changetest_ext_tagged_id_clash.py, 1 intest_skill_no_backtick_substitution.py) fail the same way onv8without this changeHeads up
GRAPHIFY_HOOK_NUDGE_CAP=1only the first one. So it could probably be closed.graphify installwrites still says "MANDATORY". I left it, since that's an instructions file the user installs, not text that shows up in tool output.