원클릭으로
rust-tests-guidelines
Guidelines for writing Rust tests in OpenFirma.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guidelines for writing Rust tests in OpenFirma.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Review Rust changes for correctness, robustness, documentation quality, and test coverage.
Write Rust tests for OpenFirma crates while avoiding redundant coverage.
Review changes ahead of opening a new PR, modifying an existing one or on demand by the user.
Edit a pre-existing GitHub pull request for OpenFirma. Use whenever you are asked to make changes to commits, branches or bookmarks that would affect an open GitHub PR.
Open a GitHub pull request for OpenFirma. Use whenever you are asked to open a PR.
Dirty repo, uncommitted changes, commit, amend, split, changeset, PR history: inspect repository state and prepare atomic Git commits or jj changesets. Use whenever the worktree is already dirty or you are about to commit or rewrite history.
| name | rust-tests-guidelines |
| description | Guidelines for writing Rust tests in OpenFirma. |
Guidelines for writing new tests for Rust code.
proptest where property-based coverage adds real value for invariants or parser-like behavior.Test an error's structure and its user-visible rendering when both are part of the contract. Prefer the following assertion strategy at each boundary:
assert_matches! to verify the variant and any
meaningful fields, then use an inline insta::assert_snapshot! on
error.to_string() when the message is user-visible.anyhow errors, downcast and verify the typed source. Snapshot
format!("{error:#}") only when the complete error chain is what a user
sees; error.to_string() may contain only an outer context message.stderr
with only narrowly scoped redactions of nondeterministic values, and retain
separate assertions for important ordering or side-effect invariants.Avoid bare .is_err(), matches!(error, Variant { .. }), and
message.contains(...) when a stable variant, meaningful fields, or the full
user-visible message can be asserted. Substring checks remain useful as
supplementary assertions for ordering and absence guarantees.
When adding an error variant or changing a user-visible error message, inspect the affected tests for both structural coverage and rendered-message coverage.
.snap.new or .pending-snap artifacts in the working copy.tests/ integration suites.#[cfg(test)] modules or inline tests to src/ files.