Complete source 6 engineering workflows and preserve release validation evidence
This commit is contained in:
@@ -165,9 +165,9 @@ fn data_group_candidates_cover_every_definition_and_companion_default_both_direc
|
||||
let paths = constructors::roots(app.project(), target, &group).unwrap();
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(paths[0].clone(), json!(definition)),
|
||||
RowEvent::Variant(paths[0].clone(), json!(definition)),
|
||||
);
|
||||
send(&mut app, Event::Shape(paths[1].clone(), json!(default)));
|
||||
send(&mut app, RowEvent::Shape(paths[1].clone(), json!(default)));
|
||||
assert!(
|
||||
state(&app).can_apply(),
|
||||
"{definition:?}: {}",
|
||||
@@ -293,9 +293,9 @@ fn group_take_reference_payload_and_scalar_candidate_match_core_and_one_document
|
||||
assert!(!state(&app).can_apply());
|
||||
let oa_choice = view::choice(app.project(), refs[0]);
|
||||
let sa_choice = view::choice(app.project(), refs[1]);
|
||||
send(&mut app, Event::ReferenceOa(oa_choice));
|
||||
send(&mut app, Event::ReferenceSa(sa_choice));
|
||||
send(&mut app, Event::AddReference);
|
||||
send(&mut app, RowEvent::ReferenceOa(oa_choice));
|
||||
send(&mut app, RowEvent::ReferenceSa(sa_choice));
|
||||
send(&mut app, RowEvent::AddReference);
|
||||
assert!(
|
||||
state(&app).can_apply(),
|
||||
"{family} reverse={reverse}: {}",
|
||||
@@ -309,7 +309,7 @@ fn group_take_reference_payload_and_scalar_candidate_match_core_and_one_document
|
||||
);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Input("/description".into(), source_ref.to_string()),
|
||||
RowEvent::Input("/description".into(), source_ref.to_string()),
|
||||
);
|
||||
assert!(
|
||||
state(&app).can_apply(),
|
||||
@@ -377,14 +377,17 @@ fn data_group_retains_invalid_sibling_drafts_companion_default_and_variant_edito
|
||||
let roots = constructors::roots(app.project(), sa, &group).unwrap();
|
||||
let min_path = format!("{}/Integer/minimum", roots[0]);
|
||||
decide(&mut app, minimum.clone(), SemanticDecision::Candidate);
|
||||
send(&mut app, Event::Input(min_path.clone(), "-".into()));
|
||||
send(&mut app, RowEvent::Input(min_path.clone(), "-".into()));
|
||||
decide(&mut app, minimum.clone(), SemanticDecision::KeepTarget);
|
||||
decide(&mut app, group.clone(), SemanticDecision::Candidate);
|
||||
send(&mut app, Event::Input(min_path.clone(), "-draft".into()));
|
||||
send(&mut app, RowEvent::Input(min_path.clone(), "-draft".into()));
|
||||
let cursor = state(&app).group_drafts[&group].inputs[&min_path]
|
||||
.editor
|
||||
.cursor();
|
||||
send(&mut app, Event::Variant(roots[0].clone(), json!("Boolean")));
|
||||
send(
|
||||
&mut app,
|
||||
RowEvent::Variant(roots[0].clone(), json!("Boolean")),
|
||||
);
|
||||
assert_eq!(
|
||||
state(&app).group_drafts[&group].value.pointer(&roots[1]),
|
||||
Some(&json!({"Integer":5}))
|
||||
@@ -392,7 +395,7 @@ fn data_group_retains_invalid_sibling_drafts_companion_default_and_variant_edito
|
||||
assert!(!state(&app).can_apply()); // overlap and explicitly incompatible default retained
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Variant(
|
||||
roots[0].clone(),
|
||||
json!({"Integer":{"minimum":null,"maximum":null}}),
|
||||
),
|
||||
@@ -411,16 +414,19 @@ fn data_group_retains_invalid_sibling_drafts_companion_default_and_variant_edito
|
||||
state(&app).draft.as_ref().unwrap().inputs[&min_path].raw,
|
||||
"-"
|
||||
);
|
||||
send(&mut app, Event::Shape(min_path.clone(), Value::Null));
|
||||
send(&mut app, Event::Variant(roots[0].clone(), json!("Boolean")));
|
||||
send(&mut app, RowEvent::Shape(min_path.clone(), Value::Null));
|
||||
send(
|
||||
&mut app,
|
||||
Event::Shape(roots[1].clone(), json!({"Boolean":true})),
|
||||
RowEvent::Variant(roots[0].clone(), json!("Boolean")),
|
||||
);
|
||||
send(&mut app, Event::Decide(minimum, None));
|
||||
send(
|
||||
&mut app,
|
||||
RowEvent::Shape(roots[1].clone(), json!({"Boolean":true})),
|
||||
);
|
||||
send(&mut app, RowEvent::Decide(minimum, None));
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
for protected in ["/id", "/alias", "/body", "/parent", "/name"] {
|
||||
send(&mut app, Event::Shape(protected.into(), Value::Null));
|
||||
send(&mut app, RowEvent::Shape(protected.into(), Value::Null));
|
||||
assert!(
|
||||
state(&app)
|
||||
.error
|
||||
@@ -433,7 +439,7 @@ fn data_group_retains_invalid_sibling_drafts_companion_default_and_variant_edito
|
||||
state(&app).draft.as_ref().unwrap().inputs[&min_path].raw,
|
||||
"-"
|
||||
);
|
||||
send(&mut app, Event::Preview);
|
||||
send(&mut app, RowEvent::Preview);
|
||||
assert!(state(&app).can_apply());
|
||||
}
|
||||
|
||||
@@ -595,7 +601,7 @@ fn occurrence_and_event_candidate_variants_cover_closed_families_without_touchin
|
||||
SharedBody::Event { body } => json!(body),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
send(&mut app, Event::Shape(root, payload));
|
||||
send(&mut app, RowEvent::Shape(root, payload));
|
||||
assert!(
|
||||
state(&app).can_apply(),
|
||||
"{body:?}: {}",
|
||||
@@ -636,18 +642,18 @@ fn port_group_companions_typed_owner_context_and_direction_restrictions_are_expl
|
||||
let roots = constructors::roots(app.project(), sa, &group).unwrap();
|
||||
send(
|
||||
&mut app,
|
||||
Event::Shape(format!("{}/interface", roots[1]), json!(interface)),
|
||||
RowEvent::Shape(format!("{}/interface", roots[1]), json!(interface)),
|
||||
);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Variant(
|
||||
roots[0].clone(),
|
||||
json!({"FunctionInput":{"incoming_items":[]}}),
|
||||
),
|
||||
);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Append(
|
||||
RowEvent::Append(
|
||||
format!("{}/FunctionInput/incoming_items", roots[0]),
|
||||
json!(item),
|
||||
),
|
||||
@@ -655,7 +661,7 @@ fn port_group_companions_typed_owner_context_and_direction_restrictions_are_expl
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Variant(
|
||||
roots[0].clone(),
|
||||
json!({"FunctionOutput":{"outgoing_items":[]}}),
|
||||
),
|
||||
@@ -678,11 +684,14 @@ fn port_group_companions_typed_owner_context_and_direction_restrictions_are_expl
|
||||
FacetSelector::Header(HeaderFacet::Parent),
|
||||
SemanticDecision::Candidate,
|
||||
);
|
||||
send(&mut app, Event::Shape("/parent".into(), json!(component)));
|
||||
send(&mut app, Event::Select(group.clone()));
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Shape("/parent".into(), json!(component)),
|
||||
);
|
||||
send(&mut app, RowEvent::Select(group.clone()));
|
||||
send(
|
||||
&mut app,
|
||||
RowEvent::Variant(
|
||||
roots[0].clone(),
|
||||
json!({"Component":{"kind":"Flow","orientation":"InOut"}}),
|
||||
),
|
||||
@@ -693,7 +702,7 @@ fn port_group_companions_typed_owner_context_and_direction_restrictions_are_expl
|
||||
state(&app).group_drafts[&group].context_value()["parent"],
|
||||
json!(component)
|
||||
);
|
||||
send(&mut app, Event::Shape(roots[1].clone(), Value::Null));
|
||||
send(&mut app, RowEvent::Shape(roots[1].clone(), Value::Null));
|
||||
assert!(state(&app).can_apply());
|
||||
apply(&mut app);
|
||||
assert!(matches!(
|
||||
@@ -736,29 +745,29 @@ fn outer_and_nested_constructor_candidates_require_explicit_resolution_and_retai
|
||||
decide(&mut app, nested.clone(), SemanticDecision::Candidate);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Input(expression.clone(), "nested draft".into()),
|
||||
RowEvent::Input(expression.clone(), "nested draft".into()),
|
||||
);
|
||||
decide(&mut app, outer.clone(), SemanticDecision::Candidate);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Input(expression.clone(), "outer draft".into()),
|
||||
RowEvent::Input(expression.clone(), "outer draft".into()),
|
||||
);
|
||||
assert!(!state(&app).can_apply());
|
||||
assert!(failure(state(&app)).contains("different final values"));
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Variant(
|
||||
path.clone(),
|
||||
json!({"Action":{"action":null,"lifeline":null}}),
|
||||
),
|
||||
);
|
||||
assert!(!state(&app).can_apply());
|
||||
assert_eq!(state(&app).decisions.len(), 2);
|
||||
send(&mut app, Event::Decide(nested.clone(), None));
|
||||
send(&mut app, RowEvent::Decide(nested.clone(), None));
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(
|
||||
RowEvent::Variant(
|
||||
path.clone(),
|
||||
json!({"Exchange":{"exchange":null,"sender":null,"receiver":null,"message_kind":"Asynchronous","reply_to":null,"values":[]}}),
|
||||
),
|
||||
@@ -777,7 +786,7 @@ fn outer_and_nested_constructor_candidates_require_explicit_resolution_and_retai
|
||||
);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Variant(path, json!({"Action":{"action":null,"lifeline":null}})),
|
||||
RowEvent::Variant(path, json!({"Action":{"action":null,"lifeline":null}})),
|
||||
);
|
||||
assert!(state(&app).can_apply());
|
||||
let scope = reviewed(state(&app));
|
||||
@@ -841,7 +850,10 @@ fn historical_event_keep_retires_only_obsolete_branch_and_unchanged_kind_acknowl
|
||||
FacetSelector::Header(HeaderFacet::Name),
|
||||
SemanticDecision::Candidate,
|
||||
);
|
||||
send(&mut app, Event::Input("/name".into(), "Kind only".into()));
|
||||
send(
|
||||
&mut app,
|
||||
RowEvent::Input("/name".into(), "Kind only".into()),
|
||||
);
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
assert_eq!(
|
||||
reviewed(state(&app)),
|
||||
@@ -950,7 +962,7 @@ fn existing_fragment_and_branch_group_candidates_edit_complete_owned_order_witho
|
||||
decide(&mut app, group, SemanticDecision::Candidate);
|
||||
send(
|
||||
&mut app,
|
||||
Event::Array(format!("{root}{suffix}"), Some(1), -1),
|
||||
RowEvent::Array(format!("{root}{suffix}"), Some(1), -1),
|
||||
);
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
let result = state(&app).proposed.as_ref().unwrap();
|
||||
@@ -1028,7 +1040,7 @@ fn scenario_use_group_takes_typed_binding_references_and_preserves_source_text_b
|
||||
}
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(
|
||||
RowEvent::Decide(
|
||||
FacetSelector::Occurrence(OccurrenceFacet::Constructor),
|
||||
Some(SemanticDecision::TakeSource),
|
||||
),
|
||||
@@ -1040,18 +1052,18 @@ fn scenario_use_group_takes_typed_binding_references_and_preserves_source_text_b
|
||||
.clone();
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(
|
||||
RowEvent::Decide(
|
||||
FacetSelector::Header(HeaderFacet::Description),
|
||||
Some(SemanticDecision::Candidate),
|
||||
),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
RowEvent::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Input("/description".into(), refs[side][1].to_string()),
|
||||
RowEvent::Input("/description".into(), refs[side][1].to_string()),
|
||||
);
|
||||
assert!(s.can_apply(), "{}", failure(&s));
|
||||
assert_eq!(
|
||||
@@ -1101,7 +1113,7 @@ fn reverse_existing_typed_port_reviews_keep_or_candidate_legacy_without_permitti
|
||||
if decision == SemanticDecision::Candidate {
|
||||
send(
|
||||
&mut app,
|
||||
Event::Shape("/body/Oa/Shared/Port/legacy/direction".into(), json!("In")),
|
||||
RowEvent::Shape("/body/Oa/Shared/Port/legacy/direction".into(), json!("In")),
|
||||
);
|
||||
if let SharedBody::Port {
|
||||
legacy: Some(association),
|
||||
@@ -1174,7 +1186,7 @@ fn historical_same_kind_take_preserves_target_only_literals_when_composed_with_c
|
||||
);
|
||||
let unit =
|
||||
scalar::binding(app.project(), target, &FacetSelector::Data(DataFacet::Unit)).unwrap();
|
||||
send(&mut app, Event::Input(unit, "final unit".into()));
|
||||
send(&mut app, RowEvent::Input(unit, "final unit".into()));
|
||||
assert!(state(&app).can_apply(), "{}", failure(state(&app)));
|
||||
let SharedBody::DataType {
|
||||
definition: DataTypeDefinition::Enumeration { literals },
|
||||
@@ -1250,7 +1262,7 @@ fn closed_data_and_event_take_composition_matches_core_across_every_kind_pair_an
|
||||
let mut s = State::new(&p, source).unwrap();
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(group.clone(), Some(SemanticDecision::TakeSource)),
|
||||
RowEvent::Decide(group.clone(), Some(SemanticDecision::TakeSource)),
|
||||
);
|
||||
assert!(
|
||||
s.can_apply(),
|
||||
@@ -1264,18 +1276,18 @@ fn closed_data_and_event_take_composition_matches_core_across_every_kind_pair_an
|
||||
let expected_review = s.plan.as_ref().unwrap().reviews[0].clone();
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(
|
||||
RowEvent::Decide(
|
||||
FacetSelector::Header(HeaderFacet::Description),
|
||||
Some(SemanticDecision::Candidate),
|
||||
),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
RowEvent::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Input("/description".into(), "composed candidate".into()),
|
||||
RowEvent::Input("/description".into(), "composed candidate".into()),
|
||||
);
|
||||
assert!(
|
||||
s.can_apply(),
|
||||
@@ -1417,7 +1429,7 @@ fn exchange_constructor_takes_qualified_annotation_addresses_without_remapping_e
|
||||
}
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(
|
||||
RowEvent::Decide(
|
||||
FacetSelector::Occurrence(OccurrenceFacet::Constructor),
|
||||
Some(SemanticDecision::TakeSource),
|
||||
),
|
||||
@@ -1425,18 +1437,18 @@ fn exchange_constructor_takes_qualified_annotation_addresses_without_remapping_e
|
||||
assert!(s.can_apply(), "reverse={reverse}: {}", failure(&s));
|
||||
s.update(
|
||||
&p,
|
||||
Event::Decide(
|
||||
RowEvent::Decide(
|
||||
FacetSelector::Header(HeaderFacet::Description),
|
||||
Some(SemanticDecision::Candidate),
|
||||
),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
RowEvent::Select(FacetSelector::Header(HeaderFacet::Description)),
|
||||
);
|
||||
s.update(
|
||||
&p,
|
||||
Event::Input("/description".into(), "annotation reviewed".into()),
|
||||
RowEvent::Input("/description".into(), "annotation reviewed".into()),
|
||||
);
|
||||
assert!(s.can_apply(), "reverse={reverse}: {}", failure(&s));
|
||||
let Some(SharedBody::Occurrence {
|
||||
|
||||
Reference in New Issue
Block a user