Skip to content

fork seam check ignores upstream files that have no seam entry #242

Closed

Description

@scuttletoby

The fork seam check (.github/scripts/fork-seam-check.cjs) only looks at files listed in .github/fork-seams.json (findSeamBreaches loops over Object.entries(files)). A fork change to an upstream file that is not listed passes the check with any number of lines.

Example: PR #227 adds about 33 Fork: lines to apps/server/src/serverSettings.ts (an upstream file with no seam entry) and the check is green.

docs/fork/updates.md says the check "refuses any line the fork adds to an upstream file beyond the seam lines pinned", so the docs promise more than the check does.

Proposed fix (general, any fork using this check):

  • List upstream-owned files the PR changes relative to the upstream base (files that exist at the upstream commit and are not fork-only files such as */fork/*, fork*.ts, FORK_*.md, docs/fork/*, .github/fork-*).
  • Any such file with added lines and no seam entry fails with "upstream file X has fork lines but no entry in .github/fork-seams.json".
  • Test: an unlisted upstream file with one added line fails; a fork-only file passes; a listed file keeps today's rules.
  • State: runs again gives the same answer; a fork with existing unlisted edits fails once with a list of files, which are then added as seam entries or moved to fork files.

Short term: PR #227 adds a seam entry for apps/server/src/serverSettings.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions