overengineeringstudio / overengineeringstudio/effect-utils
notion-react: deep-nesting (3+ levels) e2e coverage + cache schema-mismatch e2e
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
From principal-engineer e2e review (packages/@overeng/notion-react/context/testing/e2e-review.md, commit a076493e). Two critical e2e coverage gaps that could mask regressions:
Deep nesting (3+ levels)
The sync diff recurses through diffChildren, but no e2e exercises nesting past 2 levels. The closest existing test (columns) is 1 level. Real Notion pages commonly have column_list > column > toggle > callout > list > paragraph chains; a subtle reorder/update bug at depth 3+ would only surface in production.
Add:
deep-nesting/cold 3-level— full round-trip, assert shape + children counts at every depth.deep-nesting/update-at-depth-3— mutate leaf paragraph text, assert{updates:1, inserts:0, appends:0, removes:0}.- Optional 5-level stress variant to lock depth bounds.
Cache schema-version mismatch
sync() has a documented fallbackReason: 'schema-mismatch' path (src/renderer/sync.ts:136), invalidating and re-seeding when schemaVersion !== CACHE_SCHEMA_VERSION. It is only reachable by bumping the constant, and no test covers the fallback. If someone later touches the fallback logic, the bug is invisible until the next schema bump.
Add:
cache/schema-mismatch— write aCacheTreeblob withschemaVersion: 0via FsCache, runsync(), assertfallbackReason === 'schema-mismatch'and the on-disk blob afterwards hasschemaVersion === CACHE_SCHEMA_VERSION.
Scope
Page-renderer only; database sync is out of scope (use @overeng/notion-effect-client directly).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/@overeng/notion-react/context/testing/e2e-review.md and the schema-mismatch path in src/renderer/sync.ts:136; inspect the existing page-renderer e2e coverage and FsCache usage. Add deep-nesting round-trip and depth-3 update cases plus the cache/schema-mismatch case, and verify the requested child counts, sync diff, fallbackReason, and reseeded schema version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100