chore(#803): persistent fork checkout replaces the clone-per-task pattern - #927
Merged
Conversation
…tern Two pieces of upstream housekeeping deferred past v2.0.0. The staged replies are settled on evidence rather than on what #803 assumed. OCCT#1418 merged on 2026-08-10 without its reply, its rewritten description or its Draw test; OCCT#1417 was closed by an amend against a shallow clone and reopened as OCCT#1457, where the #555 reply was posted the same day, byte for byte below its scaffolding. All four staged files now carry a status header saying which of those happened to them, so none of them reads as a pending draft when it was sent, or as sendable when it is moot. Nothing is owed upstream: a sweep of all fifteen open PRs finds no maintainer comment left unanswered. The workflow change is the remaining work. Upstream branches now live in one persistent blobless checkout of gsdali/OCCT with Open-Cascade-SAS/OCCT as a second remote, shared across worktrees, rather than a shallow clone made per task. That clone is what closed OCCT#1417, and it is not recoverable. §0 of okf/policies/upstream-occt-patch-process.md documents it, and §6 keeps the two footguns as the reason it exists. Libraries/occt-src was evaluated as the host and rejected on four measured counts, the strongest being that build-occt.sh reuses it only when HEAD is exactly at the pinned tag and prints `rm -rf occt-src` when it is not. Co-Authored-By: Claude Opus 5 (1M context) <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.
What & why
#803 asked for two things: post two staged upstream replies, then move upstream work off disposable
shallow clones onto a branch checkout of our own fork. Part 1 had largely overtaken itself between
the issue being filed and this branch, so it is closed out on evidence rather than acted on. Part 2
is the real change.
Closes #803
Nothing is owed upstream, and nothing was posted from this branch. Verified directly rather than
inherited:
state_reason: null, no closing commentfix/555-gcpnts-point-countA sweep of all fifteen currently open
gsdali-authored upstream PRs finds no maintainer comment orreview left unanswered. The only one where a maintainer has the last word is
OCCT#1388, and it is gkv311 acknowledging our
own answer ("indeed, thanks for pointing out"), not a question.
One correction to the issue's premise
#803 says
Libraries/occt-src"is already a full clone of upstream". It is not:Scripts/build-occt.sh:97creates it withgit clone --depth 1, andLibraries/occt-src/.git/shallowis present. That matters, because the shallow boundary is the exactthing that closed OCCT#1417.
What each staged file got, and why
The repro directories are kept, per #803. The four staged files each get a status header instead,
because the trap #803 was filed about is a file that reads as an unsent draft when it was sent, or as
sendable when it is moot. Deleting them would have removed the record of both.
555-gcpnts-count-contract/upstream/reply-to-gkv311.md: posted. The two-line drafting note("not yet posted", naming #1417) is replaced by a header recording that it went to #1457, why the
PR number moved, and that its "Pushed an update addressing all three points" opening is accurate.
Re-verified after editing: everything below the rule is still byte-identical to the live comment.
The staged
0001-gcpnts-review-fixes.patchis on the branch as8adab6565, hunks identical barone blank line.
522-approx-c0-collapse/upstream/reply-to-gkv311.md: never posted. Header records that, andnames the two things its body describes as done that were never done (the description rewrite, the
Draw test). Without that, the body still misleads.
522-approx-c0-collapse/upstream/pr-1418-description.md: never applied. #1418 merged with itsoriginal description.
522-approx-c0-collapse/upstream/tests/bugs/moddata_3/bug1418: never contributed. Its own"rename this at merge time" note was stale the moment #1418 merged without it.
#803's three drafting corrections (the internal scaffolding in #1417's first three lines, the "did
not have the OCCT tree checked out" sentence, the
bug23942idiom claim) are recorded as neverapplied. The first turned out to be moot already: the scaffolding was stripped at post time, as
§7 requires. The other two only mattered if the 522 reply were still going to be sent, and it is not.
The fork checkout
~/Projects/occt-upstream, outside every OCCTSwift checkout, shared by every worktree. Bloblessclone of
gsdali/OCCTwithOpen-Cascade-SAS/OCCTwired asupstream, also blobless. Set up andverified, nothing pushed:
git rev-parse --is-shallow-repositoryanswersfalse, 7136 commits reachable onupstream/master.gitfix/555-gcpnts-point-countchecked outHEADis06d807ff1,git merge-base HEAD upstream/masteris7d2efad9c, and those match#1457's live
head.shaandbase.shaexactlygit cat-file -p HEADshows two real parents, which is the footgun-A check passingWhy there, and what was rejected
Libraries/occt-srcwith the fork added as a remote is #803's own floated option. Rejected on fourcounts, each checked:
--depth 1clone, so branching there inherits the boundary that closed #1417.Libraries/is gitignored in full and is per-worktree. This worktree has noLibraries/at all,so the checkout would be re-cloned per worktree, which is the thing Post-release: post the two staged upstream replies, and move to branch checkouts of our own fork #803 asked to avoid.
build-occt.shapplies every carried patch tothe working tree, not to HEAD, and relies on
git apply --reverse --checkto stay idempotent.build-occt.sh:110-123reuses the tree only whengit describe --tags --exact-match HEADequalsthe tag it builds. A branch checkout fails that test, and the error it prints tells you to
rm -rf occt-src, which would take unpushed branch work with it.Gitignoring a checkout inside the repo was rejected for reason 2 alone: anything under the repo path
is per-worktree.
Where it is documented
okf/policies/upstream-occt-patch-process.md, as a new §0, plus a rewritten §6. Not a new file andnot
docs/guides/: that policy already owns the git mechanics, and its §6 was the thing prescribingthe clone-per-task recipe. Fixing it in place beats adding a fourth description of upstream process.
§6 keeps both footguns, since the cost is unrecoverable and the symptoms do not read as "shallow",
and now says what prevents them. Numbering starts at §0 deliberately:
upstream-occt-style.mdlinksto
#2-add-a-gtest-in-the-same-commitand#4-format, and renumbering would silently break both.Also corrected as docs-current fallout:
Scripts/patches/README.md's0018entry still called thereply "drafted" and named #1417 as the live PR, and its
0019entry did not record that #1418 ismerged upstream (
07e6d8d40).0019stays carried, since no OCCT release contains it yet.CHANGELOG entry
Upstream OCCT work moves to a persistent branch checkout of our fork (#803)
Process and documentation only, no library change. Upstream patches are now developed in one
persistent blobless checkout of
gsdali/OCCTwithOpen-Cascade-SAS/OCCTas a second remote, sharedacross worktrees, instead of a shallow clone created per task and discarded. The old pattern is what
closed OCCT#1417 (a
git commit --amendagainst a
--depth 1clone produces a rootless commit, and GitHub closes the PR as unrelated historywith no way to reopen it); that PR was reopened as
OCCT#1457. Documented as §0 of
okf/policies/upstream-occt-patch-process.md. The four upstream replies and test files staged underScripts/repro/*/upstream/now each carry a status header recording whether they were sent, so afile that was posted no longer reads as a pending draft.
SemVer impact
NONE. No source, no public API, no behaviour. The diff is one okf policy, two reproducer READMEs,
Scripts/patches/README.md, and four staged upstream artifacts underScripts/repro/*/upstream/.Nothing a consumer compiles against is touched, and the next release is v3.0.0 for reasons unrelated
to this PR (#844's rename, already in
## Unreleased).Checklist
changes: no test exists that could observe this diff.
--self-testcase was run once with its subject broken. Notapplicable, no new tests. Every existing gate self-test was run and passes, listed below.
docs/CHANGELOG.mdis not in this diff.docs/SEMVER.mdis not in this diff.Notes for the reviewer
Gate scripts, all green (run from the repo root):
No
swift build/swift testrun: the diff contains no Swift, no.mm, no.h, and noPackage.swift.Em-dash cleanup, and where it stops.
writing-style.mdasks for em-dashes to be cleared from anyfile being edited. Done for
okf/policies/upstream-occt-patch-process.md(14, plus one banned"honest") and
Scripts/repro/522-approx-c0-collapse/README.md(16). Not done forScripts/patches/README.md, which has 144 across 1164 lines: that is the dedicated pass the policyexplicitly does not require, and it would bury a two-sentence status correction under an unrelated
rewrite of the kernel-patch evidence record. Flagging the choice rather than leaving it to be
noticed.
The bodies of the staged replies are deliberately unedited, including their em-dashes. The 555
one is a verbatim copy of a public comment and the header claims byte-identity, which was re-verified
after adding the header. Editing either body would falsify the record.
Left undone, deliberately. The staged Draw test
tests/bugs/moddata_3/bug1418was nevercontributed and #1418 merged without it. Sending it now means a fresh PR against a merged fix, which
is a call for the user, not something to do under a "post the staged replies" issue. The file says so
at the top.
Scripts/repro/657-upstream-pr-status/describes a disposable sparse clone as its Method 2. Leftalone: it is a dated audit artifact recording how that audit was performed, not a live prescription,
and the persistent checkout now answers the same question without cloning.