Skip to content

R1: the stale-pointer control's owner-dir guard has no assertion that can fail — out5 tested the empty-dir case, so the absent/non-directory owner branch was untested #253

Closed

Description

@aitrawog

What is wrong

The validator's PASS on #252 (the PR that closed #246) raised two non-blocking
observations about the change it had just reviewed. Both are real, and both are
disposed of here rather than filed away.

1. The owner-dir guard has no assertion that can fail. owner_present decides
whether a named surface's owner repo is materialized in this checkout. It has two
guards:

  [[ -d "$rt/$owner" ]] || return 1                              # the owner is a DIRECTORY
  [[ -n "$(ls -A "$rt/$owner" 2>/dev/null)" ]] || return 1         # and it is not EMPTY

Four filesystem states reach it: the owner dir is absent, an empty dir (an
uninitialized submodule path in a light checkout), a non-directory (a stray file
named like a sibling repo), or a populated dir. The two guards cover them as
absent-or-not-a-directory and empty.

The self-test asserted:

  • out5 — "a surface whose owner repo is NOT in this checkout SKIPS cleanly" — but its
    fixture ran mkdir -p "$tmp/unmaterialized/absent-repo", so the owner dir was
    present and empty. That is the empty-dir state, i.e. out6's case again;
  • out6 — "an EMPTY owner directory … must SKIP" — the same state.

So the [[ -d "$rt/$owner" ]] branch was never distinctly exercised, and the code
comment ("owner repo is NOT in this checkout") and the PR body ("an uncarried
owner"
) overstated what out5 tested. The validator's words:

out5/out6 are effectively the same case … The [[ -d "$rt/$owner" ]] || return 1
branch (owner dir entirely absent) is therefore not distinctly exercised.

The fix is not "add a test for the absent case". An absent owner dir and an empty
owner dir are the same verdict (skip), and ls -A on a missing directory yields
nothing — so an absent-owner assertion cannot fail if the -d guard is removed. A
test that cannot fail is invalid under R7. The branch is load-bearing only in the
non-directory state, where ls -A on a file prints the file name and would make
the owner look materialized — a false red. So the coverage that discriminates the
guard is a case where the owner path is a regular file.

2. The "two false-red guards" taxonomy is imprecise. The #252 body named "a
same-named root file in a standalone checkout, a name collision in a standalone
checkout"
as the two false-red guards. The actual blocks are:

block what it asserts a guard?
out3 a same-named root file in a standalone checkout skips yes (pre-existing)
out4 a stale pointer FAILS no — a FAIL assertion
out5 an uncarried owner skips no — a skip assertion
out6 an empty owner dir skips no — a skip assertion
out7 an absent top-level surface FAILS no — a FAIL assertion
out8 a name-collision directory in a standalone checkout skips yes (new)

The count (five new blocks) was right; the taxonomy mixed FAIL assertions in with
the two skip guards, and the same-named-root-file guard is out3, which predates #246.

Root fix

  1. out5 becomes the truly-absent case — drop mkdir -p "$tmp/unmaterialized/absent-repo"
    so the owner dir does not exist at all, and restate the comment to say exactly that.
    out6 keeps the empty-dir case, so the two states are distinct.
  2. A new assertion covers the non-directory owner — an owner path that is a regular
    file must SKIP. This is the assertion that fails if the -d guard is removed:
    ls -A on a file prints its name, the owner would look materialized, and the checker
    would raise a false stale-pointer red. That is the R7 coverage the branch never had.
  3. The prose is corrected — the guards are named as what they are (out3 and out8 are
    the two skip guards; out4 and out7 are the two FAIL assertions), in the script's
    comments and in the PR body.

Why this is filed as its own issue rather than folded into #246

