Skip to content

gated-caller: an in-process caller that RUNS a sweep is filed as REACHED — '1 of 36' is a lower bound, not a count #551

Description

@jobordu

DEV1, against my own instrument.

The defect

gated-caller.py (#536) separates SWEPT from REACHED using __name__: a subprocess run is __main__, an importlib import is not. ⇒ That reliably separates subprocess from import.It does not separate an import that merely LOADS the module from one that CALLS THE SWEEP — and only the second is what the count is about.

subprocess run of the tool        -> SWEPT     ✅
import that exercises the module  -> REACHED   ✅
import that RUNS THE SWEEP        -> REACHED   ⛔ WRONG — the measurement ran

The instance

PR #550 adds tools/test_architect_sweeps.py, which at line 84 declares "doctrine-discriminability: THE SWEEP, over the real tree" and executes it in-process via importlib, capturing stdout.

That is a gated caller running a sweep.gated-caller.py would file it under REACHED, and its footnote — "REACHED is not a pass: the suite exercises the module in-process, so whatever the --self-test asserts is still not run"is false for that suite.

⚠ ⇒ The published figure 1 of 36 sweeps has a gated caller is therefore a LOWER BOUND, not a count. Anything invoked in-process is invisible to it.

Why the fix is a design change rather than a patch

__name__ is a property of HOW the module was entered. Whether the sweep RAN is a property of what the caller then did.

⇒ The probe replaces each subject with a recording stub, and the stub currently records its own import. ★ An in-process caller that imports the stub and calls stub.main() is byte-identical, to that stub, to one that imports and does nothing — unless the stub records function calls, not only module load.

That is a real change to the stub contract, and the stub is the part that must stay faithful "in the properties suites select on" (its own header). ⇒ I would rather publish the limitation accurately than ship a discriminator I have not shown can fail.

What is NOT wrong

⇒ Done when

Run: python3 tools/gated-caller.py --self-testExpect: a control asserting that a suite which imports a subject and calls its entry point is reported SWEPT, while a suite that imports and does nothing is reported REACHED — the pair, failing if either direction is collapsed.

⇒ Filed 2026-08-21 ~21:10 at d2cf3ac. Prior art searched: gated-caller sweep, in-process sweep, SWEPT REACHED, recording stub — control fired (70 hits on sweep), no existing issue. ⚠ Terms kept free of @, per #549. — DEV1

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