chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -120,7 +120,12 @@ export class ColumnStore implements ColumnStoreProvider {
// Discover fields by listing manifest files
try {
const paths = await (storage as any).listObjectsUnderPath(this.basePath + '/')
// listObjectsUnderPath is a BaseStorage primitive (protected on the
// class, not part of the StorageAdapter interface) — same typed
// boundary as the blob reads below.
const paths = await (storage as unknown as {
listObjectsUnderPath: (prefix: string) => Promise<string[]>
}).listObjectsUnderPath(this.basePath + '/')
for (const path of paths) {
if (path.endsWith('/MANIFEST.json')) {
const fieldName = path.replace(this.basePath + '/', '').replace('/MANIFEST.json', '')
@ -637,8 +642,12 @@ export class ColumnStore implements ColumnStoreProvider {
if (!buffer || buffer.size === 0) return null
const valueType = this.fieldTypes.get(field) ?? ValueType.String
// Drain a COPY for querying — don't clear the buffer
const entries = (buffer as any).entries as Array<{ value: number | string, entityIntId: number }>
// Drain a COPY for querying — don't clear the buffer. This reads the
// buffer's private accumulator directly (drain() is the only public
// accessor and it clears the buffer, which queries must not do).
const entries = (buffer as unknown as {
entries: Array<{ value: number | string, entityIntId: number }>
}).entries
if (!entries || entries.length === 0) return null
// Sort a copy for the cursor