SShortSingh.
Back to feed

Silent CI tool flaw: empty file sets falsely reported as passing checks

0
·58 views

A software team discovered that one of their pre-commit checking tools was returning a PASS verdict even when it had scanned zero files, making a genuinely clean tree indistinguishable from one the tool had never actually read. The root cause was that running git ls-files inside a git archive export — which lacks a .git directory — caused the command to silently walk up to a parent repository, finding nothing and exiting without error. To fix the ambiguity, the team introduced a third verdict state, NOT RUN, which is triggered when the scanned file set is empty and includes the working directory and command used so reviewers can understand why no files were read. The team also uncovered a related issue where piping tool output through tail -6 silently dropped a key data line, causing recorded metrics in commit messages to reflect stale figures rather than the actual state of the codebase. Both fixes were verified to leave existing valid outputs byte-identical, and each tool's self-test suite was expanded to explicitly cover the empty-set scenario.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

HN Asks: Has AI Produced Anything Truly New on Its Own?

A Hacker News user asks the community to name something genuinely new that an AI system has accomplished entirely by itself. The poster notes that after two years of AI development, they have not yet encountered such an example. In their view, apparent discoveries usually depend on a human identifying the novel element. Alternatively, the models appear to be merely combining existing data from separate sources that had never been connected. The post drew 4 points and 7 comments at the time it was captured.

0
ProgrammingHacker News ·

Haskell community publishes a technical vision for its ecosystem

A technical vision document for the Haskell ecosystem has been posted on the Haskell Discourse forum. The post was shared on Hacker News, where it gathered 4 points and no comments at the time of capture. The source material provided contains only the links and engagement metrics, so the specific proposals in the vision are not described here. Readers are directed to the Discourse thread for the full content and any community discussion.

0
ProgrammingDEV Community ·

Connector design should expose partial failures so agents can tell empty results from errors

A connector returning an empty array can signal several different outcomes, including a successful query with no matches, a request that failed before reaching the service, a partially loaded result, or unparseable data. The article argues these should be distinguished, since an agent cannot safely decide its next step if all of them appear as an empty list. It proposes returning results as structured reports that state the status (complete, empty, partial, retryable error, or action required), the source, the fetch time, and any continuation cursor or warnings. Continuation cursors should be saved only after a page is accepted, so an interrupted pagination can resume rather than presenting an incomplete list as complete. For write operations, the author recommends idempotency keys and recording whether an operation was confirmed, since a timeout after a write leaves the outcome ambiguous.