Skip to content

fix(pending): close the small gaps the reviews of #4106 left listed - #4109

Merged
devswha merged 1 commit into
mainfrom
fix/pending-lows
Nov 18, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/pending-lows

Conversation

@devswha

@devswha devswha commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What

The small gaps that the reviews of #4106 found and that PR listed for later, each with a test that fails without its fix. Nothing was typed into a terminal in any of them except the third.

  1. A first message nobody will send on its own was listed as queued, then as held. Other pages attached to its pane saw it as waiting for a moment. PendingInputs.enqueue takes the reason and lists the message held at once.
  2. A queue request typed at once could be queued without a check. When omp's start ran out before the wait's first poll, the wait's last process read came after its last check, and the pending_wait that followed queued the message for a page that had left, or past its deadline. The wait's own check (lease, discard, deadline) is made once more after the wait.
  3. A chat message sent at once, then queued behind a starting omp, took its lease in the pane's lane. A page that left the pane and came back while its frame waited there got a new lease, and the message was sent on its own later. The lease is now the one taken as the frame comes.

The verify-pending-lease skill drops the assumption and the "not covered" lines these were (its model is unchanged), and says of a held copy's resend (resend_id) that it is a present user's own send under authorizeSocket, by design. AGENTS.md: one line of #4108 rewrapped.

Validation

  • bun run check fast: green.
  • bun test server/pending-input.contract.test.ts server/opencode-first-message.contract.test.ts against the isolated test herdr: 134 pass, 0 fail (run before the last two small fixes below; the unit tests ran after them).
  • Each new test fails with its fix taken out: server/core/pending-left-lease.test.ts (two), server/core/pending-omp-start.test.ts (three cases).
  • Not run: check full, browser regressions (no UI change).

Review

Codex gpt-6.2-astra, read-only, on the commit before this push: CLEAR, two mediums and one low, all three taken:

  • a requester that closes as it is told of the first listing stayed registered (a regression of fix 1): asked about again after the listing, with a test;
  • discard and the deadline were not checked after omp's last process read (older than this PR): fix 2 now repeats the wait's whole check, with a test for the deadline;
  • the skill overstated what Submit stands for: its text says which immediate sends it covers.

🤖 Generated with Claude Code

- A first message that nobody will type on its own was listed as queued and then, in a second
  frame, as held. PendingInputs.enqueue takes the reason and lists it held at once. A page that
  leaves as it is told of that first listing is still asked about after it, and held.
- A queue request typed at once could be queued without a check: when omp's start ran out before
  the wait's first poll, the wait's last process read came after its last check, and the
  pending_wait that followed queued the message for a page that had left, or past its deadline.
  The wait's own check (lease, discard, deadline) is made once more after the wait. Nothing was
  typed; the row said it waited.
- A chat message sent at once that is queued after all behind a starting omp took its lease in
  the pane's lane: a page that left the pane and came back while the frame waited got a new one,
  and the message was sent on its own later. The lease is now the one taken as the frame comes.

The verify-pending-lease skill drops the assumption and the "not covered" lines these were, and
says of a held copy's resend that it is a present user's own send, by design. AGENTS.md: one line
of #4108 rewrapped.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Chat messages are now refused if the sender loses their page lease or the submission times out while waiting for an agent to start, instead of being sent or left pending.
    • First messages that won’t be sent automatically appear as held from the start, rather than briefly appearing queued.
    • If a page leaves while a first message is waiting, the message remains held and won’t be sent when the page returns.
  • Documentation
    • Clarified how queued and held messages behave when a page leaves or loses its lease.

Pending message handling now retains arrival-time leases across OMP startup waits and checks lease validity, discard status, and deadlines again after waiting. First messages are held when their requester is absent or leaves. The maintainer instructions also clarify when to request another review.

Changes: Pending message handling

Layer / File(s) Summary
Submission lease validation
server/core/pending.ts, server/core/pending-omp-start.test.ts, .claude/skills/verify-pending-lease/SKILL.md, .claude/skills/verify-pending-lease/covered.blobs
Eligible immediate submissions capture a lease at arrival for use behind OMP startup. The wait rechecks lease, discard status, and deadline after it completes. Tests cover lease loss and timeout cases.
First-message held status
server/pending-input.ts, server/core/pending.ts, server/core/pending-left-lease.test.ts, changelog.d/pending-lease-lows.md, .claude/skills/verify-pending-lease/covered.blobs
Enqueueing can start a message as held with a fault. First messages are held when the requester is absent or leaves. Tests cover held listings and preventing later typing.

Maintainer review-request rule

Layer / File(s) Summary
Review-request conditions
AGENTS.md
The instructions specify which behavior, HTTP/WS contract, or workflow changes qualify for another review, and exclude rebases and changelog, documentation, comment, or test-only commits.

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

Change: Bug fix

Possibly related PRs

  • devswha/ovis#4107: Changes the same first-message listing path and adds tests to the same test file.
  • devswha/ovis#4106: Introduced the pending-input hold behavior and tracking that this pull request updates.
Merge Risk: Minimal · up to b669c

The change tightens lease and held-status handling for pending messages and adds tests for those cases. No merge-blocking risk is identified from the supplied evidence.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(pending): close the small gaps the reviews of #4106 left listed" names the pending-input area and the fix intent, which matches the changeset. The changes cover three gaps: immediate he…
Description check Passed The description follows the template. It has a Change section that explains the problem and resulting behavior for three fixes, with a note on the skill and AGENTS.md updates. It has a Validation sect…
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 "fix(pending): close the small gaps the reviews of #4106 left listed" names the pending-input area and the fix intent, which matches the changeset. The changes cover three gaps: immediate held-state enqueue for first messages, rechecks after the omp-start wait, and lease capture at frame arrival. The title is vague about which gaps, which makes it partially related rather than fully specific, but it is not off-topic. The phrase "left listed" is awkward and refers to an external PR, so a teammate scanning history may not know the specific fixes.

Full details: Description check

Explanation

The description follows the template. It has a Change section that explains the problem and resulting behavior for three fixes, with a note on the skill and AGENTS.md updates. It has a Validation section listing commands run with results, the checks skipped (check full, browser regressions), and the new tests that fail without their fixes. The template asks for contract-test coverage for HTTP/WS changes. The author ran the contract tests, which covers that. The template's issue link applies to features, and this is a fix, so it is not required. The description is complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d0e3923 and b669ce5.

Files selected for processing: 8

  • .claude/skills/verify-pending-lease/SKILL.md
  • .claude/skills/verify-pending-lease/covered.blobs
  • AGENTS.md
  • changelog.d/pending-lease-lows.md
  • server/core/pending-left-lease.test.ts
  • server/core/pending-omp-start.test.ts
  • server/core/pending.ts
  • server/pending-input.ts

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

@devswha
devswha merged commit 10c2f06 into main Nov 18, 2026
24 checks passed
@devswha
devswha deleted the fix/pending-lows branch November 18, 2026 06:23
@devswha

devswha commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head b669ce58e. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

Merged by the session that opened it, as AGENTS.md now says. Reviews of this head: CodeRabbit, no actionable comments; Codex gpt-6.2-astra, read-only, on the commit before the push: CLEAR, and its two mediums and one low are fixed in this head with tests (listed in the description).

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