Align contributor guides with current project contracts
This commit is contained in:
parent
18110049f2
commit
29fcb50fcd
11 changed files with 198 additions and 58 deletions
|
|
@ -37,6 +37,36 @@ and deliberate architecture constraints retain static or pure-function tests.
|
|||
Implementation-name assertions can be replaced when their owning code changes;
|
||||
their mere presence is not a functional defect.
|
||||
|
||||
## Validation by Change Risk
|
||||
|
||||
`npm run check` is the baseline for every significant change. It covers syntax,
|
||||
lint, generated list indexes, Node tests and the production build. Add the
|
||||
targeted checks below while implementing; use `npm run check:full` when the
|
||||
change affects persisted data, imports, user interaction or delivery.
|
||||
|
||||
| Change | Targeted evidence | Completion gate |
|
||||
| --- | --- | --- |
|
||||
| Documentation only | Verify relative links, paths, commands and the described source of truth. No browser matrix is required when behavior and accessible labels are unchanged. | `npm run check` for a significant grouped update. |
|
||||
| Public JSON or game data | Run the relevant data validator and loader tests; regenerate list indexes when lists change. Exercise the affected game route if shape, retry behavior or visible content changes. | `npm run check`, plus targeted E2E for behavior visible in the browser. |
|
||||
| IndexedDB, persistence or JSON import/export | Cover canonical compaction, failures, conflicts, deletion, startup recovery and at least one concurrent-page scenario. Imports must prove atomic rejection and reference remapping. | Targeted Node and Playwright suites, then `npm run check:full`. |
|
||||
| Interaction or accessible label | Search E2E locators that use the role or accessible name. Verify focus, keyboard and pointer behavior at 768 px and any other width affected by the layout. | Targeted Playwright scenario, then `npm run check:full`. |
|
||||
| Sass, component surface or layout | Run the owning NDS/layout suites and inspect the real page at the affected desktop widths. Computed-style checks may prove stable primitives; source-text assertions do not prove rendering. | `npm run check`; add `check:full` when a workflow or interactive control changes. |
|
||||
| Server, workflow or deployment | Run workflow contract tests, the direct Node server cache test when headers change, and the full browser gate. Verify the public origin only after an authorized deployment. | `npm run check:full` before delivery; post-deploy SHA and HTTP health checks afterward. |
|
||||
|
||||
## Validation Layers
|
||||
|
||||
- `npm test` runs Node tests for pure logic, data contracts, architecture guards
|
||||
and the direct `server.mjs` cache test. The latter opens a local ephemeral port.
|
||||
- `npm run test:e2e` uses Vite in development and therefore includes React
|
||||
`StrictMode`; it validates interactive behavior against source modules.
|
||||
- `npm run test:e2e:production` rebuilds the client and exercises the Vite
|
||||
Preview result. It catches build-only behavior and stale-bundle recovery, but
|
||||
does not run the Node static server or the production proxy.
|
||||
- `tests/server-cache.test.mjs` exercises the HTTP policy implemented by
|
||||
`server.mjs`. It does not prove headers added or replaced by the public proxy.
|
||||
- Public `curl` checks after deployment validate the delivered origin and remain
|
||||
separate from local and CI tests.
|
||||
|
||||
## Optional Extensions
|
||||
|
||||
Exhaustive advanced tool variants (calendar recurrence operations, goal graph
|
||||
|
|
@ -46,12 +76,11 @@ assertions are outside this closure boundary. They are candidates when related
|
|||
features change or a concrete regression demonstrates missing coverage, not
|
||||
automatic follow-on batches required to finish this audit.
|
||||
|
||||
## Validation
|
||||
## Completion and Reporting
|
||||
|
||||
Run targeted tests while implementing a grouped change, then `npm run check:full`
|
||||
as the final gate: lint, Node tests, build, development E2E and production E2E.
|
||||
Use the direct Node server test for HTTP headers; Vite Preview does not exercise
|
||||
the cache policy implemented by `server.mjs` or any production proxy override.
|
||||
Review the diff and report actual failures or limits before closing the task.
|
||||
Run the gate required by the matrix after the targeted checks. Review the diff
|
||||
and report the behavior changed, commands executed, results, remaining limits
|
||||
and Beads task. Keep historical results dated instead of presenting them as a
|
||||
current run. Close only the task whose acceptance criteria were actually met.
|
||||
Do not introduce visual snapshots solely to prove that a page loads.
|
||||
Keep detailed command logs outside tracked source and report concise results.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue