Skip to content

fix(environment): keep skill previews valid during a repeated report - #1341

Merged
nixuuu merged 1 commit into
devfrom
fix/skill-preview-repeated-report
Nov 27, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/skill-preview-repeated-report

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 27, 2026

Copy link
Copy Markdown
Member

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 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-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

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
nixuuu enabled auto-merge (squash) November 27, 2026 16:08
@nixuuu
nixuuu merged commit 5f6ccc8 into dev Nov 27, 2026
45 of 47 checks passed
@nixuuu
nixuuu deleted the fix/skill-preview-repeated-report branch November 27, 2026 16:23
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant