Skip to content

Commit 58e560d

Browse files
committed
fix: finalize auto index rollout verification
1 parent e5993b8 commit 58e560d

52 files changed

Lines changed: 1400 additions & 1778 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ Current TypeScript documentation and examples are the source of truth for the v2
502502

503503
- Complete docs: [English](https://vextjs.github.io/monSQLize/) · [简体中文](https://vextjs.github.io/monSQLize/zh/)
504504
- Constructor configuration: [English](https://vextjs.github.io/monSQLize/configuration) · [简体中文](https://vextjs.github.io/monSQLize/zh/configuration)
505+
- Production rollout: [English](https://vextjs.github.io/monSQLize/production-rollout) · [简体中文](https://vextjs.github.io/monSQLize/zh/production-rollout)
505506
- Common scenarios: [English](https://vextjs.github.io/monSQLize/recipes) · [简体中文](https://vextjs.github.io/monSQLize/zh/recipes)
506507
- Example source: [examples index](https://github.com/vextjs/monSQLize/blob/main/examples/README.md)
507508
- Documentation source: [docs/en](https://github.com/vextjs/monSQLize/tree/main/docs/en) · [docs/zh](https://github.com/vextjs/monSQLize/tree/main/docs/zh)
@@ -548,7 +549,7 @@ npm run test:real-env:private
548549

549550
`test:examples`, `test:server-matrix`, and `config.useMemoryServer` use a fixed `mongodb-memory-server` policy: MongoDB `7.0.14` by default, binaries cached under `.cache/mongodb-memory-server/binaries`, and temporary data paths created under `.cache/mongodb-memory-server/db` with forced cleanup for project-managed paths. Stale managed data paths whose owner PID is no longer alive are pruned before new memory-server launches. Override with `MONSQLIZE_MEMORY_MONGO_BINARY_VERSION`, `MONSQLIZE_REPLSET_BINARY_VERSION`, `MONGOMS_DOWNLOAD_DIR`, or `MONSQLIZE_MEMORY_SERVER_DB_DIR` when needed.
550551

551-
`test:coverage` is the independent 90% coverage governance gate for the published CJS runtime artifact. `test:audit` checks production dependencies against the npm registry. `test:real-env:private` is intentionally opt-in and expects private environment variables. Coverage and private real-environment checks are not part of the default CI or release gate.
552+
`test:coverage` is the independent 90% coverage governance gate for the published CJS runtime plus source-level gap coverage resolved through sourcemaps. `test:audit` checks production dependencies against the npm registry. `test:real-env:private` is intentionally opt-in and expects private environment variables. Coverage and private real-environment checks are not part of the default CI or release gate.
552553

553554
## Roadmap
554555

‎changelogs/unreleased.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
## Fixed / changed
1616

17+
- Fixed Model `autoIndex=true` scheduling to preflight declared indexes with `listIndexes()`, skip matching existing indexes, create only missing indexes, and report conflicts through warning logs / `model-index-error` without destructive index changes.
18+
- Fixed Batch 1 validation findings: `getDefaults()` now returns isolated deep-frozen snapshots, aggregate `$merge` / `$out` cache tests assert explicit target invalidation instead of implicit broad invalidation, cache invalidation docs list descriptor shapes, and legacy Redis lock wording no longer implies a running Redis service is bundled.
1719
- Fixed aggregate direct `.toArray()` to honor cache/meta execution paths, extended `find()` ObjectId auto-conversion to comparison operators, forwarded CountQueue abort signals into MongoDB count options, and added a warning when sync idempotency falls back to in-memory storage.
1820
- Upgraded `schema-dsl` to `2.1.3` and moved Model schema compilation/validation onto a MonSQLize runtime-scoped `schema-dsl/runtime` engine. `schemaDsl` now supports runtime options, extension registration, external runtime injection, explicit validation disablement, and fail-closed dependency resolution diagnostics.
1921
- Fixed `schemaDsl: { runtime, extensions }` lifecycle handling so injected runtimes register extensions once during `connect()` instead of registering the same factory during construction and reconnect setup.
@@ -52,4 +54,5 @@
5254
- Fixed documentation-site footer localization so the English and Chinese home pages no longer show both language footer navigation blocks at the same time.
5355
- Hid hand-written Markdown table-of-contents blocks in the Rspress documentation site so they no longer duplicate the generated right-side page outline.
5456
- Corrected the multi-pool documentation path: the page now presents `new MonSQLize({ pools: [...] })` as the recommended setup, removes stale pinned install versions, and aligns adjacent connection, pool-chain, API index, capability index, function-cache, and Saga installation docs with the current package.
55-
- Repositioned `withCache()` / `FunctionCache` as hidden legacy compatibility surfaces, removed them from current cache/navigation/API recommendation paths, aligned cache examples with database query caching, and corrected stable docs drift for pool health status, Node.js runtime version, and the 98/98 docs-example matrix.
57+
- Repositioned `withCache()` / `FunctionCache` as hidden legacy compatibility surfaces, removed them from current cache/navigation/API recommendation paths, aligned cache examples with database query caching, and corrected stable docs drift for pool health status, Node.js runtime version, and the 104/104 docs-example matrix.
58+
- Fixed the independent coverage runner to preserve the 90% gate while counting source-level gap coverage through sourcemaps, and refreshed the verification docs/profile facts to the current 104/104 docs matrix and 57 runnable examples.

‎docs/en/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This documentation starts with the common application path: connect to MongoDB,
1212
| Match docs to runnable source | [`examples.md`](./examples.md) | Links each topic to a GitHub example source |
1313
| Add database caching | [`cache.md`](./cache.md) | Collection query cache, Redis L2 cache, and distributed invalidation |
1414
| Control collection-vs-Model writes | [`write-path-policy.md`](./write-path-policy.md) | Optional guard when selected namespaces must go through Model writes |
15+
| Prepare production rollout | [`production-rollout.md`](./production-rollout.md) | Data backfill, Change Stream CDC, index preflight, and traffic-switch checks |
1516
| Follow scenario guides | [`recipes.md`](./recipes.md) | Guides for connection, cache, Redis, SSH, pools, and Model usage |
1617
| Browse the full API surface | [`api-index.md`](./api-index.md) | Reference entry for lower-level and compatibility APIs |
1718
| Check runtime boundaries | [`capability-index.md`](./capability-index.md) | Capability map with links to deeper reference pages |
@@ -30,8 +31,9 @@ This documentation starts with the common application path: connect to MongoDB,
3031
- [`examples.md`](./examples.md)
3132
6. Cache guide: [`cache.md`](./cache.md)
3233
7. Write path policy: [`write-path-policy.md`](./write-path-policy.md)
33-
8. Scenario guides: [`recipes.md`](./recipes.md)
34-
9. API and runtime reference:
34+
8. Production rollout: [`production-rollout.md`](./production-rollout.md)
35+
9. Scenario guides: [`recipes.md`](./recipes.md)
36+
10. API and runtime reference:
3537
- [`api-index.md`](./api-index.md)
3638
- [`capability-index.md`](./capability-index.md)
3739
- [`support-matrix.md`](./support-matrix.md)

‎docs/en/api-index.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This index documents the current stable MongoDB adapter APIs and shared runtime
2727
| [Change Stream sync](sync-backup.md) | **Change Stream data sync: real-time backup to multiple databases** |
2828
| [Transaction optimizations](transaction-optimizations.md) | Transaction optimization strategies |
2929
| [Distributed deployment](distributed-deployment.md) | **Distributed deployment guide for multi-instance cache consistency** |
30+
| [Production rollout](production-rollout.md) | Production data backfill, CDC sync, index preflight, and traffic-switch checks |
3031
| [Event system](events.md) | Event system |
3132

3233
---
@@ -59,11 +60,11 @@ This index documents the current stable MongoDB adapter APIs and shared runtime
5960

6061
| Document | Method | Description |
6162
|----------|--------|-------------|
62-
| [Update operations guide](update-operations.md) | All update methods | Complete update operations guide |
63+
| [Update methods overview](update-operations.md) | All update methods | Method choice, traditional operators, and pipeline handoff |
6364
| [Upsert guide](upsert-guide.md) | **Upsert guide** | Insert when missing, update when present |
6465
| [Update one document](update-one.md) | `updateOne()` | Update one document |
6566
| [Update many documents](update-many.md) | `updateMany()` | Update many documents |
66-
| [Aggregation pipeline updates](update-aggregation.md) | Aggregation pipeline update | Field-to-field calculation and conditional assignment |
67+
| [Aggregation pipeline update guide](update-aggregation.md) | Aggregation pipeline update | Field-to-field calculation, conditional assignment, and pipeline details |
6768
| [Batch update](updateBatch.md) | `updateBatch()` | Large batch update with batching and retry |
6869
| [Replace one document](replace-one.md) | `replaceOne()` | Replace a whole document |
6970
| [Find one and update](find-one-and-update.md) | `findOneAndUpdate()` | Atomically update and return |
@@ -151,7 +152,7 @@ This index documents the current stable MongoDB adapter APIs and shared runtime
151152

152153
**Update**
153154

154-
- [Update operations guide](update-operations.md) - Complete update operations guide
155+
- [Update methods overview](update-operations.md) - Method choice, traditional operators, and pipeline handoff
155156
- [Update one document](update-one.md) - `updateOne`
156157
- [Update many documents](update-many.md) - `updateMany`
157158
- [Replace one document](replace-one.md) - `replaceOne`
@@ -213,6 +214,7 @@ This index documents the current stable MongoDB adapter APIs and shared runtime
213214
| Document | Description |
214215
|----------|-------------|
215216
| [Runtime consistency and boundaries](runtime-architecture.md) | Runtime capability boundaries and consistency contracts |
217+
| [Production rollout](production-rollout.md) | Data migration sync, index sync, and production traffic-switch checklist |
216218
| [Support matrix](support-matrix.md) | Support matrix |
217219
| [Roadmap boundaries](roadmap-boundaries.md) | Roadmap boundaries |
218220
| [Validation notes](validation.md) | Validation notes |
@@ -251,3 +253,4 @@ Recommended reading order for new users:
251253
9. [Cache system](cache.md) - Understand the cache mechanism.
252254
10. [Transaction management](transaction.md) - Learn transaction management.
253255
11. [Distributed deployment](distributed-deployment.md) - Multi-instance deployment for production.
256+
12. [Production rollout](production-rollout.md) - Data migration, index sync, and traffic-switch checks.

0 commit comments

Comments
 (0)