chore: keep task review reports outside tracked files
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
# Task 2 report: visitor account and storage sources
|
||||
|
||||
## Outcome
|
||||
|
||||
Implemented the local visitor account source and its scoped storage key. The provider validates the local startup context at construction, reuses only exact schema-version-1 records, freezes returned identities, generates from the ten legacy avatar URLs, and replaces storage only after generation and validation succeed.
|
||||
|
||||
Concurrency is explicit: simultaneous `getAccount()` calls share one in-flight operation and identity; `resetAccount()` rejects while that operation is pending or while a runtime session is active. No in-memory account remains after an operation, so a successful reset cannot be followed by a stale cached return.
|
||||
|
||||
## TDD evidence
|
||||
|
||||
- RED: `node --import tsx --test framework-tests/adapters/local/visitor-account.test.ts` failed with `ERR_MODULE_NOT_FOUND` for `adapters/local/local-storage.ts` before production files existed.
|
||||
- GREEN: the focused suite passes all 8 tests.
|
||||
- A typecheck then caught ES2020-incompatible `Object.hasOwn`; the implementation was changed to `Object.prototype.hasOwnProperty.call`, followed by a clean rerun.
|
||||
|
||||
## Coverage
|
||||
|
||||
- concurrent generation, one write, and frozen identity reuse
|
||||
- lower/upper random boundaries and NaN, Infinity, negative, and 1 rejection
|
||||
- exact cache schema, complete field validation, forbidden legacy/unknown fields, and sanitized errors
|
||||
- dependency error causes and preservation of existing storage when generation fails
|
||||
- scope separation by value type, version exclusion, and server inclusion
|
||||
- active-session and pending-read reset refusal; isolation from legacy and machine keys
|
||||
|
||||
## Verification
|
||||
|
||||
- `node --import tsx --test framework-tests/adapters/local/visitor-account.test.ts` — 8 passed, 0 failed
|
||||
- `.\\node_modules\\.bin\\tsc.cmd -p tsconfig.framework.json --noEmit` — passed
|
||||
- `node scripts/check-import-boundaries.mjs` — `[import-boundaries] OK`
|
||||
- `git diff --check` — passed
|
||||
|
||||
## Self-review
|
||||
|
||||
The change is limited to the two requested sources, their focused test, and this report. It does not touch serialized Cocos assets, engine code, networking, or legacy runtime files. Cache errors include the key and field path, preserve the original cause where one exists, and never include the cached payload.
|
||||
Reference in New Issue
Block a user