Checkpoint source 7 workflows and in-progress diagram authoring redesign
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s
Preserve current core, source, REST, desktop, recovery, documentation and validation work, including AGENTS.md and the development summary. This is a work-in-progress checkpoint: the new compact palette has outstanding compilation errors and native acceptance; earlier passing gates retain their documented scope.
This commit is contained in:
@@ -22,6 +22,7 @@ fn message(
|
||||
reply: Option<Id>,
|
||||
) -> OccurrenceBody {
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(exchange),
|
||||
sender: Some(sender),
|
||||
receiver: Some(receiver),
|
||||
|
||||
@@ -71,6 +71,7 @@ fn message(
|
||||
reply_to: Option<Id>,
|
||||
) -> OccurrenceBody {
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(mean),
|
||||
sender: Some(sender),
|
||||
receiver: Some(receiver),
|
||||
@@ -110,7 +111,7 @@ fn communication_means_are_distinct_oa_participant_relations_and_strict_source6_
|
||||
valid(&p);
|
||||
let text = language::format(&p);
|
||||
assert!(text.contains("communication_mean"));
|
||||
assert!(text.starts_with("arcadia 6;"));
|
||||
assert!(text.starts_with(&format!("arcadia {SCHEMA_VERSION};")));
|
||||
assert_eq!(language::parse(&text).unwrap(), p);
|
||||
let bytes = serde_json::to_vec(&p).unwrap();
|
||||
assert_eq!(persistence::decode(&bytes).unwrap(), p);
|
||||
@@ -122,8 +123,12 @@ fn communication_means_are_distinct_oa_participant_relations_and_strict_source6_
|
||||
"schema {version}"
|
||||
);
|
||||
assert!(
|
||||
language::parse(&text.replacen("arcadia 6;", &format!("arcadia {version};"), 1))
|
||||
.is_err(),
|
||||
language::parse(&text.replacen(
|
||||
&format!("arcadia {SCHEMA_VERSION};"),
|
||||
&format!("arcadia {version};"),
|
||||
1
|
||||
))
|
||||
.is_err(),
|
||||
"source {version}"
|
||||
);
|
||||
}
|
||||
@@ -158,8 +163,11 @@ fn communication_schema5_upgrade_preserves_legacy_data_and_exact_source_trivia()
|
||||
assert_eq!(result.migration.unwrap().from_schema, 5);
|
||||
let mut without_views = p.clone();
|
||||
without_views.diagrams.clear();
|
||||
let old =
|
||||
language::format(&without_views).replacen("arcadia 6;", "arcadia // old contract\n5;", 1);
|
||||
let old = language::format(&without_views).replacen(
|
||||
&format!("arcadia {SCHEMA_VERSION};"),
|
||||
"arcadia // old contract\n5;",
|
||||
1,
|
||||
);
|
||||
let bundle = source_project::SourceBundle {
|
||||
entry: "entry.arcadia".into(),
|
||||
files: BTreeMap::from([("entry.arcadia".into(), old.clone())]),
|
||||
@@ -168,7 +176,7 @@ fn communication_schema5_upgrade_preserves_legacy_data_and_exact_source_trivia()
|
||||
source_project::compile_bundle(&bundle, source_project::ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
compiled.bundle.files["entry.arcadia"],
|
||||
old.replacen("\n5;", "\n6;", 1)
|
||||
old.replacen("\n5;", &format!("\n{SCHEMA_VERSION};"), 1)
|
||||
);
|
||||
assert_eq!(compiled.decoded.project, without_views);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ fn occurrence(p: &mut Project, owner: Id, body: OccurrenceBody) -> Id {
|
||||
}
|
||||
fn exchange(id: Id) -> OccurrenceBody {
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(id),
|
||||
sender: None,
|
||||
receiver: None,
|
||||
@@ -183,6 +184,7 @@ fn included_process_and_nested_scenario_evidence_is_identity_based_in_both_layer
|
||||
&mut p,
|
||||
branch,
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(e),
|
||||
sender: Some(sender),
|
||||
receiver: Some(receiver),
|
||||
@@ -195,6 +197,7 @@ fn included_process_and_nested_scenario_evidence_is_identity_based_in_both_layer
|
||||
&mut p,
|
||||
branch,
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(e),
|
||||
sender: Some(receiver),
|
||||
receiver: Some(sender),
|
||||
|
||||
@@ -363,6 +363,49 @@ project mission "Harbor safety — 港 🌊" {
|
||||
family: oa_core::view_options::ExchangeFamily::Participant,
|
||||
exchanges: vec![means],
|
||||
};
|
||||
let caller = p
|
||||
.add_element(Kind::Process, Layer::Oa, "Common work caller", None)
|
||||
.unwrap();
|
||||
let work = p
|
||||
.elements
|
||||
.values()
|
||||
.find(|e| e.kind() == Kind::Activity)
|
||||
.unwrap()
|
||||
.id;
|
||||
let mut occurrences = vec![];
|
||||
for name in ["First contribution", "Second contribution"] {
|
||||
let id = p
|
||||
.add_element(Kind::Occurrence, Layer::Oa, name, Some(caller))
|
||||
.unwrap();
|
||||
*p.elements.get_mut(&id).unwrap().shared_mut().unwrap() = SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Action {
|
||||
action: Some(work),
|
||||
lifeline: None,
|
||||
},
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
};
|
||||
occurrences.push(id);
|
||||
}
|
||||
*p.elements.get_mut(&caller).unwrap().steps_mut().unwrap() = occurrences.clone();
|
||||
let id = p.relate(
|
||||
RelationKind::ContextualLink,
|
||||
"Shared work incidence",
|
||||
occurrences[0],
|
||||
occurrences[1],
|
||||
);
|
||||
p.relations.get_mut(&id).unwrap().body = RelationBody::ContextualLink {
|
||||
owner: caller,
|
||||
source: OccurrenceEndpoint {
|
||||
references: vec![],
|
||||
occurrence: occurrences[0],
|
||||
},
|
||||
target: OccurrenceEndpoint {
|
||||
references: vec![],
|
||||
occurrence: occurrences[1],
|
||||
},
|
||||
purpose: ContextualLinkPurpose::CommonWork { work },
|
||||
};
|
||||
p
|
||||
}
|
||||
|
||||
@@ -515,7 +558,7 @@ fn authoring_defaults_and_forward_references_remain_strict() {
|
||||
#[test]
|
||||
fn typed_unknown_fields_enums_duplicates_and_reference_spelling_are_rejected() {
|
||||
for (source, expected) in [
|
||||
("arcadia 7; project mission \"x\" {}", "Unsupported schema"),
|
||||
("arcadia 8; project mission \"x\" {}", "Unsupported schema"),
|
||||
(
|
||||
"arcadia 2; project mission \"x\" { oa_activity a \"A\" { nonsense 1; } }",
|
||||
"Unknown field",
|
||||
@@ -1219,11 +1262,10 @@ fn complete_normative_examples_are_accepted_by_the_real_parser() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if code.trim_start().starts_with("arcadia 2;")
|
||||
|| code.trim_start().starts_with("arcadia 3;")
|
||||
|| code.trim_start().starts_with("arcadia 4;")
|
||||
|| code.trim_start().starts_with("arcadia 6;")
|
||||
{
|
||||
if (1..=SCHEMA_VERSION).any(|version| {
|
||||
code.trim_start()
|
||||
.starts_with(&format!("arcadia {version};"))
|
||||
}) {
|
||||
read(&code);
|
||||
examples += 1;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ fn missing_v2_endpoints_are_deterministic_reported_and_independently_typed() {
|
||||
}
|
||||
}
|
||||
let canonical = language::format(&first.project);
|
||||
assert!(canonical.starts_with("arcadia 6;"));
|
||||
assert!(canonical.starts_with(&format!("arcadia {SCHEMA_VERSION};")));
|
||||
let reopened = persistence::decode_with_report(canonical.as_bytes()).unwrap();
|
||||
assert!(reopened.migration.is_none());
|
||||
assert_eq!(reopened.project, first.project);
|
||||
|
||||
@@ -102,6 +102,7 @@ fn fixture(family: Family) -> (Project, Id, Id, Id, FacetSelector, FacetSelector
|
||||
id,
|
||||
SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: None,
|
||||
sender: None,
|
||||
receiver: None,
|
||||
|
||||
@@ -120,7 +120,7 @@ fn authored_v4_modules_upgrade_only_the_version_and_preserve_nested_comments() {
|
||||
assert_eq!(compiled.bundle.files["contracts.arcadia"], module);
|
||||
assert_eq!(
|
||||
compiled.bundle.files["project.arcadia"],
|
||||
entry.replacen("arcadia 4;", "arcadia 6;", 1)
|
||||
entry.replacen("arcadia 4;", &format!("arcadia {SCHEMA_VERSION};"), 1)
|
||||
);
|
||||
assert_eq!(
|
||||
compiled.index.lexical_owners
|
||||
|
||||
@@ -515,6 +515,7 @@ fn payload(p: &mut Project, layer: Layer, prefix: &str) -> Payload {
|
||||
scenario,
|
||||
&format!("{prefix} message"),
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(exchange),
|
||||
sender: None,
|
||||
receiver: None,
|
||||
|
||||
@@ -131,7 +131,7 @@ fn typed_historical_facets_roundtrip_deleted_references_and_all_leaf_categories(
|
||||
]);
|
||||
assert!(!model.contains(id(90)));
|
||||
let source = language::format(&model);
|
||||
assert!(source.starts_with("arcadia 6;"));
|
||||
assert!(source.starts_with(&format!("arcadia {SCHEMA_VERSION};")));
|
||||
assert!(
|
||||
source.contains(&format!("Named uuid \"{}\"", id(90))),
|
||||
"{source}"
|
||||
|
||||
@@ -91,6 +91,7 @@ fn message(
|
||||
id,
|
||||
SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(exchange),
|
||||
sender: None,
|
||||
receiver: None,
|
||||
|
||||
@@ -74,7 +74,7 @@ fn genuine_v3_preserves_typed_ports_and_allocates_deterministic_relationships()
|
||||
.any(|issue| issue.code == "message_value_ambiguous_path")
|
||||
);
|
||||
let canonical = language::format(project);
|
||||
assert!(canonical.starts_with("arcadia 6;"));
|
||||
assert!(canonical.starts_with(&format!("arcadia {SCHEMA_VERSION};")));
|
||||
let reopened = language::parse_with_report(&canonical).unwrap();
|
||||
assert_eq!(&reopened.project, project);
|
||||
assert!(reopened.migration.is_none());
|
||||
|
||||
@@ -26,7 +26,9 @@ fn authored_v3_bundle_upgrade_preserves_includes_nested_ownership_comments_and_i
|
||||
};
|
||||
let compiled = compile_bundle(&bundle, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(compiled.bundle.files.len(), 2);
|
||||
assert!(compiled.bundle.files["project.arcadia"].contains("arcadia 6;"));
|
||||
assert!(
|
||||
compiled.bundle.files["project.arcadia"].contains(&format!("arcadia {SCHEMA_VERSION};"))
|
||||
);
|
||||
assert!(compiled.bundle.files["project.arcadia"].contains("include \"contracts.arcadia\";"));
|
||||
for text in [
|
||||
"// Contracts stay in their original module.",
|
||||
|
||||
@@ -51,6 +51,7 @@ fn message(
|
||||
call: Option<Id>,
|
||||
) -> OccurrenceBody {
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange,
|
||||
sender: Some(sender),
|
||||
receiver,
|
||||
|
||||
@@ -271,6 +271,7 @@ fn contextual_links_match_work_exchange_endpoints_and_reject_foreign_owners() {
|
||||
owner,
|
||||
"Contextual message",
|
||||
OccurrenceBody::Exchange {
|
||||
operation: None,
|
||||
exchange: Some(global),
|
||||
sender: None,
|
||||
receiver: None,
|
||||
|
||||
@@ -372,7 +372,8 @@ fn source6_new_historical_facts_are_rejected_under_source5_even_without_live_cat
|
||||
error.contains("category semantic facts require schema/source 6"),
|
||||
"{error}"
|
||||
);
|
||||
let old = language::format(&p).replacen("arcadia 6;", "arcadia 5;", 1);
|
||||
let old =
|
||||
language::format(&p).replacen(&format!("arcadia {SCHEMA_VERSION};"), "arcadia 5;", 1);
|
||||
assert!(language::parse(&old).unwrap_err().iter().any(|d| {
|
||||
d.message
|
||||
.contains("category semantic facts require schema/source 6")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -163,7 +163,9 @@ fn cross_file_typed_ports_global_forward_references_and_stable_ids() {
|
||||
(5, oa_core::SCHEMA_VERSION)
|
||||
);
|
||||
assert!(input.files[&input.entry].contains("arcadia 5;"));
|
||||
assert!(result.bundle.files[&result.bundle.entry].contains("arcadia 6;"));
|
||||
assert!(
|
||||
result.bundle.files[&result.bundle.entry].contains(&format!("arcadia {SCHEMA_VERSION};"))
|
||||
);
|
||||
assert!(
|
||||
again.decoded.migration.is_none(),
|
||||
"stabilized current source must not migrate twice"
|
||||
|
||||
Reference in New Issue
Block a user