test(config-audit): add Opus 4.7 pattern fixtures (cache, redundant, imports, sonnet-era)
This commit is contained in:
parent
87b5078c91
commit
2a8dc8655f
11 changed files with 255 additions and 0 deletions
46
tests/fixtures/opus-47/deep-imports/layer1.md
vendored
Normal file
46
tests/fixtures/opus-47/deep-imports/layer1.md
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Layer 1
|
||||
|
||||
First layer of the deep import chain. Each layer contributes substantive
|
||||
content so the chain is not trivially dismissable as "all short stubs".
|
||||
|
||||
## Section A
|
||||
|
||||
Coding conventions for the fictitious project that exists solely to
|
||||
exercise the TOK scanner's import-depth detection logic.
|
||||
|
||||
- Prefer async/await over raw Promises.
|
||||
- Annotate return types even when TypeScript can infer them.
|
||||
- Keep functions under 40 lines where practical.
|
||||
- Use `readonly` generously on types.
|
||||
- Dependency-inject side effects at module boundaries.
|
||||
- Validate inputs at system boundaries only.
|
||||
|
||||
## Section B
|
||||
|
||||
Error handling patterns:
|
||||
|
||||
- Subclass `Error` with typed messages.
|
||||
- Never swallow errors silently.
|
||||
- Prefer `Result<T, E>` return types in business logic.
|
||||
- Log at boundaries, never inside pure functions.
|
||||
|
||||
## Section C
|
||||
|
||||
Testing patterns:
|
||||
|
||||
- Test fixtures live under `tests/fixtures/{name}/`.
|
||||
- Each fixture has a single shape it exercises.
|
||||
- Use `describe(...)` + `it(...)` from `node:test`.
|
||||
- Prefer table-driven tests for permutations.
|
||||
- Keep test setup idempotent.
|
||||
|
||||
## Section D
|
||||
|
||||
CI/CD conventions:
|
||||
|
||||
- Conventional Commits for every commit.
|
||||
- PR-free single-branch workflow on Forgejo.
|
||||
- Lint and typecheck on every push.
|
||||
- Release tags follow `{plugin}-v{semver}`.
|
||||
|
||||
@layer2.md
|
||||
Loading…
Add table
Add a link
Reference in a new issue