GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fork seams: after a rebase, exclude an upstream file named like a fork file (#432) by scuttletoby · Pull Request #567 · scuttletoby/t3code

fork seams: after a rebase, exclude an upstream file named like a fork file (#432) #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
scuttletoby merged 4 commits into main from fix/432-fork-seam-followups
Nov 20, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fork seams: after a rebase, exclude an upstream file named like a fork file (#432) #567

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
0f33575
fork seams: after a rebase, exclude an upstream file named like a for…
scuttletoby Nov 20, 2026
11f4515
fork seam check: short comments for lint; refuse when the lowered lis…
scuttletoby Nov 20, 2026
26f1205
Merge branch 'main' into fix/432-fork-seam-followups
scuttletoby Nov 20, 2026
eedc09c
Merge branch 'main' into fix/432-fork-seam-followups
scuttletoby Nov 20, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fork seam check: short comments for lint; refuse when the lowered lis…
…t still takes a hidden file

Co-Authored-By: Claude Opus 5.5 <[email protected]>
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@scuttletoby @claude
scuttletoby and claude committed Nov 20, 2026
commit 11f4515b89477c83c6c1398e530b9b7ff8db1869

There are no files selected for viewing

32 changes: 19 additions & 13 deletions 32 .github/scripts/fork-seam-check.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,9 @@ function findListedGone(config, { atBase, atHead }) {
}

/**
* Upstream's files the head still has that a pull request's run would take for the fork's own (a
* hole in that run). `upstreamFiles`: every path upstream has; `atHead`: a path's text in head.
* Refused, except where a lowered list is written (right after a rebase): there each goes to
* `lowered.hidden`, and lowerList excludes it in "forkFiles". That only narrows what a pull
* request's run takes for the fork's own (the run from upstream already judges it as upstream's),
* so no upstream file, whatever its name, stops fork-follow or reaches main unexcluded.
* Upstream files in head that a pull request's run would take for the fork's own. Refused, except
* right after a rebase that writes a lowered list: there each goes to `lowered.hidden` and lowerList
* excludes it in "forkFiles", which only narrows what a pull request's run takes for the fork's own.
*/
function findHiddenUpstreamFiles(upstreamFiles, isForkFile, atHead, lowered) {
const hidden = upstreamFiles.filter((file) => isForkFile(file) && atHead(file) !== undefined);
Expand Down Expand Up @@ -884,12 +881,10 @@ const MOVED_WHY =
'Was "pending": fork-follow moved it here once it had no fork line left, as its "lost" entry still counts upstream lines it loses. No seam line: a fork line goes in a file of the fork\'s own.';

/**
* `text` with the counts in `lowered` ({ pending, lost }: Maps of file to count) lowered, as { text, changes },
* or undefined when nothing changes. Only lowers; a count at 0 removes the entry. A "pending" file with no fork
* line left that "lost" still names moves to "files" with no seam line (no fork line may come back, no line may
* be lost). Each upstream file in `lowered.hidden` (a Set) stops being a fork file: its own "forkFiles" entry
* goes, and a `!` entry excludes it where a name or another pattern still takes it. Two-space JSON, parsed again
* before it is returned, so a lowered list is never one the check refuses.
* `text` with `lowered` ({ pending, lost } Maps of counts, `hidden` Set of upstream files) applied, as
* { text, changes }, or undefined when nothing changes. Only lowers; a count at 0 removes the entry; a
* "pending" file with no fork line left moves to "files"; each hidden file stops being a fork file
* (its own "forkFiles" entry goes, or a `!` entry excludes it). Parsed again before it is returned.
*/
function lowerList(text, lowered) {
const raw = JSON.parse(text);
Expand Down Expand Up @@ -1154,7 +1149,18 @@ function main(argv) {
if (listProblem !== undefined) return 1;
if (lowered !== undefined) {
// After a rebase only: fork-follow commits the lowered list into the rebased series.
const lower = lowerList(textAt(configRef, CONFIG), lowered);
const listText = textAt(configRef, CONFIG);
const lower = lowerList(listText, lowered);
const isStillFork = forkFileTest(parseConfig(lower?.text ?? listText).forkFiles);
const still = [...lowered.hidden].filter((file) => isStillFork(file));
if (still.length > 0) {
for (const file of still) {
console.error(
printable(`${file}: the lowered list still takes this upstream file for a fork file.`),
);
}
return 1;
}
if (lower !== undefined) {
fs.writeFileSync(parsed.loweredList, lower.text);
for (const change of lower.changes) console.log(printable(`Lowered: ${change}`));
Expand Down
4 changes: 2 additions & 2 deletions 4 .github/scripts/fork-seam-check.test.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,8 @@ test("from upstream, an upstream file named like a fork file fails on the comman
});
});

// #432: a file upstream names like a fork file stopped every fork-follow after the rebase until a
// pull request excluded it. Right after a rebase that writes a lowered list, the list excludes it.
// A file upstream names like a fork file stopped every fork-follow after the rebase until a pull
// request excluded it. Right after a rebase that writes a lowered list, the list excludes it.
test("after a rebase, the lowered list excludes an upstream file a pull request's run takes for a fork file", () => {
withRepo(({ dir, commit, fromUpstream }) => {
const upstream = commit(
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.