fix(supabase): confirmed uploads gate asset reads (hash claim), seeds-listed test, Dockerfile workspace manifests; importer declares every authored label, real in=out control
This commit is contained in:
1 parent
bbfb8d6203
commit
dee4ce43d9
28 files changed
+511
-87
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { FindingNodeInput } from '@faunosteo/domain'
|
||||
import { EQUINE_SOURCE_PATHS, type ImportResult } from '../src'
|
||||
import { legacyAnnoIds, runImport } from './helpers'
|
||||
|
||||
@@ -51,9 +52,27 @@ describe('equine import volumes', () => {
|
||||
expect(bilateral).toHaveLength(9)
|
||||
})
|
||||
|
||||
it('keeps 26 zones, 792 nodes, 612 leaves, 41 vet referrals', () => {
|
||||
it('writes 792 nodes, 612 leaves, 41 vet referrals in the document', () => {
|
||||
const counts = { nodes: 0, leaves: 0, vet: 0 }
|
||||
const walk = (nodes: readonly FindingNodeInput[]): void => {
|
||||
for (const node of nodes) {
|
||||
counts.nodes += 1
|
||||
if (!node.children?.length) counts.leaves += 1
|
||||
if (node.requires_vet_referral === true) counts.vet += 1
|
||||
walk(node.children ?? [])
|
||||
}
|
||||
}
|
||||
for (const zone of result.document.finding_zones) {
|
||||
counts.nodes += zone.categories.length
|
||||
for (const category of zone.categories) walk(category.children)
|
||||
}
|
||||
expect(counts).toEqual({ nodes: 792, leaves: 612, vet: 41 })
|
||||
})
|
||||
|
||||
it('reports the input side from the sources: 27 ids, 26 zones, 792/612/41', () => {
|
||||
expect(result.document.finding_zones).toHaveLength(26)
|
||||
expect(result.stats).toMatchObject({
|
||||
legacyAnnotations: 27,
|
||||
findingZones: 26,
|
||||
nodes: 792,
|
||||
leaves: 612,
|
||||
|
||||
Reference in new issue
Block a user