Muse reported that find({ orderBy: 'createdAt' }) silently returned the
wrong order: getFieldValueForEntity read noun.metadata[field] for
timestamp fields, but getNoun() destructures standard fields to the top
level, so the read always returned undefined and the sort collapsed to
insertion order.
The fix introduces a single source of truth for reading fields off an
entity. STANDARD_ENTITY_FIELDS + resolveEntityField() in coreTypes.ts
encode the "standard fields top-level, custom fields nested" contract
in one place. getFieldValueForEntity now uses the helper and routes
through a named BUCKETED_INDEX_FIELDS set instead of a hardcoded
timestamp if-chain — filtered sort on createdAt/updatedAt now works.
Unfiltered orderBy is explicitly rejected with a clear error pointing
callers at the right pattern. A scalable, unfiltered-sort-capable
time-ordered segment index is tracked as a separate follow-up.
|
||
|---|---|---|
| .. | ||
| aggregation.test.ts | ||
| all-apis-comprehensive.test.ts | ||
| api-parameter-validation.test.ts | ||
| azure-storage.test.ts | ||
| batchImportWithRelations.test.ts | ||
| brainy-complete.integration.test.ts | ||
| brainy-core.integration.test.ts | ||
| brainy-phase1c-integration.test.ts | ||
| bun-compile-test.ts | ||
| clear-persistence.test.ts | ||
| clear-vfs.test.ts | ||
| commit-ref-bug.test.ts | ||
| commit-state-capture.test.ts | ||
| count-synchronization.test.ts | ||
| cow-commit-storage.test.ts | ||
| cow-full-integration.test.ts | ||
| empty-tree-bug.test.ts | ||
| entity-confidence-weight.test.ts | ||
| find-unified-integration.test.ts | ||
| fork-persistence.test.ts | ||
| gcs-native-storage.test.ts | ||
| gcs-persistence-fix.test.ts | ||
| get-relations-fix.test.ts | ||
| history-ref-resolution-bug.test.ts | ||
| hnsw-rebuild.test.ts | ||
| hybrid-search-cow.test.ts | ||
| initial-commit-null-parent.test.ts | ||
| memory-enhancements-v5.11.0.test.ts | ||
| metadata-only-comprehensive.test.ts | ||
| metadata-vector-exclusion.test.ts | ||
| migration.test.ts | ||
| orderby-sort-bug.test.ts | ||
| phase3TypeFirstQuery.integration.test.ts | ||
| readAfterWrite.test.ts | ||
| relationship-intelligence.test.ts | ||
| remaining-apis.test.ts | ||
| s3-storage.test.ts | ||
| smart-import.test.ts | ||
| storage-batch-operations.test.ts | ||
| typeAwareHNSW.integration.test.ts | ||
| update-asymmetry.test.ts | ||
| versioning.test.ts | ||
| vfs-and-graph-entities.test.ts | ||
| vfs-api-wiring.test.ts | ||
| vfs-debug.test.ts | ||
| vfs-historical-reads.test.ts | ||
| vfs-import-verification.test.ts | ||
| vfs-knowledge-separation.test.ts | ||
| vfs-performance-v5.11.1.test.ts | ||
| vfs-versioning.test.ts | ||
| wasm-embeddings.test.ts | ||