Skip to content

docs(go): define deterministic reservation release with Update(0) - #6424

Merged
kixelated merged 3 commits into
mainfrom
quest/m1/release-audit/go-reservation
Oct 23, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m1/release-audit/go-reservation

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Go's reservation docs say to drop the handle to return bandwidth, but collection does not promptly finalize it. Replacing a reservation on a still-subscribed track can keep its previous share and probe ceiling until collection.

Approach

Document the existing Update(0) contract: it immediately relinquishes the share and automatic probe ceiling while keeping the track and reservation usable. Prefer updating one reservation to replacing it. Public Go coverage retains the old handle across replacement without forced GC, checks sibling allocation, repeated release, and reuse; deterministic native coverage checks the matching probe target. Complete the release-audit quest.

Impact

  • No Go API, FFI, production behavior, or wire changes. No migration required.
  • A zero ceiling retains the native registration until finalization or closed-track pruning, with no bandwidth or automatic probe contribution.
  • The consumer is a Go application managing its own encoder and reservation lifetime.

Alternatives

An explicit disposal API is unnecessary for the intended allocation-release contract. Reusing Update(0) avoids expanding the public surface.

Validation

  • just ci: passed on the final tree, including 8,253 native tests, optional-feature suites, documentation, quests, and race-enabled Go wrapper tests.
  • Standalone just go check and focused native allocation/probe-target regression: passed.
  • quest check --base origin/main and git diff --check: passed.
  • Full cross-language interop is not required: no FFI, wire, or gateway behavior changed.

Follow-ups

None. This is a deterministic release contract, not evidence of a permanent native leak or a measured performance regression.

(Written by GPT-6)

@kixelated kixelated changed the title Settle deterministic Go reservation release docs(go): define deterministic reservation release with Update(0) Oct 23, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Completed the release-audit quest with the existing Update(0) operation. Retained-handle replacement through the public Go wrapper proves immediate sibling-share release without GC, and the native regression proves the automatic probe target falls immediately while subscriptions remain live. Repeated release and reuse are covered. No public API, FFI, production behavior, or wire change was needed.

Final just ci, standalone Go checks, the focused native test, quest validation, and diff checks all passed. There are no open decisions or suggested follow-ups; marking ready for review. No merge or review monitoring is part of this run.

(Written by GPT-6)

@kixelated
kixelated marked this pull request as ready for review October 23, 2026 00:44
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a221419c-4ae5-4846-b556-c1eddf9080a0
📥 Commits

Reviewing files that changed from the base of the PR and between bbbb42c and 7e67abd.

📒 Files selected for processing: 7
  • doc/lib/go/index.md
  • go/wrapper/README.md
  • go/wrapper/bandwidth_test.go
  • go/wrapper/session.go
  • quest/m1/release-audit/README.md
  • quest/m1/release-audit/go-reservation.md
  • rs/moq-net/src/model/bandwidth.rs
  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T09:06:41.075423Z 7e67abd New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated
kixelated enabled auto-merge October 23, 2026 04:49
# Conflicts:
#	quest/m1/release-audit/README.md
@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e67abdca3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

replacement := bandwidth.Reserve(demand, 1)
// Even a retained predecessor must relinquish the allocation explicitly.
// Priority makes this independent of the live estimate's exact value.
grant(sibling, 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Wait for the first bandwidth sample

On a fresh connection this assertion races the asynchronous estimate forwarding: Session::new creates the send-bandwidth producer without seeding it (rs/moq-net/src/session.rs:345-347), and the connection publishes Connected before run_session forwards the first sample (rs/moq-tokio/src/connection.rs:875-882). Consequently Grant() can still return nil here, causing the helper to fail before the release behavior is tested; the context timeout cannot help because these reads are nonblocking. Synchronize on estimate availability or use a deterministic injected estimate so this remains a high-signal merge-gate test.

AGENTS.md reference: AGENTS.md:L28-L28

Useful? React with 👍 / 👎.

Merged via the queue into main with commit 4381af6 Oct 23, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m1/release-audit/go-reservation branch October 23, 2026 10:43
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