Testing rules in this repository

  • Every code change must add or update test coverage.
  • Source code stays in src/; tests stay in test/.
  • Use unit tests for local behavior and integration tests for runtime-visible behavior.
  • For frontend or docs-site changes, verify the rendered result, not only the source text.

What readers notice

If a docs-site change has no test asserting its entry points and navigation, readers can hit broken links or missing pages—so treat navigation coverage as part of the change.

Integration and real-environment validation

The repository guidance explicitly calls for integration testing against a real environment when the change requires it. Local confidence is not enough if the runtime contract depends on provider behavior, external protocols, or GitHub Actions release flow.

npm test
./node_modules/.bin/vitest run test/docs/developer-docs-site.test.ts
./node_modules/.bin/vitest run test/docs/docs-site.test.ts

Keep documentation aligned with shipped behavior

Every feature change should include an explicit documentation pass. At minimum, check whether the behavior change requires updates to README.md, README.zh.md, docs/index.html, affected topical docs under docs/, and RELEASE_NOTES.md.

Always review

README.md, README.zh.md, docs homepage, topical docs, and release notes.

Why it matters

Behavior that ships without matching docs leaves users following outdated guidance—effectively a second defect alongside the code change.

Release flow

  1. Triage and confirm the issue or defect.
  2. Implement the smallest product-owned fix.
  3. Add unit and integration coverage.
  4. Update documentation and release notes in the same change.
  5. Push, monitor GitHub Actions, and keep fixing until the pipeline is green.
  6. If the change resolves an issue, close the issue after the release is confirmed.

GitHub Actions posture

Pushing to master is not the end of the task. The release is only complete when the relevant workflows for the new head commit have finished successfully.

Ship checklist

Code

The implementation matches the product boundary and runtime contract.

Tests

Unit and integration coverage prove the runtime-visible behavior.

Docs

README, docs site, topical docs, and release notes are aligned with the shipped behavior.

Release

CI is green, release artifacts are healthy, and the linked issue can be closed.

Pre-release verification checklist

  1. The code matches the product boundary.
  2. The changed behavior has focused tests.
  3. Docs and release notes reflect the shipped behavior.
  4. GitHub Actions for the new master head commit are green.
  5. Any linked issue can be closed with a clear explanation of what shipped.