#246 is closed by #252 and its scope was the 19 stale rows plus the stale-pointer
control. This is the coverage of the control it added — a different, separable
scope, on a different, already-merged PR. The umbrella's AGENTS.md (R1) forbids
treating "pre-existing" or "out of scope" as a classification, and a finding raised by
the validator on a merged PR is fixed or rebutted on the thread — this issue plus the
follow-up PR is the fix, and the disposition is posted on #252's thread.

The disposition of the merged PR's changelog

The imprecise taxonomy sentence also lives in CHANGELOG/2026.297.1200.md (written by
tag-on-merge from #252's body). That file is history, and the tag
v2026.297.1200 points at it: editing it would make the tagged content differ from the
tag. The correction therefore lands in the script's comments and in the follow-up
PR's body
, and the misstatement is corrected on #252's thread. The history stays as
written; the truth is stated where it is used.

Agent: charly

Assisted-by: Claude Code minimax minimax-m3.1-flash:cloud (analysed on a live system)

Activity

  1. aitrawog commented on Oct 24, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — this issue is mine to fix, in this repo, by a PR that lands on main through the org's own gate.

    Why it exists. The validator's PASS on #252 (the PR that closed #246) raised two non-blocking observations about the change it had just reviewed. #252 was already merged when the verdict landed — the arming job merged it within seconds of the report (the mechanism #245 exists for), so a finding raised by that verdict could not be landed on the PR it was raised on. It lands here instead, and it lands fixed, not filed away.

    Scope. scripts/governance-reconcile.sh — the --self-test block and the owner_present comment. Three parts:

    1. out5 becomes the truly-absent case — its fixture created an empty owner dir, so it tested out6's case again and the [[ -d "$rt/$owner" ]] guard was never distinctly exercised. The empty dir goes; the comment is restated to say exactly what is tested.
    2. A new assertion covers the non-directory owner — an owner path that is a regular file must SKIP. This is the assertion that fails if the -d guard is removed (ls -A on a file prints its name, so the owner would look materialized and the checker would raise a false red). The absent-owner assertion alone could not fail — that is why the branch had no R7 coverage.
    3. The prose is corrected — the two skip guards are out3 (pre-existing) and out8 (new); out4 and out7 are FAIL assertions, not guards. The fix(gate): the governance manifest must assert against surfaces that exist (#246) #252 body's "two false-red guards" phrasing mixed them.

    Not in scope. The CHANGELOG/2026.297.1200.md sentence (history, and the tag v2026.297.1200 points at it — the correction goes into the script's comments and the PR body, and the misstatement is corrected on #252's thread). The third observation from the verdict — that the control only fires in strong form until opencharly/opencharly#674 lands — is already filed, and needs no code here.

    Next update due: when the follow-up PR is open, or within 30 minutes, whichever comes first.

    Agent: charly

    Assisted-by: Claude Code minimax minimax-m3.1-flash:cloud (analysed on a live system)

  2. self-assigned this
    on Oct 24, 2026
  3. aitrawog commented on Oct 24, 2026

    @aitrawog
    ContributorAuthor

    STATUS — the PR is open: #254, head 9de02ac, branch fix/owner-dir-guard-coverage-253, off a fresh origin/main (b8e54dc).

    What it changes. One file — scripts/governance-reconcile.sh — and the diff is test + comments only: the checker's executable lines are byte-identical to origin/main (77 lines, same sha256), so no gate behaviour changes. What changes is that the gate's own suite can now tell whether a guard is load-bearing.

    • out5 becomes the truly-absent case — its fixture created an empty owner dir while claiming to test an absent one, which is out6's case again. The empty dir is gone.
    • out6 keeps the empty-dir case, and the difference between the two is written down.
    • A new out9 asserts that a NON-DIRECTORY owner path skips — the assertion that actually discriminates. The fix is deliberately not an absent-owner assertion: an absent owner and an empty owner are the same verdict, and ls -A on a missing directory yields nothing, so such an assertion cannot fail if the -d guard is removed. The guard is load-bearing only when the owner path is a regular file, where ls -A prints the file's name, the owner looks materialized, and the control turns into a false red.

    The negative control, measured on the committed file — each guard removed in turn, and the PREVIOUS suite on the same mutation:

      the committed file, unmutated          -> all assertions passed        (rc=0)
      the DIRECTORY guard removed            -> SELF-TEST FAIL: a non-directory owner path was reported as a stale pointer   (rc=1)
      the EMPTINESS guard removed            -> SELF-TEST FAIL: an uninitialized submodule path was reported as a stale pointer  (rc=1)
      the PREVIOUS suite, the same mutation  -> all assertions passed        (rc=0)   <- the hole: the old coverage could not fail
    

    The gate — this repo's own workflow-checks job, run on the committed tree: every offline step rc=0, zero warnings (transcript in the PR body). The changed checker also ran against the real umbrella checkout, every row asserted: checked=81 skipped=0 fail=0 (rc=0).

    T4: not triggered — the diff touches one file, and it is on none of T3's weakened guardrails list (no hook script in this repo, no ruleset change, no validator-spec change, no rulebook change); it strengthens the gate's own suite. The other T3 bullets are walked in the PR body.

    Next update due: when the validator's verdict lands on #254, or when the round ends — whichever comes first.

    Agent: charly

    Assisted-by: Claude Code minimax minimax-m3.1-flash:cloud (fully tested and validated)

  4. aitrawog commented on Oct 24, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — landed as #254, squashed into main as aee7c3f541533301dc7446f1ac4d8d507b9dcbca at 2026-10-24T12:10:28Z, with the merge-time tag v2026.297.1210 → aee7c3f. CHANGELOG/2026.297.1210.md was written from the PR body by tag-on-merge. The validator's verdict was PASS (run 40092767805, ollama-cloud/deepseek-v4.1-flash — action-review); all four checks — validate / validate, workflow-checks, validate / lint, validate / arm — were SUCCESS.

    What landed. The stale-pointer control's two owner guards — the owner path must be a DIRECTORY, and it must not be EMPTY — had one assertion between them, because out5's fixture created an empty owner dir while claiming to test an absent one, which is out6's case again. The directory guard therefore had no coverage that could fail, and the validator's PASS on #252 found it. The change makes out5 the truly-absent case, keeps out6 for the empty dir, and adds out9 — a non-directory owner path must skip — which is the assertion that discriminates: ls -A on a file prints the file's name, so with the -d guard removed the owner looks materialized and the control turns into a false red.

    The negative control, measured on the committed file:

      the committed file, unmutated          -> all assertions passed        (rc=0)
      the DIRECTORY guard removed            -> SELF-TEST FAIL: a non-directory owner path was reported as a stale pointer   (rc=1)
      the EMPTINESS guard removed            -> SELF-TEST FAIL: an uninitialized submodule path was reported as a stale pointer  (rc=1)
      the PREVIOUS suite, the same mutation  -> all assertions passed        (rc=0)   <- the hole, closed
    

    The gate — this repo's own workflow-checks job on the committed tree: every offline step rc=0, zero warnings. The changed checker also ran against the real umbrella checkout, every row asserted: checked=81 skipped=0 fail=0 (rc=0).

    The checker's behaviour did not change — the diff is test + comments only, and the production region's 77 executable lines are byte-identical to origin/main (same sha256 on both sides). What changed is that the gate's own suite can now tell whether a guard is load-bearing.

    The verdict's one observation — a cross-reference typo in the body ("block 3" where the proof is in block 2) — is accepted and dispositioned on #254's thread: the claim it supports is true and its proof is in the same file, and the released changelog is not hand-edited (this repo has never modified a released changelog — every one is written once by tag-on-merge).

    Agent: charly

    Assisted-by: Claude Code minimax minimax-m3.1-flash:cloud (fully tested and validated)

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

Metadata

Metadata

Assignees

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