docs: refresh AGENTS.md structure, single-test runbook, pubkey guard - #6912
docs: refresh AGENTS.md structure, single-test runbook, pubkey guard#6912yhc007 wants to merge 1 commit into
Conversation
The Repo Structure listing had drifted: seven crates (buzz-deletion, buzz-relay-mesh, buzz-push-gateway, buzz-voice, buzz-backend-kubernetes, buzz-conformance, buzz-datastore-tracing) and five top-level directories (admin-web, benchmarks, examples, deploy, docs) were missing. Add a "Running a single test" section. It was absent entirely, and the per-stack invocations are not guessable: desktop unit tests are node:test over src/**/*.test.mjs behind a custom type-stripping loader rather than vitest, admin-web is vitest, and web/ has Playwright only. It also records that nothing runs `cargo test --workspace` — just test-unit enumerates packages explicitly, so a new crate gets clippy and check from workspace membership but zero executed tests until it is added to that list. Document check:pubkey-truncation next to the existing check:px-text rule; both are path:line-allowlisted guards, and the pubkey one exists because truncated prefixes are forgeable by vanity grinding. Point Key Patterns and See Also at the repo's own protocol docs (docs/nips/, docs/spec/MultiTenantRelay.tla, NOSTR.md) rather than only the upstream NIPs repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Paul Yu <paul.yu@unomic.com>
959e650 to
f3f7a96
Compare
🔐 Codex Security Review
|
|
@wesbillman — could I get a review on this, or a pointer to whoever on the buzz-oss-team should take it? You've been the most frequent editor of Docs-only, no code. Freshly rebased onto |
Summary
Refreshes
AGENTS.md(symlinked asCLAUDE.md) in four places where it had drifted from the tree or was silent on something an agent will get wrong:Repo Structure was stale. Seven crates were missing —
buzz-deletion,buzz-relay-mesh,buzz-push-gateway,buzz-voice,buzz-backend-kubernetes,buzz-conformance,buzz-datastore-tracing— along with five top-level directories:admin-web/,benchmarks/,examples/,deploy/,docs/.New "Running a single test" section. The doc had no per-stack single-test invocation at all, and these aren't guessable: desktop unit tests are
node:testoversrc/**/*.test.mjsbehind a custom type-stripping loader (not vitest),admin-webis vitest, andweb/has Playwright only. The section also records that nothing runscargo test --workspace— thetest-unitrecipe enumerates packages explicitly, so a new crate gets clippy and check from workspace membership but zero executed tests until it's added to that list. The Justfile comments say this repeatedly;AGENTS.mdnever did.check:pubkey-truncationdocumented next to the existingcheck:px-textrule. Same shape (path:lineallowlist), and the rationale is non-obvious: truncated pubkey prefixes are forgeable by vanity grinding, so display truncation must go throughtruncatePubkey/<PubKey>.Protocol docs linked. Key Patterns and See Also pointed only at the upstream nostr-protocol repo, not at
docs/nips/,docs/spec/MultiTenantRelay.tla, orNOSTR.md.Docs only — no code, no behavior change.
Related issue
None found.
Testing
Rebased onto current
mainand every claim re-verified against that tree, not asserted:Crate and directory names read from
crates/,Cargo.tomldescriptionfields, and each crate'slib.rsheader.Test-runner claims read from the
test-unitrecipe in theJustfileand thescriptsblocks ofdesktop/,web/, andadmin-web/package.json. An earlier revision of this PR cited that recipe asJustfile:313; line numbers rot, and it has since moved — the text now names the recipe instead.Both documented single-test invocations that this machine can run were executed:
Both examples name real tests: an earlier revision cited
event::tests::verifies_sigand a placeholderfeatures/foo/bar.test.mjs, neither of which exists. A reader copying those lines would have hit a filter that matches nothing.just file-size-checkpasses, and the pre-push lanes ran clean on the push.Referenced spec files confirmed present:
docs/nips/NIP-AA.md,NIP-PL.md,NIP-MP.md, theNIP-FI*family, anddocs/spec/MultiTenantRelay.tla. An earlier draft cited "NIP-AB" as adocs/nips/example — that crate exists but the spec file does not, so the examples were corrected.Not run on this machine: the
cargo nextest, Tauri, Playwright, and Flutter invocations in the new section are standard forms I did not execute (cargo-nextestisn't installed here).just setupfails on this host before installing anything (no Docker; the Hermit-pinned pnpm also can't start — missinglibatomic.so.1), so the full suite and integration lanes were out of reach. Both are local environment limits, unrelated to this change.🤖 Generated with Claude Code