Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,27 @@ jobs:
# §E8. Enforce the repository's 80% floor over production sources only.
# Test helpers and vendored code can make the aggregate look healthy
# without exercising the libraries a release actually ships.
#
# `reference/full.rs` is excluded on the same ground, and it is the one
# exclusion here that needs its reasoning written down. It is a driver
# that exists to be bound by *other repositories'* test suites — it is
# what lets a host test its own layer above the contract without linking
# an engine. This workspace cannot exercise it without inventing suite
# assertions for every optional family, and every assertion added to
# `assert_provider` binds TinyCortex too (`full_provider_conformance`
# picks them up automatically), so "cover the double" would mean writing
# engine requirements to satisfy a coverage number. `reference/mod.rs` is
# deliberately NOT excluded: the suite drives it hard and it sits at ~90%,
# which is what a driver this workspace does own should look like.
- name: Enforce production-source coverage
run: |
set -euo pipefail
cargo llvm-cov --all-features --workspace \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$' \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$|/crates/tinymemory-conformance/src/reference/full\.rs$' \
--fail-under-lines 80 --summary-only \
| tee "$GITHUB_STEP_SUMMARY"
cargo llvm-cov report \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$' \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$|/crates/tinymemory-conformance/src/reference/full\.rs$' \
--json --output-path target/production-coverage.json
test_decl_line="$(grep -n '#\[cfg(test)\]' \
crates/tinymemory-api/src/host/local_ai.rs | tail -1 | cut -d: -f1)"
Expand Down Expand Up @@ -358,7 +370,7 @@ jobs:
set -euo pipefail
cargo llvm-cov --manifest-path crates/tinymemory-module/Cargo.toml \
--workspace --all-features \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$' \
--ignore-filename-regex '(^|/)(tests|vendor)/|(^|/)(test|tests|test_helpers|test_support|test_seams)\.rs$|(_test|_tests|_test_support)\.rs$|/crates/tinymemory-core/src/(engine/parity|tree/retrieval/benchmarks)\.rs$|/crates/tinymemory-conformance/src/reference/full\.rs$' \
--fail-under-lines 80 --summary-only \
| tee "$GITHUB_STEP_SUMMARY"

Expand Down
7 changes: 7 additions & 0 deletions crates/tinymemory-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ pub use tinymemory_bus::{
capabilities, chunks, composio, error, evidence, goals, graph, health, learning, namespace,
operations, recall, tool_memory, tree, types, version, wire,
};
// `chrono` rides the same rule for the same reason. Two trait methods on
// `provider::MemoryTree` — `runtime_buffer_write` and `runtime_summarize` — take
// a `DateTime<Utc>` in their signature, so *implementing* the contract requires
// naming the type, and a driver crate that depends on this one and nothing else
// had no path to it. Forwarding the re-export is what makes "depend on the
// contract alone" true for an implementor rather than only for a caller.
pub use tinymemory_bus::chrono;
/// The mandatory-family composition: wrap any [`traits::Memory`] backend as a
/// complete [`provider::MemoryProvider`].
///
Expand Down
7 changes: 4 additions & 3 deletions crates/tinymemory-conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@
pub mod reference;
pub mod suite;

pub use reference::full::{Call, RecordingProvider, FULL_DRIVER_ID};
pub use reference::{InMemoryProvider, REFERENCE_DRIVER_ID};
pub use suite::{
assert_awkward_content_round_trips, assert_capability_audit, assert_export_cursor_terminates,
assert_export_import_round_trip, assert_forget_is_idempotent, assert_kv_round_trip,
assert_list_filters_narrow, assert_namespaces_are_isolated,
assert_awkward_content_round_trips, assert_capability_audit, assert_documents_round_trip,
assert_export_cursor_terminates, assert_export_import_round_trip, assert_forget_is_idempotent,
assert_kv_round_trip, assert_list_filters_narrow, assert_namespaces_are_isolated,
assert_namespaces_preserve_their_section, assert_provider,
assert_recall_respects_limit_and_namespace, assert_store_get_round_trip,
assert_taint_is_preserved, assert_upsert_replaces_rather_than_duplicates,
Expand Down
Loading