Repository navigation
Closed
Labels
Description
Friction
- The
binary_sha256of a Python review tool, such as Bandit or Semgrep, is the digest of its launcher script. The launcher does not change when the package changes, so the record does not show which code ran.
Evidence
Checked at main 4bb052c.
docs/agent/tasks/task-772-the-review-records-each-tool-run.mdsays: "The binary digest of Bandit and Semgrep names a launcher script of 320 and 379 bytes. It does not name the package."- The executor gets the digest from
resolve_tool_version_and_sha(src/devops_cli/review/canary.py:402-414). It hashes the file thatresolve_tool_binaryfinds, which is the launcher script for a Python tool. - feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 lists this change as its later part 6 of six. After the split, feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 only tracks its child issues, and no pull request closes feat(review): review tools run through one injectable executor in a network-less sandbox with CPU, memory and time limits #772 itself. So this candidate asks for a change that no other issue holds.
Existing tool considered
importlib.metadatareads the installed distribution of a tool. TheRECORDfile of an installed distribution lists a sha256 hash for each file of the package (the packaging specification for recorded installs).- The tools lock already names the version of each tool.
Proposed remedy
- For a tool that is a Python distribution, take the digest from the installed distribution, for example a digest of its
RECORDfile throughimportlib.metadata. Do not hash the launcher script. - Keep the file digest for a tool that is one native binary.
Acceptance criteria
- The
binary_sha256of a Python tool changes when a file of its package changes, and stays the same when only its launcher script changes. A test with a fake installed distribution intmp_pathasserts both. - The
binary_sha256of a native binary is still the digest of that file. - Tests run offline with fakes and recorded tool output: no network, no real scanner, no model. Each new test runs under 1 s.
-
uv run devops cipasses.
Source: #772
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 23, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate fixes an incorrect behavior in how binary digests are calculated for Python tools.The issue affects correctness of tool version tracking and should be fixed but is not critical.Fixing the digest calculation improves accuracy of review records for Python tools.Requires changes to how Python tool digests are calculated using importlib.metadata and updating tests.refactor(security): mypy and the review canary start their tools thro…