Repository navigation
fix(environment): retry skill preview after a report refresh - #1330
Merged
Merged
Conversation
nixuuu
enabled auto-merge (squash)
November 27, 2026 09:04
nixuuu
added a commit
that referenced
this pull request
Nov 27, 2026
…1341) ## Changes The gateway dropped a connection's accepted skill report as soon as a new report arrived and restored it only after the database write. A preview that read during that window saw no accepted report and blanked copy tokens, so it failed with "This skill copy changed" even though the worker re-sent an identical inventory. Workers repeat their report on every environment sync (connect, CLI tool reports, config changes), so this hit the linked-computer preview test in Push CI and real users. Keep the previous acceptance until the new report is stored or rejected, and store its revision and copy tokens. The preview checks that report after reading the snapshot, so an identical repeat passes and a report with a changed copy stored during the read still rejects. This replaces the single re-read added in #1330, which covered only a report that finished during the first read. Fixes: #1303 Related: #1330 ## Verification - Reproduced on current `dev` (with #1330) by firing extra environment refreshes before the preview: 1 failure in 4 runs. After the fix: 12/12. - `agent-skills` and `config-sync-environment` passed 6 times through `check:tmp` (26/26 each). - Gateway and integration typecheck, oxlint and oxfmt on edited files. Copy audit: no UI text changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 28, 2026
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.
Summary
Push CI #146 and #147 reported the same
FAILED_PRECONDITION. The controlled regression reproduces that error. The original CI logs do not identify which validation condition rejected those requests.Verification
FAILED_PRECONDITIONbefore the fix and passed afterwards.check:tmp, including rejection of an on-disk change and preview through a linked computer.git diff --checkpassed.Fixes: #1303