[github-graph] Synced files from github-config. - #4
Merged
Merged
Conversation
SgtSwagrid
force-pushed
the
sync/SgtSwagrid/github-config_main_.--.;
branch
4 times, most recently
from
April 19, 2026 12:46
6dd76aa to
61e32d6
Compare
SgtSwagrid
force-pushed
the
sync/SgtSwagrid/github-config_main_.--.;
branch
from
April 19, 2026 14:02
61e32d6 to
9ff1b39
Compare
SgtSwagrid
added a commit
that referenced
this pull request
Sep 27, 2026
## Sync deletions, but only of files which came from the source. Files deleted from a source were never deleted downstream (e.g. `claude-code-review.yml`, which had to be removed from this repo by hand in b042a53). ### Why it never worked The sync workflow checks out the source with `actions/checkout`'s default `fetch-depth: 1`. In a single-commit shallow clone, `git log --diff-filter=D` sees nothing, so the deletion step always found zero files. Had it found any, it would have deleted **any** target file with a matching name, whether or not it came from the source. ### What's changed - Both repositories are checked out with full history. - A file deleted from the source is only deleted from the target if all of the following hold: 1. **It originated from the source.** When it was last added to the target, it matched a version the source once had. This protects files the target had before a sync overwrote them. 2. **It wasn't re-added after the deletion.** It was last added to the target before it was deleted from the source. This protects files restored downstream, even with identical content. 3. **It wasn't modified downstream.** Its current content matches a version the source once had. - Each file kept for one of these reasons is logged with the reason, e.g. `Kept: F (re-added after being deleted from the source)`. - Timestamps come from `--first-parent` history, so they reflect when a change *landed* on each branch rather than when it was committed on a feature branch. - Renames are treated as delete + add (`--no-renames`). Previously a rename showed up as `R` and was missed even with full history. - New `syncDeletions` option, **on by default**. Per-child or global, and an explicit `false` is respected (plain `//=` would have overwritten it). - If either checkout is shallow, deletions are skipped with a workflow warning, never guessed. ### Testing **Scenarios:** 46 checks across 21 synthetic source/target histories, including: plain deletion, an unrelated same-name file, identical and different re-adds, downstream modification, a target-original file overwritten by sync, a graph restructured through a new intermediate repo, ignored files, `source.root`/`target.root` mapping, renames, deletion via merge commit, sync via merge commit, delete/re-add cycles, stale versions, glob and unicode filenames, a directory at the path, and a shallow clone. The previous script fails 20 of them; dropping `--first-parent` fails 2. **Real graph (dry run, nothing pushed):** replayed every edge reachable from `github-config` against current `main`s: | Edge | Result | |---|---| | `github-config` β `github-graph` @ #4 | deletes `claude-code-review.yml` (matches b042a53) | | `scala-library-config` β 7 libraries, template, 3Γ Themis | deletes `linter.yml` (deleted upstream in scala-config#38) | | `scala-website-config` β template, fairmap, Themis, Kairos | deletes `linter.yml` and the now-unreferenced `deploy/Caddyfile` | | `Themis` β `Iris` | deletes `ModelTier.scala` (moved out in Themis#138) | | everything else | no change | `parse-config.sh` wasn't executed locally (no `jq` available); the change there is a single `if . == null` default. ### Note Merging enables this for every caller of `sync.yml@main`. The next sync from each source above will open or refresh PRs containing the deletions listed. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Synced files from
github-config.Applied automatic synchronisation of updated files from SgtSwagrid/github-config.
Trigger
This pull request was initially triggered by 2bb9a02633c39731d945203b18891243ea2743d0.
Note however that subsequent commits to main may also be incorporated.
Warning
This change is potentially destructive, as files with matching names will be overwritten.
Please review carefully.
Explanation
GitHub Graoh is a tool for duplicating files across repositories.
The responsible configuration can be found here.