Repository navigation
fix(overleaf): send outside the application section, behind an admission check - #634
Merged
Merged
Conversation
…ion check Contract section 9: the network is never awaited while holding the checkout. #633 held confirm's application section through the push, so a pull, branch switch or checkpoint restore of the checkout waited for Overleaf. Publication is now two parts. Inside the section: gate, verify, re-check kept copies, commit and record the attempt (unchanged). Then the section is released, and a short admission section of its own checks that the checkout's epoch has not moved since verification (no pull, switch or restore ran, and none is running) and that the credential is still the reviewed one; otherwise the attempt is recorded `not-sent` (`send-refused`). The push runs holding no section. Changes after admission are later local changes and never alter what is sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
…d the credential Codex round 1 on #634: - Admission compared only the checkout's epoch number. A removed or replaced checkout (another physical key, also at epoch 0), or a nested checkout that lost its marker (the remaining chain adding up the same), was admitted and sent. Admission now requires the same key chain at the same epoch as at verification, and the same physical checkout and folder. - The credential was compared before entering the admission section, whose lookup is asynchronous; a renewal meanwhile was missed. It is now decided inside the section, last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yaacovcorcos
marked this pull request as ready for review
October 23, 2026 14:32
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2026
…admission-20261023
yaacovcorcos
added a commit
that referenced
this pull request
Oct 23, 2026
yaacovcorcos
added a commit
to nattikahana/scient-desktop
that referenced
this pull request
Oct 24, 2026
…utes) The slowest web shard takes about 10 minutes, setup and cleanup included (9m50s to 10m18s in October 2026). With a 10-minute cap, a shard whose every step passed was cancelled during cleanup, and the merge queue treated that as a failed check and ejected ScientFactory#634. The cap now keeps headroom over the slowest observed shard, as the server shards already do. 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.
What this changes
A follow-up to step 4 (#633) that brings publication in line with contract section 9: the network is never awaited while holding the checkout.
#633 kept the confirm's application section through the push to Overleaf. While a push was in flight, a Git pull, branch switch or checkpoint restore of that checkout had to wait, however slow the network was. Nothing was affected in practice: nothing mounts the coordinator until step 5, and this lands first.
How it works now
Publication is split in two:
unknownwith its pins.Send admission, a short application section of its own. Inside that section, the send goes ahead only if:
Otherwise the attempt is recorded
not-sent(send-refused), and nothing is sent.Send once, holding no section. A change to the checkout after admission is a later local change, and it never alters what is sent.
A new test hook,
admitting, sits between the two.Tests
Six new real-Git tests in
OverleafCoordinator.publication.test.ts:not-sent, with no push.not-sent, no push.not-sent, no push.Each guard was broken in turn (the epoch, the key chain, the folder check, and the credential check moved back before the section), and its test failed.
vp test run src/scient/overleaf src/scient/workspace: 584 tests pass. Typecheck, lint and knip are clean.The engine doc and #535's step-4 design now describe the two parts.
Review
Codex (gpt-6.1-sol, high reasoning) reviewed this in two rounds. Round 1's findings are fixed, each with a test that fails without its fix. Round 2 found nothing: merge-ready (55 focused tests, 12 extra checks and two real crash-and-restart runs passed).
One boundary remains, and Codex judged it acceptable: if the original folders are moved away and moved back unchanged, outside Scient, admission still passes, because their identity and epoch are the same.
Follows #633.
🤖 Generated with Claude Code