Skip to content

Commit 3295fad

Browse files
authored
Add base BugBot review rules scaffold (#220)
Add base scaffold .cursor/BUGBOT.md for BugBot code review
1 parent 53a80a5 commit 3295fad

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.cursor/BUGBOT.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Anonymiser — Repo-Specific BugBot Rules
2+
3+
> Org-wide rules are enforced via Cursor Team Rules.
4+
5+
## Architecture
6+
7+
- Rust CLI tool that reads PostgreSQL dump files and anonymises them based on a strategy JSON file. Source is in `src/` with `parsers/` (SQL parsing), `fixers/` (data transformation), and top-level modules for file handling and compression.
8+
- The tool processes SQL dumps line-by-line for memory efficiency. Changes to parsing or fixing logic must handle large files without loading everything into memory.
9+
10+
## Data Safety
11+
12+
- This tool processes database backups that may contain PII. Any changes to anonymisation logic must ensure data is properly scrubbed — incomplete anonymisation is a data privacy risk.
13+
- Strategy files define how each database column is anonymised. The `generate-strategies` command creates blank strategy files from live databases. Review generated strategies carefully before use.
14+
15+
## Rust Conventions
16+
17+
- Edition 2021 Rust. Uses `structopt` for CLI argument parsing, `serde`/`serde_json` for JSON handling, `fake` for generating anonymised data.
18+
- `mimalloc` is used as the global allocator for performance. Do not switch allocators without benchmarking.
19+
20+
## Testing & Releases
21+
22+
- Test files for anonymisation are in `test_files/`. Tests are in-source (`#[cfg(test)]` modules) and integration-style.
23+
- Releases are published to GitHub Releases. The `update_version` script handles version bumping. Version in `Cargo.toml` is only used for dev builds.

0 commit comments

Comments
 (0)