Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,49 @@ members = ["tests/helpers/wt-perf", "tests/helpers/mock-stub"]
# Include mock-stub and wt-perf so `cargo test` builds their binaries
default-members = [".", "tests/helpers/mock-stub", "tests/helpers/wt-perf"]

# cargo-affected input→test rules. cargo-affected selects tests by Rust-line
# coverage overlap, so a file a test reads at *runtime* (never recorded in
# coverage) maps to no test and would slip through `cargo affected run`. Each
# rule force-selects the owning tests when a matching path changes. `[*.metadata]`
# is excluded from cargo-affected's fingerprint, so editing a rule is
# cache-neutral. See https://github.com/max-sixty/cargo-affected#input-rules.

# insta `.snap` snapshots are read at test time and never appear in coverage, so
# a snapshot edit maps to no test. Route each snapshot to the binary that owns
# it — the finest granularity available without a snapshot→test map. Integration
# snapshots live under tests/; unit-test snapshots under src/, split across the
# lib (`worktrunk`) and the `wt` binary (`worktrunk::bin/wt`).
[[workspace.metadata.affected.rule]]
globs = ["tests/**/*.snap"]
filterset = "binary_id(=worktrunk::integration)"

[[workspace.metadata.affected.rule]]
globs = ["src/**/*.snap"]
filterset = "binary_id(=worktrunk) | binary_id(=worktrunk::bin/wt)"

# tests/integration_tests/readme_sync.rs reads each of these at runtime (via
# fs::read_to_string) and asserts the committed copies stay in sync — both the
# sources (README.md, docs/content markdown, docs/config.toml's site title and
# description, src/cli/mod.rs, src/llm.rs, the skill references, Taskfile.yaml)
# and the generated artifacts it regenerates and compares against (the
# dev/*.example.toml files, docs/static/llms.txt, the agent-skills index.json).
# Editing any of them flips the test, but coverage can't link a runtime-read
# file to it.
[[workspace.metadata.affected.rule]]
globs = [
"README.md",
"docs/**/*.md",
"docs/config.toml",
"docs/static/llms.txt",
"docs/static/.well-known/agent-skills/index.json",
"dev/*.toml",
Comment thread
max-sixty marked this conversation as resolved.
"src/cli/mod.rs",
"src/llm.rs",
"Taskfile.yaml",
"skills/**/*.md",
]
filterset = "test(/readme_sync/)"

[package]
name = "worktrunk"
version = "0.58.0"
Expand Down
Loading