Repository navigation
Description
Raised from ptr727/aiopurpleair, whose copy declares no tools at all and exists only to say so. Read on main at 8195c43.
The contradiction
scripts/host_gate.py:528, at the point it loads a repository's overlay:
# A repository layering onto the hub is the normal case, and carrying no local file is the common one, so its absence is silent.
if not a.no_local and local_path.is_file():spec/files.json declares the opposite:
{ "path": "host-tools.json", "appliesTo": "*" }baseline with appliesTo: "*" makes it required of every repository, so an absent one is a LETTER finding, and spec/audit.py exits non-zero on a LETTER. The tool documents absence as the common case and the manifest treats it as a conformance miss.
An empty file is not neutral, it manufactures a false warning
overlay_above() walks ancestors for a host-tools.json and warns:
carries a host-tools.json overlay this bare run did not read - re-run with --repo <path> so its floors count
A bare run started in a subdirectory of a repository whose overlay declares "tools": [] therefore tells the operator to re-run a command so that nothing counts. The empty file is worse than no file at that moment, which is the opposite of what a required baseline file should be.
What the fleet actually holds
Sampled ten repositories' main:
tools=1 LanguageTags, PlexCleaner, Blog
tools=0 Utilities, PhotoCleaner, NxWitness, aiopurpleair
absent MediaTools, ESPHome-NonRoot, homeassistant-purpleair, AudioCleaner
Of the seven carrying the file, four carry nothing but a note explaining that they carry nothing. aiopurpleair's is 755 bytes, of which the entire payload is "tools": [].
Being honest about the other column: the four absent ones are largely unconverged rather than deliberate, MediaTools reporting 62 defect/letter/error findings overall, so their absence is not evidence that absence is accepted. The argument here rests on the tool's own comment and the empty-file noise, not on those four.
Suggested remedy
Make the manifest entry conditional so the file is owed only when it declares something. Either drop it from the unconditional baseline and treat it as an optional overlay, or keep the entry and add a selector so it applies only to a repository that actually declares a local floor.
Worth pairing with a positive check in the other direction: a present file whose tools array is empty is removable, and reporting that as a DRIFT would let the four repositories above shed the file rather than each carrying a paragraph explaining an empty array. That turns the audit from requiring noise into removing it.
If the unconditional requirement is deliberate, for discoverability so a maintainer finds the file when they need to add a floor, that is a defensible answer and worth stating where a reader looks, since docs/host-setup.md does not say it today and host_gate.py's comment currently says the reverse. The discoverability job could also be done by a line in the hub's own docs rather than by a file in every repository.
Related
Same class as #1472, #1473, #1475 and #1482 from this repository's resync: a rule and the thing it describes having drifted apart, with nothing failing when they do.
Not filed here
No audit report or registry change is being written back, and aiopurpleair keeps its copy until this is settled, since removing it today would earn the LETTER this issue is about.
Activity
State the host-tools.json Carry Rule and Stop the Empty-Overlay Warni…
Promote the Host-Tools Carry Rule, the Multi-Interpreter Validator Le…