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.
Formal verification could not match the changed code to the code graph, so it may not have checked the code this PR changed.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.
Not checked: tests were not run; formal verification proved 0 of 1 changed function(s) (1 not verified).
Formal verification. PR-changed functions: 0/1 verified (0 proven, 0 may-equivalent, 0 distinguished) · 1 not verified (1 unsupported).
Not verified on this run: \_rebuild\_code (unsupported).
Graphify review — findings
Fixes full-corpus rebuild requests (watcher, post-checkout hook) being silently dropped when another rebuild holds the lock: they now leave a .pending_full marker. The lock-holder consumes the marker and runs a full pass, either upgrading its own incremental run or adding one more pass before releasing. Full rebuilds now also drain work that arrives mid-run, and an empty change set prints "nothing to queue" instead of claiming "changes queued".
Worth a look
- Queued full rebuild can be missed after the final empty drain —
graphify/watch.py:1654· Escalate · medium- 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 — 708 functions depend on the 474 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
_rebuild_code()— 167 callers, 58 callees
Verification — 708 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: 515 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
17 of 361 test file(s) selected (5%) via static blast radius.
tests/test_cache_stale_import_target.py— impacttests/test_elixir_import_resolution.py— impacttests/test_elixir_qualified_calls.py— impacttests/test_elixir_unqualified_call_scope.py— impacttests/test_export_direction.py— impacttests/test_external_stub_endpoints.py— impacttests/test_incremental_unscanned_placeholders.py— impacttests/test_kotlin_grammar.py— impacttests/test_labeling.py— impacttests/test_markdown_code_spans.py— impacttests/test_no_cluster_undeclared_endpoints.py— impacttests/test_python_inherited_method_calls.py— impacttests/test_skill_persisted_scan_options.py— impacttests/test_terraform_modules.py— impacttests/test_watch.py— impact, changed-testtests/test_watch_identity_cache.py— impacttests/test_watch_manifest_location.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.
Formal verification
Could not verify: Could not verify \_rebuild\_code.
The verifier did not have enough to check \_rebuild\_code, 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: no capturable inputs from the test suite; property tier: nondeterministic output (both versions disagreed with themselves on the witness) — not a behaviour change; a function whose output is not a function of its inputs (random / time / uuid / os.urandom, or state carried across calls) cannot be soundly distinguished by execution, so this tier abstains for the whole function
· 1 more finding(s) on lines outside this diff (see the check run).
FolatheDuckofDuckingburg
left a comment
There was a problem hiding this comment.
This PR cleanly fixes #4274 by introducing a
.pending_full
marker mechanism that ensures full-corpus rebuild requests are no longer dropped during lock contention.
|
Shipped in v0.9.87, just released to PyPI as |
Fixes #4274.
Problem
#1059 made incremental rebuild requests survive lock contention by queueing their paths in
.pending_changes. Two gaps remained in_rebuild_code:watch) that lost the non-blocking lock queued nothing, returnedFalse, and still loggedchanges queued. The lock holder only covered its own change set, so files touched by the checkout never reached the graph..pending_changesuntil some unrelated rebuild ran.Fix
.pending_fullmarker beside.pending_changes(_queue_pending_full/_drain_pending_full)._PENDING_DRAIN_MAX_PASSES.changes queuedis printed only when something was actually queued (an empty change set now logsnothing to queue).Behaviour change worth noting: an incremental holder that finds a full request waiting now does a full rebuild instead of its incremental one. Slower for that one run, but it's the only way the full request gets honoured.
Verification
g_added_latefunction lands ingraph.jsonwith.pending_changesempty afterwards.tests/test_watch.py. All 5 fail onv8HEAD and pass with this change:tests/test_watch.py: 186 passed, 3 skipped. Hook/watch/rebuild subset (-k "hook or watch or rebuild or pending"): 615 passed, 13 skipped.Thanks to @Ethan-JY-Park for the detailed report and repro scripts.