Skip to content

docs: CONTRIBUTING.md accuracy pass — verified against every line of code#244

Merged
tlongwell-block merged 1 commit into
mainfrom
improve-contributing-md
Apr 5, 2026
Merged

docs: CONTRIBUTING.md accuracy pass — verified against every line of code#244
tlongwell-block merged 1 commit into
mainfrom
improve-contributing-md

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Why

CONTRIBUTING.md was last updated in PR #40 (Mar 12) — before the MySQL → Postgres migration (#114, Mar 19). PR #220 identified the database references but was closed without merging. Meanwhile, a docs accuracy blitz landed today (#233, #235, #236, #237, #240) fixing every other top-level doc — CONTRIBUTING.md was explicitly called out as the remaining gap.

This PR brings CONTRIBUTING.md to the same standard: every factual claim verified against the actual codebase.

What changed

1 file · +61 / −34

Infrastructure fixes

Before After Evidence
MySQL (3 places) Postgres docker-compose.yml, Cargo.toml sqlx features, schema/schema.sql
Port :3306 :5432 docker-compose.yml
Clone URL sprout-rs/sprout block/sprout git remote -v
sqlx-cli — "falls back to docker exec" pgschema — "applies schema/schema.sql declaratively" justfile, scripts/dev-setup.sh
5 Docker services listed 7 services (+MinIO :9000, +Prometheus :9090) docker-compose.yml

Crate & test list completeness

Before After Evidence
14 crates in architecture overview 17 crates (+sprout-sdk, +sprout-media, +sprout-cli) Cargo.toml workspace members
5 E2E test files listed 8 files (+e2e_nostr_interop, +e2e_media, +e2e_media_extended) ls crates/sprout-test-client/tests/

Code example accuracy

Section Before After
API handler example AuthenticatedUser extractor, ApiError type, Path<Uuid>, unwrap() extract_auth_contextscope_errorcheck_token_channel_accesscheck_channel_access, Path<String> with explicit UUID parse, json!() macro
Error handling guidance "use ApiError in error.rs" "use api_error()/internal_error() helpers in api/mod.rs"
Event kind guide 8 steps, handle_side_effects only 9 steps: added required_scope_for_kind() in ingest.rs, fixed handle_side_effects arg order to (event, state)
MCP tool guide REST-only example Added read (self.client.get()) vs write (self.client.send_event()) note

Cleanup

  • Removed redundant sentence in MCP #[tool_router] description

Verification

Three rounds of crossfire review (Claude Opus + Codex CLI), each round finding and fixing real issues:

Round Opus Codex Issues fixed
R1 8/10 6/10 pubkey type mismatch, unwrap(), MCP dual-transport, event-kind dispatch, scope check
R2 8/10 8/10 side_effects arg order, check_token_channel_access, scope_error, naming consistency, redundant sentence
R3 9/10 ✅ 9/10 ✅ Path<String> pattern, pubkey_bytes clone

All pre-push hooks pass: cargo fmt, cargo clippy -D warnings, unit tests (93 passed), desktop build, Tauri check.

…code

Fixes all verified inaccuracies found by comparing every claim in
CONTRIBUTING.md against the actual codebase.

Changes:
- MySQL → Postgres (3 places: prereqs, setup description, crate list)
- Port :3306 → :5432
- Clone URL: sprout-rs/sprout → block/sprout
- sqlx-cli → pgschema (declarative schema tool)
- Added MinIO (:9000) and Prometheus (:9090) to setup description
- Added 3 missing crates: sprout-sdk, sprout-media, sprout-cli
- Added 3 missing E2E test files: e2e_nostr_interop, e2e_media, e2e_media_extended
- API handler example: AuthenticatedUser → extract_auth_context pattern
- API handler example: added scope check, check_channel_membership, no unwrap()
- Error handling: ApiError → api_error()/internal_error() helpers
- Event kind guide: added required_scope_for_kind() step in ingest.rs
- Event kind guide: clarified handle_side_effects() is post-storage
- MCP tool guide: documented read (REST) vs write (signed event) pattern
@tlongwell-block tlongwell-block merged commit 006fb9e into main Apr 5, 2026
12 of 13 checks passed
@tlongwell-block tlongwell-block deleted the improve-contributing-md branch April 5, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant