Skip to content

fix(copilot): retry transient identity reads without reviving stale evidence - #2283

Merged
devswha merged 1 commit into
devswha:mainfrom
YuuuXie:fix/copilot-identity-retry
Oct 28, 2026
Merged

devswha merged 1 commit into
devswha:mainfrom
YuuuXie:fix/copilot-identity-retry

Conversation

@YuuuXie

@YuuuXie YuuuXie commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Change

Recover from two temporary Copilot identity-read failures without relaxing ownership checks:

  • Retry a rejected foreground-process RPC once. Successful empty or ambiguous responses still fail closed.
  • Preserve the log byte-prefix checkpoint after retryable descriptor-read errors, solely for subsequent continuity revalidation. The failing read remains unavailable; revoked or changed session evidence is not restored.

This closes reproducible retry gaps that can leave a reader unavailable after a temporary failure. It does not recover genuinely lost lifecycle evidence, introduce session bookmarks, or claim to conclusively fix incidents whose failing response was not captured.

Validation

  • Focused Copilot tests: 74 passed, including three regressions that failed before the corrections.
  • Type checking passed.
  • Independent code review: no significant issues found.
  • Full bun run check fast passed: workflow syntax, generated files, type checking,
    build and unit tests; 8,198 passed, zero failed, 33 skipped across 529 files.
    The report verified unchanged source throughout the run.

Initial full checks exposed an existing jq installation missing from PATH. Using that installation resolved all eight CI-routing/runner failures without changing tests or safeguards.
Earlier full runs failed an installer elapsed-time assertion. A full unchanged
upstream baseline at the same commit also failed that assertion (8,194 passed,
one failed, 33 skipped). Independent wall/monotonic sampling measured repeated
approximately 1.5-second backward wall-clock steps. A targeted unchanged-baseline
reproduction captured a step during the test: the shell's blocked read lasted
19.999924 seconds in strace, while the Date.now-based assertion measured 18,574 ms.
This explains the reproduced baseline false failure. No test code, thresholds,
timeouts, clocks or security controls were changed. The final full patched run
passed all required fast checks; the host clock instability remains.

No production runtime, installed hooks, native daemon, or user agent was changed.

…vidence

Preserve only log-prefix revalidation context after transient descriptor errors and retry a rejected foreground-process RPC once. Keep changed, ambiguous and revoked ownership fail-closed.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 1fad73aa-cbc5-42dd-916b-64e5198bc512
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 4cc61dc
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 21932ae3-e1cd-4b2b-af7b-8c8191e795d2
Commits

Reviewing files that changed from the base of the PR and between 4cc61dc and d689dd5.

Files selected for processing: 4
  • changelog.d/copilot-identity-retry.md
  • server/conversation.ts
  • server/copilot-store.ts
  • server/copilot.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Copilot Chat now retries a failed process lookup once. If the retry also fails, the session is treated as unavailable.
    • Temporary errors while reading session history now trigger a fresh validation rather than relying on cached evidence. Stale or revoked session evidence is not restored, and conflicting ownership information continues to be rejected.

Copilot transcript reads now retry failed process lookups once and revalidate ownership before reusing history. Temporary descriptor-link read errors invalidate checkpoint continuity and return a retry result. Linux tests cover recovery, ownership conflicts, session changes, and unregister behavior.

Changes: Copilot transcript validation

Layer / File(s) Summary
Process lookup retry
server/conversation.ts, server/copilot.test.ts
Conversation reads retry a failed process lookup once. Tests cover recovery, ownership revocation, peer conflicts, empty results, session switches, and ongoing failures.
Descriptor-read continuity
server/copilot-store.ts, server/copilot.test.ts, changelog.d/copilot-identity-retry.md
Temporary descriptor-link read errors mark an existing checkpoint as conflicted and return LOG_READ_CHANGED. Tests cover rereads, registered and marker evidence, and unregister behavior. The changelog describes these changes.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related issues

  • devswha/ovis#2112 — Covers Copilot refresh-read failures and identity revalidation, which overlap with this PR’s retry and continuity checks.

Suggested reviewers: devswha

Merge Risk: Minimal · up to d689d

Temporary identity-read failures remain bounded and fail closed. No identified issue prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: retrying transient identity reads in the copilot code path, while keeping stale evidence from being revived. It matches the raw summary, which describes a single retry…
Description check Passed The description follows the template. It has a Change section that states the problem and the resulting behavior: one retry for a rejected foreground-process RPC, and preserved checkpoints after retry…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: retrying transient identity reads in the copilot code path, while keeping stale evidence from being revived. It matches the raw summary, which describes a single retry for process lookup and descriptor-read revalidation that does not restore revoked or stale evidence. The title is specific and follows the conventional-commit style.

Full details: Description check

Explanation

The description follows the template. It has a Change section that states the problem and the resulting behavior: one retry for a rejected foreground-process RPC, and preserved checkpoints after retryable descriptor-read errors, with revoked evidence still excluded. It has a Validation section that lists focused tests, type checking, and the full fast check with results. It does not link an issue, which the template asks for only on features, and this is a fix. The long CI and clock-instability narrative is detailed but does not change the assessment.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Merging d689dd5 (external, @YuuuXie). Codex was at capacity, so an omo reviewer and an independent second reviewer reviewed it strictly; it decides which Copilot session's history a pane shows, so both looked for any way to show a peer's or a stale session's history. A rejected paneProcessInfo is retried once (an answered empty or ambiguous process set still fails closed), and a transient readlink error on /proc//fd marks the log checkpoint for full revalidation instead of failing outright; nothing is served from the checkpoint. The second reviewer's deterministic probes: a reused pid (same number, new birth time and log) between the failed lookup and its retry shows only the new process's own verified session; a log replaced, truncated or rewritten with the same size while reads fail cannot revive the old session; a peer pane in the same folder claiming the session during the failure is refused; an unchanged log recovers its original binding. The two recovery cases fail on main and pass here; copilot.test.ts 74/74. Thank you, @YuuuXie. Not filed: the added tests do not themselves cover pid reuse or a rewrite during the descriptor error (the review's probes did); EIO on a /proc fd readlink was injected, not reproduced from a real kernel.

@devswha
devswha merged commit 44bb9f8 into devswha:main Oct 28, 2026
19 checks passed
@devswha devswha mentioned this pull request Oct 29, 2026
5 tasks
devswha added a commit that referenced this pull request Oct 29, 2026
## Release 0.4.20

The release PR, prepared by step 1 of
[docs/development.md#releasing](https://github.com/devswha/ovis/blob/main/docs/development.md#releasing),
initially on main `bd676637a16471e8744d62c7311026ddb43a39eb` (#2335,
xterm 6), then merged with final-scope main
`ef482f2e66b3344658fb548fa1110744a92929c9` (#2338) and test-only
follow-up main `269e9ce19558b8d197959250075da56b25b9668f` (#2345):

- **Version:** `version` is 0.4.20 in `package.json` and
`herdr-plugin.toml`.
- **Changelog:** `bun scripts/changelog-fold.ts 0.4.20` initially folded
122 fragments into the 2026-10-29 section of `CHANGELOG.md`, linked
their PRs, and deleted the fragments. After merging main, the modified
`letta-native-chat.md` from #2338 was folded by hand with its current
wording and PR link. No other late fragment landed; `changelog.d` holds
only `README.md`. Four additional entries for external PRs without their
own fragments bring the section to 157 entries.
- Added 22 `by @login` credits across all 19 outside-contributor PRs in
the release range. Preserved the existing credit to @Yoonwoo-Ha for
#1634. See the complete ancestry-based audit below.
- **Release summaries:** en, ko, ja and zh each have 5 new, 5 improved
and 5 fixed lines, matching 0.4.19's shape. They include the xterm 6
improvement: terminal frames no longer mix old and new output. Every
English line is at most 80 characters.
- **Remote bundle:** `REMOTE_BUNDLE_VERSION` rises from 38 to 39 because
the bundle inputs changed since remote-v38.
- **Telemetry:** the guard confirms no Worker deploy or deployed
fingerprint update is needed.
- **iOS upload note:** CURRENT_PROJECT_VERSION raised to 3 for App and
OvisNotifications (last uploaded: 2, source: `docs/native-app.md:99`,
commit `54fdadc1c65da5d50a6afef411e3ed8f23b6c255`). Both targets inherit
project-level Debug and Release settings, and every
`CURRENT_PROJECT_VERSION` entry is 3. `app/store/ios.md` now records the
prepared build. This is the last documented upload, not a live App Store
Connect query; check for later uploads before uploading. The marketing
version remains 1.0.
- The changelog explicitly distinguishes delivery: removing WebKit's
form bar (#2109) requires the new iOS app build, while Korean
composition (#2307) comes with the PC update and needs no new iOS build.
The Korean-input summary says the same in all four languages, with no
change to list counts.

## Validation

- Final `dori heavy release-check -- bun run check fast`: passed, exit
0; workflow syntax, generated types/themes, typecheck, build and unit
suite (8,591 pass, 0 fail, 34 platform skips in 549 files). This is the
merged tree containing #2338, #2345, the contributor corrections and iOS
build 3.
- `bun test scripts/changelog-fold.test.ts
server/release-notes.test.ts`: 33 pass, 0 fail.
- `bun scripts/release-notes.ts 0.4.20`: passed, with all patch-note
lists and the full changelog.
- `bun scripts/release-guards.ts` and CI mode with `--base
ef482f2`: passed on the final merged
tree: "Release 0.4.20: remote bundle, telemetry Worker and release
metadata are in order."
- `bun scripts/release-guards.ts --release 0.4.20`: expected exit 1 only
because "remote-v39 is not published." The merge pass publishes it after
merging.

## Merge pass

**Do not merge before the owner's OK.**

- [ ] Merge only after the owner's OK and required checks pass.
- [ ] After merging, push `remote-v39` on the merged commit and wait for
the **Remote PC bundles** workflow to publish the manifest and all
archives.
- [ ] Then run **Release** on `main` with version `0.4.20`, without `v`.
The Release workflow creates the app tag; do not push it by hand.
- [ ] From this PR's merge until the Release run is done, merge nothing
touching `server/`, `shared/`, `bun.lock` or `patches/`.
- [ ] A changelog fragment merged after this PR must be moved into
0.4.20 by hand.

This lane stops at the open PR. No tag, workflow dispatch, merge or
telemetry deploy was performed.

**Completed release follow-up:** merged main `ef482f2e` including #2338
(`fix/letta-no-live-box`), folded its revised fragment into 0.4.20, and
retained the contributor-credit commit `184dc120` and iOS-build commit
`0ffa3d45`. The Letta summary already describes conversation support
without promising a live-terminal box, so it needs no change.

Merged test-only #2345 from main `269e9ce1`: the two usage browser
checks now wait for the earlier shared account-order save and start the
sign-in check from a cleared order. No product behavior or late fragment
was added; `changelog.d` still contains only `README.md`. The iOS
delivery clarification and resolved review thread are retained.

## Complete external-contributor audit

Checked every merged PR whose merge commit is in `git log
v0.4.19..origin/main`: 133 PRs through final-scope main `ef482f2e`, or
134 including test-only #2345 on `269e9ce1`, with 19 PRs by 12 external
non-bot authors. Both rescans found no additional external-author gaps;
#2345 is by the maintainer. Added the four missing entries: #2271 and
#2274 by @CharleoYang, #2290 by @DravenDou, and #2282 by @fivetaku. The
tab-reopening summary now includes the history-page improvement in all
four languages; list counts remain 5/5/5.

Full external PR list checked: #1911 @jjsteffen; #2068 @YuuuXie; #2072
@Noobear; #2087 @JJLiebig; #2145 @mattmarcin; #2176 @jpcarranza94; #2231
@philipprass-prog; #2235 @vuongnmhvn; #2270, #2271, #2274 @CharleoYang;
#2278 @jpcarranza94; #2282 @fivetaku; #2283, #2292, #2293 @YuuuXie;
#2301 @jpcarranza94; #2321 @kilhyeonjun. Every PR has a linked `by
@login` credit in 0.4.20.

---------

Co-authored-by: sisyphus-dev-ai <[email protected]>
@YuuuXie
YuuuXie deleted the fix/copilot-identity-retry branch November 3, 2026 14:55
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.

2 participants