docs: add ADRs, API error reference, troubleshooting and git workflow guides - #564
Open
graceuvala-collab wants to merge 1 commit into
Conversation
… guides Adds four contributor-facing documentation sets: - Architecture Decision Records under docs/adr/ — a template plus five initial records covering the off-chain listener architecture, Soroban on Stellar, SQLite persistence, TypeScript for the listener, and the event deduplication strategy. - API error reference documenting every error response the listener returns, grounded in events-server.ts, template-routes.ts, rate-limiter.ts and batch-validator.ts. - Contributor troubleshooting guide for build, test, database, Git and CI problems, scoped to complement the existing setup and deployment troubleshooting docs. - Git workflow guide covering the fork model, branch naming, commit conventions and the PR process. README.md and CONTRIBUTING.md now link to all four, including ADRs. Closes Core-Foundry#516 Closes Core-Foundry#511 Closes Core-Foundry#513 Closes Core-Foundry#512 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@graceuvala-collab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds four contributor-facing documentation sets that were missing from the project. Documentation only — no source changes.
Closes #516
Closes #511
Closes #513
Closes #512
Changes
Architecture Decision Records — Closes #516
New
docs/adr/directory:README.md0000-template.md0001-off-chain-listener-architecture.md0002-soroban-smart-contracts.md0003-sqlite-for-local-persistence.md0004-typescript-for-listener-service.md0005-event-deduplication-strategy.mdEach record documents the options actually weighed and the trade-offs accepted, not just the outcome.
API Error Reference — Closes #511
New
docs/API_ERROR_REFERENCE.md. Every error response the listener API returns, organised by status code (400/401/404/409/413/429/500/503), each with cause, resolution, and a runnable example. Also covers the diagnostic headers (X-Request-Id,X-Correlation-Id,X-API-Version), the rate-limit headers, the nine batch-validation error codes, and a quick-reference table mapping every documented error to its endpoint and fix.Content is derived from the actual handlers —
listener/src/api/events-server.ts,template-routes.ts,rate-limiter.ts, andlistener/src/utils/batch-validator.ts— rather than written from assumption. The guide explicitly flags that only the batch-validationcodevalues are stable enough to branch on, since the API does not yet emit a top-level machine-readable code.Contributor Troubleshooting Guide — Closes #513
New
docs/CONTRIBUTOR_TROUBLESHOOTING.md, covering install/dependency failures, TypeScript and build errors, test failures (including flaky timing-dependent tests and open handles), running the listener locally, database and migration issues, dashboard problems, Rust/Soroban issues, Git mistakes, and CI failures — with a triage section up front and a structured bug-report checklist at the end.Scoped deliberately to the contribution workflow so it complements rather than duplicates the existing
TROUBLESHOOTING.md(environment setup) andDEPLOYMENT_TROUBLESHOOTING.md(deploys); a table at the top routes readers to the right one.Git Workflow Guide — Closes #512
New
docs/GIT_WORKFLOW.md: the fork model with a diagram and remote-role table, one-time setup, fork syncing, branch naming (six prefixes, with worked examples and an anti-pattern table), Conventional Commits, the day-to-day loop, PR requirements, conflict recovery, post-merge cleanup, and a command cheat sheet.Documentation cross-references
README.md— new links to the ADR index, API error reference, and both contributor guides; Contributing section now points at them.CONTRIBUTING.md— companion-guides block at the top; the workflow section now directs contributors to read the ADRs before significant architectural changes and to add a new ADR when a decision changes.This satisfies the "Documentation references ADRs" criterion on #516.
Acceptance criteria
#516 — ADR template added ✅ · Initial ADRs created (5) ✅ · Documentation references ADRs ✅
#511 — Error codes listed ✅ · Descriptions included ✅ · Examples provided ✅
#513 — Common issues documented ✅ · Guide is easy to navigate (numbered TOC, triage section, cross-links) ✅
#512 — Workflow documented ✅ · Branch naming examples included ✅ · PR process explained ✅
Verification
Documentation-only change — no code, config, or dependency modifications, so no build or test run was performed. Technical claims were grounded by reading the source directly rather than by execution:
8787) and database path (./data/notifications.db) fromlistener/src/config.ts.listener/src/utils/payload-size-validator.ts.listener/src/services/notification-deduplicator.ts.listener/anddashboard/package.jsonscripts; Node 22 and the CI job matrix from.github/workflows/ci.yml.One item worth a reviewer's eye: the guides state that CI is path-filtered on pull requests (
listener/src/migrations/,listener/src/database/,listener/src/scripts/,listener/package.json), so a docs-only PR such as this one runs no CI jobs by design. Please confirm that filter is intended — if CI is meant to run more broadly on PRs, that is a separate fix and I'm happy to open an issue.How to test
docs/adr/README.mdand confirm all five indexed ADRs resolve.docs/API_ERROR_REFERENCE.mdand spot-check a few responses againstlistener/src/api/events-server.ts.README.mdandCONTRIBUTING.mdresolve.🤖 Generated with Claude Code