Skip to content

Modularize workspace into focused crates + fix/watch/hooks/baseline + BDD receipt contract - #5

Merged
EffortlessSteven merged 10 commits into
mainfrom
add-fix-watch-hooks-crates
Jun 20, 2026
Merged

Modularize workspace into focused crates + fix/watch/hooks/baseline + BDD receipt contract#5
EffortlessSteven merged 10 commits into
mainfrom
add-fix-watch-hooks-crates

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Feb 19, 2026

Copy link
Copy Markdown
Member

Summary

This PR introduces new capability crates and modularizes the workspace into
focused, dependency-light crates, while tightening the BDD receipt contract.

New capability crates (earlier commits)

  • builddiag-fix — deterministic auto-fix planner/applier (MSRV, resolver, checksums)
  • builddiag-watch — polling watch loop with debounce and desktop notifications
  • builddiag-hooks — pre-commit/Git/Husky hook snippet generation
  • builddiag-baseline — baseline snapshot comparisons / report deltas

Modularization (latest commit)

Logic extracted out of builddiag-app/builddiag-checks into small crates:

  • builddiag-paths — deterministic repo-relative, forward-slash path helpers
  • builddiag-receiptbuilddiag.report.v1sensor.report.v1 transformation
  • builddiag-output-contract — report/sensor contract validation entry points
  • builddiag-checks-catalog — check id/docs/severity registry + explain lookup
  • builddiag-checks-checksums, builddiag-checks-deps — split check implementations
  • builddiag-testkit — shared fs/repo/cli test support

BDD receipt contract

Adds the bdd-receipt-contract spec and new feature files (check_catalog,
path_normalization) that assert full receipt payloads — findings by
check_id/code/severity, verdict reasons/data, capabilities, artifacts, schema
ids — rather than only exit code and top-level verdict. Receipt/sensor
assertions are now centralized in builddiag-output-contract. Adds a
fuzz_paths target. Workspace bumped to 0.3.0.

Verification (local, Windows)

  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo test --all — all pass (incl. 57 cucumber scenarios)
  • cargo fmt --all --check — clean
  • cargo run -p xtask -- conform10/10 (schema, determinism, survivability,
    layout, golden, tool-error, library-parity, native-schema, verdict-contract,
    native-golden); golden files regenerated after merge with main

Notes


Note

Medium Risk
Large crate split and orchestration/receipt moves affect every check run path; risk is mitigated by unchanged receipt schemas and heavy test/conform coverage, but integration surface area grew substantially.

Overview
v0.3.0 splits the monolith into focused crates (paths, receipt, output-contract, checks-catalog/checksums/deps, testkit, baseline, fix, watch, hooks) and bumps the whole workspace from 0.2.0.

Orchestration moves sensor/receipt building out of builddiag-app into builddiag-receipt (re-exported APIs, optional substrate capability on repo-state runs). Checks delegate checksum and dependency logic to new microcrates and pull metadata from builddiag-checks-catalog behind feature flags.

CLI/product wires builddiag baseline (regression-only --baseline + inline builddiag:ignore), watch, fix, and init-hooks; README/ROADMAP mark Phase 1 DX items done.

BDD adds the bdd-receipt-contract Kiro spec (requirements/design for full builddiag.report.v1 / sensor.report.v1 cucumber assertions and a coverage audit); builddiag-output-contract is a CLI dev-dependency for test validation.

Docs, crate READMEs, and GitHub repo metadata are refreshed for the expanded 12-crate layout.

Reviewed by Cursor Bugbot for commit 4cc31af. Bugbot is set up for automated code reviews on this repo. Configure here.

…g capabilities

- Introduced `builddiag-fix` crate for deterministic auto-fix planning and application of build-contract issues, including support for workspace MSRV, resolver settings, and checksum entries.
- Implemented `plan_fixes` and `apply_fixes` functions for planning and applying fixes with options for dry-run and interactive confirmation.
- Added tests for various fix scenarios to ensure correct functionality.
- Created `builddiag-watch` crate to provide a polling watch loop for monitoring changes in key files and re-running checks.
- Implemented customizable watch options, including debounce timing and terminal notifications.
- Added tests to verify the watch loop functionality and file tracking.
- Updated `rust-version` in `Cargo.toml` files for all crates to 1.92.
- Updated `rust-toolchain.toml` files to reflect the new Rust channel 1.92.0.
- Enhanced descriptions, readme, and documentation links in `Cargo.toml` for better clarity and accessibility.
- Added new README.md files for several crates to provide detailed information about their purpose and functionality.
- Introduced new features and improvements in the `builddiag-watch` crate, including desktop notifications for status changes.
- Added new `builddiag-hooks` crate for generating deterministic hook snippets for Git and Husky.
- Improved test coverage and added new feature tests for receipt contracts.
Use `if let Ok(...)` instead of `if let Some(...).ok()` (match_result_ok)
and collapse nested `if let` blocks (collapsible_if).
Copilot AI review requested due to automatic review settings February 19, 2026 00:38
@coderabbitai

coderabbitai Bot commented Feb 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EffortlessSteven, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 51 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c38710fc-008b-4ac6-88d1-0ae4b924fd13

📥 Commits

Reviewing files that changed from the base of the PR and between 3f92f80 and 4cc31af.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (108)
  • .github/settings.yml
  • .kiro/specs/bdd-receipt-contract/.config.kiro
  • .kiro/specs/bdd-receipt-contract/design.md
  • .kiro/specs/bdd-receipt-contract/requirements.md
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • Cargo.toml
  • README.md
  • ROADMAP.md
  • crates/builddiag-app/CLAUDE.md
  • crates/builddiag-app/Cargo.toml
  • crates/builddiag-app/README.md
  • crates/builddiag-app/src/lib.rs
  • crates/builddiag-baseline/CLAUDE.md
  • crates/builddiag-baseline/Cargo.toml
  • crates/builddiag-baseline/README.md
  • crates/builddiag-baseline/src/lib.rs
  • crates/builddiag-checks-catalog/Cargo.toml
  • crates/builddiag-checks-catalog/README.md
  • crates/builddiag-checks-catalog/src/lib.rs
  • crates/builddiag-checks-checksums/Cargo.toml
  • crates/builddiag-checks-checksums/README.md
  • crates/builddiag-checks-checksums/src/lib.rs
  • crates/builddiag-checks-deps/Cargo.toml
  • crates/builddiag-checks-deps/README.md
  • crates/builddiag-checks-deps/src/lib.rs
  • crates/builddiag-checks/CLAUDE.md
  • crates/builddiag-checks/Cargo.toml
  • crates/builddiag-checks/README.md
  • crates/builddiag-checks/src/lib.rs
  • crates/builddiag-cli/CLAUDE.md
  • crates/builddiag-cli/Cargo.toml
  • crates/builddiag-cli/README.md
  • crates/builddiag-cli/src/main.rs
  • crates/builddiag-cli/tests/bdd/helpers.rs
  • crates/builddiag-cli/tests/bdd/steps.rs
  • crates/builddiag-cli/tests/bdd/world.rs
  • crates/builddiag-cli/tests/cli_baseline.rs
  • crates/builddiag-cli/tests/cli_check.rs
  • crates/builddiag-cli/tests/cli_exit_codes.rs
  • crates/builddiag-cli/tests/cli_smoke.rs
  • crates/builddiag-cli/tests/features/check_catalog.feature
  • crates/builddiag-cli/tests/features/extended_checks.feature
  • crates/builddiag-cli/tests/features/path_normalization.feature
  • crates/builddiag-cli/tests/features/receipt_contract.feature
  • crates/builddiag-core/Cargo.toml
  • crates/builddiag-core/README.md
  • crates/builddiag-core/src/lib.rs
  • crates/builddiag-domain/Cargo.toml
  • crates/builddiag-domain/README.md
  • crates/builddiag-fix/CLAUDE.md
  • crates/builddiag-fix/Cargo.toml
  • crates/builddiag-fix/README.md
  • crates/builddiag-fix/src/lib.rs
  • crates/builddiag-hooks/CLAUDE.md
  • crates/builddiag-hooks/Cargo.toml
  • crates/builddiag-hooks/README.md
  • crates/builddiag-hooks/src/lib.rs
  • crates/builddiag-output-contract/Cargo.toml
  • crates/builddiag-output-contract/src/lib.rs
  • crates/builddiag-output-contract/src/report.rs
  • crates/builddiag-output-contract/src/sensor.rs
  • crates/builddiag-paths/CLAUDE.md
  • crates/builddiag-paths/Cargo.toml
  • crates/builddiag-paths/README.md
  • crates/builddiag-paths/src/lib.rs
  • crates/builddiag-paths/tests/paths_integration.rs
  • crates/builddiag-paths/tests/paths_properties.rs
  • crates/builddiag-receipt/CLAUDE.md
  • crates/builddiag-receipt/Cargo.toml
  • crates/builddiag-receipt/README.md
  • crates/builddiag-receipt/src/lib.rs
  • crates/builddiag-render/Cargo.toml
  • crates/builddiag-render/README.md
  • crates/builddiag-repo/CLAUDE.md
  • crates/builddiag-repo/Cargo.toml
  • crates/builddiag-repo/README.md
  • crates/builddiag-repo/src/lib.rs
  • crates/builddiag-repo/tests/repo_properties.rs
  • crates/builddiag-testkit/Cargo.toml
  • crates/builddiag-testkit/src/cli.rs
  • crates/builddiag-testkit/src/fs.rs
  • crates/builddiag-testkit/src/lib.rs
  • crates/builddiag-testkit/src/repo.rs
  • crates/builddiag-types/Cargo.toml
  • crates/builddiag-types/README.md
  • crates/builddiag-types/src/lib.rs
  • crates/builddiag-watch/CLAUDE.md
  • crates/builddiag-watch/Cargo.toml
  • crates/builddiag-watch/README.md
  • crates/builddiag-watch/src/lib.rs
  • crates/depguard/Cargo.toml
  • crates/depguard/README.md
  • docs/README.md
  • docs/architecture.md
  • docs/integration.md
  • fixtures/conformance/valid-workspace/rust-toolchain.toml
  • fixtures/golden/all-disabled.native.report.json
  • fixtures/golden/all-disabled.report.json
  • fixtures/golden/missing-msrv.native.report.json
  • fixtures/golden/missing-msrv.report.json
  • fixtures/golden/valid-workspace.native.report.json
  • fixtures/golden/valid-workspace.report.json
  • fuzz/Cargo.toml
  • fuzz/fuzz_targets/fuzz_paths.rs
  • xtask/src/main.rs
  • xtask/tests/metadata_properties.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-fix-watch-hooks-crates

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 and usage tips.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @EffortlessSteven, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the builddiag tool's capabilities by introducing several new core features aimed at improving developer experience and workflow automation. It adds dedicated crates for automated fixing, continuous monitoring, Git hook management, and baseline reporting, alongside a comprehensive update to the Rust toolchain and extensive documentation. These changes empower users with more control over their build contract validation process, from proactive issue resolution to streamlined integration into development pipelines.

Highlights

  • New Crates Introduced: Four new crates were added: builddiag-fix for deterministic auto-fix planning, builddiag-watch for a polling watch loop with debounce, builddiag-hooks for Git/Husky hook snippet generation, and builddiag-baseline for baseline snapshot comparisons and inline suppressions.
  • CLI Enhancements: The builddiag-cli now includes new subcommands for fix, watch, hook install/snippet, and baseline save/diff, significantly expanding its functionality.
  • Rust Version Update: The Rust toolchain version was updated to 1.92 across all crates and fixtures, ensuring compatibility with the latest stable release.
  • Comprehensive Documentation: New README.md files were added for all new and existing crates, alongside updated Cargo.toml metadata and general documentation improvements across the workspace.
  • Baseline and Inline Suppression Support: The builddiag-baseline crate introduces the ability to create and update baseline snapshots of findings, allowing for regression-only reporting, and supports inline suppression comments in Cargo.toml files.
  • Watch Mode Implementation: A new builddiag watch command provides continuous validation during development, featuring a polling loop, debounce functionality, and optional desktop notifications.
  • Automated Fixes: The builddiag fix command offers deterministic auto-remediation for common issues such as missing MSRV, resolver version, and checksum entries, with dry-run and interactive modes.
Changelog
  • CHANGELOG.md
    • Added new version entry 0.3.0.
Activity
  • The pull request includes 4 commits.
  • All 846 tests passed, with 0 failures and 4 ignored.
  • Clippy lints are clean with zero warnings (-D warnings).
  • Code formatting is clean (cargo fmt --all -- --check).
  • A total of 69 files were changed, with +4607 additions and -192 deletions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces four new crates (builddiag-fix, builddiag-watch, builddiag-hooks, builddiag-baseline), adding significant new capabilities like auto-fixing, file watching, hook generation, and baseline comparisons. The Rust version is also updated across the workspace. The changes are well-structured and follow the project's architecture. I've found a potential issue with the inline suppression logic that could lead to over-suppression of findings, and a suggestion to improve the auto-fix functionality to preserve Cargo.toml formatting. Overall, this is a great feature addition to the project.

Comment on lines +402 to +409
if location.line.is_none()
&& file_rules
.line_scoped
.values()
.flatten()
.any(|selector| selector_matches(selector, finding))
{
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This logic could lead to over-suppression of findings. It allows any line-scoped suppression comment in a file to suppress a finding that has no line number associated with it. A finding without a line number is typically a file-level finding and should only be matched by file-scoped suppressions (comments on their own line).

For example, if a file has a line-scoped suppression for issue_A on line 10, this logic would also suppress a file-level finding for issue_B if that finding lacks a line number.

If the intent is to suppress findings like wildcard_version which are conceptually tied to a line but might not have a line number from the parser, it would be more robust to ensure the finding generator (depguard) provides a line number for the finding.

I recommend removing this block. A finding without a line number should only be suppressible by file-scoped rules, which are already handled by the logic on lines 385-391.

Comment on lines +344 to +385
fn apply_workspace_manifest_changes(
manifest_path: &Utf8Path,
workspace_msrv: Option<&str>,
set_resolver_v2: bool,
) -> Result<bool> {
let raw = fs::read_to_string(manifest_path).with_context(|| format!("read {manifest_path}"))?;
let mut value: toml::Value =
toml::from_str(&raw).with_context(|| format!("parse {manifest_path}"))?;

let root = value
.as_table_mut()
.ok_or_else(|| anyhow!("manifest root is not a table: {manifest_path}"))?;
let workspace = ensure_table(root, "workspace")?;

let mut changed = false;

if set_resolver_v2 && workspace.get("resolver").and_then(toml::Value::as_str) != Some("2") {
workspace.insert("resolver".to_string(), toml::Value::String("2".to_string()));
changed = true;
}

if let Some(msrv) = workspace_msrv {
let package = ensure_table(workspace, "package")?;
if package.get("rust-version").and_then(toml::Value::as_str) != Some(msrv) {
package.insert(
"rust-version".to_string(),
toml::Value::String(msrv.to_string()),
);
changed = true;
}
}

if !changed {
return Ok(false);
}

let rendered = toml::to_string_pretty(&value)
.with_context(|| format!("render updated manifest {manifest_path}"))?;
fs::write(manifest_path, rendered).with_context(|| format!("write {manifest_path}"))?;

Ok(true)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The current implementation uses toml::from_str and toml::to_string_pretty to modify the Cargo.toml file. This approach will reformat the entire file and may remove comments, which could be an undesirable side effect for users of builddiag fix.

Consider using the toml_edit crate, which is designed to parse and modify TOML files while preserving formatting and comments. This would make the auto-fix feature less intrusive.

Copilot AI 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.

Pull request overview

This PR introduces four new crates to expand builddiag's developer experience capabilities: builddiag-fix (auto-fix planning/application), builddiag-watch (polling watch loop with debounce), builddiag-hooks (Git/Husky hook snippet generation), and builddiag-baseline (baseline snapshot comparisons and inline suppressions). The entire workspace is also updated to Rust 1.92 with comprehensive documentation improvements and enhanced Cargo.toml metadata for all crates.

Changes:

  • Four new crates with deterministic auto-fix, watch mode, hook generation, and baseline/suppression filtering capabilities
  • Workspace-wide version bump from 0.2.0 to 0.3.0 with Rust toolchain update to 1.92
  • New CLI subcommands (fix, watch, init-hooks, baseline create/update) with comprehensive BDD test coverage

Reviewed changes

Copilot reviewed 68 out of 69 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Workspace members updated to include 4 new crates, version bumped to 0.3.0
crates/builddiag-watch/ New crate for polling watch loop with debounce and desktop notifications
crates/builddiag-fix/ New crate for deterministic auto-fix planning and application
crates/builddiag-hooks/ New crate for hook snippet generation (pre-commit, Git, Husky)
crates/builddiag-baseline/ New crate for baseline snapshots and inline suppression filtering
crates/builddiag-cli/src/main.rs Added new subcommands and baseline/suppression filtering logic
crates/builddiag-cli/tests/ New integration tests for baseline workflows and inline suppressions
crates/builddiag-cli/tests/features/ New BDD scenarios for receipt contract and extended checks
fixtures/golden/ Regenerated golden files for Rust 1.92 and version 0.3.0
fixtures/conformance/valid-workspace/ Updated rust-toolchain.toml to 1.92.0
xtask/tests/metadata_properties.rs Updated workspace crate list to include all new crates
docs/ Updated architecture diagrams, crate documentation table, and integration examples
ROADMAP.md, CHANGELOG.md, README.md Documentation updates reflecting new features as released
All */Cargo.toml Enhanced metadata with description, readme, documentation, and keywords
All */README.md New per-crate README files with API documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@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: 83d5314a90

ℹ️ 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".

use std::process::Command;
use std::time::{Duration, UNIX_EPOCH};

const WATCHED_FILE_NAMES: &[&str] = &["Cargo.toml", "rust-toolchain.toml", "checksums.txt"];

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 Watch checksum inputs used by default config

WATCHED_FILE_NAMES is hard-coded to checksums.txt, but builddiag’s default checksums input is scripts/tools.sha256, so builddiag watch will not rerun when the checksum file changes in the common/default setup. This causes stale watch results and can hide newly introduced checksum policy violations until some other watched file changes.

Useful? React with 👍 / 👎.

Comment on lines +957 to +959
let git_dir = root.join(".git");
if !git_dir.exists() {
return Err(anyhow::anyhow!(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle git worktrees when installing hooks

This check only verifies that .git exists, then assumes it is a directory. In git worktrees/submodules, .git is a file, so this passes and the later create_dir_all(<root>/.git/hooks) path fails with Not a directory, making builddiag init-hooks --install fail in those valid repository layouts.

Useful? React with 👍 / 👎.

claude and others added 4 commits May 16, 2026 08:37
…ity host check

- builddiag-fix: drop redundant `.into_iter()` (clippy::useless_conversion).
- builddiag-cli/bdd: drop `as usize` no-op casts (clippy::unnecessary_cast).
- builddiag-app: recover poisoned git test mutex (parallel-run safety) and
  disable GPG signing in test git commands so CI without GPG passes.
- xtask: normalize host.os and host.arch in the conformance comparison so the
  library-parity check works regardless of which OS regenerated the goldens.

All tests pass, clippy clean with `-D warnings`, and `xtask conform` shows
10/10 passing.
…ract

Extract cross-cutting logic out of builddiag-app/builddiag-checks into
dependency-light crates and split the check implementations:

- builddiag-paths: deterministic repo-relative, forward-slash path helpers
- builddiag-receipt: builddiag.report.v1 -> sensor.report.v1 transformation
- builddiag-output-contract: report/sensor contract validation entry points
- builddiag-checks-catalog: check id/docs/severity registry + explain lookup
- builddiag-checks-checksums, builddiag-checks-deps: split check impls
- builddiag-testkit: shared fs/repo/cli test support

Add the bdd-receipt-contract spec and new feature files (check_catalog,
path_normalization) that assert full receipt payloads (findings, verdict
reasons/data, capabilities, artifacts, schema ids) rather than just exit
code and top-level verdict. Add a fuzz_paths target. Bump workspace to 0.3.0.
…rates

# Conflicts:
#	crates/builddiag-checks/src/lib.rs
#	fixtures/golden/all-disabled.native.report.json
#	fixtures/golden/all-disabled.report.json
#	fixtures/golden/missing-msrv.native.report.json
#	fixtures/golden/missing-msrv.report.json
#	fixtures/golden/valid-workspace.native.report.json
#	fixtures/golden/valid-workspace.report.json
test_main_uses_injected_args and test_main_args_falls_back_to_env both
mutate the global MAIN_ARGS. Under parallel execution it was possible
for the fallback test to set MAIN_ARGS to None *after* the injected
test set Some(...) but *before* its main() call consumed the slot,
making main() fall through to env args, which clap rejects with exit(2)
and tears down the whole test process.

Gate both tests behind a new MAIN_ARGS_TEST_LOCK so they run serially
relative to each other while other tests remain parallel.
@EffortlessSteven EffortlessSteven changed the title Add builddiag-fix, builddiag-watch, builddiag-hooks, and builddiag-baseline crates Modularize workspace into focused crates + fix/watch/hooks/baseline + BDD receipt contract Jun 20, 2026
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

@cursor

cursor Bot commented Jun 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e6ae7a9f-0094-4671-9181-7ed8855299e3)

The wrapper functions and dispatch arms for the checksums and deps checks
call into the optional `builddiag-checks-checksums` / `builddiag-checks-deps`
crates unconditionally, so building `builddiag-checks` with the `checksums`
or `deps` feature disabled failed to compile (E0433: unlinked crate). The
catalog already feature-gates the corresponding `BUILTIN_CHECKS` entries, so
the dispatch arms are unreachable when the feature is off; gate the wrappers
and arms with the matching `#[cfg(feature = ...)]` to match.

Verified: `builddiag-checks` now builds with checksums/deps individually or
both disabled; clippy --all-features and the default test suite stay green.
@cursor

cursor Bot commented Jun 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_609905c1-638b-4966-ae01-882b8bf495dd)

Replace the crate-local `rel_path` helper with the canonical
`builddiag_paths::to_repo_relative`, centralizing path normalization in
builddiag-paths as intended by the refactor, and drop the now-unused
`camino` direct dependency. Output is unchanged (conform 10/10, all tests
green).
@EffortlessSteven
EffortlessSteven merged commit ec76712 into main Jun 20, 2026
14 of 17 checks passed
@EffortlessSteven
EffortlessSteven deleted the add-fix-watch-hooks-crates branch June 20, 2026 08:56
@cursor

cursor Bot commented Jun 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_83119ebb-04cd-49ae-bfc1-36b7cd513719)

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.

3 participants