Repository navigation
fix(environment): keep skill previews valid during a repeated report - #1341
Merged
Merged
Conversation
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 Co-Authored-By: Claude Opus 5.5 <[email protected]> (cherry picked from commit 4c6c5996d27f6e0dc4247188127d1674214b8556)
nixuuu
enabled auto-merge (squash)
November 27, 2026 16:08
This was referenced Nov 28, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 29, 2026
## Changes - Scope diagnostics assertions to their own SQL operations. Wait for the gateway to record the active turn before exercising bot connector rules. - Keep the checkout-alias lock fixture running through the rejection assertion. Track unique start commands and their acknowledgements after a worker restart, including when the link redelivers a command. - Preinstall and cache the pinned Electron binary before the native window test. Retry the install step on failure. Use the artifact downloader with interrupted-transfer retry and digest validation for native binaries. - List the first failed step and Bun test names from attempt 1. Report missing log downloads explicitly. The old skill-preview and linked-mirror failures already have fixes on `dev`. The earlier notch timeout also has separate launch and behavior budgets. This PR moves the Electron download out of that test's setup. #1341, #1412, #1347 ## Verification - `check:tmp` on the four affected integration files and the recovery script test passed all 36 tests. The four flaky cases and two recovery cases also passed 12 consecutive runs each. - Focused lint, formatting, Bash syntax and diff checks passed. Replaying the reporter against a real failed test and a real artifact failure produced the expected entries without posting comments. - PR CI covers the full gate and the native macOS/Windows checks. The automatic recovery workflow itself runs after Push CI on protected branches. Closes #1346
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.
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
dev(with fix(environment): retry skill preview after a report refresh #1330) by firing extra environment refreshes before the preview: 1 failure in 4 runs. After the fix: 12/12.agent-skillsandconfig-sync-environmentpassed 6 times throughcheck:tmp(26/26 each).🤖 Generated with Claude Code