feat(projects): automatically pull clean default branches - #419
Merged
Conversation
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit ba3cb0773859334fe9f75016295bb3893c9e6044)
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit f6db4206258b0ef30e8dd8949627acfd209bf338)
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
Projects can now keep their default-branch checkout current on their own. Turn on
Automatically pull in a project's settings and Pylon fast-forwards that checkout in the
background and at server start, but only when the checkout is genuinely idle: on the default
branch, with an upstream, and with no working-tree changes, untracked files, or local commits.
Anything else is skipped, and a failed pull never blocks startup.
Adopted from T3 Code
ba3cb0773859334fe9f75016295bb3893c9e6044(#9277) automatically pull clean default branchesf6db4206258b0ef30e8dd8949627acfd209bf338(#9763) reset automatic pull to defaultCherry-picked with
-x; both source SHAs are in the commit trailers.Pylon adaptations
Migration renumbered 045 → 058. Pylon's migration lineage diverged from upstream's when id
36 was retired, and Pylon already uses 045 for
AuthSessionClientConnection. Taking upstream'snumber would let any environment that had recorded 045 silently skip the new
auto_pullcolumn.Registered as 058 with a comment following the convention already used for ids 40–57.
The pull runs inside Pylon's remote write lock. Upstream calls
maybeAutoPulloutside anylock in both
refreshRemoteStatusandrefreshStatus. Pylon wraps those bodies inwithRemoteWriteLock, which upstream does not have. Since the pull writes to the checkout,it belongs inside that lock rather than racing the status refresh it is interleaved with, so
it was placed there.
Dropped an unrelated upstream test. The path-filtered diff carried a
"canonical Codex default for the auto-bootstrapped welcome thread" test that predates #9277
upstream and asserts an exported
getAutoBootstrapThreadModelSelection, which Pylon keepsprivate. It is not part of this feature, so only the auto-pull policy test was taken.
Docs kept Pylon's voice. The new section says Pylon rather than T3 Code, and upstream's
"To use automatic detection again, select Automatic" line was dropped because the page
already documents Pylon's Reset control a few paragraphs above.
Verification
enabled, behind, clean, default-branch checkout is pulled and that dirty, ahead, non-default
and disabled projects are left alone.
@t3tools/contracts,@t3tools/webandt3typecheck clean.its id matches its filename.
No new dependency. One additive migration, backfilling
auto_pullto0, so the feature isoff until a project opts in.
Model and harness: Claude Opus 5 via Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.