Skip to content

Commit ea576d2

Browse files
committed
PR 423 merge conflicts resolved. Tests passing.
2 parents 9f68f14 + fb12ae6 commit ea576d2

223 files changed

Lines changed: 18651 additions & 7071 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
run: |
3131
nix develop --command bash -c "npm ci"
3232
33+
- name: Check SDK wire fixtures are up to date
34+
run: |
35+
nix develop --command bash -c "npm run regen:sdk-fixtures && git diff --exit-code host/map-sdk/tests/fixtures/"
36+
3337
- name: Test
3438
run: |
3539
nix develop --command bash -c "npm test"

Cargo.lock

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ holons_guest_integrity = { path = "happ/crates/holons_guest_integrity" }
4848
#holochain_receptor = { path = "host/crates/holochain_receptor" }
4949
#holons_receptor = { path = "host/crates/holons_receptor" }
5050
#holons_loader_client = { path = "host/crates/holons_loader_client" }
51+
map_commands_contract = { path = "host/crates/map_commands_contract" }
52+
map_commands_runtime = { path = "host/crates/map_commands_runtime" }
5153

5254

5355
# Shared

happ/crates/holons_guest/src/dances_guest/dancer.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ impl Dancer {
4646
dispatch_table.insert("add_related_holons", add_related_holons_dance as DanceFunction);
4747
dispatch_table.insert("commit", commit_dance as DanceFunction);
4848
dispatch_table.insert("delete_holon", delete_holon_dance as DanceFunction);
49-
dispatch_table.insert(
50-
"fetch_all_related_holons",
51-
fetch_all_related_holons_dance as DanceFunction,
52-
);
49+
dispatch_table
50+
.insert("fetch_all_related_holons", fetch_all_related_holons_dance as DanceFunction);
5351
dispatch_table.insert("get_all_holons", get_all_holons_dance as DanceFunction);
5452
dispatch_table.insert("get_holon_by_id", get_holon_by_id_dance as DanceFunction);
5553
dispatch_table.insert("load_holons", load_holons_dance as DanceFunction);
@@ -107,9 +105,7 @@ impl Dancer {
107105
/// * `description` holds the error message associated with the HolonError
108106
/// * `body` and `descriptor` are set to None
109107
///
110-
fn process_dispatch_result(
111-
dispatch_result: Result<ResponseBody, HolonError>,
112-
) -> DanceResponse {
108+
fn process_dispatch_result(dispatch_result: Result<ResponseBody, HolonError>) -> DanceResponse {
113109
match dispatch_result {
114110
Ok(body) => DanceResponse {
115111
status_code: ResponseStatusCode::OK,

happ/crates/holons_guest/src/guest_shared_objects/commit_functions.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,14 @@ fn commit_relationship(
445445
Ok(())
446446
}
447447

448-
/// This method creates smartlinks from the specified source_id for the specified relationship name
449-
/// to each holon in its collection that has a holon_id.
448+
/// Creates SmartLinks from `source_id` to each member in `collection`.
449+
///
450+
/// Current behavior is fail-fast at the collection level: if any member cannot
451+
/// resolve a persisted `holon_id` or key metadata, this function returns that
452+
/// error immediately and no later members in the same collection are processed.
453+
/// In practice, an abandoned staged target can therefore prevent otherwise
454+
/// valid sibling links in the same relationship collection from being
455+
/// persisted during this commit pass.
450456
fn save_smartlinks_for_collection(
451457
_context: &Arc<TransactionContext>,
452458
source_id: LocalId,

happ/crates/holons_guest/src/guest_shared_objects/guest_holon_service.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use std::any::Any;
22
use std::collections::HashMap;
3-
use std::{fmt, sync::{Arc, RwLock}};
3+
use std::{
4+
fmt,
5+
sync::{Arc, RwLock},
6+
};
47

58
use hdk::prelude::*;
69
use holons_core::core_shared_objects::SavedHolon;
@@ -21,9 +24,7 @@ use base_types::MapString;
2124
use core_types::{HolonError, HolonId};
2225
use holons_core::core_shared_objects::transactions::TransactionContextHandle;
2326
use holons_core::{
24-
core_shared_objects::{
25-
transactions::TransactionContext, Holon, HolonCollection,
26-
},
27+
core_shared_objects::{transactions::TransactionContext, Holon, HolonCollection},
2728
reference_layer::{
2829
HolonCollectionApi, HolonReference, HolonServiceApi, SmartReference, WritableHolon,
2930
},

happ/crates/holons_guest/src/guest_shared_objects/smartlink_adapter.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ use base_types::{BaseValue, MapString};
44
use core_types::{ExternalId, HolonError, HolonId, OutboundProxyId};
55
use hdi::prelude::*;
66
use hdk::prelude::*;
7-
use holons_core::{
8-
core_shared_objects::holon::key_from_property_map,
9-
};
7+
use holons_core::core_shared_objects::holon::key_from_property_map;
108
use holons_guest_integrity::type_conversions::*;
119
use holons_integrity::LinkTypes;
1210
use holons_integrity::*;

0 commit comments

Comments
 (0)