Skip to content

fix(tests): repair Windows hook-lifecycle and macOS connection-cap CI failures - #13

Merged
ngallodev merged 1 commit into
mainfrom
release-tooling
Oct 2, 2026
Merged

ngallodev merged 1 commit into
mainfrom
release-tooling

Conversation

@ngallodev

@ngallodev ngallodev commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Fixes the two GitHub CI shards that were still red when #12 merged. Both are test defects; no product code changes.

Windows: cli_windows_lifecycle (tests/test_cli.c:9090)

The test installed hooks bound to <home>/.local/bin/codebase-memory-mcp.exe. uninstall builds its expected owned-script bytes from cbm_agent_installed_binary_path(), which in this fork returns codebase-memory-cli.exe (src/cli/cli.c:7696). The seeded .cmd scripts and their extensionless twins never matched an owned shape, so uninstall left them in place and the final check failed. The test now uses the fork's installed binary name. Upstream's version of this test uses mcp.exe because its installed binary still has that name.

macOS: daemon_runtime_connection_cap_covers_slow_hello_and_stopping_is_terminal (tests/test_daemon_runtime.c:2951)

The test holds a raw connection open without sending hello so it occupies one of two slots, then expects a third client to be rejected for capacity. The fixture's server hello deadline was 2 s. On macos-14 the sanitized daemon_runtime suite took 427 s, and the two full client handshakes before the overflow connect could outlast that deadline. The server then dropped the slow connection and freed the slot before the sample. This fixture now gets a 30 s request timeout through a static override, following the existing runtime_test_fixture_permanent pattern. The test closes the slow connection itself, so nothing depends on the shorter deadline. The capacity assertion is unchanged.

Validation

Summary by CodeRabbit

  • Tests
    • Improved the connection-capacity test to keep a slow connection active during the check, making the test better reflect that scenario.
    • Updated test setup to allow a longer HELLO timeout when needed; other test changes do not affect behavior.

…-cap failures

Windows: cli_windows_lifecycle (tests/test_cli.c:9090) installed hooks bound
to <home>/.local/bin/codebase-memory-mcp.exe, but `uninstall` derives its
expected owned-script bytes from cbm_agent_installed_binary_path(), which in
this fork returns codebase-memory-cli.exe. The seeded .cmd scripts and their
extensionless twins therefore never matched the owned shapes and were left
in place. The test now uses the fork's installed binary name, matching the
path uninstall actually resolves. Upstream's test used mcp.exe because its
installed binary still has that name.

macOS: daemon_runtime_connection_cap_covers_slow_hello_and_stopping_is_terminal
keeps a raw connection open without sending hello so it occupies one of two
slots. The fixture's 2 s server hello deadline could expire during the two
full client handshakes on a loaded sanitized runner (the suite took 427 s on
macos-14), freeing the slot before the overflow connect was sampled. This one
fixture now gets a 30 s request timeout through a static override, following
the existing runtime_test_fixture_permanent pattern. The test closes the slow
connection itself, so nothing depends on the shorter deadline. The capacity
assertion is unchanged.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1065f9e6-98b7-4392-bb52-e482de335320

📥 Commits

Reviewing files that changed from the base of the PR and between 37dd63b and 7e9005f.

📒 Files selected for processing (2)
  • tests/test_cli.c
  • tests/test_daemon_runtime.c

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


📝 Walkthrough

Walkthrough

The runtime test fixture now accepts a file-local request-timeout override. The connection-cap test uses a 30-second timeout during startup, then resets the override. Other changes reformat existing test calls and expressions without changing their behavior.

Changes

Runtime test adjustments

Layer / File(s) Summary
Fixture timeout and test updates
tests/test_daemon_runtime.c
The fixture uses a nonzero timeout override when set and otherwise retains its 2-second default. The connection-cap test sets the override to 30 seconds during startup, then resets it. Other operation calls and test expressions are reformatted.

Priority: ⬇️ Low

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

Change: Other

Suggested reviewers: deusdata

Merge Risk: ⚪ Minimal · up to 7e900

The changes correct test setup without changing runtime behavior: the CLI lifecycle test uses the installed binary name, and the daemon test extends the HELLO timeout only for its fixture. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the two main changes: test fixes for Windows hook-lifecycle failures and macOS connection-cap failures.
Description check ✅ Passed The description clearly explains both test defects, the implemented fixes, and validation results. It does not include the repository checklist or explicit DCO and lint confirmations, but the main req…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@ngallodev
ngallodev merged commit bbabc07 into main Oct 2, 2026
34 checks passed
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