Skip to content

Graph provenance: diff a no-commit graph against its file table; a later engine is newer - #1830

Merged
swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/javascript/graph-provenance-false-alarms-on-mirror
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/javascript/graph-provenance-false-alarms-on-mirror

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor
  • A graph built without git (a mirror synced without .git) stamped nogit, so changed and the edit hooks read the working tree against HEAD: every uncommitted edit the index had already read was reported as changed right after the index.
  • changed now diffs such a graph against the file table the index wrote (per-file hashes): an unchanged file is not an edit; a changed one is read against HEAD, or counted whole with no git. A copy without git answers "no change" instead of refusing; with no table it still refuses.
  • An explicit no-git index keeps that table as base-files.json, so a background refresh does not erase the baseline (same role as base-tree for git).
  • Hooks say "the files the graph was indexed from" instead of "the graph's commit nogit"; the Read stale note uses the table hash.
  • The newer-build check treats a graph ahead on either IMPACT_VERSION or engine version as newer. A lower IMPACT_VERSION had hidden a later engine, which produced "older (0.1.8 -> 0.1.3)". The note also names AXIOMCODE_ENGINE when it is not the checkout answering.
  • Tests: the no-git block in tests/changed_range.py is reworked (5 new checks + 2 controls: an edit after the index is still reported; no table still refuses). tests/freshness.py gets 2 new checks; the "older engine" control is unchanged. All new checks fail before the fix and pass after.

Checked: dirty mirror copy of a JS service repo: 158 changed declarations → 0, hook "87 declarations … nogit" → silent. JS suite 88/88; probes 57/70 → 57/70, 0 regressed; call edges 11,309 = 11,309. The remaining changed_range/freshness failures (3+3) fail the same way on the base.

…ter engine is newer

A graph built where there was no git (a mirror synced without .git) stamps no
commit and no tree. `changed` and the edit hooks then read the working tree
against HEAD, so every uncommitted edit the index had read came back as
changed right after it, and a copy without git could not answer at all.

- changed: with no commit recorded, a file whose hash matches the table the
  index wrote is not an edit; one that differs is (read against HEAD, or
  counted whole without git). No table: the old refusal.
- build: an explicit no-git index keeps its table as base-files.json; a
  background refresh leaves it, as base-tree is kept for git.
- hooks: say "the files the graph was indexed from", never "commit nogit";
  the Read stale note uses the table hash when there is no commit.
- newer check: a graph ahead on either IMPACT_VERSION or engine version is
  newer (a lower IMPACT_VERSION no longer hides a later engine), and the note
  names AXIOMCODE_ENGINE when it is not the checkout answering.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit e492c51 into apps/integration-0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/javascript/graph-provenance-false-alarms-on-mirror branch September 30, 2026 19:00
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.

1 participant