Skip to content

check_intent_staleness ignores the intentRef the manifest declares, so seven entries are measured against the wrong file #726

Description

@ptr727

check_intent_staleness reads item.get("reference") or path (spec/audit.py:1785), but no intent entry in spec/files.json sets reference. Seven of them set intentRef instead, naming a canonical that is not the same path, and the check never looks at it. Each of those seven is compared against the hub file that happens to share its name.

entry intentRef declares compared against
.editorconfig GOVERNANCE.md#line-endings hub .editorconfig
.editorconfig-checker.json GOVERNANCE.md#line-endings hub .editorconfig-checker.json
.gitattributes GOVERNANCE.md#line-endings hub .gitattributes
version.json WORKFLOW.md#d3---versioning-and-classification hub version.json
repo-config/settings.json repo-config/README.md hub repo-config/settings.json
AUDIT.md docs/repo-config-carry.md hub AUDIT.md
spec/secrets.json docs/repo-config-carry.md hub spec/secrets.json

codecov.yml is the one intent entry that does set reference, so the field the function reads exists and is honored. The seven above are simply not using it.

Both directions are wrong, and the second is silent

False positive. AUDIT.md is the clearest case, because the two documents are not versions of each other: the hub's is the fleet audit procedure, and a downstream repo's is a self-audit of its own settings, rulesets and secrets, which docs/repo-config-carry.md prescribes. A hub commit touching the fleet procedure raises an intent finding on every repo's unrelated self-audit doc. ESPHome-Config's 2026-08-15 audit reported exactly that, citing 6418d25, a commit that added mermaid diagrams to the hub procedure.

False negative. docs/repo-config-carry.md last changed at 91c887c (2026-08-10), and that change altered the ruleset-field comparison a downstream AUDIT.md is supposed to implement. It raised no finding on any repo, because nothing declares it as the canonical for anything. The document that actually governs those two carried files is the one document the audit does not watch.

Fix

item.get("reference") or item.get("intentRef") or path, with the #anchor stripped, would resolve all seven to a real hub path. Whether an anchored intentRef should compare against the whole file or the named section is the one judgment call: GOVERNANCE.md changes often for unrelated reasons, so resolving .editorconfig to the whole of GOVERNANCE.md would trade a wrong comparand for a noisy one. See #727 on intent findings that correct action cannot clear.

Found during the ESPHome-Config resync, audit run 2026-08-15T14:30:53Z | hub 0e84805.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions