test-infra(1/6): add test infrastructure and CI tooling#205
test-infra(1/6): add test infrastructure and CI tooling#205aRustyDev wants to merge 21 commits intojoshrotenberg:mainfrom
Conversation
Restructure documentation for better organization: Directory changes: - Rename doc/ to docs/ - Move book/src/ to docs/src/ - Move docs/adr/ to docs/src/adrs/ New documentation pages: - docs/src/adrs/README.md - ADR index with status summary - docs/src/templates/README.md - Templates overview - docs/src/templates/nygard.md - Nygard format details - docs/src/templates/madr.md - MADR 4.0 format details - docs/src/templates/variants.md - Template variants reference - docs/src/modes/README.md - Modes overview - docs/src/modes/compatible.md - Compatible mode details - docs/src/modes/nextgen.md - NextGen mode details - docs/src/frontmatter.md - YAML frontmatter reference - docs/src/glossary.md - Key terms glossary Removed (content migrated to new pages): - formats.md -> templates/ - compatibility.md -> modes/ - templates.md -> templates/README.md Updated SUMMARY.md with new navigation structure: - Concepts section (Modes, Templates, Frontmatter) - Architecture section (ADRs) - Reference section (Glossary) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all external references to use new docs/ path: - README.md: Update doc/adr references to docs/src/adrs - .github/workflows/book.yml: Update mdbook build/deploy paths - .github/workflows/ci.yml: Remove book/** from paths-ignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reorganize documentation into clear audience-based sections: - users/: Installation, configuration, commands, modes, frontmatter - developers/: Contributing, library, MCP server, testing - ai/: AI agent documentation and skills - reference/: ADRs, templates, glossary - resources/: External resources Changes include: - Move existing content to appropriate sections - Add placeholder pages for new sections - Update SUMMARY.md navigation structure - Fix all internal cross-references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive contribution guidelines covering: - Development setup and prerequisites - Project structure overview - Code style and testing guidelines - PR process and commit message conventions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Plugins added:
- mdbook-mermaid: Diagram support (architecture, workflows, ADR graphs)
- mdbook-toc: Inline table of contents
- mdbook-termlink: Auto-link glossary terms
- mdbook-linkcheck2: Link validation
Synced files via {{#include}}:
- contributing.md -> includes CONTRIBUTING.md
- changelog.md -> includes CHANGELOG.md
- license.md -> includes LICENSE-MIT and LICENSE-APACHE-2.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix AI skills paths to use SKILL.md in subdirectories - Fix example links in status.md (remove broken references) - Update internal cross-references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document adrs-core library API including: - Repository operations (open, init, list, create, update) - Core types (Adr, AdrStatus, AdrLink, Config) - Template system usage - Linting and validation - JSON-ADR import/export - Mermaid diagram of module structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reorganize documentation into focused, hierarchical structure: - lib/: Split into modules/, templates, linting, errors, import-export - lib/modules/: Architecture overview with types-core.md for core types - lib/requirements/: API, types, errors, compatibility requirements - cli/: Add examples/ and requirements/ subdirectories - cli/requirements/: Commands, compatibility, UX requirements - testing/: Split into types/, fixtures, goals - testing/types/: Unit, integration, property-based test guides - mcp/: Reorganize tools/, examples/, requirements/ - mcp/requirements/: Protocol, tools, safety, performance requirements - requirements/project/: Functional and non-functional requirements - ai/: Add rules/ and hooks/ for AI agent guidelines Add mermaid architecture diagrams throughout. Fix broken links found by mdbook-linkcheck2. Remove external GitHub Repository links. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
just test all
cargo nextest run
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.14s
────────────
Nextest run ID 5d4af15b-237d-4d2d-ad05-aad638708b2d with nextest profile: default
Starting 520 tests across 7 binaries
PASS [ 0.490s] adrs::cli test_cheatsheet_output
... removed for brevity ...
PASS [ 0.013s] adrs-core::real_world_corpus test_npryce_adr_tools_canonical
────────────
Summary [ 1.475s] 520 tests run: 520 passed, 0 skipped
cargo test --doc --package adrs-core
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.08s
Doc-tests adrs_core
running 1 test
test crates/adrs-core/src/types.rs - types::LinkKind::reverse (line 293) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
all doctests ran in 0.39s; merged doctests compilation took 0.19s
All tests passed! |
just quality all
cargo deny check
... removed for brevity ...
advisories ok, bans ok, licenses ok, sources ok
Security checks passed!
cargo machete
Analyzing dependencies of crates in this directory...
cargo-machete didn't find any unused dependencies in this directory. Good job!
Done!
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s
All quality checks passed! |
pre-commit run --all-files --hook-stage pre-push
cargo fmt................................................................Passed
cargo clippy.............................................................Passed
cargo nextest (unit tests)...............................................Passed
cargo test --doc.........................................................Passed
cargo deny (security, licenses)..........................................Passed
cargo machete (unused deps)..............................................Passedpre-commit run --all-files
cargo fmt................................................................Passed
cargo clippy.............................................................Passed |
901e0f4 to
250985b
Compare
- Update module overview with accurate crate structure (2 crates, not 3) - Add module dependency graph showing internal relationships - Add 4 workflow diagrams: creation, parsing, config loading, template rendering - Create ADR alignment matrix comparing implementation to ADRs 0004-0007 - Draft 4 new ADRs for undocumented architectural decisions: - ADR-0008: Linting with mdbook-lint-rulesets - ADR-0009: JSON-ADR export format - ADR-0010: Error handling strategy - ADR-0011: MCP server integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- B1: Error handling audit complete - library compliant with ADR-0004 - B2: Mode handling gap identified - --ng flag doesn't override template mode - B3: Frontmatter parsing exceeds ADR-0006 spec (MADR 4.0.0 + tags) - B4: Template tests comprehensive (77 tests covering all ADR-0007 features) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 22 tests covering all 15 MCP tools: - Read operations: list_adrs, get_adr, search_adrs, get_repository_info, get_adr_sections, validate_adr, compare_adrs, get_related_adrs - Write operations: create_adr, update_status, link_adrs, update_content, bulk_update_status - NextGen operations: update_tags (requires NextGen mode) - Analysis operations: suggest_tags Test helpers: - setup_test_repo(): Creates Compatible mode repo with 3 sample ADRs - setup_nextgen_repo(): Creates NextGen mode repo with adrs.toml Also adds Deserialize derive to response types for test assertions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add hierarchical justfile modules for organized development workflows: - Root justfile with init, build, test shortcuts - crates/ module for build recipes (debug, release) - crates/adrs/ module for CLI recipes - crates/adrs-core/ module for library recipes - docs/ module for documentation recipes - tests/ module for test recipes (nextest, doctests, coverage) - quality/ module for security, linting, unused deps - schema/ module for JSON schema recipes (placeholder) Platform-specific init recipes: - macOS/Linux: Homebrew bundle + pre-commit setup - Windows: Scoop packages + pre-commit setup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add development tooling configuration: deny.toml: - License allowlist (MIT, Apache-2.0, BSD, etc.) - Security advisory checks via RustSec database - Dependency bans and source restrictions - Ignore entries for unmaintained transitive deps (bincode, yaml-rust) .config/nextest.toml: - Default profile with fail-fast - CI profile with retries and JUnit output .config/Brewfile: - Homebrew dependencies for macOS/Linux - Includes just, pre-commit, and cargo tools .pre-commit-config.yaml: - Pre-commit hooks: cargo fmt, clippy - Pre-push hooks: nextest, doctests, cargo-deny, machete Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update CI workflow (.github/workflows/ci.yml): - Add concurrency control to cancel in-progress runs - Add rust-cache for faster builds - Add docs job for documentation checks - Add deny job for security/license checks - Add unused-deps job for cargo-machete - Add coverage job for PRs with Codecov upload - Cross-platform testing (ubuntu, macos, windows) Update audit workflow (.github/workflows/audit.yml): - Replace cargo-audit with cargo-deny (supersedes it) - cargo-deny handles advisories, licenses, bans, sources Add supporting files: - dependabot.yml: Automated dependency updates - pull_request_template.md: PR checklist - codecov.yml: Coverage thresholds and PR comments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update .gitignore: - Add coverage output directories (target/llvm-cov/, lcov.info) - Add mutation testing output (mutants.out/) - Add nextest output directory Remove audit.toml: - Migrated ignore entries to deny.toml [advisories] section - cargo-deny supersedes cargo-audit functionality Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add architectural decision record evaluating MCP library options: - Compare rmcp vs tower-mcp vs mcp-server-rs - Analyze MCP 2025-11-25 Streamable HTTP transport support - Recommend staying with rmcp pending transport support Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `just homebrew` recipe with confirmation prompt to install Homebrew package manager via official install script. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All justfile modules now use `set working-directory` to run cargo commands from the project root, fixing "Cargo.toml not found" errors when invoking module recipes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
250985b to
9418cf3
Compare
|
On first glance this PR seems to include all of the doc changes of the first one. Is that intentional? |
Yeah thats more of an error with how I broke up the work when submitting. I put a 'WARNING' block in the description to try and capture that. I'd definitely recommend Merging #203 first, then looking at this one. Note I need to make another update too this too, the CI failure is b/c of how I broke up the changes too. |
cargo llvm-cov --doc requires nightly Rust toolchain, which causes CI failures on stable. Remove doctest coverage from the coverage job. Doctests are still tested in the test job (via cargo test --doc), just not coverage-tracked since that feature is nightly-only. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@joshrotenberg |
|
Hey, I appreciate the effort but these PRs are huge and have a lot of changes I think require discussion first. Your recent commits also seem to include the entire doc changes despite claiming to change something else. There is no way I can review these in this state. I'm all for using Claude (I use it every day) but this is just too much at one time without clear value. Please close these and open up issues to discuss the changes you think will help the project. |
Summary
Important
MOST of this PRs changes are contained in #203
Merge #203 first before reviewing these changes
Test infrastructure and CI tooling (builds on docs reorganization):
Files Changed (10 commits)
justfile,*/justfile- Task runner.pre-commit-config.yaml,deny.toml- Quality tools.github/workflows/*- CI updatescrates/adrs/src/mcp.rs- MCP integration testsTest plan
just test- All tests passjust test doc- All doctests passdepends-on: #203
🤖 Generated with Claude Code