Skip to content

A full pass deletes description text that sits inside an existing header block after the copyright line #160

Closed

Description

@Shinrai

Seen in CLDMV/rummage commit 9f523d31 (a repo-wide fix-headers pass over 756 files). In 8 test files the existing header block carried free-form description lines after the @Copyright line, inside the same /** … */ comment. The pass rewrote the header and dropped those lines — about 68 lines in total, e.g. packages/rummage-ext-storage-driver-google/tests/inherited-permissions-434.test.vitest.mjs lost 15. Everything outside the header block was byte-identical, so it is only the in-block trailing text that is lost.

Expected: text in the header comment that isn't a recognised header field is preserved (kept after the regenerated fields, or the header written as its own block above it). A pass must never delete content it doesn't manage.

Repro shape:

/**
 *	@Project: …
 *	…
 *	@Copyright: Copyright (c) 2013-2026 Catalyzed Motivation Inc. All rights reserved.
 *
 *	What this test pins and why (several lines).
 */

After a pass the description lines are gone.

Related, same pass: a vendored third-party file (packages/rummage-ext-pdf/vendor/pdf.worker.mjs, Mozilla pdf.js) got a "Catalyzed Motivation … All rights reserved" header. That's a consumer config gap (vendor folders should be excluded), tracked on the rummage side; worth considering a default skip for vendor/ folders or for files carrying a foreign license notice.

Activity

  1. added
    type: bug
    priority: high
    area: core
    status: not started
    status: implemented
    and removed
    status: not started
    on Oct 31, 2026
  2. Shinrai commented on Oct 31, 2026

    @Shinrai
    ContributorAuthor

    The header block should only hold header fields. Anything else in it moves to its own comment block directly below the header, unchanged. strictHeaderBlock (default true) controls this; set it to false to keep the text inside the header after the fields. Text is never deleted either way.

    Fix is in #161.

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

    area: corepriority: highstatus: implementedtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions