docs: update AGENTS.md with testing guidelines and architecture#190
Merged
Conversation
Update AGENTS.md to reflect the current state of the project: - Emphasize property-based and model-based testing as preferred over traditional unit tests, using fast-check for better coverage - Add testing hierarchy: model-based > property-based > unit tests - Document test file naming conventions (*.property.test.ts, *.model-based.test.ts) - Add examples for property-based and model-based testing patterns - Document test helpers (createIsolatedDbContext, DEFAULT_NUM_RUNS) - Update architecture tree with new files in db/, dsn/, lib/, formatters/ - Add new key features: multi-region support, project root detection, directory name inference - Update error hierarchy with SeerError and UpgradeError - Add SQL utilities pattern (upsert helper) - Update file locations table with test-related entries
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Dsn
Other
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧
Other
🤖 This preview updates automatically when you update the PR. |
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.
Summary
Updates AGENTS.md to reflect the current state of the project, with a focus on emphasizing property-based and model-based testing using fast-check.
Key Changes
Testing Section Rewrite: Establish property-based and model-based testing as the preferred approach over traditional unit tests
*.property.test.ts,*.model-based.test.ts)createIsolatedDbContext,DEFAULT_NUM_RUNS)Architecture Updates: Reflect all new files added to the codebase
src/lib/db/: utils.ts, regions.ts, migration.ts, user.ts, version-check.ts, etc.src/lib/dsn/: project-root.ts, code-scanner.ts, fs-utils.ts, errors.tssrc/lib/: region.ts, telemetry.ts, sentry-urls.ts, upgrade.ts, etc.New Key Features: Document recent additions
Error Handling: Add new error types (SeerError, UpgradeError)
New Patterns: Document SQL upsert() helper utilities
The implementation plan is available as a git note on the commit.