Skip to content

Refs #84: broaden workspace test gate to --tests --bins --examples --lib - #15

Merged
AlexMikhalev merged 1 commit into
mainfrom
task/84-fix-workflow
Sep 1, 2026
Merged

Refs #84: broaden workspace test gate to --tests --bins --examples --lib#15
AlexMikhalev merged 1 commit into
mainfrom
task/84-fix-workflow

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Refs #84: replaces
cargo test --workspace --lib --no-fail-fast
with
cargo test --workspace --tests --bins --examples --lib --no-fail-fast
in .gitea/workflows/native-ci.yml.

Why: the narrower --lib gate silently skipped
crates/terraphim_mcp_server/tests/test_tools_list.rs and
crates/terraphim_mcp_server/tests/test_all_mcp_tools.rs, which
exercise real JSON-RPC round-trips against the terraphim_mcp_server
binary. --tests --bins --examples adds those targets; --lib is
retained so the existing crate-internal coverage continues to run.
--no-fail-fast ensures all targets run even when one fails, so a
single broken test does not hide the rest of the failures behind an
early abort.

Local verification: on a verification branch that merged #142, #143,
and #144 alongside this change, cargo test --workspace --tests --bins --examples --lib --no-fail-fast with TERRAPHIM_SERVER_BIN
pointing at the v1.21.3 server binary exits 0 with zero FAILED test
targets.

Order of merging: #142, #143, #144 should land first so the
broadened gate has nothing to flag. Once they are in, this PR
keeps the gate honest going forward.

Copy link
Copy Markdown
Contributor Author

Summary

The native CI gate at .gitea/workflows/native-ci.yml has been running cargo test --workspace --lib --no-fail-fast since the 2026-07-31 --lib-only regression. That narrower gate silently skipped crates/terraphim_mcp_server/tests/test_tools_list.rs and crates/terraphim_mcp_server/tests/test_all_mcp_tools.rs, which exercise real JSON-RPC round-trips against the terraphim_mcp_server binary. As a result, the broken -- clap argument, the missing notifications/initialized frame, and the KG-walk hang in CI went undetected for several weeks; this PR is the gate half of the broader #142/#143/#144/#84 fix.

The change is one line: --workspace --lib --no-fail-fast becomes --workspace --tests --bins --examples --lib --no-fail-fast. --lib is retained so the existing crate-internal unit tests continue to run; --tests --bins --examples adds the missing integration-test, binary-smoke, and example-doctest targets. --no-fail-fast ensures a single failing target does not abort the rest, so the failure surface area remains visible.

The PR also adds an inline comment block explaining the rationale and pointing at #142/#143/#144 as the prerequisite fixes. The merge order is called out in the PR body: #142, #143, #144 should land first, then this PR keeps the gate honest going forward.

What was done well: the verification path is documented (the PR body cites a local verification branch that merged #142, #143, #144 alongside this change, with TERRAPHIM_SERVER_BIN pointing at the v1.21.3 binary, exiting 0 with zero FAILED targets). The rationale comment block inside native-ci.yml is well-placed and gives the next maintainer the historical context they need.

What remains problematic: nothing structural. The one observation worth noting is that --doc (doctests) is not enabled by --tests --bins --examples; cargo test --workspace --doc is a separate flag. If the workspace has doctests that need to participate in the gate, this PR does not exercise them.

Confidence Score: 5/5

  • Safe to merge after #142, #143, and #144 land.
  • The change is a one-line CI flag flip with a clear before/after rationale. No code is touched. The only gate adjustment is "more targets participate"; existing passing targets continue to pass.
  • No files require special attention.

Important Files Changed

Filename Overview
.gitea/workflows/native-ci.yml Workspace test gate widened from --lib to --tests --bins --examples --lib with --no-fail-fast retained. Inline comment block documents the rationale. No issues found.

Inline Findings

No P0, P1, or P2 findings.

Observation (not a finding) crates/terraphim_update/src/lib.rs and friends may have /// doc comments with runnable examples. cargo test --tests --bins --examples --lib does not enable --doc. If a future test regression hides inside a doctest, this PR will not catch it. Consider whether a follow-up should add cargo test --workspace --doc --no-fail-fast as a separate step. Not blocking.

Last reviewed commit: f0ab648 | Reviews (1)

Replace 'cargo test --workspace --lib --no-fail-fast' with
'cargo test --workspace --tests --bins --examples --lib --no-fail-fast'.

Why: the narrower --lib gate silently skipped
crates/terraphim_mcp_server/tests/test_tools_list.rs and
crates/terraphim_mcp_server/tests/test_all_mcp_tools.rs, which
exercise real JSON-RPC round-trips against the terraphim_mcp_server
binary. --tests --bins --examples adds those targets; --lib is
retained so the existing crate-internal coverage continues to run.
--no-fail-fast ensures all targets run even when one fails, so a
single broken test does not hide the rest of the failures behind an
early abort.

Verified locally on a verification branch that merged #142, #143,
and #144 alongside this change: 'cargo test --workspace --tests
--bins --examples --lib --no-fail-fast' with TERRAPHIM_SERVER_BIN
pointing at the v1.21.3 server binary exits 0 with zero FAILED
test targets.
@AlexMikhalev
AlexMikhalev merged commit 9f31558 into main Sep 1, 2026
1 check failed
@AlexMikhalev
AlexMikhalev deleted the task/84-fix-workflow branch September 1, 2026 00:24
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