Skip to content

Measure a registered generated copy at its canonical in the code-metrics size check #18683

Description

@kyle-sexton

Context

Lanes App PR #18598 adds the generated copy plugins/external-agents/scripts/docs-cache.sh (1,375 non-blank lines, generated from lib/docs-cache.sh by scripts/sync-shared-copies.sh). Under size.check: crossing, a new file counts 0 lines at the base, so the copy always crosses size.file_lines (1000) and Lint Repo fails it. The owner decided the scope of the fix in owner-decisions row 390, 2026-11-24T03:07:43Z. Question: "The scope of #18671's size-check exemption. As built, one added registry line exempts any file as a 'copy'." Options: "(a) keep it as built; (b) exempt a copy only when scripts/shared-copies.txt also lists it as generated from that original; (c) drop the rule and split lib/docs-cache.sh instead." Recommendation shown: (b), "A registry line alone then exempts nothing." Owner, verbatim: "go w/ recommenadtions". Decision: (b).

Leaving it costs #18598 (and #18306 behind it) staying blocked.

Proposed work

  • The code-metrics size check measures a file at its canonical only when a scope.registries cluster line names the canonical and a member glob matching the file, and the configured copies manifest (size.copies_manifest, here scripts/shared-copies.txt) lists that exact <canonical> <copy> pair.
  • Such a file is reported as a copy measured at its canonical and never fails on its own count; the canonical stays checked under the same rule.

Acceptance criteria

  • A copy named by both a registry cluster line and a manifest pair passes audit-size.sh --check under crossing and reports its canonical.
  • A registry glob match with no manifest pair still fails.
  • A manifest pair with no registry cluster line still fails.
  • With size.copies_manifest unset, nothing is exempt; a configured manifest path that does not exist exits 2.
  • A canonical over size.file_lines still fails.

References

Activity

  1. added theissue type on Nov 24, 2026
  2. added
    session-owned
    on Nov 24, 2026
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

    session-owned

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions