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
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benchmarks/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cargo-bazel-lock.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "04e97f3fc63e6ba232f6ee2a5f5669b86d44d249022a6bf960c7bbed5fff87cc",
"checksum": "7a4bf6809a93be5676332ba45a2e8d4de029ae879e07c4198b5c9034771daebe",
"crates": {
"adler2 2.0.1": {
"name": "adler2",
Expand Down Expand Up @@ -13035,6 +13035,10 @@
"id": "codspeed-divan-compat 5.0.1",
"target": "codspeed_divan_compat",
"alias": "divan"
},
{
"id": "serde_json 1.0.151",
"target": "serde_json"
}
],
"selects": {}
Expand Down
10 changes: 10 additions & 0 deletions crates/graphforge-api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ _API_COMPILE_DATA = [
]

_API_DEPS = [
"//crates/graphforge-discovery:graphforge_discovery",
"//crates/graphforge-portable-oci:graphforge_portable_oci",
"@crates//:bytes",
"//crates/graphforge-core:graphforge_core",
Expand Down Expand Up @@ -522,6 +523,7 @@ test_suite(
":clear",
":conductance",
":create_scaling",
":discovery_portable_v2",
":e2e_baseline",
":existential_subquery",
":facade_methods",
Expand Down Expand Up @@ -628,3 +630,11 @@ gf_rust_integration_test(
crate = ":graphforge_api",
deps = _API_DEPS,
)

gf_rust_integration_test(
name = "discovery_portable_v2",
srcs = ["tests/discovery_portable_v2.rs"],
crate = ":graphforge_api",
compile_data = ["//tests/fixtures/portable-v2:ontology-only.manifest.json"],
deps = _API_DEPS,
)
1 change: 1 addition & 0 deletions crates/graphforge-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ license-file.workspace = true
repository.workspace = true

[dependencies]
graphforge-discovery = { version = "0.5.2", path = "../graphforge-discovery" }
graphforge-portable-oci = { version = "0.5.2", path = "../graphforge-portable-oci" }
graphforge-value = { version = "0.5.2", path = "../graphforge-value" }
graphforge-core = { version = "0.5.2", path = "../graphforge-core" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
//! and authenticity exclusively to [`crate::verify_portable_v2`]. A successful
//! result is constructed only after both authorities agree.

use crate::{
PortableV2Error, PortableV2Limits, PortableV2Mode, PortableV2Report, verify_portable_v2,
use crate::{PortableVerifyRequest, verify_portable_v2};
use graphforge_core::portable::{
PortableV2Error, PortableV2Limits, PortableV2Mode, PortableV2Report,
};
use graphforge_discovery::{
DiscoveryError, DiscoveryLimits, DiscoveryManifest, RefSet, RepositoryIdentity,
Expand Down Expand Up @@ -115,9 +116,11 @@ pub fn verify_discovered_portable_v2(
}
})?;
let report = verify_portable_v2(
request.package,
request.mode,
request.portable_limits,
&PortableVerifyRequest {
input: request.package.to_path_buf(),
mode: request.mode,
limits: request.portable_limits,
},
request.cancelled,
)
.map_err(DiscoveryPortableV2Error::Portable)?;
Expand Down
39 changes: 25 additions & 14 deletions crates/graphforge-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ pub use ontology_composition_lifecycle::{
CompositionChangeRequest, CompositionDataDisposition, CompositionPortableCompatibility,
CompositionPortableReceipt,
};
mod discovery_portable_v2;
mod paging;
pub use discovery_portable_v2::{
DiscoveredPortableV2, DiscoveryPortableV2Error, DiscoveryPortableV2Mismatch,
DiscoveryPortableV2Request, verify_discovered_portable_v2,
};
mod portable;
mod provenance;
mod provider_embedding;
Expand Down Expand Up @@ -153,25 +158,33 @@ mod valid_time;
mod workspace_ontology;
mod write_modes;

pub use graphforge_storage::{
pub use graphforge_core::portable::{
PortableV2Authenticity, PortableV2Compatibility, PortableV2Error, PortableV2ErrorCode,
PortableV2ExportLimits, PortableV2ExportPlan, PortableV2ExportProgress,
PortableV2ExportReceipt, PortableV2GraphSelector, PortableV2GraphSubsetMeta,
PortableV2ExportProgress, PortableV2GraphSelector, PortableV2GraphSubsetMeta,
PortableV2Integrity, PortableV2Limits, PortableV2Mode, PortableV2Output,
PortableV2PackageClass, PortableV2ParticipantId, PortableV2PropertyProjection,
PortableV2Representation, PortableV2SelectionEntry, PortableV2SelectionPlan,
PortableV2SelectionProfile, PortableV2SelectionReason, PortableV2SelectionRequest,
PortableV2SubsetClosure, PortableV2SubsetPlan, PortableV2SubsetRequest,
PortableV2SubsetClosure, PortableV2SubsetPreview as PortableV2SubsetPlan,
PortableV2SubsetRequest,
};
pub use graphforge_core::storage_receipt::{
ArtifactCategory, ArtifactStorageTotals, StorageAttributionReceipt,
};
/// Finite portable export budgets.
pub type PortableV2ExportLimits = PortableV2Limits;
pub use graphforge_storage::{
SemanticMigrationOperation, WorkspaceOntologyComposition, WorkspacePortableOntologyStaging,
};
pub use portable::{
PortableExportRequest, PortableExportResult, PortableImportRequest, PortableImportResult,
PortableSelection, PortableV2ExportFacadeResult, PortableV2ExportRequest,
PortableV2ImportRequest, PortableV2ImportResult, PortableV2OciPublishFacadeRequest,
PortableV2OciPullFacadeRequest, PortableV2SelectionPreviewRequest,
PortableV2SubsetPreviewRequest, PortableVerifyRequest, PortableVerifyResult,
publish_portable_v2_oci, publish_portable_v2_oci_with_registry, pull_portable_v2_oci,
pull_portable_v2_oci_with_registry, verify_portable_v2,
PortableSelection, PortableV2ExportFacadeResult, PortableV2ExportReceiptView,
PortableV2ExportRequest, PortableV2ImportRequest, PortableV2ImportResult,
PortableV2OciPublishFacadeRequest, PortableV2OciPullFacadeRequest, PortableV2RepackRequest,
PortableV2RepackResult, PortableV2SelectionPreviewRequest, PortableV2SubsetPreviewRequest,
PortableVerifyRequest, PortableVerifyResult, publish_portable_v2_oci,
publish_portable_v2_oci_with_registry, pull_portable_v2_oci,
pull_portable_v2_oci_with_registry, repack_verified_expanded_portable_v2, verify_portable_v2,
};
pub use repository::{
GitProvenance, InfraCapabilityCompatibility, InfraNotChecked, InfraPlan, InfraStaticValidity,
Expand Down Expand Up @@ -551,10 +564,8 @@ impl GraphForge {
}

/// Capture closed, identity-free storage evidence for ordinary consumers.
pub fn storage_attribution_receipt(
&self,
) -> Result<graphforge_storage::StorageAttributionReceipt, GfError> {
graphforge_storage::StorageAttributionReceipt::from_snapshot(&self.storage_attribution()?)
pub fn storage_attribution_receipt(&self) -> Result<StorageAttributionReceipt, GfError> {
graphforge_storage::storage_attribution_receipt_from_snapshot(&self.storage_attribution()?)
}

pub(crate) fn stage_project_generation(
Expand Down
Loading