Skip to content

v1.108.277 — Reachability is not only the import graph, and liveness is not only the PID

Choose a tag to compare

@jgravelle jgravelle released this 13 Aug 20:08
· 35 commits to main since this release

Three fixes, two of them from @phantom-man. The through-line: an obvious signal was mistaken for the whole answer, and in both cases the wrong verdict carried no hedge.

find_dead_code reported a rendered template as dead at confidence 1.0 (#461)

A template is never imported. It is reached by a render edge — a string argument (render(request, "page.html")) that flow_edges resolves to a file. Classifying from the import graph alone meant an actively-rendered template came back zero_importers while _resolve_template resolved that same file from the same index in the same process.

⚠⚠ The confidence value is the sharp part, not the misclassification. 1.0 is reserved for "no importers and not a test file" — a test file gets 0.9, a cascading case 0.7. So the one file class we index because another subsystem can prove it reachable was reported dead with no hedge, above the default min_confidence of 0.8, and could not be filtered out without discarding genuine findings too. A wrong answer at maximum certainty is worse than the same answer hedged, because confidence is exactly what a caller uses to decide whether to look.

Deliberately not an extension exemption, and two tests fail against one. A template nothing renders is dead and is still reported.

Process liveness verifies identity, not just PID occupancy (#450)

_is_pid_alive answered "is this PID taken?", not "is my process still there?" After the OS recycles a PID, a registry row or lock file for a long-dead holder read as live indefinitely — observed in the field as two-week-old rows resolving to a Chrome renderer and an AMD service. register() and acquire() now record the holder's OS creation time; readers treat alive-PID-but-mismatched-creation-time as stale.

The Linux epoch choice is the load-bearing detail. /proc/<pid>/stat starttime is kept boot-relative rather than converted via btime, because btime derives from the current wall clock — a settimeofday-class step (suspend/resume, VM restore, first NTP sync) would move every recorded value at once and read every live holder as recycled. A fix that mass-invalidates on clock adjustment would be worse than the bug it fixes.

Rows and locks written by earlier versions carry no create_time and keep liveness-only behaviour, so mixed-version stores degrade rather than mass-prune.

.html / .htm are indexable as a text-searchable file class (#452)

Registered on the bundled html grammar with empty symbol_node_types: an indexed template contributes zero entries to index.symbols, so every symbol-driven consumer is unaffected. The file entering index.source_files is the point — flow_edges._resolve_template returned None on every Django, Flask, Express and Rails repo before this, degrading the views annotation on get_signal_chains and the render edges in get_endpoint_impact, silently.

The markdown half was declined, and not on scope grounds. find_dead_code is file-driven with no language filter, nothing imports a .md file, and on the reporter's own numbers 2,410 new section symbols would have landed in dead code — collapsing the dead_code radar axis and the composite grade published weekly for third-party repos. A repo would have received a worse public grade for being well documented. Section-level doc retrieval is jdocmunch's product and ships today.


Gates: 7788 passed / 9 skipped / 0 failed on 3.10; 7782 / 15 / 0 on the 3.13 CI-environment reproduce (same 7797 total, different skip split); ruff check src/ clean; CI green on all jobs for 8afb119, first attempt.

Reconciled by decomposition rather than the usual same-tree collect, because this release adds no test file of its own — the 25 new tests landed across the day in #459, #462, #463 and #464, and .276's 7763 + 25 = 7788 exactly. On any other release a flat delta is the signal that a bump outran its work; here the release commit is version metadata, changelog and rotation only. Pick the reconciliation method that matches how the work landed.

Install: pip install --upgrade jcodemunch-mcp