8000 test(e2e): hold daemon 2's busy default port across its start by gominimal-aw-bot[bot] · Pull Request #2311 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

test(e2e): hold daemon 2's busy default port across its start - #2311

Merged
norrietaylor merged 2 commits into
mainfrom
inbox-patch/e2e-hold-default-port-at-beat-d-c7c9198a76fa866d
Oct 18, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
inbox-patch/e2e-hold-default-port-at-beat-d-c7c9198a76fa866d

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABU7kqog

The two-daemon recovery proof staged daemon 2's busy default port
(127.0.0.1:7654) with a single check-then-act probe: a transient holder
could release before daemon 2 started, leaving the default free — no
relocation, so the NET-025 warn the proof asserts was never owed
(informed by #627). Beat D now waits out any foreign holder, then holds
7654 with this run's own stand-in (ready-file handshake, three-way
outcome), and asserts daemon 2 never reports 7654.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — pass
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — pass
  • no Rust source changed (shell script only), so no cargo test -p crate applies; clippy type-checked all test code
  • live-session: native-daemon-e2e (.github/workflows/ci-linux-native.yml) — runs on this PR; not runnable in the fixer sandbox

Summary by CodeRabbit

  • Tests
    • Improved end-to-end checks for concurrent daemon startup when the expected port is occupied. The checks now verify that the test daemon secures its port before continuing, allow time for another listener to release it, and fail if the daemon’s proxy reuses the first daemon’s port.

The beat D staging gated its stand-in holder for 127.0.0.1:7654 on
a single check-then-act probe, so a transient holder (a daemon still
draining from the stop above) could hold the port at the probe,
release before the second daemon started, and leave the default free:
no relocation happened and the NET-025 warn was never owed, failing
the proof spuriously.

Wait out any foreign holder, then hold the port with this run's own
stand-in, confirming the bind via a ready-file handshake, and treat
a persistent foreign listener as a valid holder of the busy default.
Assert daemon 2 never reports 7654 so the staging fails loudly at
the source instead of at a downstream grep.
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 18, 2026 03:10
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 18, 2026
@coderabbitai
coderabbitai Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

Or wait 39 minutes for your next included review.

Che 8000 ck out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 58 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c05f8863-3a62-4524-b7c8-495dc06923dc
📥 Commits

Reviewing files that changed from the base of the PR and between 744bdf9 and 5c9a16e.

📒 Files selected for processing: 1
  • scripts/session-e2e.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0d6754ff-6bb5-47a2-98aa-c8cff69e3e38
📥 Commits

Reviewing files that changed from the base of the PR and between 11b0b44 and 744bdf9.

📒 Files selected for processing: 1
  • scripts/session-e2e.sh

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

📝 Walkthrough

The session end-to-end proof now waits for port 7654 to become available, confirms that the proof or a foreign listener holds it, and fails if the second daemon selects port 7654.

Changes: Port contention proof

Layer / File(s) Summary
Port 7654 contention and daemon check
scripts/session-e2e.sh
When the first daemon uses a spare pin, the proof waits up to 30 seconds for port 7654 to become free. It confirms its holder is ready or accepts a remaining foreign listener, and fails if the port becomes free without being secured. The proof also fails if the second daemon selects port 7654.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 744bd

The port-contention proof has no identified issue that needs resolution before merge.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Title check Passed The title clearly and concisely describes the main change: keeping daemon 2's default port occupied during startup.
Description check Passed The description explains the problem, the fix, and verification results. It uses “Verification” instead of the template’s “Testing” heading and omits the checklist, but it provides the required substa…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.)

Full details: Description check

Explanation

The description explains the problem, the fix, and verification results. It uses “Verification” instead of the template’s “Testing” heading and omits the checklist, but it provides the required substantive information.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit waits beside the gate,
While port 7654 keeps its state.
A holder signals, clear and bright,
The daemon picks a different site,
And hops away into the night.

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

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 18, 2026
@norrietaylor norrietaylor changed the title fix: hold daemon 2's busy default port across its start test(e2e): hold daemon 2's busy default port across its start Oct 18, 2026
When the pin is 7654, daemon 1 holds the default, so daemon 2 on 7654
is a same-port failure; let the same-port assert diagnose it.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 5c9a16e97f88.

Nothing to do.

Clobber: none: git log shows the two PR commits build on each other (744bdf9 adds the staging, 5c9a16e gates the new assert on RECOVER_PIN != 7654); nothing recent is reverted.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 18, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved on ARCH PASS at 5c9a16e.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit e2443c1 Oct 18, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/e2e-hold-default-port-at-beat-d-c7c9198a76fa866d branch October 18, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0