Skip to content

diff_versions: list the used names check_symbols cant check, with the reason - #22

Merged
cschmertz merged 1 commit into
cschmertz:mainfrom
rise11hx-cmyk:fix/16-unchecked-uses
Nov 18, 2026
Merged

cschmertz merged 1 commit into
cschmertz:mainfrom
rise11hx-cmyk:fix/16-unchecked-uses

Conversation

@rise11hx-cmyk

Copy link
Copy Markdown
Contributor

Closes #16 (DT-CORE-61). When a used name's module comes from a distribution DepTime doesn't index, diff_versions used to answer events: [] and no note, which reads as "nothing changed". It now says it couldn't check.

What changed

  • DiffResult gains unchecked_uses: list[UncheckedUse], each item with path, unknown_in (the ends of the range where check_symbols reads the path unknown) and hint — the same reason check_symbols gives, not a second derivation of it.
  • note gains a sentence pointing at that field, so a reader who only looks at events isn't misled: one path names itself, several are shown three at a time with a count, like _never_seen_note.
  • never_seen and suppressed keep their current meaning, so the change is additive and no renamed or removed field.

A path is left out of unchecked_uses when:

  • never_seen already covers it (it is missing at one end, and that list says which end), so the same fact isn't stated twice;
  • a listed event's affects already takes it (the removal is the answer, e.g. langgraph 0.0.37 -> 0.3.31 with checkpoint.memory.InMemorySaver);
  • check_symbols has the path at both ends.

Evidence, on the published index

uv run deptime index pull, then the issue's example. Before this branch:

{"package":"langgraph","from_version":"1.0.2","to_version":"0.2.39","events":[],"truncated":false,"suppressed":0,"never_seen":[]}

After:

{
  "package": "langgraph", "from_version": "1.0.2", "to_version": "0.2.39",
  "events": [], "truncated": false,
  "note": "`langgraph.checkpoint.base.get_checkpoint_metadata` can't be checked: the index can't tell what langgraph has at 1.0.2 or 0.2.39, so no event can say whether the name survived (`unchecked_uses` says why).",
  "suppressed": 0, "never_seen": [],
  "unchecked_uses": [{
    "path": "langgraph.checkpoint.base.get_checkpoint_metadata",
    "unknown_in": ["1.0.2", "0.2.39"],
    "hint": "langgraph is a namespace package, and langgraph 1.0.2 requires langgraph-checkpoint, langgraph-prebuilt and langgraph-sdk, which can install modules into it; langgraph itself doesn't have this one"
  }]
}

Going the other way, 0.2.39 -> 1.0.2, reads the same with unknown_in reversed. And never_seen still answers where it does:

uv run deptime diff langgraph 0.0.37 0.3.31 --used langgraph.checkpoint.memory.InMemorySaver
  "never_seen": [{"path": "langgraph.checkpoint.memory.InMemorySaver", "missing_in": ["0.0.37"]}]
  "unchecked_uses": []

Tests

Two tests in tests/test_query.py, on the synthetic ng index:

  • test_diff_lists_a_used_path_check_symbols_cant_check_with_the_reason — a namespace package that requires a distribution which can install into it: the path is unknown at both ends and lands in unchecked_uses with ng-checkpoint in the hint and in the note; a name the index has at both ends, and a call without used_symbols, list nothing; a module the package owns at the from end and another distribution fills at the to end is unknown at that end only, and the note names that end rather than the whole range.
  • test_a_used_path_missing_at_one_end_is_left_to_never_seen — the InMemorySaver shape above: never_seen has it, unchecked_uses doesn't.

Run against the source with the tests kept, both fail with AttributeError: 'DiffResult' object has no attribute 'unchecked_uses'; with the models and query.py in place they pass.

Checks

uv run ruff format src tests   # 58 files left unchanged
uv run ruff check src tests    # All checks passed!
uv run pytest                  # 596 passed; test_golden needs `deptime index pull`, test_curated needs to fetch
                               # docs.sqlalchemy.org, which this box timed out on. Neither touches this change.

No bench/ touched, as the issue asked.

DT-CORE-61: a used path whose module another distribution installs into a namespace read as nothing changed. DiffResult gains unchecked_uses, with the end it is unknown at and the same hint check_symbols gives, and note says so; never_seen keeps its meaning.
Signed-off-by: rise11hx-cmyk <rise11hx@gmail.com>
@cschmertz
cschmertz merged commit f6c1c47 into cschmertz:main Nov 18, 2026
7 checks passed
@cschmertz

Copy link
Copy Markdown
Owner

Thanks, @rise11hx-cmyk, merged. Building the list in its own pass turned out better than what I suggested: on langgraph 0.2.76 → 0.3.1 it now also names create_react_agent and ToolNode as unchecked, where before the answer only said removals under langgraph.prebuilt weren't listed.

cschmertz added a commit that referenced this pull request Nov 18, 2026
…E-61)

Changelog entry for the new unchecked_uses field from #22, and DT-CORE-61 moves from the held gaps to done. The bench side, counting such an answer as an abstention, is still to do.
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.

diff_versions: say when a used name can't be checked, instead of returning nothing

2 participants