Skip to content

Compare Intent Staleness Against the Hub's Own Copy and Name the Moved Canonical #3371

Closed

Description

@ptr727

spec/audit.py's intent staleness advisory (around intent_canonical_rel and the possibly trails the hub finding) resolves an intent unit's canonical to its intentRef doc where one is set. Two things follow from that.

  1. A byte-identical copy is still flagged. The content-identical skip hashes the downstream file against canonical_current_text(canonical_rel), which for .editorconfig-checker.json is GOVERNANCE.md rather than the hub's own .editorconfig-checker.json. The two can never match, so a copy identical to the hub's file is still reported as possibly trailing. The run at hub main 43b1f49 flagged ptr727/ESPHome-NonRoot's .editorconfig-checker.json, and cmp against the hub's root copy exits 0.
  2. The message names the wrong thing as having changed. It says "the hub canonical changed later at ()". For .editorconfig-checker.json and version.json, the named commits (a86e92c, ab32efd) touch only GOVERNANCE.md and WORKFLOW.md, not either file. A reader checking that commit's diff for the file finds nothing, and has to read the engine to learn that the date belongs to the intent doc.

Suggested shape: also skip where the copy is content-identical to the hub's file at the unit's own path, where one exists, and name canonical_rel in the message, for example "the intent canonical GOVERNANCE.md changed later at ...".

Found during ptr727/ESPHome-NonRoot's intent-file sync (ptr727/ESPHome-NonRoot#349), where all three date-flagged files turned out to need at most a form fix.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions