Skip to content

One skip stands in for 28 named arms across six suites, so a skipped arm and a deleted one are indistinguishable #994

Description

@OffgridwithJD

Four check_skip calls stand in for 17 named arms under a name none of those arms has. When the condition fails, the 17 names produce no record at all, and one line appears bearing a name that exists nowhere else:

# test/selftest/340-the-binary-must-be-built-from.sh:676
if [ -z "$_fp_user" ]; then
	check_skip "the unreadable-source refusal" "SKIP  no non-root user to read as; ..."
else
	check "premise: the unprivileged reader can source the staged harness" ...
	check "premise: the tree fingerprints to something when it is readable" ...
	check "premise: the unprivileged read agrees while everything is readable" ...
fi

A reader of that log cannot tell which three arms did not run, and the ledger cannot tell a skipped arm from a deleted one — its rows for those three names have no matching record, exactly as a removed check's would.

Measured, not estimated

Swept every check_skip in test/*.sh and test/selftest/*.sh:

count
check_skip call sites 25
named by a literal string 21
named by a variable 4
literal skips standing in for named arms in the sibling branch 4
literal skips guarding a block with no named arms 17

The 17 that guard no named arms are fine: the skip is the record, nothing else claimed to run, and nothing is lost. This issue is only about the four.

The four, with the arms each one replaces — every count read off the file by eye, not only from the sweep:

site arms it stands in for
test/native_parquet_flba.sh:211 6
test/native_parquet_pushdown.sh:214 3
test/sorted_pathkeys.sh:278 5
test/selftest/340-the-binary-must-be-built-from.sh:677 3

17 arms, 4 lines.

The fix already exists in the tree, 32 lines below one of the offenders

340-the-binary-must-be-built-from.sh:709 does it the other way — it skips under each arm's own name:

	for _fp_n in ...; do
		check_skip "$_fp_n" \
			"SKIP  $_fp_n (the unprivileged reader could not fingerprint a readable tree)" \
			"the unprivileged reader could not fingerprint a readable tree"
	done

Three of the four variable-named sites do the same thing (lib.sh:1696 uses "$2", native_groupagg_batch.sh:179 uses "$label"). So this is not a new convention to invent — it is the one already in use, missing at four sites.

Why this is worth fixing beyond tidiness

It is the precondition for arming the orphan guard in #983 / #993. That guard compares the ledger's keys against a run's and finds rows with no matching record. It reports rather than refuses only because of this: on a box with no non-root user, the two 340 rows are live checks with no record, so a gate refusing on absence would redden a correct run. Once a skipped arm records under its own name, absence means removal and the guard can be armed.

Two arms in #993 pin the current shape, so the day it changes they say so rather than the guard quietly becoming armable with nobody noticing.

What I am not claiming

  • This hides no failure. A skipped arm is not a passing arm: check_skip records a SKIP verdict and the suite's accounting includes it. The cost is that a reader and the ledger cannot tell which arms were skipped, and that the orphan guard cannot be armed.
  • I measured the repository, not every environment. Whether each of the four conditions actually fails anywhere in CI is a separate question; 340's does, on any box without a non-root user, which is why it surfaced.
  • The 17/4 split rests on an awk that reads the sibling branch between else and fi. I verified all four by eye afterwards, because my first two sweeps of this produced confident wrong numbers from a broken field split (grep -n emits file:lineno:content, and stripping one colon left the line number on the name).

Found while measuring the false-positive budget for #983's guard. Related: #965, which made the same conversion for the eleven timeout paths.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions