Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ and chose not to fix here belongs in this section too.
What you added or changed. For a fix: revert the fix, keep the test, and say
whether it goes red. A test that passes either way isn't testing the fix.

If the test matches source text rather than running the code, say what the
anchor is. Pinning a contract the compiler can't check — a Tauri command name,
an i18n key, a second copy of a fixed behaviour — is what those are for.
Pinning an internal call site pins today's spelling instead, so it goes red on
a rename that broke nothing and stays green on a change that broke something.

Not every fix needs one. A defect that announces itself — a crash, a type
error, something the next person to open the app would see — is already caught
by `npm run check`, `cargo test` and a single manual run.

## Verification

The commands you ran and what they said — the ones CI runs are:
Expand Down
7 changes: 6 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ All file operations go through Rust commands - never use Node.js fs APIs.
## Testing

- **Rust**: `cargo test` in `src-tauri/` directory
- **Frontend**: `npm test` runs the behavior tests in `scripts/*.test.ts` (`node --test --import tsx`)
- **Frontend**: `npm test` runs `scripts/*.test.ts` (`node --test --import tsx`). Two kinds
live there: behavior tests, which import and run the real modules, and source-shape
assertions, which match the source text for a contract the compiler cannot check — a Tauri
command name, an i18n key, a second copy of a fixed behavior. A green run is not a claim
that every behavior is covered; a source-shape assertion passes as long as the line it
matches is still spelled that way.
- **CI**: Runs `npm audit`, `npm run check`, `npm test` and `cargo test` on PRs

## Notes
Expand Down