hawdb 0.36.0

An embedded Rust graph database for local data-plane workloads
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
// Copyright 2026 Nowledge
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Embedded database facade.
//!
//! # Memory allocation
//!
//! HawDB does not install a global allocator or depend on an allocator
//! implementation. The final host binary or WASM `cdylib` selects its Rust
//! allocator with `#[global_allocator]`; HawDB's Rust allocations inherit that
//! choice. Without an explicit host selection, Rust's target default applies.
//! Allocator selection is module-wide, not a per-`Database` setting. HawDB's
//! Zstd contexts also use that selection through explicit allocation callbacks.
//! Mappings and independently linked native dependencies have separate ownership.

pub mod analytics;
pub mod api;
pub mod compat;
mod compatibility_facades;
mod compiled_capabilities;
pub mod embedded;
pub mod embedded_store;
#[cfg(feature = "tokio-runtime")]
pub mod embedded_tokio;
pub mod executor;
pub mod graph_route_evidence;
pub mod logical_dump;
pub mod mem_library_readiness;
pub mod nowledge_fuzz;
pub mod nowledge_inventory;
pub mod query_runtime_preflight;
mod relational_sql;
pub mod replacement_summary;
pub mod search;
pub mod sql_session;
pub use hawdb_route_ownership as search_route_ownership;
pub use hawdb_search::consumer::{
    ConsumerCleanupOptions as SearchProjectionConsumerCleanupOptions,
    ConsumerCleanupReport as SearchProjectionConsumerCleanupReport,
};
pub use hawdb_storage::store;
pub use sql_session::{SqlSession, SqlSessionTransaction};

#[cfg(test)]
mod store_facade_tests;

pub mod telemetry;
pub mod workload_fixtures;

pub use compatibility_facades::{
    background_maintenance_evidence, blackbox, bounded_read_evidence, cypher,
    graph_route_readiness, mem_integration_bundle, mem_integration_readiness, optimizer, planner,
    previous_wrapper_preflight, qos, query_family_evidence, route_ownership,
    search_candidate_shadow_evidence, search_projection_evidence, storage_recovery_evidence,
};

pub mod error {
    pub use hawdb_core::error::*;
}

pub mod schema {
    pub use hawdb_core::schema::*;
}

pub mod value {
    pub use hawdb_core::value::*;
}

pub mod sql {
    pub use hawdb_sql::*;
}

pub use analytics::{
    CommunityAssignment, GraphAlgorithmMemoryEstimate, LouvainOptions, LouvainProcedureOptions,
    PageRankOptions, PageRankProcedureOptions, PageRankScore, ProjectedGraph, ProjectionLayout,
    ProjectionMemoryAdmissionError, ProjectionMemoryBudget, ProjectionMemoryEstimate,
};
pub use api::SearchProjectionEpochAdvanceVerification;
pub use api::{
    hawdb_lightning_initial_import_advance_checkpoint,
    hawdb_lightning_initial_import_advance_durable_state_streaming,
    hawdb_lightning_initial_import_advance_durable_state_with_search_projection_batch,
    hawdb_lightning_initial_import_checkpoint_readiness,
    hawdb_lightning_initial_import_cutover_catch_up_report,
    hawdb_lightning_initial_import_decode_durable_state,
    hawdb_lightning_initial_import_document_identity_coverage,
    hawdb_lightning_initial_import_durable_state_report,
    hawdb_lightning_initial_import_encode_durable_state, hawdb_lightning_initial_import_plan,
    hawdb_lightning_initial_import_plan_with_document_identities,
    hawdb_lightning_initial_import_readiness, hawdb_lightning_initial_import_recovery_readiness,
    hawdb_lightning_initial_import_resume_action,
    hawdb_lightning_initial_import_search_projection_batch_report,
    hawdb_lightning_initial_import_search_projection_batch_report_with_document_identities,
    hawdb_lightning_initial_import_session_bundle_readiness,
    hawdb_lightning_initial_import_session_report,
    hawdb_lightning_initial_import_source_bundle_readiness,
    hawdb_lightning_initial_import_source_fingerprint,
    hawdb_lightning_initial_import_startup_readiness, parse_hawdb_lightning_graph_stream_export,
    validate_hawdb_lightning_graph_stream, validate_hawdb_lightning_relational_stream,
    AccessControlPolicyReadiness, AppendCommitResult, AutomaticCheckpointReport,
    BackgroundMaintenanceCandidate, BackgroundMaintenanceKind, BackgroundMaintenanceOptions,
    BackgroundMaintenanceSummary, BackgroundMaintenanceSummaryItem, BlockingOperatorMemoryReport,
    BoundedReadQueryOutput, BranchAbandonmentAcknowledgement, BranchAbandonmentLimits,
    BranchAbandonmentPlan, BranchAbandonmentReport, BranchCreateRecoveryEntry,
    BranchCreateRecoveryLimits, BranchCreateRecoveryReport, BranchCreateRecoveryStatus,
    BranchCreateRequest, BranchInfo, BranchLifecycleError, BranchLifecycleState,
    BranchReclamationLimits, BranchReclamationReport, BranchSelector, BudgetedReadSnapshot,
    CanonicalGraphSnapshotExport, CanonicalGraphSnapshotValidation,
    CanonicalSnapshotEndpointViolation, CanonicalSnapshotIdentityAudit, CanonicalSnapshotNode,
    CanonicalSnapshotRelationship, CanonicalStableIdMapping, ConcurrentDatabase,
    ConcurrentDatabaseMetrics, ConcurrentDatabaseTransaction, ConcurrentPhaseMetrics,
    ConcurrentTransactionMode, ConcurrentTransactionOptions, Database, DatabaseConfig,
    DatabaseInstanceIdentity, DatabasePublicationOwner, DatabasePublicationState,
    DatabaseReadTransaction, DatabaseTransaction, DecayTerm, DefinedProjectionStagingSession,
    DerivedArtifactJob, DerivedArtifactJobReport, DerivedArtifactJobStatus, ExplainAnalyzeOutput,
    ExternalContentArtifactJobCompletion, ExternalContentArtifactJobSummary,
    ExternalContentArtifactRuntimeManifest, GraphAnalyticsAlgorithm, GraphAnalyticsFreshness,
    GraphAnalyticsPublicationStatus, GraphAnalyticsRequest, HawDBLightningBootstrapExport,
    HawDBLightningBootstrapManifest, HawDBLightningGraphStream,
    HawDBLightningGraphStreamValidation, HawDBLightningInitialImportApplyReport,
    HawDBLightningInitialImportCheckpoint, HawDBLightningInitialImportCheckpointProgress,
    HawDBLightningInitialImportCheckpointProgressReport,
    HawDBLightningInitialImportCheckpointReadiness,
    HawDBLightningInitialImportCutoverCatchUpReport, HawDBLightningInitialImportDocumentIdentity,
    HawDBLightningInitialImportDocumentIdentityCoverage,
    HawDBLightningInitialImportDocumentIdentityKindReport,
    HawDBLightningInitialImportDurableBatchAdvanceReport, HawDBLightningInitialImportDurableState,
    HawDBLightningInitialImportDurableStateCodecReport,
    HawDBLightningInitialImportDurableStateReport, HawDBLightningInitialImportIdempotencyKey,
    HawDBLightningInitialImportPlan, HawDBLightningInitialImportReadiness,
    HawDBLightningInitialImportReadinessInputs, HawDBLightningInitialImportRecoveryReadinessReport,
    HawDBLightningInitialImportResumeAction, HawDBLightningInitialImportResumeActionKind,
    HawDBLightningInitialImportSearchProjectionBatchReport,
    HawDBLightningInitialImportSessionBundleReadiness, HawDBLightningInitialImportSessionReport,
    HawDBLightningInitialImportSourceBundleReadiness, HawDBLightningInitialImportSourceFingerprint,
    HawDBLightningInitialImportStartupReadinessReport,
    HawDBLightningInitialImportStreamingBatchAdvanceReport, HawDBLightningRelationalStream,
    HawDBLightningRelationalStreamValidation, HostScoringRequest, KnowledgeCandidate,
    KnowledgeCandidateScoreBreakdown, KnowledgeCandidateScoringPolicy, KnowledgeCandidateSource,
    KnowledgeEvidence, KnowledgeFallbackReasonCode, KnowledgeFanoutReasonCode,
    KnowledgeFanoutReasonDetail, KnowledgeGraphContextPath, KnowledgeGraphPathDirection,
    KnowledgeGraphSeed, KnowledgeRetrievalDiagnostics, KnowledgeRetrievalEmptyReasonCode,
    KnowledgeRetrievalOutput, KnowledgeRetrievalRequest, KnowledgeRetrieverCandidate,
    KnowledgeRetrieverReport, KnowledgeSourceCandidateRow, KnowledgeSourceCandidateScanOrigin,
    KnowledgeSourceCandidateScanOutput, KnowledgeSourceCandidateScanRequest,
    KnowledgeTruncationReasonCode, MissingScoringFeature, NowledgeGraphAdapter,
    NowledgeGraphExplainOutput, NowledgeGraphStatement, NowledgeGraphTransactionOutput,
    OptimizerQualificationOutput, OwnedHostScoringRequest, OwnedQueryRequest, OwnedSqlQueryRequest,
    PlanCacheBypassReason, PlanCacheLookup, PlanCacheStats, PreparedGraphAnalytics,
    PreparedProjectionFeed, PreparedProjectionFullSource, PreparedRead, PreparedReadDependencies,
    PreparedReadLimits, ProfiledRelationalSqlQueryOutput, ProjectionBaselineComparisonConfig,
    ProjectionBaselineComparisonSession, ProjectionBaselineComparisonStep,
    ProjectionBaselineMappingContext, ProjectionBaselineMappingFunction,
    ProjectionBaselineMappingLimits, ProjectionConsumerCatchUpConfig,
    ProjectionConsumerCatchUpError, ProjectionConsumerCoverageSession,
    ProjectionConsumerPreparation, ProjectionConsumerPublication, ProjectionConsumerStagingSession,
    ProjectionCoverageConfig, ProjectionCoverageSession, ProjectionCoverageStep,
    ProjectionCoveredConsumerUpdate, ProjectionCoveredUpdate, ProjectionFeedError,
    ProjectionFeedItem, ProjectionFeedLimits, ProjectionFeedRead, ProjectionFeedResource,
    ProjectionFeedStep, ProjectionFeedUsage, ProjectionFullRebuildConfig,
    ProjectionFullRebuildSession, ProjectionFullRebuildStep, ProjectionFullSourceItem,
    ProjectionFullSourceLimits, ProjectionMappingContext, ProjectionMappingFunction,
    ProjectionMappingInput, ProjectionMappingLimits, ProjectionMappingStatus,
    ProjectionMappingUsage, ProjectionMatchedBaseline, ProjectionOutputVerificationContext,
    ProjectionOutputVerificationFunction, ProjectionOutputVerificationSession,
    ProjectionPreparedConsumerUpdate, ProjectionPreparedFullRebuild, ProjectionPublicationError,
    ProjectionRelationalReadBinding, ProjectionSourceDurability, ProjectionSourceScope,
    ProjectionStagedInputs, ProjectionStagingSession, ProjectionStagingSessionConfig,
    ProjectionStagingSessionStep, QueryAccessControlContext, QueryOutput, QueryRequest,
    QueryStreamOptions, QueryStreamReport, QuerySystemVariables, RankedBackgroundMaintenance,
    ReadDependencyValidationFailures, ReadSnapshotBudget, ReadSnapshotUsage,
    RelationalJoinPlanningAttempt, RelationalJoinPlanningBudget, RelationalJoinPlanningCost,
    RelationalJoinPlanningDirective, RelationalJoinPlanningFallbackClass,
    RelationalJoinPlanningOutcome, RelationalJoinPlanningReason, RelationalJoinPlanningStatus,
    RelationalJoinPlanningStrategy, RelationalMutationResult, RelationalOperatorCardinalityProfile,
    RelationalOperatorId, RelationalOperatorKind, RelationalSqlIndexReadProfile,
    RelationalSqlReadProfile, RelationalSqlRowReadProfile, RelationalSqlStageTimings,
    ScheduledSearchProjectionCatchUpReport, ScoreFeature, ScoringCombination, ScoringEvaluation,
    ScoringFeatureSource, ScoringProgram, ScoringProgramError, ScoringProgramShape, ScoringRequest,
    ScoringSpec, ScoringSpecError, ScoringTerm, SearchIndexScanEvidence,
    SearchProjectionCatchUpReport, SearchProjectionCatchUpStopReason, SearchProjectionChangeBatch,
    SearchProjectionConsumer, SearchProjectionConsumerCatchUpReport, SearchProjectionConsumerError,
    SearchProjectionConsumerId, SearchProjectionConsumerOptions, SearchProjectionConsumerReadPin,
    SearchProjectionConsumerReadiness, SearchProjectionConsumerRebuildReason,
    SearchProjectionConsumerResult, SearchProjectionConsumerState, SearchProjectionConsumerStatus,
    SearchProjectionDefinition, SearchProjectionGraphDeltaRequest, SearchProjectionInitializer,
    SearchProjectionRelationalDelta, SessionConfig, SlowQueryLogExportOptions,
    SlowQueryLogRecordSummary, SqlQueryRequest, SqlStatementResult, StorageResourceProfileLimits,
    StorageResourceProfileReport, SystemSchemaMigration, SystemSchemaRegistry,
    SystemSchemaUpgradeReport, TransactionCommitResult, TransactionIsolation,
    TransactionReadDependencyLimits, TransactionReadDependencyUsage, WalGroupCommitActivation,
    WalGroupCommitAdaptiveColdStartEvidence, WalGroupCommitAdaptivePolicyEvidence,
    WalGroupCommitAdaptiveSteadyStateEvidence, WalGroupCommitConfig, WalGroupCommitDelayPolicy,
    WalGroupCommitEvidence, WalGroupCommitSnapshot, WalGroupCommitTailLatencyEvidence,
    WalGroupCommitWaitDecision, DEFAULT_MAX_READ_INTERMEDIATE_ROWS,
    DEFAULT_MAX_READ_RESULT_PAYLOAD_BYTES, DEFAULT_MAX_READ_RESULT_ROWS,
    DEFAULT_PESSIMISTIC_LOCK_TIMEOUT, DEFAULT_WAL_GROUP_COMMIT_MAX_BYTES,
    DEFAULT_WAL_GROUP_COMMIT_MAX_DELAY, DEFAULT_WAL_GROUP_COMMIT_MAX_ENTRIES,
    HAWDB_LIGHTNING_BOOTSTRAP_PROTOCOL_VERSION, HAWDB_LIGHTNING_GRAPH_STREAM_FORMAT_VERSION,
    HAWDB_LIGHTNING_INITIAL_IMPORT_DURABLE_STATE_PROTOCOL,
    HAWDB_LIGHTNING_RELATIONAL_STREAM_FORMAT_VERSION, SLOW_QUERY_LOG_EVENT_PROTOCOL,
    STORAGE_RESOURCE_PROFILE_PROTOCOL,
};
#[cfg(feature = "qualification")]
pub use api::{
    query_preparation_metrics, PublicationLockDurationSnapshot, PublicationLockMetricsSnapshot,
    QueryPreparationMetricsSnapshot,
};
pub use api::{
    ArrowArray, ArrowArrayStream, ArrowSchema, RetainedArrowCodeOwner, RetainedArrowExport,
    RetainedArrowSchema, RetainedArrowStream, RetainedColumnRole, RetainedColumnSchema,
    RetainedColumnType, RetainedColumnValues, RetainedNodeCursor, RetainedNodeField,
    RetainedNodeLabels, RetainedNodeSnapshotCursor, RetainedNodeTaskCursor, RetainedNodeView,
    RetainedQueryBatch, RetainedQueryCursor, RetainedQueryError, RetainedQueryOptions,
    RetainedQueryProfile, RetainedQueryStatus,
};
pub use api::{
    OptimizerQualificationAttemptLimits, OptimizerQualificationCandidateKind,
    OptimizerQualificationCandidateOutput, OptimizerQualificationCandidateRequest,
    OptimizerQualificationCandidateSetOutput, OptimizerQualificationResultError,
    OPTIMIZER_QUALIFICATION_CANDIDATE_LIMIT,
};
pub use api::{
    VectorIndexBuildError, VectorIndexBuildOptions, VectorIndexField, VectorIndexLanguageBudget,
    VectorIndexLanguageReport, VectorIndexReadError, VectorIndexReadTransaction,
    VectorIndexSqlReport, VectorIndexSqlRequest, VectorIndexUpdateReport,
};
pub use background_maintenance_evidence::nowledge_background_maintenance_evidence_json;
pub use blackbox::{
    blackbox_readiness_from_manifest_json, blackbox_report, blackbox_report_json,
    write_blackbox_report, write_blackbox_report_typed, BlackboxArtifactReport,
    BlackboxBackgroundQosSummary, BlackboxEventReport, BlackboxJsonArtifactSummary,
    BlackboxJsonlArtifactSummary, BlackboxReadinessReport, BlackboxRedactionReport, BlackboxReport,
    BlackboxReportOptions, BlackboxRunStatus, BLACKBOX_EVENT_PROTOCOL, BLACKBOX_REPORT_PROTOCOL,
};
pub use bounded_read_evidence::{
    parse_covered_routes_json, parse_graph_route_readiness_json, parse_read_report_json,
};
pub use compat::{
    add_shadow_ready_report, add_shadow_run_report, add_shadow_trace_report,
    assess_compatibility_cutover, assess_compatibility_cypher_migration_gate_bundle,
    assess_compatibility_cypher_migration_gate_bundle_with_rollback,
    assess_compatibility_migration_gate, assess_compatibility_migration_gate_bundle,
    assess_compatibility_migration_gate_with_rollback, assess_external_shadow_cutover_evidence,
    assess_query_inventory_coverage, assess_query_inventory_cypher_coverage,
    assess_query_inventory_gate, build_compatibility_query_inventory,
    build_compatibility_query_inventory_from_json,
    build_compatibility_query_inventory_from_json_str, compatibility_cutover_report_to_json,
    compatibility_inventory_coverage_report_to_json, compatibility_inventory_gate_report_to_json,
    compatibility_migration_gate_bundle_to_json, compatibility_migration_gate_report_to_json,
    compatibility_query_inventory_to_json, cutover_evidence_is_eligible,
    enforce_external_shadow_adapter_smoke_requirements, external_shadow_adapter_smoke_fixture,
    external_shadow_adapter_smoke_report_json, external_shadow_json_from_value,
    external_shadow_ready_missing_capabilities, external_shadow_trace_health_from_bundle,
    external_shadow_trace_report_json, external_shadow_value_from_json, is_self_shadow_command,
    nowledge_memory_core_fixture, nowledge_memory_core_inventory, run_compatibility_fixture,
    run_compatibility_fixture_with_shadow, should_run_shadow_ready, CompatibilityCheck,
    CompatibilityCheckReport, CompatibilityCutoverDecision, CompatibilityCutoverPolicy,
    CompatibilityCutoverReport, CompatibilityFixture, CompatibilityInventoryCoveragePolicy,
    CompatibilityInventoryCoverageReport, CompatibilityInventoryGateReport,
    CompatibilityMigrationGateBundle, CompatibilityMigrationGateReport, CompatibilityQueryCallSite,
    CompatibilityQueryInventory, CompatibilityQueryInventoryItem, CompatibilityReport,
    CompatibilityRollbackEvidence, CompatibilityShadowCheckReport, CompatibilityShadowEngine,
    CompatibilityShadowReport, CompatibilityShadowStatus, CypherFixtureCheck,
    CypherFixtureStatement, ExpectedErrorClass, ExpectedRows, ExternalShadowCommand,
    ExternalShadowCutoverEvidence, ExternalShadowProjectGraphReply,
    ExternalShadowProjectGraphRequest, ExternalShadowProtocolBackend, ExternalShadowProtocolServer,
    ExternalShadowReady, ExternalShadowStatementRequest, ExternalShadowTraceHealth,
    ExternalShadowTraceSummary, ProjectedGraphFixtureCheck, ProjectedGraphShadowOutput,
    EXTERNAL_SHADOW_PROTOCOL_VERSION, REQUIRED_EXTERNAL_SHADOW_CAPABILITIES,
};
pub use compiled_capabilities::compiled_runtime_capabilities;
pub use cypher::RelationshipDirection;
pub use embedded::{
    EmbeddedDeploymentProfile, EmbeddedQueryError, EmbeddedRuntimeResources, HawDBEmbedded,
    HawDBEmbeddedOpenOptions,
};
pub use embedded_store::{
    bounded_read_evidence_json, bounded_read_evidence_json_with_route_readiness,
    bounded_read_evidence_json_with_routes, graph_config, graph_config_with_search_mode,
    graph_read_route_catalog_digest, graph_read_route_spec, graph_read_route_spec_json,
    graph_read_route_specs_json, required_query_families_for_route,
    search_candidate_shadow_evidence_json, source_mutation_dual_write_evidence_all_ready,
    source_mutation_dual_write_readiness, source_mutation_family_requirements,
    BackgroundMaintenanceReport, BoundedSearchCandidateOutput, CutoverControls,
    CutoverControlsReport, DefinedSearchProjectionConsumer, EmbeddedGraph,
    EmbeddedOptimizerCardinalityEstimate, EmbeddedOptimizerCardinalityEstimateScope,
    EmbeddedProductionStatus, EmbeddedQueryExecutionPath, EmbeddedQueryOutput, EmbeddedQueryReport,
    EmbeddedQueryReportOptions, EmbeddedReadOptions, EmbeddedReadOutput, EmbeddedReadReport,
    EmbeddedReadSnapshot, EmbeddedReadSnapshotBudget, EmbeddedReadSnapshotReport,
    EmbeddedRuntimeStatus, EmbeddedServingEntrypoint, EmbeddedServingPathReadiness,
    EmbeddedStorageRecoveryReport, EmbeddedStore, EmbeddedStoreHandle, EmbeddedStoreOpenOptions,
    EmbeddedStoreOpenReport, ExhaustiveSearchCandidates, GraphMode,
    GraphOnlySearchProjectionRebuild, GraphReadRouteEvidenceKind, GraphReadRouteOwner,
    GraphReadRouteSpec, IncrementalSearchMaintenanceOptions, InitialImportProjectionPending,
    LibraryProductionPathSummary, LibraryReadinessReport, NowledgeQueryRuntimePreflightProbe,
    NowledgeQueryRuntimePreflightProbeReport, NowledgeQueryRuntimePreflightReport,
    OperationsReadinessReport, OutOfCoreSearchCandidateOutput, OutOfCoreSearchProjection,
    PreparedSearchProjectionConsumerUpdate, QualifiedOutOfCoreSearchOptions, ReadControl,
    ReadinessAreaMap, ReadinessAreaSummary, ReadinessDashboard, ReadinessOptions,
    ReadinessRedactionSummary, RegisteredSearchProjectionConsumer, RetrievalOutput,
    RetrievalReport, RouteReadinessSummary, SearchCandidateExhaustionError,
    SearchCandidateFieldSummary, SearchCandidateFilterPushdownEvidence, SearchCandidateOutput,
    SearchCandidateReadinessOptions, SearchCandidateReadinessReport, SearchCandidateReport,
    SearchCandidateRequest, SearchCandidateShadowAccumulator, SearchCandidateShadowEvidence,
    SearchHydrationOutput, SearchProjection, SearchProjectionDocumentLookup,
    SearchProjectionOpenMode, SearchProjectionRebuildOptions, SearchProjectionRebuildPhase,
    SearchProjectionRebuildProgress, SearchProjectionRebuildReport, SearchProjectionRebuildSource,
    SearchProjectionRebuildVerification, SearchProjectionRole, SlowQueryReport,
    SlowQueryReportRecord, SourceMutationDualWriteEvidence, SourceMutationDualWriteReadinessReport,
    SourceMutationFamilyRequirement, StorageLifecycleActionKind, StorageLifecycleDecision,
    WorkControl, BOUNDED_READ_EVIDENCE_PROTOCOL, CUTOVER_CONTROLS_PROTOCOL,
    GRAPH_READ_ROUTE_CATALOG_VERSION, LIBRARY_READINESS_PROTOCOL,
    MAX_SEARCH_PROJECTION_MARKER_REASON_BYTES, NOWLEDGE_QUERY_RUNTIME_PREFLIGHT_PROTOCOL,
    OPEN_REPORT_PROTOCOL, OPERATIONS_READINESS_PROTOCOL, PRODUCTION_STATUS_PROTOCOL,
    QUERY_REPORT_PROTOCOL, READINESS_DASHBOARD_PROTOCOL, READ_REPORT_PROTOCOL,
    READ_SNAPSHOT_REPORT_PROTOCOL, REQUIRED_BOUNDED_READ_ROUTES, REQUIRED_SOURCE_MUTATION_FAMILIES,
    RETRIEVAL_REPORT_PROTOCOL, RUNTIME_STATUS_PROTOCOL, SEARCH_CANDIDATE_EVIDENCE_ROUTE,
    SEARCH_CANDIDATE_EVIDENCE_SOURCE, SEARCH_CANDIDATE_PRIMARY_ENGINE,
    SEARCH_CANDIDATE_READINESS_PROTOCOL, SEARCH_CANDIDATE_REPORT_PROTOCOL,
    SEARCH_CANDIDATE_SHADOW_ENGINE, SEARCH_CANDIDATE_SHADOW_EVIDENCE_PROTOCOL,
    SEARCH_CANDIDATE_TRACE_EVIDENCE_SOURCE, SEARCH_CANDIDATE_TRACE_PRIMARY_ENGINE,
    SEARCH_CANDIDATE_TRACE_SHADOW_ENGINE, SEARCH_ROUTE, SERVING_PATH_READINESS_PROTOCOL,
    SLOW_QUERY_REPORT_PROTOCOL, SOURCE_MUTATION_DUAL_WRITE_READINESS_PROTOCOL,
    SOURCE_MUTATION_FAMILY_CONTENT_REFRESH_REPARSE, SOURCE_MUTATION_FAMILY_GRAPH_DELETE,
    SOURCE_MUTATION_FAMILY_INDEXED_TRANSITION, SOURCE_MUTATION_FAMILY_INGEST_CREATE,
    SOURCE_MUTATION_FAMILY_LIFECYCLE, SOURCE_MUTATION_FAMILY_PATCH_DELETE,
    SOURCE_MUTATION_FAMILY_REVISION_EDGES, SOURCE_MUTATION_FAMILY_SEARCH_PROJECTION_EFFECTS,
    STORAGE_LIFECYCLE_DECISION_PROTOCOL,
};
#[cfg(feature = "tokio-runtime")]
pub use embedded_tokio::{
    HawDBTokioEmbedded, HawDBTokioEmbeddedError, TokioQueryBatchStream, TokioQueryStreamOptions,
};
pub use error::{
    FileDescriptorError, HawDBError, ReadBudgetError, ReadBudgetResource, RelationalErrorKind,
    RelationalErrorSurface, ResourceBudgetError, ResourceBudgetKind, ResourceBudgetScope, Result,
    RuntimeAdmissionRefusal, SearchProjectionEpochAdvanceRefusal, SearchProjectionRebuildRefusal,
    StorageFormatError, TransactionRetryError, TransactionRetryReason, WalRecordLimit,
    WalRecordLimitError, APPEND_WAL_FORMAT, LOGICAL_DUMP_FORMAT,
    RELATIONAL_CHECKPOINT_LAYOUT_FORMAT, RELATIONAL_DURABLE_CODEC_FORMAT,
    RELATIONAL_ROW_PAGE_FORMAT, RELATIONAL_SCHEMA_FORMAT, SEARCH_PROJECTION_MANIFEST_FORMAT,
    STORAGE_MANIFEST_FORMAT,
};
pub use executor::{
    ProjectedRowRef, QueryRow, QueryRowRef, QueryRows, QuerySchema, ReadExecutionProfile, Row,
    RowRef,
};
pub use graph_route_evidence::{
    nowledge_graph_route_evidence_json, parse_route_parity_evidence, parse_route_query_inventory,
    RouteCypherQuery, RouteParityEvidence, RouteParityEvidenceRoute, RouteQuery,
    NMEM_GRAPH_ROUTE_PARITY_EVIDENCE_PROTOCOL,
};
pub use graph_route_readiness::{
    nowledge_graph_route_readiness_json, NMEM_GRAPH_ROUTE_EVIDENCE_PROTOCOL,
    NMEM_GRAPH_ROUTE_READINESS_PROTOCOL,
};
#[doc(hidden)]
pub use hawdb_bootstrap::{
    endpoint_violations_json, hawdb_lightning_artifact_summary,
    hawdb_lightning_bootstrap_bundle_json,
    hawdb_lightning_bootstrap_bundle_json_with_optional_storage_recovery,
    hawdb_lightning_bootstrap_manifest_json, hawdb_lightning_gc_staging_report,
    hawdb_lightning_graph_stream_validation_json, hawdb_lightning_import_state_marker,
    hawdb_lightning_import_status, hawdb_lightning_relational_stream_validation_json,
    publish_hawdb_lightning_staging_catalog, publish_hawdb_lightning_staging_catalog_with_options,
    read_hawdb_lightning_staging_artifact_json, stable_identity_audit_json,
    stage_hawdb_lightning_bootstrap_export,
    stage_hawdb_lightning_bootstrap_export_with_optional_storage_recovery,
    sync_bootstrap_directory, verify_hawdb_lightning_published_manifest,
    verify_hawdb_lightning_staging_catalog, write_bootstrap_atomic_file,
    HawDBLightningPublishOptions, HAWDB_LIGHTNING_STAGING_CATALOG_PROTOCOL_VERSION,
};
pub use hawdb_core::{temporal, time, TemporalDuration, Uuid};
pub use hawdb_core::{
    CompressedHistogram, HistogramBucket, MostCommonValue, PropertyCardinalityEstimate,
    PropertyEstimateSource,
};
pub use hawdb_core::{
    Decimal, DecimalError, DecimalType, LogicalType, Vector, VectorDimension, VectorDistance,
    VectorRef,
};
pub use hawdb_core::{
    GraphRagCommonPathSummary, GraphRagGeneratedQuery, GraphRagLabelSummary,
    GraphRagPropertySubject, GraphRagPropertySummary, GraphRagQueryBinding, GraphRagQueryDraft,
    GraphRagQueryGenerationError, GraphRagQueryParameterCardinality, GraphRagQueryParameterError,
    GraphRagQueryParameterRequirement, GraphRagQueryPattern, GraphRagQueryPredicate,
    GraphRagQueryPredicateOperator, GraphRagQueryProjection, GraphRagRelationshipTypeSummary,
    GraphRagRouteSummary, GraphRagSchemaContext, GraphRagSchemaContextOptions,
    GraphRagSchemaContextTruncation, RuntimeCancellationReason, RuntimeCancellationToken,
    RuntimeCapabilities, RuntimeCapability, RuntimeIoWaveController, RuntimeIoWaveError,
    RuntimeIoWavePermit, RuntimeIoWaveTryAcquire, RuntimeMemoryController, RuntimeMemoryError,
    RuntimeMemoryPermit, RuntimeMemoryReservation, RuntimeMemoryTarget, RuntimeTaskContext,
    DEFAULT_GRAPH_RAG_MAX_COMMON_PATHS, DEFAULT_GRAPH_RAG_MAX_LABELS,
    DEFAULT_GRAPH_RAG_MAX_PROPERTIES_PER_SUBJECT, DEFAULT_GRAPH_RAG_MAX_RELATIONSHIP_TYPES,
    DEFAULT_GRAPH_RAG_MAX_ROUTES, GRAPH_RAG_SCHEMA_CONTEXT_PROTOCOL, MAX_GRAPH_RAG_QUERY_LIMIT,
};
pub use hawdb_core::{
    VectorIndexBackend, VectorIndexDescriptor, VectorIndexLsg, VectorIndexTarget,
};
pub use hawdb_evidence::{
    ProductionEvidenceBinding, ProductionQualificationIdentity,
    PRODUCTION_QUALIFICATION_POLICY_VERSION,
};
pub use hawdb_evidence::{
    StorageCrashCaseEvidence, StorageCrashPoint, StorageCrashRecoveryEvidence,
    STORAGE_CRASH_RECOVERY_EVIDENCE_PROTOCOL,
};
pub use hawdb_executor::numeric::retained::{
    NumericBufferIdentity as RetainedBufferIdentity,
    NumericBufferProvenance as RetainedBufferProvenance,
};
pub use hawdb_executor::scoring::{HostScorer, HostScorerBatch, HostScorerDescriptor};
pub use hawdb_executor::ValidityView as RetainedValidityView;
pub use hawdb_optimizer::{
    AdaptiveVectorBackendPolicy, Distribution, GroupId, Memo as OptimizerMemo,
    MemoGroup as OptimizerMemoGroup, PhysicalProperties, RequiredProperties,
};
pub use hawdb_plan_cypher::GraphExpansionBudget;
pub use hawdb_qos::{
    IoConcurrencyBudget, ProcessMemoryCapabilities, ProcessMemoryPolicy, ProcessMemoryPolicyConfig,
    ProcessMemoryPolicySnapshot, ProcessMemoryProfile, ProcessMemorySnapshot, RuntimeAdmissionCode,
    RuntimeAdmissionError, RuntimeGovernor, RuntimeGovernorConfig, RuntimeGovernorLimits,
    RuntimeGovernorSnapshot, RuntimeIoReservationScope, RuntimeMaintenanceMemoryReport,
    RuntimeMaintenanceWork, RuntimeMemoryPressure, RuntimeMemorySnapshot, RuntimePermit,
    RuntimeResourceBudget, RuntimeResourceSnapshot, RuntimeRetainedMemory, RuntimeRetainedResult,
    RuntimeRetainedResultError, RuntimeRetainedResultResource, RuntimeRetainedResultSnapshot,
    RuntimeTelemetryEvent, RuntimeTelemetryEventKind, RuntimeTelemetrySink, RuntimeWorkKind,
    RuntimeWorkPriority, RuntimeWorkRequest, StorageDeviceDiscoverySource, StorageDeviceProfile,
    StorageMediaKind,
};
pub use hawdb_readiness::embedded_query_path::{
    EmbeddedQueryEntrypoint, EmbeddedQueryPathReadiness, EMBEDDED_QUERY_PATH_READINESS_PROTOCOL,
};
pub use hawdb_readiness::query_runtime_preflight::parse_query_runtime_preflight_probes;
#[cfg(feature = "tokio-runtime")]
pub use hawdb_runtime_tokio::{
    TokioRuntimeAdapter, TokioRuntimeConfig, TokioRuntimeError, TokioRuntimeOwnership,
    TokioSegmentReadExecutionError, TokioSegmentReadExecutor, TokioTaskError,
};
pub use hawdb_search::{SearchQueryError, SearchQueryResult, SearchRetainedOutput};
pub use hawdb_storage::file_descriptors::FileDescriptorMetrics;
pub use hawdb_storage::projection_generation::{
    decode_projection_relational_member, encode_projection_relational_member,
    ProjectionGenerationBatchLimits, ProjectionGenerationBegin, ProjectionGenerationCursor,
    ProjectionGenerationDigestBuilder, ProjectionGenerationError, ProjectionGenerationGcLimits,
    ProjectionGenerationGcReport, ProjectionGenerationIdentity, ProjectionGenerationManifest,
    ProjectionGenerationMember, ProjectionGenerationPage, ProjectionGenerationPublishReport,
    ProjectionGenerationReadLimits, ProjectionGenerationReadReport, ProjectionGenerationReader,
    ProjectionGenerationSeal, ProjectionGenerationState, ProjectionGenerationStatus,
    ProjectionGenerationStore, ProjectionGenerationWriter, SealedProjectionGeneration,
};
pub use hawdb_storage::scan::ScanPredicate;
#[cfg(feature = "vector-search")]
pub use hawdb_vector_projection::{
    KernelPreference as RaBitQKernelPreference,
    ProjectionBuildReport as RaBitQCandidateProjectionBuildReport,
    ProjectionManifest as RaBitQCandidateProjectionManifest,
    ProjectionSearchReport as RaBitQCandidateScanReport, ScanKernel as RaBitQScanKernel,
};
pub use logical_dump::{
    confirm_logical_dump_publication, persistent_format_version, verify_logical_dump,
    LogicalDumpExportReport, LogicalDumpImportReport, LogicalDumpOptions, LogicalDumpVerifyReport,
    LOGICAL_DUMP_FORMAT_VERSION, PERSISTENT_FORMAT_VERSION,
};
pub use mem_integration_bundle::{integration_bundle_json, IntegrationBundleInputs};
pub use mem_integration_readiness::{
    background_maintenance_cutover_readiness, bounded_read_alignment_cutover_readiness,
    bounded_read_cutover_readiness, content_store_boundary_cutover_readiness,
    final_cutover_preflight, final_cutover_preflight_json, graph_replacement_cutover_readiness,
    graph_route_alignment_cutover_readiness, graph_route_cutover_readiness,
    graph_route_parity_alignment_cutover_readiness, hawdb_submodule_cutover_readiness,
    integration_bundle_protocol_cutover_readiness, integration_readiness,
    integration_readiness_json, legacy_coexistence_cutover_readiness,
    library_readiness_cutover_readiness, previous_wrapper_preflight_cutover_readiness,
    query_family_replacement_cutover_readiness,
    query_runtime_preflight_alignment_cutover_readiness, query_runtime_preflight_cutover_readiness,
    replacement_summary_protocol_cutover_readiness, route_ownership_cutover_readiness,
    search_candidate_cutover_readiness, search_projection_cutover_readiness,
    storage_recovery_cutover_readiness, BackgroundMaintenanceCutoverReadiness,
    BoundedReadAlignmentCutoverReadiness, BoundedReadCutoverReadiness,
    ContentStoreBoundaryCutoverReadiness, FinalCutoverPreflightReport,
    GraphReplacementCutoverReadiness, GraphRouteAlignmentCutoverReadiness,
    GraphRouteCutoverReadiness, GraphRouteParityAlignmentCutoverReadiness,
    HawDBSubmoduleCutoverReadiness, IntegrationBundleProtocolCutoverReadiness,
    IntegrationCheckReport, IntegrationNextAction, IntegrationReadinessReport,
    LegacyCoexistenceCutoverReadiness, LibraryReadinessCutoverReadiness,
    PreviousWrapperPreflightCutoverReadiness, QueryFamilyReplacementCutoverReadiness,
    QueryRuntimePreflightAlignmentCutoverReadiness, QueryRuntimePreflightCutoverReadiness,
    ReplacementSummaryProtocolCutoverReadiness, RouteOwnershipCutoverReadiness,
    SearchCandidateCutoverReadiness, SearchProjectionCutoverReadiness,
    StorageRecoveryCutoverReadiness, FINAL_CUTOVER_PREFLIGHT_PROTOCOL,
    HAWDB_INTEGRATION_BUNDLE_PROTOCOL, INTEGRATION_READINESS_PROTOCOL,
};
pub use mem_library_readiness::{
    parse_bounded_probe_json, parse_mem_library_covered_routes_json,
    parse_mem_library_graph_route_readiness_json, parse_mem_library_readiness_mode,
    parse_parameters_json, value_from_json, LibraryReadinessRunReport,
};
pub use nowledge_fuzz::{
    nowledge_query_fuzz_harness, NowledgeQueryFuzzCaseReport, NowledgeQueryFuzzHarnessOptions,
    NowledgeQueryFuzzHarnessReport, NOWLEDGE_QUERY_FUZZ_HARNESS_PROTOCOL,
};
pub use nowledge_inventory::{
    background_maintenance_evidence_health, background_maintenance_evidence_health_from_bundle,
    replacement_readiness_family_evidence_health,
    replacement_readiness_family_evidence_health_from_bundle, scan_nowledge_query_inventory,
    scan_nowledge_query_inventory_cypher_coverage_detail_to_json,
    scan_nowledge_query_inventory_cypher_coverage_to_json,
    scan_nowledge_query_inventory_cypher_migration_gate_to_json,
    scan_nowledge_query_inventory_cypher_migration_gate_with_options_to_json,
    scan_nowledge_query_inventory_to_json, scan_nowledge_query_inventory_with_options,
    storage_recovery_evidence_health, storage_recovery_evidence_health_from_bundle,
    BackgroundMaintenanceEvidenceHealth, NowledgeCypherMigrationGateJsonOptions,
    NowledgeInventoryScanOptions, ReplacementReadinessFamilyEvidenceHealth,
    StorageRecoveryEvidenceHealth, REQUIRED_NOWLEDGE_REPLACEMENT_QUERY_FAMILIES,
};
pub use previous_wrapper_preflight::{
    nowledge_previous_wrapper_preflight_check, nowledge_previous_wrapper_preflight_check_json,
    IntoNowledgePreviousWrapperPreflightInputs, NowledgePreviousWrapperPreflightCheckReport,
    NowledgePreviousWrapperPreflightInputs, NowledgePreviousWrapperPreflightReport,
    NOWLEDGE_PREVIOUS_WRAPPER_PREFLIGHT_PROTOCOL,
};
pub use qos::{
    BackgroundWorkDecision, BackgroundWorkHint, BackgroundWorkPlan, BackgroundWorkReasonCode,
    LocalQosClassSnapshot, LocalQosPermit, LocalQosPolicy, LocalQosScheduler, LocalQosSnapshot,
    LocalQosState, QosAdmission, QosAdmissionCode, QosSnapshotBlockerCode, QosTelemetryEvent,
    QosTelemetryOutcome, QosTelemetryPhase, QosTelemetrySink, RankedBackgroundWork, WorkClass,
    WorkPriority, WorkRequest, WORK_CLASS_COUNT,
};
pub use query_family_evidence::nowledge_query_family_evidence_json;
pub use query_runtime_preflight::query_runtime_preflight_json;
pub use replacement_summary::{
    nowledge_graph_route_readiness_summary, nowledge_graph_route_readiness_summary_from_bundle,
    nowledge_replacement_summary_json, nowledge_replacement_summary_json_with_options,
    GraphRouteReadinessSummary, NowledgeReplacementSummaryOptions,
};
pub use route_ownership::{
    route_ownership_all_hawdb, route_ownership_all_legacy, route_ownership_for_engine,
    route_ownership_readiness, RouteOwnership, RouteOwnershipPolicy, RouteOwnershipReadinessReport,
    RouteReadEngine, ROUTE_OWNERSHIP_PROTOCOL,
};
pub use schema::{
    AdvancedStatisticsFreshness, BasicGraphStatistics, CompositeIndexDescriptor,
    ConstraintDescriptor, ConstraintId, ConstraintKind, ConstraintSubject, DeclaredPropertyDefault,
    GraphStatistics, IndexDescriptor, IndexId, IndexKind, IndexStatisticsSample, PropertyDefault,
    PropertyDescriptor, PropertyId, PropertySchema, PropertyType, SchemaObjectState,
    TableDescriptor, TableId, TableKind,
};
pub use search::projection_ownership::ExternallyOwnedRowsToken;
#[cfg(feature = "vector-search")]
pub use search::rabitq_projection::{
    RaBitQBitWidth, RaBitQCandidate, RaBitQCandidateOutput, RaBitQCandidateProjection,
    RaBitQCandidateProjectionBuildOptions, RaBitQCandidateScanOptions,
};
#[doc(hidden)]
pub use search::PreparedSearchPublication;
pub use search::{
    AdaptiveVectorSearchOptions, CompressedVectorSearchMode, GovernedSearchGenerationUpdate,
    GovernedSearchGenerationWriter, LexicalQueryTermPolicy, MetadataRepairOptions,
    MetadataRepairSummary, SearchAccessControlContext, SearchAnalyzerLexicon,
    SearchBaselineComparisonLimits, SearchBaselineComparisonReport, SearchBodyReadOptions,
    SearchCandidateSetReport, SearchCheckpointReport, SearchDerivedArtifactReport, SearchDocument,
    SearchDocumentBody, SearchDocumentHeader, SearchDocumentSetDigest, SearchEmbeddingManifest,
    SearchEmptyReasonCode, SearchFallbackReasonCode, SearchFusionWeights,
    SearchGenerationAdmission, SearchHit, SearchHitHydration, SearchIndex,
    SearchLexicalFeasibilityCoverage, SearchLexicalFeasibilityMetrics,
    SearchLexicalProductionQualificationReport, SearchLexicalSourcePolicy, SearchLexicalTermPolicy,
    SearchMatchedBaseline, SearchMode, SearchMutationInspectionInput, SearchMutationInspectionStep,
    SearchMutationSortStep, SearchMutationSortStepLimits, SearchMutationSortStepUsage,
    SearchOutOfCoreBaselineComparison, SearchOutOfCoreCandidate, SearchOutOfCoreConfig,
    SearchOutOfCoreDeltaComparison, SearchOutOfCoreDocumentLookup, SearchOutOfCoreExecutionContext,
    SearchOutOfCoreGenerationBuildOptions, SearchOutOfCoreGenerationBuildReport,
    SearchOutOfCoreGenerationUpdate, SearchOutOfCoreGenerationWriter,
    SearchOutOfCoreHydrationOutput, SearchOutOfCoreMetrics, SearchOutOfCoreMutationWriter,
    SearchOutOfCoreOutput, SearchOutOfCorePreparedGeneration, SearchOutOfCorePreparedUpdate,
    SearchOutOfCoreReader, SearchOutOfCoreSegmentCompaction,
    SearchOutOfCoreSegmentCompactionPolicy, SearchOutOfCoreSegmentCompactionReport,
    SearchOutOfCoreUnorderedMutationWriter, SearchOutOfCoreUnorderedReplacementWriter,
    SearchPredicateFieldPruningReport, SearchPredicatePushdownReport,
    SearchProjectionCleanupOptions, SearchProjectionCleanupOutcome, SearchProjectionCleanupReport,
    SearchProjectionDelta, SearchProjectionDeltaReport, SearchProjectionEpochAdvanceReport,
    SearchProjectionFreshness, SearchProjectionKind, SearchProjectionProbeOptions,
    SearchProjectionQualificationIdentity, SearchProjectionRow, SearchProjectionScanBudget,
    SearchProjectionScanReport, SearchQueryOptions, SearchRangeReadConfig, SearchRebuildOptions,
    SearchRebuildSummary, SearchResultSet, SearchRetrieverCandidateSetReport,
    SearchScoredCandidate, SearchStagingCleanupReport, SearchTextSeedOutput, SearchTextSeedReport,
    SearchTopKScoreParity, SearchTruncationReasonCode, SearchUnorderedMutationLimits,
    SearchUnorderedMutationReport, SearchVectorScoring, SearchVerifiedBody,
    VectorProjectionQualificationIdentity, VectorProjectionResourceEvidence,
    VectorRecallProductionQualificationReport, VectorRecallValidationBlocker,
    VectorRecallValidationOptions, VectorRecallValidationReport, VectorSearchExecutionOptions,
    VectorSearchKernelPreference, DEFAULT_VECTOR_SEARCH_WORKING_BYTES,
    MAX_VECTOR_RECALL_VALIDATION_CANDIDATE_LIMIT, MAX_VECTOR_RECALL_VALIDATION_SAMPLES,
    MAX_VECTOR_RECALL_VALIDATION_TOP_K, MINIMUM_VECTOR_QUALIFICATION_DOCUMENT_COUNT,
    NOWLEDGE_MEMORY_MATERIALIZED_METADATA_PATHS, NOWLEDGE_SEARCH_PROJECTION_SCAN_FILTER_FIELDS,
    SEARCH_LEXICAL_QUALIFICATION_PROTOCOL, SEARCH_LEXICAL_QUALIFICATION_PROTOCOL_VERSION,
    SEARCH_PROJECTION_CLEANUP_PROTOCOL, VECTOR_RECALL_PRODUCTION_QUALIFICATION_PROTOCOL,
    VECTOR_RECALL_VALIDATION_PROTOCOL,
};
pub use search_candidate_shadow_evidence::parse_search_candidate_shadow_probe;
pub use search_projection_evidence::{
    nowledge_search_projection_probe_contract_json, NowledgeSearchProjectionEvidenceReport,
};
pub use search_route_ownership::{
    active_search_route_ownership_all_hawdb, active_search_route_ownership_all_lancedb,
    active_search_route_ownership_for_engine, active_search_route_ownership_readiness,
    active_search_route_read_evidence_all_hawdb_ready, active_search_route_read_requirement,
    active_search_route_read_requirements, active_search_route_readiness,
    required_projection_route_for_active_search_route, search_route_ownership_all_hawdb,
    search_route_ownership_all_lancedb, search_route_ownership_for_engine,
    search_route_ownership_readiness, ActiveSearchRouteOwnership,
    ActiveSearchRouteOwnershipReadinessReport, ActiveSearchRouteReadEvidence,
    ActiveSearchRouteReadRequirement, ActiveSearchRouteReadinessReport, SearchReadEngine,
    SearchRouteOwnership, SearchRouteOwnershipPolicy, SearchRouteOwnershipReadinessReport,
    ACTIVE_SEARCH_ROUTE_COMMUNITY_DISCOVERY, ACTIVE_SEARCH_ROUTE_DEEP_SEARCH_GRAPH_EXPANSION,
    ACTIVE_SEARCH_ROUTE_ENTITY_DISCOVERY, ACTIVE_SEARCH_ROUTE_FS_RECALL,
    ACTIVE_SEARCH_ROUTE_MCP_SEARCH, ACTIVE_SEARCH_ROUTE_READINESS_PROTOCOL,
    ACTIVE_SEARCH_ROUTE_SOURCE_CHUNK_RECALL, ACTIVE_SEARCH_ROUTE_SOURCE_RECALL,
    ACTIVE_SEARCH_ROUTE_THREAD_MESSAGE_FTS, REQUIRED_ACTIVE_SEARCH_ROUTES, REQUIRED_SEARCH_ROUTES,
    SEARCH_ROUTE_COMMUNITY, SEARCH_ROUTE_ENTITY, SEARCH_ROUTE_MEMORY, SEARCH_ROUTE_MESSAGE,
    SEARCH_ROUTE_OWNERSHIP_PROTOCOL, SEARCH_ROUTE_SOURCE, SEARCH_ROUTE_SOURCE_CHUNK,
};
pub use storage_recovery_evidence::nowledge_storage_recovery_evidence_json;
pub use store::{
    restore_storage_backup, AdjacencyConsistencyReport, AdjacencyConsolidationPlan,
    AdjacencyConsolidationReport, AdjacencyDirection, AdjacencyGroupConsistencyMismatch,
    AdjacencyGroupKey, AdjacencyGroupStats, AdjacencyLayout, AppendGeneratedRow,
    AppendMutationOutcome, AppendOrderMode, AppendSegmentReadOutput, AppendStorageResidencyReport,
    AppendTableRow, AppendTableSchema, AppendTransaction, AppendWrite,
    BasicStatisticsConsistencyReport, ColumnarShadowCheckpointReport,
    ColumnarShadowCheckpointStatus, ColumnarShadowRecoveryStatus, DatabaseDoctor,
    DegreeStatisticsConsistencyReport, DegreeStatisticsEntry, DegreeStatisticsKey,
    DerivedArtifactBranchSource, DerivedArtifactHealth, DerivedArtifactHealthReport,
    DerivedArtifactHealthState, DerivedArtifactKind, DerivedArtifactRebuildOptions,
    DerivedArtifactRepairPlan, DerivedArtifactRepairReport,
    DistinctValueStatisticsConsistencyReport, DurabilityPolicy, FileSegmentRangeReader,
    GraphIndexReadMetricsSnapshot, KernelWriteBatch, MutationSummary,
    OptimizerStatisticsRefreshOptions, OptimizerStatisticsRefreshReport, OrderedAdjacencyEntry,
    PersistentGraphIndexClass, PropertyIndexConsistencyReport, PublishedReadView, RecoveryMode,
    RelationalColumnSchema, RelationalConstraintQualificationProbeReport,
    RelationalConstraintQualificationReport, RelationalConstraintQualificationUse,
    RelationalIndexArtifactMetadata, RelationalIndexGenerationArtifacts, RelationalIndexMode,
    RelationalIndexQualificationProbeKind, RelationalIndexQualificationProbeReport,
    RelationalIndexReadLimits, RelationalIndexReadReport, RelationalIndexReadViewBackendReport,
    RelationalIndexReadViewReport, RelationalIndexRecoveryReadReport,
    RelationalIndexStorageResidencyReport, RelationalIndexViewQualificationOptions,
    RelationalIndexViewQualificationReport, RelationalKey, RelationalOverflowCompactionConfig,
    RelationalOverflowCompactionReport, RelationalRow, RelationalRowPageCompactionConfig,
    RelationalRowPageCompactionReport, RelationalRowPageRecoveryStatus,
    RelationalRowStorageResidencyReport, RelationalScalarType, RelationalValue,
    SearchProjectionChangefeedReadiness, SearchProjectionChangefeedStatus,
    SearchProjectionMutationId, SegmentBytes, SegmentCacheSnapshot, SegmentRangeReader,
    SegmentReadError, SegmentReadExecutionError, SegmentReadExecutionReport, SegmentReadExecutor,
    SegmentReadPayload, SegmentReadRange, SegmentReadSchedule, SegmentReadScheduler,
    SegmentReadWave, StorageBackupReport, StorageDebtController, StorageOpenTimings,
    StoragePressureReasonCode, StoragePressureSignals, StoragePressureSnapshot,
    StoragePressureState, StorageReclamationWatermark, StorageRecoveryReport, StorageResidencyMode,
    StorageResidencyReport, StorageRestoreReport, StorageScrubReport, WalDoctorOptions,
    WalRepairAcknowledgement, WalReplayConfig, WalTailRepairPlan, WalTailRepairReason,
    WalTailRepairReport, DENSE_ADJACENCY_DEGREE_THRESHOLD, DERIVED_ARTIFACT_REPAIR_PROTOCOL,
    RELATIONAL_CONSTRAINT_QUALIFICATION_PROTOCOL, RELATIONAL_INDEX_VIEW_QUALIFICATION_PROTOCOL,
    STORAGE_PRESSURE_DEFER_RATIO_PER_MILLION, STORAGE_PRESSURE_SOFT_RATIO_PER_MILLION,
    WAL_DOCTOR_REPAIR_PROTOCOL,
};
#[cfg(feature = "opentelemetry")]
pub use telemetry::OpenTelemetryMetrics;
pub use telemetry::{
    operations_telemetry_readiness, qos_telemetry_sink, KernelTelemetry, KernelTelemetryOperation,
    OperationsTelemetryReadiness, QueryTelemetry, TelemetrySink, REQUIRED_OPERATIONS_TELEMETRY,
};
pub use value::{Value, ValueRef};
pub use workload_fixtures::{
    nowledge_graph_route_workload_fixture_report, NowledgeGraphRouteWorkloadBoundedExpansionReport,
    NowledgeGraphRouteWorkloadFixtureOptions, NowledgeGraphRouteWorkloadFixtureReport,
    NowledgeGraphRouteWorkloadQueryReport, NowledgeGraphRouteWorkloadRouteReport,
    NowledgeSearchMetadataWorkloadReport, NOWLEDGE_GRAPH_ROUTE_WORKLOAD_FIXTURE_PROTOCOL,
};

#[cfg(test)]
mod lexical_term_policy_tests;

#[cfg(test)]
mod lexical_source_policy_tests;

#[cfg(test)]
mod lexical_manifest_budget_tests;

#[cfg(test)]
mod tests {
    use super::{
        Database, EmbeddedQueryEntrypoint, EmbeddedQueryPathReadiness, IoConcurrencyBudget,
        NowledgeGraphAdapter, NowledgeGraphStatement, RuntimeGovernor, RuntimeGovernorConfig,
        RuntimeIoWaveError, RuntimeMemorySnapshot, RuntimeResourceBudget, RuntimeResourceSnapshot,
        RuntimeTaskContext, RuntimeWorkPriority, RuntimeWorkRequest, SegmentBytes,
        SegmentRangeReader, SegmentReadError, SegmentReadExecutionError, SegmentReadExecutor,
        SegmentReadRange, SegmentReadScheduler, Value,
    };
    use std::any::TypeId;
    use std::collections::BTreeMap;
    use std::num::{NonZeroU64, NonZeroUsize};

    struct GovernorObservingReader {
        governor: RuntimeGovernor,
    }

    impl SegmentRangeReader for GovernorObservingReader {
        fn read_range(&self, range: &SegmentReadRange) -> Result<SegmentBytes, SegmentReadError> {
            assert_eq!(self.governor.snapshot().active_foreground_io_slots, 1);
            Ok(vec![0; range.length.get() as usize].into())
        }
    }

    #[test]
    fn crate_root_exports_query_runtime_front_door() {
        let mut db = Database::new();
        let mut adapter = NowledgeGraphAdapter::new(&mut db);
        let create = NowledgeGraphStatement {
            cypher: "CREATE (:Memory {id: $id, title: $title})".to_string(),
            parameters: BTreeMap::from([
                ("id".to_string(), Value::String("root".to_string())),
                ("title".to_string(), Value::String("Root".to_string())),
            ]),
        };
        adapter.query(&create).unwrap();

        let read = NowledgeGraphStatement {
            cypher: "MATCH (m:Memory {id: $id}) RETURN m.title AS title".to_string(),
            parameters: BTreeMap::from([("id".to_string(), Value::String("root".to_string()))]),
        };
        let output = adapter.query(&read).unwrap();

        assert_eq!(
            output.rows[0].get("title"),
            Some(&Value::String("Root".to_string()))
        );
    }

    #[test]
    fn crate_root_reexports_embedded_query_readiness_contract() {
        assert_eq!(
            TypeId::of::<EmbeddedQueryEntrypoint>(),
            TypeId::of::<hawdb_readiness::embedded_query_path::EmbeddedQueryEntrypoint>()
        );
        assert_eq!(
            TypeId::of::<EmbeddedQueryPathReadiness>(),
            TypeId::of::<hawdb_readiness::embedded_query_path::EmbeddedQueryPathReadiness>()
        );
    }

    #[test]
    fn admitted_segment_read_holds_io_slots_only_during_the_physical_wave() {
        let resources = RuntimeResourceSnapshot::from_parts(
            RuntimeResourceBudget::from_limits(NonZeroUsize::MIN, None, None),
            RuntimeMemorySnapshot::from_limits(
                Some(1024 * 1024),
                Some(1024 * 1024),
                None,
                None,
                None,
            ),
        );
        let governor = RuntimeGovernor::new(
            RuntimeGovernorConfig::shared_host(),
            resources,
            IoConcurrencyBudget::new(1, 1),
        );
        let permit = governor
            .try_admit(
                RuntimeWorkRequest::io(RuntimeWorkPriority::Foreground, 0, 0).with_io_wave_slots(1),
            )
            .unwrap();
        let context = permit.bind_task_context(RuntimeTaskContext::default());
        let schedule = SegmentReadScheduler::new(NonZeroUsize::MIN, NonZeroU64::MIN)
            .schedule([SegmentReadRange::new(1, 1, 0, NonZeroU64::MIN)]);
        let reader = GovernorObservingReader {
            governor: governor.clone(),
        };

        SegmentReadExecutor::new(NonZeroU64::MIN)
            .execute_with_context(&reader, &schedule, &context, |_| {
                assert_eq!(governor.snapshot().active_foreground_io_slots, 0);
                Ok::<(), std::convert::Infallible>(())
            })
            .unwrap();

        assert_eq!(governor.snapshot().active_foreground_io_slots, 0);

        let overwide = SegmentReadScheduler::new(NonZeroUsize::new(2).unwrap(), NonZeroU64::MIN)
            .schedule([
                SegmentReadRange::new(1, 1, 0, NonZeroU64::MIN),
                SegmentReadRange::new(1, 2, 1, NonZeroU64::MIN),
            ]);
        let error = SegmentReadExecutor::new(NonZeroU64::new(2).unwrap())
            .execute_with_context(&reader, &overwide, &context, |_| {
                Ok::<(), std::convert::Infallible>(())
            })
            .unwrap_err();
        assert!(matches!(
            error,
            SegmentReadExecutionError::RuntimeIo(RuntimeIoWaveError::ReservationExceeded {
                requested_slots: 2,
                reserved_slots: 1,
            })
        ));
        assert_eq!(governor.snapshot().active_foreground_io_slots, 0);
    }
}