Skip to content

docs: update AGENTS.md with testing guidelines and architecture#190

Merged
BYK merged 1 commit intomainfrom
docs/update-agents-testing-guidelines
Feb 5, 2026
Merged

docs: update AGENTS.md with testing guidelines and architecture#190
BYK merged 1 commit intomainfrom
docs/update-agents-testing-guidelines

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 5, 2026

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

    • Add testing hierarchy: model-based > property-based > unit tests
    • Document test file naming conventions (*.property.test.ts, *.model-based.test.ts)
    • Add examples for both testing patterns
    • Document shared test helpers (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.ts
    • src/lib/: region.ts, telemetry.ts, sentry-urls.ts, upgrade.ts, etc.
  • New Key Features: Document recent additions

    • Multi-region support with fan-out to regional APIs
    • Project root detection using VCS/language/build markers
    • Directory name inference for fallback project matching
  • 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.

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
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Dsn

  • Infer project from directory name when DSN detection fails by BYK in #178
  • Add project root detection for automatic DSN discovery by BYK in #159

Other

  • (issue) Replace --org/--project flags with /ID syntax by BYK in #161
  • (lib) Add anyTrue helper for parallel-with-early-exit pattern by BYK in #174
  • (telemetry) Add withTracing helper to reduce Sentry span boilerplate by BYK in #172

Bug Fixes 🐛

  • (types) Align schema types with Sentry API by betegon in #169
  • ParseIssueArg now checks slashes before dashes by BYK in #177
  • Address bugbot review comments on dsn-cache model-based tests by BYK in #176
  • Added nullable in substatus's zod validation by MathurAditya724 in #157

Documentation 📚

  • Update AGENTS.md with testing guidelines and architecture by BYK in #190

Internal Changes 🔧

  • (upgrade) Use centralized user-agent for GitHub API requests by BYK in #173

Other

  • test: add coverage for UpgradeError and SeerError classes by BYK in #188
  • test: add property tests for sentry-urls.ts (Phase 3) by BYK in #186
  • test: simplify issue-id tests covered by property tests by BYK in #183
  • test: simplify alias and arg-parsing tests covered by property tests by BYK in #182
  • test: add property tests for API command and human formatters by BYK in #181
  • test: remove redundant DB tests covered by model-based tests by BYK in #180
  • test: add property tests for async utilities (Phase 4) by BYK in #179
  • test: add model-based tests for DSN and project cache by BYK in #171
  • test: add model-based and property-based testing with fast-check by BYK in #166

🤖 This preview updates automatically when you update the PR.

@BYK BYK marked this pull request as ready for review February 5, 2026 12:53
@BYK BYK merged commit c17c13a into main Feb 5, 2026
19 checks passed
@BYK BYK deleted the docs/update-agents-testing-guidelines branch February 5, 2026 12:59
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