Skip to content

ci: format, lint and test every pull request - #23

Merged
grunch merged 1 commit into
mainfrom
ci/pr-checks
Nov 16, 2026
Merged

grunch merged 1 commit into
mainfrom
ci/pr-checks

Conversation

@grunch

@grunch grunch commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds .github/workflows/ci.yml, so every pull request and every push to main is formatted, linted and tested before review. Until now only release.yml ran these checks, and only when a version tag was pushed.

Why: on #16, merge commit 6d23f5e did not compile and deleted the trusted-node tests, yet the PR showed green, because its only check was CodeRabbit's, which had paused before that commit.

Closes #22

What runs

Job Runner Steps
Format, lint and test ubuntu-latest cargo fmt --all -- --check, cargo clippy --locked --all-targets -- -D warnings, cargo test --locked
Check the Windows target ubuntu-latest cargo check --locked --target x86_64-pc-windows-msvc --bin mostro-mcp
  • Same toolchain setup as release.yml (dtolnay/rust-toolchain@stable, Swatinem/rust-cache@v2).
  • permissions: contents: read and no secrets, so PRs from forks run it safely.
  • A newer push to the same PR cancels the run in progress; pushes to main are never cancelled.
  • Out of scope, as in ci: build, lint and test every pull request #22: the regtest suite (needs Docker and the nodes) and cargo build --release on every PR (cargo test already compiles everything; the release workflow builds the packages).

AGENTS.md lists the workflow and says CI does not replace running the checks locally and reporting the result.

After merge (repository setting)

Make Format, lint and test and Check the Windows target required status checks on main in branch protection. Until then CI shows the result but does not block a merge.

Test plan

Run locally on this branch (Linux, main at 02ec324 plus this commit):

  • cargo fmt --all -- --check: pass
  • cargo clippy --locked --all-targets -- -D warnings: pass
  • cargo test --locked: 188 unit and 21 stdio passed, 10 regtest ignored
  • cargo check --locked --target x86_64-pc-windows-msvc --bin mostro-mcp: pass
  • The workflow YAML parses (jobs check, windows-check; triggers pull_request, push to main)
  • Both jobs pass on GitHub for this PR (the workflow runs on the PR that adds it)
  • Optional, after merge: a throwaway PR with a formatting error gets a red check

Not run: actionlint (not installed here). No regtest: nothing here changes how a tool talks to the node.

🤖 Generated with Claude Code

https://claude.ai/code/session_016wLvM1GyzFZkzVQSWvWLzh

Summary by CodeRabbit

  • Chores
    • Added automated checks for changes submitted to the main branch, including formatting, linting, tests, and Windows-target build validation.

Nothing built or tested a pull request before merge: release.yml runs
only on a version tag. On #16 a merge commit that did not compile still
showed a green status, because the only check was CodeRabbit's, paused
before that commit.

The new CI workflow runs on every pull request and every push to main:
cargo fmt --check, clippy with -D warnings and cargo test (all --locked),
plus a type check for x86_64-pc-windows-msvc, which AGENTS.md already
asks for because of the #[cfg(unix)] code. Read-only token, no secrets,
so fork PRs run it too. Regtest stays manual.

AGENTS.md lists the workflow and says it does not replace running the
checks locally and reporting the result.

Closes #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wLvM1GyzFZkzVQSWvWLzh
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T19:19:38.244393Z a60e00f PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds CI checks for pull requests and pushes to main. The workflow checks formatting, Clippy, tests, and compilation for the Windows MSVC target. AGENTS.md adds two identical entries for the workflow.

Changes

Pull request CI

Layer / File(s) Summary
Linux checks and workflow documentation
.github/workflows/ci.yml, AGENTS.md
The workflow runs formatting, Clippy, and tests on Linux. It sets read-only contents permission and configures run concurrency. AGENTS.md lists the workflow twice.
Windows-target check
.github/workflows/ci.yml
A Linux-hosted job installs the Windows MSVC target and runs cargo check for the mostro-mcp binary.

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

Change: Other · Severity of issue fixed: Medium

Possibly related PRs

  • MostroP2P/mcp#18: Introduced AGENTS.md, which this PR updates with the CI workflow entry.

Suggested labels: documentation

Merge Risk: Minimal · up to a60e0

This adds CI checks for formatting, linting, tests, and a Windows-target compile check, with read-only permissions. No concrete merge-blocking risk was found. Branch protection must be configured separately for the checks to block merges.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: format, lint and test every pull request" matches the main change. The PR adds .github/workflows/ci.yml that runs formatting checks, Clippy with warnings denied, tests with the lockfile…
Linked Issues check Passed Issue #22 requires a CI workflow on pull_request and push to main. Its jobs are: fmt check, clippy with -D warnings, cargo test (all with --locked), and a Windows-target cargo check. Each requirement …
Out of Scope Changes check Passed The changes are .github/workflows/ci.yml (new, 48 lines) and AGENTS.md (2 added lines). Both serve issue #22. The workflow implements the requested checks. The AGENTS.md rows document the new workflow…
Full details: Title check

Explanation

The title "ci: format, lint and test every pull request" matches the main change. The PR adds .github/workflows/ci.yml that runs formatting checks, Clippy with warnings denied, tests with the lockfile, and a Windows-target compile check on pull requests and pushes to main. The title names the core purpose and is short and specific. It omits the Windows-target check and the concurrency settings, which is acceptable for a title.

Full details: Linked Issues check

Explanation

Issue #22 requires a CI workflow on pull_request and push to main. Its jobs are: fmt check, clippy with -D warnings, cargo test (all with --locked), and a Windows-target cargo check. Each requirement is met in .github/workflows/ci.yml at the reviewed head. The job check runs cargo fmt --all -- --check, cargo clippy --locked --all-targets -- -D warnings, and cargo test --locked. The job windows-check runs cargo check --locked --target x86_64-pc-windows-msvc --bin mostro-mcp. Both jobs use dtolnay/rust-toolchain@stable and Swatinem/rust-cache@v2, matching the release setup. The issue's acceptance criteria are met structurally. Failing steps fail the job, because no continue-on-error is set, so a failure gives a red check. The workflow sets permissions: contents: read and uses no secrets, so fork PRs run safely. AGENTS.md gains a row that lists the workflow. Its existing local-check requirement text is unchanged, so the retention criterion holds. The regtest suite and release build are excluded, as the issue requires. Branch protection is a repository setting, not a code requirement. Actual GitHub run results were not available in the evidence, so the runtime pass is unverified, but the requirements are code-level and met.

Full details: Out of Scope Changes check

Explanation

The changes are .github/workflows/ci.yml (new, 48 lines) and AGENTS.md (2 added lines). Both serve issue #22. The workflow implements the requested checks. The AGENTS.md rows document the new workflow, which the issue's acceptance criteria require. No unrelated code or file changes appear in the reviewed diff. One defect exists within the in-scope AGENTS.md change. The same .github/workflows/ci.yml row is added twice in the repository layout table. This is cosmetic and does not make the change out of scope.

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

A rabbit checks the build at dawn,
While fmt and Clippy hop along.
Tests run steady, checks turn green,
A Windows target joins the scene.
“Good hops!” the rabbit says, and bounds away.

Recent review info

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: d198db24-ca3a-460a-a275-cafa47dae198
Commits

Reviewing files that changed from the base of the PR and between 02ec324 and a60e00f.

Files selected for processing: 2

  • .github/workflows/ci.yml
  • AGENTS.md

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

@grunch
grunch merged commit 6290bf1 into main Nov 16, 2026
3 checks passed
@grunch
grunch deleted the ci/pr-checks branch November 16, 2026 19:30
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.

ci: build, lint and test every pull request

1 participant