Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f9e6a18af | ||
|
|
7836a93edb | ||
|
|
f714a25bbc | ||
|
|
cb941367d7 | ||
|
|
96b756bece | ||
|
|
e624d5b9c4 | ||
|
|
d7c065991d |
@@ -3,6 +3,8 @@
|
||||
mod semantic_source;
|
||||
#[path = "migration_v2/source.rs"]
|
||||
mod v2_source;
|
||||
pub(crate) use crate::source_defaults::Mode as DeclarationFormat;
|
||||
use crate::source_defaults::{self, Context as DefaultContext};
|
||||
use crate::*;
|
||||
use serde_json::{Map, Value};
|
||||
use std::{collections::BTreeMap, fmt};
|
||||
@@ -645,25 +647,34 @@ fn offset_for(source: &str, line: usize, column: usize) -> usize {
|
||||
source.len()
|
||||
}
|
||||
|
||||
/// Canonical output uses persistent aliases and explicit identities. Typed
|
||||
/// nested records are ordinary language fields; JSON documents are not embedded.
|
||||
/// Canonical output uses persistent aliases and explicit identities, omitting
|
||||
/// only values supplied by source defaults. Typed nested records are ordinary
|
||||
/// language fields; JSON documents are not embedded.
|
||||
pub fn format(project: &Project) -> String {
|
||||
let mut out = std::format!(
|
||||
"arcadia {SCHEMA_VERSION};\nproject {} {} id \"{}\" {{\n description {};\n\n",
|
||||
"arcadia {SCHEMA_VERSION};\nproject {} {} id \"{}\" {{\n",
|
||||
project.alias,
|
||||
quote(&project.name),
|
||||
project.id,
|
||||
quote(&project.description)
|
||||
);
|
||||
for (_, declaration) in format_declarations(project) {
|
||||
if !project.description.is_empty() {
|
||||
out.push_str(&std::format!(
|
||||
" description {};\n",
|
||||
quote(&project.description)
|
||||
));
|
||||
}
|
||||
out.push('\n');
|
||||
for (_, declaration) in format_declarations(project, DeclarationFormat::Compact) {
|
||||
out.push_str(&declaration);
|
||||
}
|
||||
out.push_str("}\n");
|
||||
out
|
||||
}
|
||||
|
||||
/// The same typed declaration writer is used by flat and modular source output.
|
||||
pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
/// Shared typed writer for canonical output and lossless editing. Complete edit
|
||||
/// comparisons retain defaults; emitted declarations and value fragments apply
|
||||
/// only the omission rules valid in their selected source context.
|
||||
pub(crate) fn format_declarations(project: &Project, mode: DeclarationFormat) -> Vec<(Id, String)> {
|
||||
let aliases = project
|
||||
.identities()
|
||||
.into_iter()
|
||||
@@ -675,6 +686,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
let mut fields = payload(&serde_json::to_value(&e.body).unwrap());
|
||||
fields.insert("description".into(), Value::String(e.description.clone()));
|
||||
fields.insert("parent".into(), serde_json::to_value(e.parent).unwrap());
|
||||
let fields = source_defaults::fields(DefaultContext::Element(e.kind()), &fields, mode);
|
||||
write_declaration(
|
||||
&mut out,
|
||||
&element_word(e.kind(), e.layer()),
|
||||
@@ -690,6 +702,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
let mut out = String::new();
|
||||
let mut fields = payload(&serde_json::to_value(&r.body).unwrap());
|
||||
fields.insert("description".into(), Value::String(r.description.clone()));
|
||||
let fields = source_defaults::fields(DefaultContext::Relation(r.kind()), &fields, mode);
|
||||
write_declaration(
|
||||
&mut out,
|
||||
&relation_word(r.kind()),
|
||||
@@ -705,6 +718,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
let mut out = String::new();
|
||||
let mut fields = record_fields(d);
|
||||
fields.remove("nodes");
|
||||
let fields = source_defaults::fields(DefaultContext::Diagram, &fields, mode);
|
||||
write_declaration(
|
||||
&mut out,
|
||||
"diagram",
|
||||
@@ -719,6 +733,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
let mut out = String::new();
|
||||
let mut fields = record_fields(n);
|
||||
fields.insert("diagram".into(), Value::String(d.id.to_string()));
|
||||
let fields = source_defaults::fields(DefaultContext::Node, &fields, mode);
|
||||
write_declaration(&mut out, "node", &n.alias, None, n.id, &fields, &aliases);
|
||||
declarations.push((n.id, out));
|
||||
}
|
||||
@@ -731,7 +746,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
&a.alias,
|
||||
Some(&a.name),
|
||||
a.id,
|
||||
&record_fields(a),
|
||||
&source_defaults::fields(DefaultContext::Artifact, &record_fields(a), mode),
|
||||
&aliases,
|
||||
);
|
||||
declarations.push((a.id, out));
|
||||
@@ -744,7 +759,7 @@ pub(crate) fn format_declarations(project: &Project) -> Vec<(Id, String)> {
|
||||
&t.alias,
|
||||
Some(&t.name),
|
||||
t.id,
|
||||
&record_fields(t),
|
||||
&source_defaults::fields(DefaultContext::Trace, &record_fields(t), mode),
|
||||
&aliases,
|
||||
);
|
||||
declarations.push((t.id, out));
|
||||
@@ -1742,7 +1757,9 @@ pub(crate) fn resolve_declarations(
|
||||
*viewpoint = ScenarioViewpoint::MixedLegacy;
|
||||
}
|
||||
let mut body = serde_json::to_value(initial).unwrap();
|
||||
let defaults = if legacy {
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Element(kind))
|
||||
} else if legacy {
|
||||
crate::persistence::v3::legacy_defaults(kind)
|
||||
.and_then(|value| value.as_object().cloned())
|
||||
.unwrap_or_else(|| payload(&body))
|
||||
@@ -1799,7 +1816,12 @@ pub(crate) fn resolve_declarations(
|
||||
let mut body =
|
||||
serde_json::to_value(RelationBody::new(kind, Id::nil(), Id::nil()))
|
||||
.unwrap();
|
||||
let merged = merge_fields(payload(&body), fields).map_err(&conversion_error)?;
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Relation(kind))
|
||||
} else {
|
||||
payload(&body)
|
||||
};
|
||||
let merged = merge_fields(defaults, fields).map_err(&conversion_error)?;
|
||||
replace_payload(&mut body, merged);
|
||||
let body = serde_json::from_value(body)
|
||||
.map_err(|e| conversion_error(e.to_string()))?;
|
||||
@@ -1824,7 +1846,10 @@ pub(crate) fn resolve_declarations(
|
||||
}
|
||||
let defaults =
|
||||
serde_json::json!({"description":"","layer":"Oa","projection":"Overview","routes":[],"view_options":crate::view_options::ViewOptions::default()});
|
||||
let mut record = merge_fields(defaults.as_object().unwrap().clone(), fields)
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Diagram)
|
||||
} else { defaults.as_object().unwrap().clone() };
|
||||
let mut record = merge_fields(defaults, fields)
|
||||
.map_err(&conversion_error)?;
|
||||
header(&mut record, d, true);
|
||||
record.insert("nodes".into(), serde_json::json!({}));
|
||||
@@ -1839,7 +1864,10 @@ pub(crate) fn resolve_declarations(
|
||||
return Err(conversion_error("Missing required field 'element'.".into()));
|
||||
}
|
||||
let defaults = serde_json::json!({"element":null,"position":{"x":0.0,"y":0.0},"size":{"width":224.0,"height":94.0},"collapsed":false,"port_anchors":[]});
|
||||
let mut record = merge_fields(defaults.as_object().unwrap().clone(), fields)
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Node)
|
||||
} else { defaults.as_object().unwrap().clone() };
|
||||
let mut record = merge_fields(defaults, fields)
|
||||
.map_err(&conversion_error)?;
|
||||
header(&mut record, d, false);
|
||||
let node: NodePlacement = serde_json::from_value(Value::Object(record))
|
||||
@@ -1851,7 +1879,10 @@ pub(crate) fn resolve_declarations(
|
||||
return Err(conversion_error("Missing required field 'owner'.".into()));
|
||||
}
|
||||
let defaults = serde_json::json!({"description":"","owner":null,"relation":"References","uri":"","revision":null,"fragment":null});
|
||||
let mut record = merge_fields(defaults.as_object().unwrap().clone(), fields)
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Artifact)
|
||||
} else { defaults.as_object().unwrap().clone() };
|
||||
let mut record = merge_fields(defaults, fields)
|
||||
.map_err(&conversion_error)?;
|
||||
header(&mut record, d, true);
|
||||
let artifact = serde_json::from_value(Value::Object(record))
|
||||
@@ -1867,7 +1898,10 @@ pub(crate) fn resolve_declarations(
|
||||
}
|
||||
}
|
||||
let defaults = serde_json::json!({"description":"","oa":null,"sa":null,"kind":"Refinement","baseline":null});
|
||||
let mut record = merge_fields(defaults.as_object().unwrap().clone(), fields)
|
||||
let defaults = if project.schema_version >= 7 {
|
||||
source_defaults::parser_fields(DefaultContext::Trace)
|
||||
} else { defaults.as_object().unwrap().clone() };
|
||||
let mut record = merge_fields(defaults, fields)
|
||||
.map_err(&conversion_error)?;
|
||||
header(&mut record, d, true);
|
||||
let trace = if project.schema_version < 5 {
|
||||
|
||||
@@ -11,6 +11,7 @@ pub mod references;
|
||||
pub mod routing;
|
||||
pub mod semantic;
|
||||
pub mod session;
|
||||
mod source_defaults;
|
||||
pub mod source_files;
|
||||
pub mod source_project;
|
||||
pub mod topology_context;
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
//! Ordinary source defaults shared by current parsing and declaration rendering.
|
||||
//!
|
||||
//! These are source omission defaults, not graphical creation defaults. The
|
||||
//! policy operates on complete typed declaration maps. Required named fields
|
||||
//! and selected constructor payloads remain distinct from omission defaults.
|
||||
//! Historical versions use their existing frozen parser paths. Semantic baseline
|
||||
//! history is never traversed or normalized here.
|
||||
use crate::{Kind, RelationKind};
|
||||
use serde_json::{Map, Value, json};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum Context {
|
||||
Element(Kind),
|
||||
Relation(RelationKind),
|
||||
Diagram,
|
||||
Node,
|
||||
Artifact,
|
||||
Trace,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum Mode {
|
||||
CompleteForEdit,
|
||||
Compact,
|
||||
/// Internal lossless-edit fragments: retain every top-level value while
|
||||
/// compacting its selected constructor's optional nested fields.
|
||||
CompactValues,
|
||||
}
|
||||
|
||||
/// Top-level field inventory for the current ordinary reader. Callers must
|
||||
/// check required fields before merging; null entries only admit their names.
|
||||
/// This never supplies defaults inside a selected constructor.
|
||||
pub(crate) fn parser_fields(context: Context) -> Map<String, Value> {
|
||||
let mut fields = declaration_defaults(context);
|
||||
let required: &[&str] = match context {
|
||||
Context::Element(kind) => {
|
||||
fields.remove("description");
|
||||
fields.remove("parent");
|
||||
if kind == Kind::Port {
|
||||
&["contract"]
|
||||
} else {
|
||||
&[]
|
||||
}
|
||||
}
|
||||
Context::Relation(kind) => {
|
||||
fields.remove("description");
|
||||
match kind {
|
||||
RelationKind::ContextualLink => &["owner", "source", "target", "purpose"],
|
||||
RelationKind::FunctionalExchange => {
|
||||
&["source", "target", "source_port", "target_port"]
|
||||
}
|
||||
_ => &["source", "target"],
|
||||
}
|
||||
}
|
||||
Context::Diagram => &[],
|
||||
Context::Node => &["element"],
|
||||
Context::Artifact => &["owner"],
|
||||
Context::Trace => &["oa", "sa"],
|
||||
};
|
||||
for name in required {
|
||||
fields.insert((*name).into(), Value::Null);
|
||||
}
|
||||
fields
|
||||
}
|
||||
|
||||
pub(crate) fn fields(
|
||||
context: Context,
|
||||
input: &Map<String, Value>,
|
||||
mode: Mode,
|
||||
) -> Map<String, Value> {
|
||||
let mut result = input.clone();
|
||||
restore_serialization_skips(context, &mut result);
|
||||
if mode != Mode::CompleteForEdit {
|
||||
compact_nested(context, &mut result);
|
||||
}
|
||||
if mode == Mode::Compact {
|
||||
// Compact a composite and its declared default by the same nested rules
|
||||
// before whole-field comparison. This also makes compact input stable:
|
||||
// e.g. String{minimum_length:0} still denotes the default definition.
|
||||
let mut defaults = declaration_defaults(context);
|
||||
compact_nested(context, &mut defaults);
|
||||
omit_defaults(&mut result, &defaults);
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
fn restore_serialization_skips(context: Context, fields: &mut Map<String, Value>) {
|
||||
match context {
|
||||
Context::Element(Kind::Occurrence) => {
|
||||
if let Some(exchange) = constructor_payload(fields, "body", "Exchange") {
|
||||
exchange
|
||||
.entry("operation".to_owned())
|
||||
.or_insert(Value::Null);
|
||||
}
|
||||
}
|
||||
Context::Node => {
|
||||
fields.entry("port_anchors".to_owned()).or_insert(json!([]));
|
||||
}
|
||||
Context::Trace => {
|
||||
if let Some(baseline) = fields.get_mut("baseline").and_then(Value::as_object_mut) {
|
||||
baseline.entry("semantic".to_owned()).or_insert(Value::Null);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn declaration_defaults(context: Context) -> Map<String, Value> {
|
||||
let mut defaults = match context {
|
||||
Context::Element(kind) => element_defaults(kind),
|
||||
Context::Relation(kind) => relation_defaults(kind),
|
||||
Context::Diagram => object(json!({
|
||||
"description": "", "layer": "Oa", "projection": "Overview",
|
||||
"routes": [], "view_options": {
|
||||
"hidden_edges": [], "relation_kinds": "All",
|
||||
"work_categories": "All", "participant_categories": "All",
|
||||
"coverage": "All", "work_contexts": "All", "exchange_labels": "Name"
|
||||
}
|
||||
})),
|
||||
Context::Node => object(json!({
|
||||
"position": {"x": 0.0, "y": 0.0},
|
||||
"size": {"width": 224.0, "height": 94.0},
|
||||
"collapsed": false, "port_anchors": []
|
||||
})),
|
||||
Context::Artifact => object(json!({
|
||||
"description": "", "relation": "References", "uri": "",
|
||||
"revision": null, "fragment": null
|
||||
})),
|
||||
Context::Trace => object(json!({
|
||||
"description": "", "kind": "Refinement", "baseline": null
|
||||
})),
|
||||
};
|
||||
match context {
|
||||
Context::Element(_) => {
|
||||
defaults.insert("description".into(), json!(""));
|
||||
defaults.insert("parent".into(), Value::Null);
|
||||
}
|
||||
Context::Relation(_) => {
|
||||
defaults.insert("description".into(), json!(""));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
defaults
|
||||
}
|
||||
|
||||
fn element_defaults(kind: Kind) -> Map<String, Value> {
|
||||
if let Some(state_kind) = kind.state_kind() {
|
||||
// The declaration selects this discriminator; no GUI factory is used.
|
||||
return object(json!({
|
||||
"kind": state_kind, "entry": "", "exit": "", "do_activity": ""
|
||||
}));
|
||||
}
|
||||
match kind {
|
||||
Kind::Process | Kind::FunctionalChain => object(json!({"steps": []})),
|
||||
Kind::ExchangeItem => object(json!({
|
||||
"kind": "Information", "mechanism": "Unspecified", "supertype": null
|
||||
})),
|
||||
Kind::ExchangeCategory => object(json!({"family": "Work", "exchanges": []})),
|
||||
Kind::DataType => object(json!({
|
||||
"definition": {"String": {"minimum_length": 0, "maximum_length": null}},
|
||||
"default": null, "unit": ""
|
||||
})),
|
||||
Kind::DataField => object(json!({
|
||||
"type_ref": "String", "minimum": 1, "maximum": 1, "unit": "",
|
||||
"direction": "Unspecified", "storage": "Value", "default": null
|
||||
})),
|
||||
Kind::Interface => object(json!({"supertype": null})),
|
||||
// Port.contract is required, even when its explicit value is Legacy.
|
||||
Kind::Port => object(json!({"legacy": null})),
|
||||
Kind::Scenario => object(json!({
|
||||
"viewpoint": "MixedLegacy", "context": null,
|
||||
"precondition": "", "postcondition": "", "steps": []
|
||||
})),
|
||||
Kind::Lifeline => object(json!({"represented": null})),
|
||||
Kind::Occurrence => object(json!({
|
||||
"body": {"Exchange": {
|
||||
"exchange": null, "sender": null, "receiver": null,
|
||||
"message_kind": "Asynchronous", "reply_to": null,
|
||||
"values": [], "operation": null
|
||||
}},
|
||||
"precondition": "", "postcondition": ""
|
||||
})),
|
||||
Kind::Event => object(json!({"body": {"Signal": {"items": []}}})),
|
||||
Kind::Constraint => object(json!({"expression": "", "constrained": []})),
|
||||
// Unit-body declarations have no additional omission defaults. A future
|
||||
// Kind reaches this branch without gaining speculative payload rules.
|
||||
_ => Map::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn relation_defaults(kind: RelationKind) -> Map<String, Value> {
|
||||
match kind {
|
||||
RelationKind::InterfaceItemAllocation => object(json!({
|
||||
"order": 0, "transmission": "Unspecified", "acquisition": "Unspecified"
|
||||
})),
|
||||
RelationKind::DataAssociation => object(json!({
|
||||
"source_role": "", "target_role": "",
|
||||
"source_minimum": 0, "target_minimum": 0,
|
||||
"source_maximum": null, "target_maximum": null,
|
||||
"source_navigable": false, "target_navigable": false
|
||||
})),
|
||||
RelationKind::Interaction | RelationKind::FunctionalExchange => {
|
||||
object(json!({"items": []}))
|
||||
}
|
||||
RelationKind::BoundaryExchange => object(json!({"items": [], "oriented": true})),
|
||||
RelationKind::CommunicationMean => object(json!({"items": [], "oriented": false})),
|
||||
RelationKind::CapabilityExtend => object(json!({"condition": ""})),
|
||||
RelationKind::SequenceLink => object(json!({"guard": ""})),
|
||||
RelationKind::StateTransition => object(json!({
|
||||
"transition_kind": "External", "trigger": "", "guard": "", "effect": "",
|
||||
"triggers": [], "effects": []
|
||||
})),
|
||||
RelationKind::StateAction => object(json!({"phase": "Do"})),
|
||||
// source/target, FunctionalExchange ports and ContextualLink's owner,
|
||||
// endpoints and purpose are required, despite factory placeholder values.
|
||||
_ => Map::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn compact_nested(context: Context, fields: &mut Map<String, Value>) {
|
||||
match context {
|
||||
Context::Element(Kind::DataType) => compact_data_definition(fields),
|
||||
Context::Element(Kind::Port) => {
|
||||
if let Some(legacy) = fields.get_mut("legacy").and_then(Value::as_object_mut) {
|
||||
omit_nulls(legacy, &["interface"]);
|
||||
}
|
||||
// Every selected PortContract payload field remains required.
|
||||
}
|
||||
Context::Element(Kind::Occurrence) => compact_occurrence(fields),
|
||||
Context::Diagram => {
|
||||
if let Some(options) = fields
|
||||
.get_mut("view_options")
|
||||
.and_then(Value::as_object_mut)
|
||||
{
|
||||
omit_defaults(
|
||||
options,
|
||||
&object(json!({
|
||||
"hidden_edges": [], "relation_kinds": "All",
|
||||
"work_categories": "All", "participant_categories": "All",
|
||||
"coverage": "All", "work_contexts": "All", "exchange_labels": "Name"
|
||||
})),
|
||||
);
|
||||
}
|
||||
if let Some(routes) = fields.get_mut("routes").and_then(Value::as_array_mut) {
|
||||
for route in routes {
|
||||
if let Some(route) = route.as_object_mut() {
|
||||
omit_defaults(route, &object(json!({"waypoints": [], "label": null})));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Route entries, EdgeLabel coordinates, projection machine IDs, and
|
||||
// Only([])/Any([]) selectors remain even when their values are empty.
|
||||
}
|
||||
Context::Trace => {
|
||||
if let Some(baseline) = fields.get_mut("baseline").and_then(Value::as_object_mut) {
|
||||
omit_nulls(baseline, &["semantic"]);
|
||||
}
|
||||
// No recursion through snapshots or semantic historical facets.
|
||||
}
|
||||
// DataValue/TypeRef payloads, EventBody fields, Node geometry/anchors,
|
||||
// contextual endpoints/purposes, and other required records stay intact.
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn compact_data_definition(fields: &mut Map<String, Value>) {
|
||||
for tag in ["Integer", "Real"] {
|
||||
if let Some(payload) = constructor_payload(fields, "definition", tag) {
|
||||
omit_nulls(payload, &["minimum", "maximum"]);
|
||||
}
|
||||
}
|
||||
if let Some(payload) = constructor_payload(fields, "definition", "String") {
|
||||
omit_nulls(payload, &["maximum_length"]);
|
||||
// minimum_length is required inside a selected String constructor.
|
||||
}
|
||||
if let Some(payload) = constructor_payload(fields, "definition", "Record") {
|
||||
omit_nulls(payload, &["supertype"]);
|
||||
}
|
||||
// Boolean has no payload; Enumeration.literals remains required even [].
|
||||
}
|
||||
|
||||
fn compact_occurrence(fields: &mut Map<String, Value>) {
|
||||
if let Some(exchange) = constructor_payload(fields, "body", "Exchange") {
|
||||
omit_defaults(
|
||||
exchange,
|
||||
&object(json!({
|
||||
"exchange": null, "sender": null, "receiver": null,
|
||||
"message_kind": "Asynchronous", "reply_to": null,
|
||||
"values": [], "operation": null
|
||||
})),
|
||||
);
|
||||
if let Some(operation) = exchange.get_mut("operation").and_then(Value::as_object_mut) {
|
||||
omit_nulls(operation, &["allocation"]);
|
||||
// Keep the containing operation field even if its record becomes {}:
|
||||
// explicit unresolved operation intent is not an absent operation.
|
||||
}
|
||||
if let Some(values) = exchange.get_mut("values").and_then(Value::as_array_mut) {
|
||||
for value in values {
|
||||
if let Some(message_value) = value.as_object_mut() {
|
||||
omit_defaults(message_value, &object(json!({"path": []})));
|
||||
}
|
||||
}
|
||||
}
|
||||
// MessageKind::Timer.expression, MessageValue.field/expression remain.
|
||||
}
|
||||
for (tag, optional) in [
|
||||
("Action", &["action", "lifeline"][..]),
|
||||
("State", &["state", "lifeline"][..]),
|
||||
("SequenceReference", &["sequence"][..]),
|
||||
("ScenarioUse", &["scenario"][..]),
|
||||
] {
|
||||
if let Some(payload) = constructor_payload(fields, "body", tag) {
|
||||
omit_nulls(payload, optional);
|
||||
}
|
||||
}
|
||||
// ScenarioUse.bindings, Control.kind, Fragment.operator/branches and
|
||||
// Branch.guard/occurrences are required, including empty strings/lists.
|
||||
}
|
||||
|
||||
fn constructor_payload<'a>(
|
||||
fields: &'a mut Map<String, Value>,
|
||||
key: &str,
|
||||
tag: &str,
|
||||
) -> Option<&'a mut Map<String, Value>> {
|
||||
let wrapper = fields.get_mut(key)?.as_object_mut()?;
|
||||
if wrapper.len() != 1 {
|
||||
return None;
|
||||
}
|
||||
wrapper.get_mut(tag)?.as_object_mut()
|
||||
}
|
||||
|
||||
fn omit_nulls(fields: &mut Map<String, Value>, names: &[&str]) {
|
||||
for name in names {
|
||||
if fields.get(*name).is_some_and(Value::is_null) {
|
||||
fields.remove(*name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn omit_defaults(fields: &mut Map<String, Value>, defaults: &Map<String, Value>) {
|
||||
for (name, default) in defaults {
|
||||
if fields.get(name).is_some_and(|value| same(value, default)) {
|
||||
fields.remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Comparison recurses only to compare a known field with its exact declared
|
||||
// default. It never traverses arbitrary data looking for values to remove.
|
||||
fn same(value: &Value, default: &Value) -> bool {
|
||||
match (value, default) {
|
||||
(Value::Object(a), Value::Object(b)) => {
|
||||
a.len() == b.len()
|
||||
&& a.iter()
|
||||
.all(|(key, value)| b.get(key).is_some_and(|d| same(value, d)))
|
||||
}
|
||||
(Value::Array(a), Value::Array(b)) => {
|
||||
a.len() == b.len() && a.iter().zip(b).all(|(value, d)| same(value, d))
|
||||
}
|
||||
(Value::Number(a), Value::Number(b)) => {
|
||||
// serde_json numeric equality alone can equate -0.0 with +0.0.
|
||||
// Extracted f32 coordinates are represented exactly as f64 here.
|
||||
a == b
|
||||
&& match (a.as_f64(), b.as_f64()) {
|
||||
(Some(x), Some(y)) if x == 0.0 && y == 0.0 => x.to_bits() == y.to_bits(),
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
_ => value == default,
|
||||
}
|
||||
}
|
||||
|
||||
fn object(value: Value) -> Map<String, Value> {
|
||||
match value {
|
||||
Value::Object(fields) => fields,
|
||||
_ => unreachable!("literal source default is an object"),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "source_defaults_tests.rs"]
|
||||
mod tests;
|
||||
@@ -0,0 +1,718 @@
|
||||
//! Independent literal oracles for the production source-default policy.
|
||||
use super::{self as policy, Context, Mode};
|
||||
use crate::{Kind, RelationKind};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
#[test]
|
||||
fn complete_comparison_keeps_populated_serializer_skip_values() {
|
||||
for (context, input) in [
|
||||
(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"operation":{"allocation":"allocation-id"},"values":[]}}}),
|
||||
),
|
||||
(
|
||||
Context::Node,
|
||||
json!({"port_anchors":[{"port":"port-id","side":"Left","offset":0.0}]}),
|
||||
),
|
||||
(
|
||||
Context::Trace,
|
||||
json!({"baseline":{"semantic":{"historical":"payload"}}}),
|
||||
),
|
||||
] {
|
||||
assert_eq!(rendered(context, &input, Mode::CompleteForEdit), input);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compact_value_fragments_keep_selected_constructor_requirements() {
|
||||
for (context, input, expected) in [
|
||||
(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":{"String":{"minimum_length":0,"maximum_length":null}},"default":null,"unit":""}),
|
||||
json!({"definition":{"String":{"minimum_length":0}},"default":null,"unit":""}),
|
||||
),
|
||||
(
|
||||
Context::Element(Kind::Event),
|
||||
json!({"body":{"Signal":{"items":[]}}}),
|
||||
json!({"body":{"Signal":{"items":[]}}}),
|
||||
),
|
||||
(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"operation":{"allocation":null},"values":[]}},"precondition":""}),
|
||||
json!({"body":{"Exchange":{"operation":{}}},"precondition":""}),
|
||||
),
|
||||
(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"ScenarioUse":{"scenario":null,"bindings":[]}}}),
|
||||
json!({"body":{"ScenarioUse":{"bindings":[]}}}),
|
||||
),
|
||||
] {
|
||||
assert_eq!(rendered(context, &input, Mode::CompactValues), expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_scenario_default_is_independent_of_graphical_creation() {
|
||||
use crate::{ElementBody, Layer, ScenarioViewpoint, SharedBody, language};
|
||||
let project = language::parse(
|
||||
"arcadia 7; project p \"P\" { oa_scenario o \"O\" {} sa_scenario s \"S\" {} }",
|
||||
)
|
||||
.unwrap();
|
||||
for element in project.elements.values() {
|
||||
assert!(matches!(
|
||||
element.body.shared(),
|
||||
Some(SharedBody::Scenario {
|
||||
viewpoint: ScenarioViewpoint::MixedLegacy,
|
||||
..
|
||||
})
|
||||
));
|
||||
assert!(!matches!(
|
||||
ElementBody::new(Kind::Scenario, element.layer())
|
||||
.unwrap()
|
||||
.shared(),
|
||||
Some(SharedBody::Scenario {
|
||||
viewpoint: ScenarioViewpoint::MixedLegacy,
|
||||
..
|
||||
})
|
||||
));
|
||||
}
|
||||
let source = language::format(&project);
|
||||
assert!(!source.contains("description"));
|
||||
assert!(!source.contains("parent"));
|
||||
assert!(!source.contains("viewpoint"));
|
||||
assert_eq!(language::parse(&source).unwrap(), project);
|
||||
|
||||
let mut typed = project;
|
||||
for element in typed.elements.values_mut() {
|
||||
let viewpoint = if element.layer() == Layer::Oa {
|
||||
ScenarioViewpoint::OperationalActivity
|
||||
} else {
|
||||
ScenarioViewpoint::Functional
|
||||
};
|
||||
*element.body.shared_mut().unwrap() = SharedBody::Scenario {
|
||||
viewpoint,
|
||||
context: None,
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
steps: vec![],
|
||||
};
|
||||
}
|
||||
let source = language::format(&typed);
|
||||
assert!(source.contains("viewpoint OperationalActivity;"));
|
||||
assert!(source.contains("viewpoint Functional;"));
|
||||
assert_eq!(language::parse(&source).unwrap(), typed);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shared_parser_defaults_preserve_required_fields_and_kind_checks() {
|
||||
for (declaration, message) in [
|
||||
(
|
||||
"oa_port p0 \"Port\" {}",
|
||||
"Missing required field 'contract'",
|
||||
),
|
||||
(
|
||||
"allocation r \"R\" { source @owner; }",
|
||||
"Missing required field 'target'",
|
||||
),
|
||||
(
|
||||
"functional_exchange r \"R\" { source @owner; target @work; }",
|
||||
"Missing required field 'source_port'",
|
||||
),
|
||||
(
|
||||
"contextual_link r \"R\" {}",
|
||||
"Missing required field 'owner'",
|
||||
),
|
||||
("node n { diagram @d; }", "Missing required field 'element'"),
|
||||
("artifact a \"A\" {}", "Missing required field 'owner'"),
|
||||
("trace t \"T\" {}", "Missing required field 'oa'"),
|
||||
(
|
||||
"oa_state s \"S\" { kind Initial; }",
|
||||
"Declaration kind disagrees",
|
||||
),
|
||||
(
|
||||
"oa_activity a \"A\" { unknown true; }",
|
||||
"Unknown field 'unknown'",
|
||||
),
|
||||
(
|
||||
"oa_data_type t \"T\" { definition { String {}; }; }",
|
||||
"minimum_length",
|
||||
),
|
||||
(
|
||||
"oa_occurrence o \"O\" { body { ScenarioUse {}; }; }",
|
||||
"bindings",
|
||||
),
|
||||
] {
|
||||
let source = format!(
|
||||
"arcadia 7; project p \"P\" {{ oa_entity owner \"Owner\" {{}} oa_activity work \"Work\" {{}} diagram d \"D\" {{}} {declaration} }}"
|
||||
);
|
||||
let errors = crate::language::parse(&source).unwrap_err();
|
||||
assert!(
|
||||
errors.iter().any(|error| error.message.contains(message)),
|
||||
"{declaration}: {errors:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn rendered(context: Context, input: &Value, mode: Mode) -> Value {
|
||||
Value::Object(policy::fields(context, input.as_object().unwrap(), mode))
|
||||
}
|
||||
|
||||
fn compact(context: Context, input: Value, expected: Value) {
|
||||
let original = input.clone();
|
||||
let result = rendered(context, &input, Mode::Compact);
|
||||
assert_eq!(result, expected, "context {context:?}");
|
||||
assert_eq!(input, original, "the input remains immutable");
|
||||
assert_eq!(
|
||||
rendered(context, &result, Mode::Compact),
|
||||
result,
|
||||
"compact policy is idempotent"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn complete_comparison_restores_only_the_three_known_skips() {
|
||||
let exchange = json!({"body":{"Exchange":{"exchange":null,"sender":null,"receiver":null,"message_kind":"Asynchronous","reply_to":null,"values":[]}}});
|
||||
let mut complete = exchange.clone();
|
||||
complete["body"]["Exchange"]["operation"] = Value::Null;
|
||||
assert_eq!(
|
||||
rendered(
|
||||
Context::Element(Kind::Occurrence),
|
||||
&exchange,
|
||||
Mode::CompleteForEdit
|
||||
),
|
||||
complete
|
||||
);
|
||||
assert_eq!(
|
||||
rendered(
|
||||
Context::Node,
|
||||
&json!({"element":"e","diagram":"d"}),
|
||||
Mode::CompleteForEdit
|
||||
),
|
||||
json!({"element":"e","diagram":"d","port_anchors":[]})
|
||||
);
|
||||
assert_eq!(
|
||||
rendered(
|
||||
Context::Trace,
|
||||
&json!({"baseline":{"oa":{"name":"","description":""},"sa":{"name":"","description":""}}}),
|
||||
Mode::CompleteForEdit
|
||||
),
|
||||
json!({"baseline":{"oa":{"name":"","description":""},"sa":{"name":"","description":""},"semantic":null}})
|
||||
);
|
||||
for input in [
|
||||
json!({"body":{"Action":{"action":null,"lifeline":null}}}),
|
||||
json!({"body":{"State":{"state":null,"lifeline":null}}}),
|
||||
] {
|
||||
assert_eq!(
|
||||
rendered(
|
||||
Context::Element(Kind::Occurrence),
|
||||
&input,
|
||||
Mode::CompleteForEdit
|
||||
),
|
||||
input
|
||||
);
|
||||
}
|
||||
for input in [
|
||||
json!({"baseline":null}),
|
||||
json!({"baseline":{"semantic":{"historical":[null,[],false,0,""]},"oa":{"name":"n","description":""},"sa":{"name":"s","description":""}}}),
|
||||
] {
|
||||
assert_eq!(
|
||||
rendered(Context::Trace, &input, Mode::CompleteForEdit),
|
||||
input
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_element_omits_only_empty_common_defaults() {
|
||||
for kind in Kind::ALL {
|
||||
// Future/unknown payloads are preservation sentinels, not admitted source.
|
||||
compact(
|
||||
Context::Element(kind),
|
||||
json!({"description":"","parent":null,"future":{"empty":[],"absent":null,"zero":0,"flag":false}}),
|
||||
json!({"future":{"empty":[],"absent":null,"zero":0,"flag":false}}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(kind),
|
||||
json!({"description":" \n","parent":"owner"}),
|
||||
json!({"description":" \n","parent":"owner"}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ordinary_element_defaults_are_context_specific() {
|
||||
for kind in [Kind::Process, Kind::FunctionalChain] {
|
||||
compact(Context::Element(kind), json!({"steps":[]}), json!({}));
|
||||
compact(
|
||||
Context::Element(kind),
|
||||
json!({"steps":["second","first"]}),
|
||||
json!({"steps":["second","first"]}),
|
||||
);
|
||||
}
|
||||
compact(
|
||||
Context::Element(Kind::ExchangeItem),
|
||||
json!({"kind":"Information","mechanism":"Unspecified","supertype":null}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::ExchangeItem),
|
||||
json!({"kind":"Energy","mechanism":"Flow","supertype":"base"}),
|
||||
json!({"kind":"Energy","mechanism":"Flow","supertype":"base"}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::ExchangeCategory),
|
||||
json!({"family":"Work","exchanges":[]}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::ExchangeCategory),
|
||||
json!({"family":"Participant","exchanges":["x"]}),
|
||||
json!({"family":"Participant","exchanges":["x"]}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::Interface),
|
||||
json!({"supertype":null}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::Lifeline),
|
||||
json!({"represented":null}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::Constraint),
|
||||
json!({"expression":"","constrained":[]}),
|
||||
json!({}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scenario_source_default_never_uses_the_graphical_viewpoint_default() {
|
||||
compact(
|
||||
Context::Element(Kind::Scenario),
|
||||
json!({"viewpoint":"MixedLegacy","context":null,"precondition":"","postcondition":"","steps":[]}),
|
||||
json!({}),
|
||||
);
|
||||
for viewpoint in [
|
||||
"OperationalActivity",
|
||||
"Functional",
|
||||
"ParticipantInteraction",
|
||||
"BoundaryInterface",
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::Scenario),
|
||||
json!({"viewpoint":viewpoint,"context":"scope","precondition":"ready","postcondition":"","steps":["two","one"]}),
|
||||
json!({"viewpoint":viewpoint,"context":"scope","precondition":"ready","steps":["two","one"]}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn each_state_header_supplies_its_own_kind() {
|
||||
for (kind, name) in [
|
||||
(Kind::State, "State"),
|
||||
(Kind::Mode, "Mode"),
|
||||
(Kind::Initial, "Initial"),
|
||||
(Kind::Final, "Final"),
|
||||
(Kind::Choice, "Choice"),
|
||||
(Kind::Junction, "Junction"),
|
||||
(Kind::Fork, "Fork"),
|
||||
(Kind::Join, "Join"),
|
||||
(Kind::ShallowHistory, "ShallowHistory"),
|
||||
(Kind::DeepHistory, "DeepHistory"),
|
||||
(Kind::EntryPoint, "EntryPoint"),
|
||||
(Kind::ExitPoint, "ExitPoint"),
|
||||
(Kind::Terminate, "Terminate"),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(kind),
|
||||
json!({"kind":name,"entry":"","exit":"","do_activity":""}),
|
||||
json!({}),
|
||||
);
|
||||
}
|
||||
// Invalid mismatches must not be silently normalized by the writer policy.
|
||||
compact(
|
||||
Context::Element(Kind::Mode),
|
||||
json!({"kind":"State","entry":"work"}),
|
||||
json!({"kind":"State","entry":"work"}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn data_field_unbounded_and_present_empty_values_are_not_defaults() {
|
||||
compact(
|
||||
Context::Element(Kind::DataField),
|
||||
json!({"type_ref":"String","minimum":1,"maximum":1,"unit":"","direction":"Unspecified","storage":"Value","default":null}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::DataField),
|
||||
json!({"type_ref":{"Named":"record"},"minimum":0,"maximum":null,"unit":"m","direction":"Out","storage":"Reference","default":[]}),
|
||||
json!({"type_ref":{"Named":"record"},"minimum":0,"maximum":null,"unit":"m","direction":"Out","storage":"Reference","default":[]}),
|
||||
);
|
||||
for value in [
|
||||
json!({"Boolean":false}),
|
||||
json!({"Integer":0}),
|
||||
json!({"Real":0.0}),
|
||||
json!({"String":""}),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::DataField),
|
||||
json!({"default":[value.clone()]}),
|
||||
json!({"default":[value]}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn data_definition_whole_default_and_selected_required_fields_differ() {
|
||||
compact(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":{"String":{"minimum_length":0,"maximum_length":null}},"default":null,"unit":""}),
|
||||
json!({}),
|
||||
);
|
||||
for (input, expected) in [
|
||||
(
|
||||
json!({"Integer":{"minimum":null,"maximum":null}}),
|
||||
json!({"Integer":{}}),
|
||||
),
|
||||
(
|
||||
json!({"Real":{"minimum":null,"maximum":2.5}}),
|
||||
json!({"Real":{"maximum":2.5}}),
|
||||
),
|
||||
(
|
||||
json!({"String":{"minimum_length":4,"maximum_length":null}}),
|
||||
json!({"String":{"minimum_length":4}}),
|
||||
),
|
||||
(json!({"Record":{"supertype":null}}), json!({"Record":{}})),
|
||||
(
|
||||
json!({"Enumeration":{"literals":[]}}),
|
||||
json!({"Enumeration":{"literals":[]}}),
|
||||
),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":input}),
|
||||
json!({"definition":expected}),
|
||||
);
|
||||
}
|
||||
compact(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":"Boolean","default":{"Boolean":false}}),
|
||||
json!({"definition":"Boolean","default":{"Boolean":false}}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn port_contract_and_its_required_payload_stay_explicit() {
|
||||
compact(
|
||||
Context::Element(Kind::Port),
|
||||
json!({"contract":"Legacy","legacy":{"direction":"Out","interface":null}}),
|
||||
json!({"contract":"Legacy","legacy":{"direction":"Out"}}),
|
||||
);
|
||||
for contract in [
|
||||
json!({"FunctionInput":{"incoming_items":[]}}),
|
||||
json!({"FunctionOutput":{"outgoing_items":[]}}),
|
||||
json!({"Component":{"kind":"Standard","orientation":"Unset"}}),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::Port),
|
||||
json!({"contract":contract.clone(),"legacy":null}),
|
||||
json!({"contract":contract}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn occurrence_whole_default_is_distinct_from_selected_constructor_payload() {
|
||||
compact(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"exchange":null,"sender":null,"receiver":null,"message_kind":"Asynchronous","reply_to":null,"values":[]}},"precondition":"","postcondition":""}),
|
||||
json!({}),
|
||||
);
|
||||
for (input, expected) in [
|
||||
(
|
||||
json!({"Action":{"action":null,"lifeline":null}}),
|
||||
json!({"Action":{}}),
|
||||
),
|
||||
(
|
||||
json!({"State":{"state":null,"lifeline":null}}),
|
||||
json!({"State":{}}),
|
||||
),
|
||||
(
|
||||
json!({"SequenceReference":{"sequence":null}}),
|
||||
json!({"SequenceReference":{}}),
|
||||
),
|
||||
(
|
||||
json!({"ScenarioUse":{"scenario":null,"bindings":[]}}),
|
||||
json!({"ScenarioUse":{"bindings":[]}}),
|
||||
),
|
||||
(
|
||||
json!({"Branch":{"guard":"","occurrences":[]}}),
|
||||
json!({"Branch":{"guard":"","occurrences":[]}}),
|
||||
),
|
||||
(
|
||||
json!({"Fragment":{"operator":"Parallel","branches":[]}}),
|
||||
json!({"Fragment":{"operator":"Parallel","branches":[]}}),
|
||||
),
|
||||
(
|
||||
json!({"Control":{"kind":"Choice"}}),
|
||||
json!({"Control":{"kind":"Choice"}}),
|
||||
),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":input}),
|
||||
json!({"body":expected}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unresolved_operation_and_required_message_value_are_preserved() {
|
||||
compact(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"exchange":null,"sender":null,"receiver":null,"message_kind":"Asynchronous","reply_to":null,"values":[{"field":"f","path":[],"expression":""}],"operation":{"allocation":null}}}}),
|
||||
json!({"body":{"Exchange":{"values":[{"field":"f","expression":""}],"operation":{}}}}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"exchange":"flow","sender":"a","receiver":"b","message_kind":{"Timer":{"expression":""}},"reply_to":"request","values":[],"operation":null}}}),
|
||||
json!({"body":{"Exchange":{"exchange":"flow","sender":"a","receiver":"b","message_kind":{"Timer":{"expression":""}},"reply_to":"request"}}}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn event_body_whole_default_does_not_prune_selected_required_fields() {
|
||||
compact(
|
||||
Context::Element(Kind::Event),
|
||||
json!({"body":{"Signal":{"items":[]}}}),
|
||||
json!({}),
|
||||
);
|
||||
for body in [
|
||||
json!({"Signal":{"items":["i"]}}),
|
||||
json!({"Time":{"kind":"After","expression":""}}),
|
||||
json!({"Change":{"expression":""}}),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::Event),
|
||||
json!({"body":body.clone()}),
|
||||
json!({"body":body}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn relation_required_endpoints_and_contextual_payloads_remain() {
|
||||
for kind in RelationKind::ALL {
|
||||
compact(
|
||||
Context::Relation(kind),
|
||||
json!({"description":"","source":"s","target":"t","future":[]}),
|
||||
json!({"source":"s","target":"t","future":[]}),
|
||||
);
|
||||
}
|
||||
compact(
|
||||
Context::Relation(RelationKind::FunctionalExchange),
|
||||
json!({"source":"s","target":"t","source_port":"sp","target_port":"tp","items":[]}),
|
||||
json!({"source":"s","target":"t","source_port":"sp","target_port":"tp"}),
|
||||
);
|
||||
let contextual = json!({"owner":"o","source":{"references":[],"occurrence":"s"},"target":{"references":[],"occurrence":"t"},"purpose":{"Precedence":{"guard":""}}});
|
||||
compact(
|
||||
Context::Relation(RelationKind::ContextualLink),
|
||||
contextual.clone(),
|
||||
contextual,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn relation_defaults_preserve_contextual_orientation_and_multiplicity() {
|
||||
for (kind, orientation) in [
|
||||
(RelationKind::BoundaryExchange, true),
|
||||
(RelationKind::CommunicationMean, false),
|
||||
] {
|
||||
compact(
|
||||
Context::Relation(kind),
|
||||
json!({"oriented":orientation,"items":[]}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(kind),
|
||||
json!({"oriented":!orientation}),
|
||||
json!({"oriented":!orientation}),
|
||||
);
|
||||
}
|
||||
compact(
|
||||
Context::Relation(RelationKind::DataAssociation),
|
||||
json!({"source_role":"","target_role":"","source_minimum":0,"target_minimum":0,"source_maximum":null,"target_maximum":null,"source_navigable":false,"target_navigable":false}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::DataAssociation),
|
||||
json!({"source_maximum":0,"target_maximum":1,"source_navigable":true}),
|
||||
json!({"source_maximum":0,"target_maximum":1,"source_navigable":true}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::InterfaceItemAllocation),
|
||||
json!({"order":0,"transmission":"Unspecified","acquisition":"Unspecified"}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::CapabilityExtend),
|
||||
json!({"condition":""}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::SequenceLink),
|
||||
json!({"guard":""}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::StateAction),
|
||||
json!({"phase":"Do"}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::StateTransition),
|
||||
json!({"transition_kind":"External","trigger":"","guard":"","effect":"","triggers":[],"effects":[]}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Relation(RelationKind::StateTransition),
|
||||
json!({"transition_kind":"Internal","triggers":["t"],"effects":["e"]}),
|
||||
json!({"transition_kind":"Internal","triggers":["t"],"effects":["e"]}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn diagram_options_remove_only_unrestricted_defaults() {
|
||||
let defaults = json!({"hidden_edges":[],"relation_kinds":"All","work_categories":"All","participant_categories":"All","coverage":"All","work_contexts":"All","exchange_labels":"Name"});
|
||||
compact(
|
||||
Context::Diagram,
|
||||
json!({"description":"","layer":"Oa","projection":"Overview","routes":[],"view_options":defaults}),
|
||||
json!({}),
|
||||
);
|
||||
compact(
|
||||
Context::Diagram,
|
||||
json!({"layer":"Sa","projection":{"StateMachine":{"machine":"m"}},"view_options":{"hidden_edges":[],"relation_kinds":{"Only":[]},"work_categories":{"Any":[]},"participant_categories":"All","coverage":"All","work_contexts":{"Any":[]},"exchange_labels":"Name"}}),
|
||||
json!({"layer":"Sa","projection":{"StateMachine":{"machine":"m"}},"view_options":{"relation_kinds":{"Only":[]},"work_categories":{"Any":[]},"work_contexts":{"Any":[]}}}),
|
||||
);
|
||||
compact(
|
||||
Context::Diagram,
|
||||
json!({"routes":[{"edge":"e","waypoints":[],"label":null}]}),
|
||||
json!({"routes":[{"edge":"e"}]}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn node_whole_defaults_preserve_negative_zero_and_required_coordinates() {
|
||||
compact(
|
||||
Context::Node,
|
||||
json!({"diagram":"d","element":"e","position":{"x":0.0,"y":0.0},"size":{"width":224.0,"height":94.0},"collapsed":false}),
|
||||
json!({"diagram":"d","element":"e"}),
|
||||
);
|
||||
for position in [
|
||||
json!({"x":-0.0,"y":0.0}),
|
||||
json!({"x":0.0,"y":-0.0}),
|
||||
json!({"x":1.0,"y":0.0}),
|
||||
] {
|
||||
let result = rendered(
|
||||
Context::Node,
|
||||
&json!({"position":position.clone()}),
|
||||
Mode::Compact,
|
||||
);
|
||||
assert_eq!(result, json!({"position":position.clone()}));
|
||||
for coordinate in ["x", "y"] {
|
||||
assert_eq!(
|
||||
result["position"][coordinate].as_f64().unwrap().to_bits(),
|
||||
position[coordinate].as_f64().unwrap().to_bits(),
|
||||
"coordinate sign is part of fidelity"
|
||||
);
|
||||
}
|
||||
}
|
||||
compact(
|
||||
Context::Node,
|
||||
json!({"size":{"width":300.0,"height":94.0},"port_anchors":[{"port":"p","side":"Left","offset":0.0}]}),
|
||||
json!({"size":{"width":300.0,"height":94.0},"port_anchors":[{"port":"p","side":"Left","offset":0.0}]}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn artifact_present_empty_strings_and_trace_history_stay_distinct() {
|
||||
compact(
|
||||
Context::Artifact,
|
||||
json!({"owner":"o","description":"","relation":"References","uri":"","revision":null,"fragment":null}),
|
||||
json!({"owner":"o"}),
|
||||
);
|
||||
compact(
|
||||
Context::Artifact,
|
||||
json!({"owner":"o","relation":"Implements","revision":"","fragment":""}),
|
||||
json!({"owner":"o","relation":"Implements","revision":"","fragment":""}),
|
||||
);
|
||||
compact(
|
||||
Context::Trace,
|
||||
json!({"oa":"o","sa":"s","description":"","kind":"Refinement","baseline":null}),
|
||||
json!({"oa":"o","sa":"s"}),
|
||||
);
|
||||
compact(
|
||||
Context::Trace,
|
||||
json!({"baseline":{"oa":{"name":"","description":""},"sa":{"name":"s","description":""}}}),
|
||||
json!({"baseline":{"oa":{"name":"","description":""},"sa":{"name":"s","description":""}}}),
|
||||
);
|
||||
let baseline = json!({"oa":{"name":"o","description":""},"sa":{"name":"s","description":""},"semantic":{"facets":[{"Value":null},{"Value":[]},{"Value":false},{"Value":0},{"Value":""}]}});
|
||||
compact(
|
||||
Context::Trace,
|
||||
json!({"kind":"Manual","baseline":baseline.clone()}),
|
||||
json!({"kind":"Manual","baseline":baseline}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nested_future_fields_prevent_whole_default_removal() {
|
||||
// These sentinels exercise preservation, not current parser admission of
|
||||
// unknown fields. Only known slots may lose their redundant defaults.
|
||||
compact(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":{"String":{"minimum_length":0,"maximum_length":null,"future":[]}}}),
|
||||
json!({"definition":{"String":{"minimum_length":0,"future":[]}}}),
|
||||
);
|
||||
compact(
|
||||
Context::Element(Kind::Occurrence),
|
||||
json!({"body":{"Exchange":{"exchange":null,"sender":null,"receiver":null,"message_kind":"Asynchronous","reply_to":null,"values":[],"operation":null,"future":false}}}),
|
||||
json!({"body":{"Exchange":{"future":false}}}),
|
||||
);
|
||||
compact(
|
||||
Context::Diagram,
|
||||
json!({"view_options":{"hidden_edges":[],"relation_kinds":"All","work_categories":"All","participant_categories":"All","coverage":"All","work_contexts":"All","exchange_labels":"Name","future":null}}),
|
||||
json!({"view_options":{"future":null}}),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_and_multikey_constructor_wrappers_are_not_reinterpreted() {
|
||||
for definition in [
|
||||
json!({"Future":{"minimum":null,"maximum":null}}),
|
||||
json!({"String":{"minimum_length":0,"maximum_length":null},"Future":{}}),
|
||||
] {
|
||||
compact(
|
||||
Context::Element(Kind::DataType),
|
||||
json!({"definition":definition.clone()}),
|
||||
json!({"definition":definition}),
|
||||
);
|
||||
}
|
||||
for body in [
|
||||
json!({"Future":{"operation":null,"values":[]}}),
|
||||
json!({"Exchange":{"exchange":null,"values":[]},"Future":{}}),
|
||||
] {
|
||||
let fields = json!({"body":body});
|
||||
assert_eq!(
|
||||
rendered(
|
||||
Context::Element(Kind::Occurrence),
|
||||
&fields,
|
||||
Mode::CompleteForEdit
|
||||
),
|
||||
fields,
|
||||
"do not invent a selected Exchange constructor in an unknown wrapper",
|
||||
);
|
||||
compact(Context::Element(Kind::Occurrence), fields.clone(), fields);
|
||||
}
|
||||
}
|
||||
@@ -726,7 +726,8 @@ fn apply_edits(bundle: &mut SourceBundle, edits: Edits) -> Result<(), Vec<Source
|
||||
pub fn format_bundle(project: &Project) -> SourceBundle {
|
||||
let ownership = default_ownership(project);
|
||||
let aliases: BTreeMap<_, _> = project.identities().into_iter().collect();
|
||||
let mut declarations = language::format_declarations(project);
|
||||
let mut declarations =
|
||||
language::format_declarations(project, language::DeclarationFormat::Compact);
|
||||
declarations.sort_by_key(|(id, _)| declaration_order(project, *id, &aliases));
|
||||
let mut files: BTreeMap<LogicalPath, String> = BTreeMap::new();
|
||||
for (id, declaration) in declarations {
|
||||
@@ -735,11 +736,13 @@ pub fn format_bundle(project: &Project) -> SourceBundle {
|
||||
.or_default()
|
||||
.push_str(&unindent(&declaration));
|
||||
}
|
||||
let mut entry = format!(
|
||||
"arcadia {SCHEMA_VERSION};\n{}{{\n description {};\n",
|
||||
project_header(project),
|
||||
quote(&project.description)
|
||||
);
|
||||
let mut entry = format!("arcadia {SCHEMA_VERSION};\n{}{{\n", project_header(project));
|
||||
if !project.description.is_empty() {
|
||||
entry.push_str(&format!(
|
||||
" description {};\n",
|
||||
quote(&project.description)
|
||||
));
|
||||
}
|
||||
for path in files.keys() {
|
||||
entry.push_str(&format!(" include {};\n", quote(path)));
|
||||
}
|
||||
@@ -850,8 +853,25 @@ pub fn update_bundle_with_identity_map(
|
||||
)]);
|
||||
}
|
||||
let origins: BTreeMap<_, _> = identities.iter().map(|(old, new)| (*new, *old)).collect();
|
||||
let before: BTreeMap<_, _> = language::format_declarations(old).into_iter().collect();
|
||||
let after: BTreeMap<_, _> = language::format_declarations(project).into_iter().collect();
|
||||
// Comparison must include defaults even when persistence serialization or
|
||||
// compact output omits them. Otherwise an unrelated payload edit erases
|
||||
// unchanged explicit fields from the authored document.
|
||||
let before: BTreeMap<_, _> =
|
||||
language::format_declarations(old, language::DeclarationFormat::CompleteForEdit)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let after: BTreeMap<_, _> =
|
||||
language::format_declarations(project, language::DeclarationFormat::CompleteForEdit)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let compact: BTreeMap<_, _> =
|
||||
language::format_declarations(project, language::DeclarationFormat::Compact)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let compact_values: BTreeMap<_, _> =
|
||||
language::format_declarations(project, language::DeclarationFormat::CompactValues)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let old_aliases: BTreeMap<_, _> = old
|
||||
.identities()
|
||||
.into_iter()
|
||||
@@ -907,6 +927,27 @@ pub fn update_bundle_with_identity_map(
|
||||
};
|
||||
let mut previous = parse(old_text)?;
|
||||
let mut next = parse(new_text)?;
|
||||
let next_id = identities[&id];
|
||||
let value_text = &compact_values[&next_id];
|
||||
let insertion = InsertionSyntax::new(
|
||||
&next.fields,
|
||||
&parse(value_text)?.fields,
|
||||
value_text,
|
||||
&parse(&compact[&next_id])?.fields,
|
||||
);
|
||||
let old_kind = previous.header["kind"];
|
||||
let new_kind = next.header["kind"];
|
||||
if old_text[old_kind.start..old_kind.end] != new_text[new_kind.start..new_kind.end]
|
||||
&& let language::EditKind::Record(actual_fields) = &actual.fields.kind
|
||||
&& let language::EditKind::Record(previous_fields) = &mut previous.fields.kind
|
||||
{
|
||||
// An implicit value is supplied by its declaration context.
|
||||
// After a kind change, an unchanged value may need explicit
|
||||
// syntax (e.g. BoundaryExchange true -> CommunicationMean true).
|
||||
// Reconsider only absent fields; authored explicit values still
|
||||
// compare against their complete old values and keep trivia.
|
||||
previous_fields.retain(|key, _| actual_fields.contains_key(key));
|
||||
}
|
||||
if actual.lexical_owner.is_some()
|
||||
&& let language::EditKind::Record(fields) = &actual.fields.kind
|
||||
&& !fields.contains_key("parent")
|
||||
@@ -923,6 +964,7 @@ pub fn update_bundle_with_identity_map(
|
||||
source,
|
||||
before: old_text,
|
||||
after: new_text,
|
||||
insertion: Some(&insertion),
|
||||
old_aliases: &old_aliases,
|
||||
new_aliases: &new_aliases,
|
||||
legacy_value_paths: false,
|
||||
@@ -953,6 +995,7 @@ pub fn update_bundle_with_identity_map(
|
||||
source,
|
||||
before: &before,
|
||||
after: &after,
|
||||
insertion: None,
|
||||
old_aliases: &old_aliases,
|
||||
new_aliases: &new_aliases,
|
||||
legacy_value_paths: false,
|
||||
@@ -1011,7 +1054,7 @@ pub fn update_bundle_with_identity_map(
|
||||
project,
|
||||
identities,
|
||||
&original_order,
|
||||
&after,
|
||||
&compact,
|
||||
limits,
|
||||
)?;
|
||||
let result = compile_bundle(&bundle, limits)?;
|
||||
@@ -1119,10 +1162,73 @@ fn inserted_value(text: &str, indent: &str, source: &str) -> String {
|
||||
output
|
||||
}
|
||||
|
||||
// Value fragments retain required payload fields even when the enclosing
|
||||
// declaration field is itself omittable. For example, a selected String type
|
||||
// needs minimum_length; an Event Signal needs items. The complete tree remains
|
||||
// the comparison authority; this parallel tree is only an insertion template.
|
||||
struct InsertionSyntax<'a> {
|
||||
source: &'a str,
|
||||
values: BTreeMap<usize, Span>,
|
||||
omitted_fields: BTreeSet<usize>,
|
||||
}
|
||||
impl<'a> InsertionSyntax<'a> {
|
||||
fn new(
|
||||
complete: &language::EditValue,
|
||||
compact_values: &language::EditValue,
|
||||
source: &'a str,
|
||||
compact: &language::EditValue,
|
||||
) -> Self {
|
||||
let mut result = Self {
|
||||
source,
|
||||
values: BTreeMap::new(),
|
||||
omitted_fields: BTreeSet::new(),
|
||||
};
|
||||
result.collect(complete, compact_values);
|
||||
if let (language::EditKind::Record(all), language::EditKind::Record(kept)) =
|
||||
(&complete.kind, &compact.kind)
|
||||
{
|
||||
for (key, field) in all {
|
||||
if !kept.contains_key(key) {
|
||||
result.omitted_fields.insert(field.value.span.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
||||
fn collect(&mut self, complete: &language::EditValue, compact: &language::EditValue) {
|
||||
// Borrow the existing compact text once. Copying each containing record
|
||||
// here would duplicate a large nested payload at every depth.
|
||||
self.values.insert(complete.span.start, compact.span);
|
||||
match (&complete.kind, &compact.kind) {
|
||||
(language::EditKind::Record(all), language::EditKind::Record(kept)) => {
|
||||
for (key, field) in all {
|
||||
if let Some(next) = kept.get(key) {
|
||||
self.collect(&field.value, &next.value);
|
||||
} else {
|
||||
self.omitted_fields.insert(field.value.span.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
(language::EditKind::List(all), language::EditKind::List(kept)) => {
|
||||
assert_eq!(
|
||||
all.len(),
|
||||
kept.len(),
|
||||
"compaction preserves array membership"
|
||||
);
|
||||
for (field, next) in all.iter().zip(kept) {
|
||||
self.collect(field, next);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SyntaxUpdate<'a> {
|
||||
source: &'a str,
|
||||
before: &'a str,
|
||||
after: &'a str,
|
||||
insertion: Option<&'a InsertionSyntax<'a>>,
|
||||
old_aliases: &'a BTreeMap<String, String>,
|
||||
new_aliases: &'a BTreeMap<String, String>,
|
||||
// Source3 migration only adds path qualification; the existing field identity
|
||||
@@ -1131,6 +1237,16 @@ struct SyntaxUpdate<'a> {
|
||||
identity_origins: Option<&'a BTreeMap<Id, Id>>,
|
||||
}
|
||||
impl SyntaxUpdate<'_> {
|
||||
fn inserted(&self, value: &language::EditValue) -> &str {
|
||||
self.insertion
|
||||
.and_then(|syntax| {
|
||||
syntax
|
||||
.values
|
||||
.get(&value.span.start)
|
||||
.map(|span| &syntax.source[span.start..span.end])
|
||||
})
|
||||
.unwrap_or(&self.after[value.span.start..value.span.end])
|
||||
}
|
||||
fn header(
|
||||
&self,
|
||||
actual: &BTreeMap<&str, Span>,
|
||||
@@ -1243,7 +1359,7 @@ impl SyntaxUpdate<'_> {
|
||||
_ => {
|
||||
erase_syntax(self.source, actual.span, edits);
|
||||
let text = inserted_value(
|
||||
&self.after[after.span.start..after.span.end],
|
||||
self.inserted(after),
|
||||
indent_at(self.source, actual.span.start),
|
||||
self.source,
|
||||
);
|
||||
@@ -1308,6 +1424,9 @@ impl SyntaxUpdate<'_> {
|
||||
.iter()
|
||||
.filter(|(key, field)| {
|
||||
!actual.contains_key(*key)
|
||||
&& self.insertion.is_none_or(|syntax| {
|
||||
!syntax.omitted_fields.contains(&field.value.span.start)
|
||||
})
|
||||
&& before
|
||||
.and_then(|fields| fields.get(*key))
|
||||
.is_none_or(|old| !self.same(&old.value, &field.value))
|
||||
@@ -1326,11 +1445,7 @@ impl SyntaxUpdate<'_> {
|
||||
.unwrap_or_else(|| format!("{} ", indent_at(self.source, span.start)));
|
||||
let mut text = String::new();
|
||||
for (key, field) in added {
|
||||
let value = inserted_value(
|
||||
&self.after[field.value.span.start..field.value.span.end],
|
||||
&indent,
|
||||
self.source,
|
||||
);
|
||||
let value = inserted_value(self.inserted(&field.value), &indent, self.source);
|
||||
if multiline {
|
||||
text.push_str(&indent);
|
||||
text.push_str(&format!("{key} {value};{}", newline(self.source)));
|
||||
@@ -1450,11 +1565,7 @@ impl SyntaxUpdate<'_> {
|
||||
} else {
|
||||
text.push(' ');
|
||||
}
|
||||
text.push_str(&inserted_value(
|
||||
&self.after[next.span.start..next.span.end],
|
||||
&indent,
|
||||
self.source,
|
||||
));
|
||||
text.push_str(&inserted_value(self.inserted(next), &indent, self.source));
|
||||
suffix = "";
|
||||
}
|
||||
if i + 1 < after.len() {
|
||||
|
||||
@@ -11,7 +11,10 @@ pub(super) fn upgrade(
|
||||
.as_ref()
|
||||
.expect("an explicit source migration report");
|
||||
let project = ¤t.decoded.project;
|
||||
let canonical: BTreeMap<_, _> = language::format_declarations(project).into_iter().collect();
|
||||
let canonical: BTreeMap<_, _> =
|
||||
language::format_declarations(project, language::DeclarationFormat::CompleteForEdit)
|
||||
.into_iter()
|
||||
.collect();
|
||||
let changed: BTreeSet<_> = report
|
||||
.semantic_defaults
|
||||
.iter()
|
||||
@@ -59,6 +62,7 @@ pub(super) fn upgrade(
|
||||
source,
|
||||
before: source,
|
||||
after,
|
||||
insertion: None,
|
||||
old_aliases: &aliases,
|
||||
new_aliases: &aliases,
|
||||
legacy_value_paths: true,
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
//! Existing source-7 nested omission compatibility, independently of formatting.
|
||||
//!
|
||||
//! Selected constructors use their own field contracts. These handwritten
|
||||
//! sources and literal models distinguish nullable optional slots from required
|
||||
//! fields; they do not prescribe compact canonical output or broaden admission.
|
||||
|
||||
use oa_core::{source_project::*, *};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
fn id(number: u8) -> Id {
|
||||
Id::parse_str(&format!("00000000-0000-4000-8000-{number:012}")).unwrap()
|
||||
}
|
||||
|
||||
fn bundle(declarations: &str) -> SourceBundle {
|
||||
let source = format!(
|
||||
"arcadia 7;\nproject p \"Admission\" id \"00000000-0000-4000-8000-000000000001\" {{\n{declarations}\n}}\n"
|
||||
);
|
||||
SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), source)]),
|
||||
}
|
||||
}
|
||||
|
||||
fn element(number: u8, alias: &str, name: &str, parent: Option<Id>, body: ElementBody) -> Element {
|
||||
Element {
|
||||
id: id(number),
|
||||
alias: alias.into(),
|
||||
name: name.into(),
|
||||
description: String::new(),
|
||||
parent,
|
||||
body,
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_admitted(input: &SourceBundle, elements: Vec<Element>) -> Project {
|
||||
let expected = Project {
|
||||
schema_version: 7,
|
||||
id: id(1),
|
||||
alias: "p".into(),
|
||||
name: "Admission".into(),
|
||||
description: String::new(),
|
||||
elements: elements.into_iter().map(|e| (e.id, e)).collect(),
|
||||
relations: BTreeMap::new(),
|
||||
diagrams: BTreeMap::new(),
|
||||
artifact_links: BTreeMap::new(),
|
||||
traces: BTreeMap::new(),
|
||||
};
|
||||
let compiled = compile_bundle(input, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(compiled.decoded.project, expected, "complete literal model");
|
||||
assert_eq!(
|
||||
compiled.bundle, *input,
|
||||
"fixed IDs require no source stabilization"
|
||||
);
|
||||
compiled.decoded.project
|
||||
}
|
||||
|
||||
fn prefix(layer: Layer) -> &'static str {
|
||||
match layer {
|
||||
Layer::Oa => "oa",
|
||||
Layer::Sa => "sa",
|
||||
}
|
||||
}
|
||||
|
||||
fn data_bundle(layer: Layer, definition: &str) -> SourceBundle {
|
||||
bundle(&format!(
|
||||
" {}_data_type subject \"Subject\" id \"00000000-0000-4000-8000-000000000002\" {{ definition {{ {definition}; }}; }}",
|
||||
prefix(layer)
|
||||
))
|
||||
}
|
||||
|
||||
fn admit_data(layer: Layer, source: &str, definition: DataTypeDefinition) -> Project {
|
||||
assert_admitted(
|
||||
&data_bundle(layer, source),
|
||||
vec![element(
|
||||
2,
|
||||
"subject",
|
||||
"Subject",
|
||||
None,
|
||||
ElementBody::shared_in(
|
||||
layer,
|
||||
SharedBody::DataType {
|
||||
definition,
|
||||
default: None,
|
||||
unit: String::new(),
|
||||
},
|
||||
),
|
||||
)],
|
||||
)
|
||||
}
|
||||
|
||||
fn assert_missing(input: &SourceBundle, field: &str) {
|
||||
let errors = compile_bundle(input, ProjectLimits::default()).unwrap_err();
|
||||
assert_eq!(
|
||||
errors.len(),
|
||||
1,
|
||||
"expect the targeted admission error: {errors:?}"
|
||||
);
|
||||
let diagnostic = &errors[0].diagnostic;
|
||||
assert_eq!(diagnostic.code, "invalid_source", "{errors:?}");
|
||||
assert!(
|
||||
diagnostic.message.to_lowercase().contains("missing") && diagnostic.message.contains(field),
|
||||
"must reject the missing constructor field {field}, not an unrelated model rule: {errors:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn integer_optional_bounds_can_be_omitted_individually_and_together() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
for (omitted, explicit, minimum, maximum) in [
|
||||
(
|
||||
"Integer {}",
|
||||
"Integer { minimum none; maximum none; }",
|
||||
None,
|
||||
None,
|
||||
),
|
||||
(
|
||||
"Integer { maximum 9; }",
|
||||
"Integer { minimum none; maximum 9; }",
|
||||
None,
|
||||
Some(9),
|
||||
),
|
||||
(
|
||||
"Integer { minimum -3; }",
|
||||
"Integer { minimum -3; maximum none; }",
|
||||
Some(-3),
|
||||
None,
|
||||
),
|
||||
] {
|
||||
let expected = DataTypeDefinition::Integer { minimum, maximum };
|
||||
assert_eq!(
|
||||
admit_data(layer, omitted, expected.clone()),
|
||||
admit_data(layer, explicit, expected),
|
||||
"omitted and explicit optional Integer bounds agree"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn real_optional_bounds_can_be_omitted_individually_and_together() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
for (omitted, explicit, minimum, maximum) in [
|
||||
(
|
||||
"Real {}",
|
||||
"Real { minimum none; maximum none; }",
|
||||
None,
|
||||
None,
|
||||
),
|
||||
(
|
||||
"Real { maximum 2.5; }",
|
||||
"Real { minimum none; maximum 2.5; }",
|
||||
None,
|
||||
Some(2.5),
|
||||
),
|
||||
(
|
||||
"Real { minimum -1.25; }",
|
||||
"Real { minimum -1.25; maximum none; }",
|
||||
Some(-1.25),
|
||||
None,
|
||||
),
|
||||
] {
|
||||
let expected = DataTypeDefinition::Real { minimum, maximum };
|
||||
assert_eq!(
|
||||
admit_data(layer, omitted, expected.clone()),
|
||||
admit_data(layer, explicit, expected),
|
||||
"omitted and explicit optional Real bounds agree"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn string_optional_maximum_can_be_omitted_without_resetting_required_minimum() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
let expected = DataTypeDefinition::String {
|
||||
minimum_length: 4,
|
||||
maximum_length: None,
|
||||
};
|
||||
assert_eq!(
|
||||
admit_data(layer, "String { minimum_length 4; }", expected.clone()),
|
||||
admit_data(
|
||||
layer,
|
||||
"String { minimum_length 4; maximum_length none; }",
|
||||
expected,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicitly_selected_string_requires_minimum_even_when_whole_definition_has_a_default() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert_missing(&data_bundle(layer, "String {}"), "minimum_length");
|
||||
assert_missing(
|
||||
&data_bundle(layer, "String { maximum_length none; }"),
|
||||
"minimum_length",
|
||||
);
|
||||
admit_data(
|
||||
layer,
|
||||
"String { minimum_length 0; }",
|
||||
DataTypeDefinition::String {
|
||||
minimum_length: 0,
|
||||
maximum_length: None,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn absent_numeric_maximum_is_distinct_from_an_explicit_zero_bound() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
let unbounded = admit_data(
|
||||
layer,
|
||||
"Integer { minimum -3; }",
|
||||
DataTypeDefinition::Integer {
|
||||
minimum: Some(-3),
|
||||
maximum: None,
|
||||
},
|
||||
);
|
||||
let bounded = admit_data(
|
||||
layer,
|
||||
"Integer { minimum -3; maximum 0; }",
|
||||
DataTypeDefinition::Integer {
|
||||
minimum: Some(-3),
|
||||
maximum: Some(0),
|
||||
},
|
||||
);
|
||||
assert_ne!(unbounded, bounded, "zero is a bound, not omitted syntax");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn record_has_no_required_payload_field_and_omitted_supertype_means_none() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
let expected = DataTypeDefinition::Record { supertype: None };
|
||||
assert_eq!(
|
||||
admit_data(layer, "Record {}", expected.clone()),
|
||||
admit_data(layer, "Record { supertype none; }", expected),
|
||||
);
|
||||
let errors = compile_bundle(
|
||||
&data_bundle(layer, "Record { fields []; }"),
|
||||
ProjectLimits::default(),
|
||||
)
|
||||
.unwrap_err();
|
||||
assert_eq!(errors.len(), 1, "{errors:?}");
|
||||
assert_eq!(errors[0].diagnostic.code, "invalid_source", "{errors:?}");
|
||||
assert!(
|
||||
errors[0]
|
||||
.diagnostic
|
||||
.message
|
||||
.contains("unknown field `fields`"),
|
||||
"Record remains a closed constructor: {errors:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn enumeration_still_requires_its_list_even_when_empty_list_is_admitted() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert_missing(&data_bundle(layer, "Enumeration {}"), "literals");
|
||||
admit_data(
|
||||
layer,
|
||||
"Enumeration { literals []; }",
|
||||
DataTypeDefinition::Enumeration { literals: vec![] },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn port_bundle(layer: Layer, fields: &str) -> SourceBundle {
|
||||
let owner_kind = match layer {
|
||||
Layer::Oa => "oa_entity",
|
||||
Layer::Sa => "sa_system",
|
||||
};
|
||||
bundle(&format!(
|
||||
" {owner_kind} owner \"Owner\" id \"00000000-0000-4000-8000-000000000002\" {{}}\n {}_port subject \"Subject\" id \"00000000-0000-4000-8000-000000000003\" {{ parent @owner; {fields} }}",
|
||||
prefix(layer)
|
||||
))
|
||||
}
|
||||
|
||||
fn admit_port(layer: Layer, fields: &str) -> Project {
|
||||
let owner_body = match layer {
|
||||
Layer::Oa => ElementBody::Oa(OaBody::Entity),
|
||||
Layer::Sa => ElementBody::Sa(SaBody::System),
|
||||
};
|
||||
assert_admitted(
|
||||
&port_bundle(layer, fields),
|
||||
vec![
|
||||
element(2, "owner", "Owner", None, owner_body),
|
||||
element(
|
||||
3,
|
||||
"subject",
|
||||
"Subject",
|
||||
Some(id(2)),
|
||||
ElementBody::shared_in(
|
||||
layer,
|
||||
SharedBody::Port {
|
||||
contract: PortContract::Legacy,
|
||||
legacy: Some(LegacyPortContract {
|
||||
direction: PortDirection::Out,
|
||||
interface: None,
|
||||
}),
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn legacy_port_interface_can_be_omitted_but_preserves_direction() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert_eq!(
|
||||
admit_port(layer, "contract Legacy; legacy { direction Out; };"),
|
||||
admit_port(
|
||||
layer,
|
||||
"contract Legacy; legacy { direction Out; interface none; };"
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn legacy_port_direction_remains_required_inside_selected_record() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert_missing(
|
||||
&port_bundle(layer, "contract Legacy; legacy {};"),
|
||||
"direction",
|
||||
);
|
||||
assert_missing(
|
||||
&port_bundle(layer, "contract Legacy; legacy { interface none; };"),
|
||||
"direction",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn port_declaration_still_requires_explicit_contract() {
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert_missing(
|
||||
&port_bundle(layer, "legacy { direction Out; };"),
|
||||
"contract",
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,445 @@
|
||||
//! Public flat/modular formatter fidelity over frozen input and bounded mutations.
|
||||
//! Legacy fixture migration uses the public parser. The original adapter tests
|
||||
//! and exact inputs remain archived at source commit 2a64344; this suite exercises
|
||||
//! production formatters, not that frozen experiment or lossless model edits.
|
||||
|
||||
use oa_core::{language, source_project::*, *};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
const COASTAL: &str = include_str!("../../../examples/coastal-rescue.arcadia");
|
||||
const KEYED: &str =
|
||||
include_str!("../../../harness/fixtures/release1-native/semantic-keyed.arcadia");
|
||||
const STATES: &str =
|
||||
include_str!("../../../harness/fixtures/release1-native/state-actions.arcadia");
|
||||
const DENSE: &str =
|
||||
include_str!("../../../harness/fixtures/release1-native/dense-40/dense-40.arcadia");
|
||||
const OPERATIONS: &str = include_str!(
|
||||
"../../../harness/fixtures/interface-operation-probe/output/boundary-only.arcadia"
|
||||
);
|
||||
|
||||
fn read(source: &str) -> Project {
|
||||
language::parse(source).unwrap()
|
||||
}
|
||||
|
||||
fn identity(project: &Project, alias: &str) -> Id {
|
||||
project
|
||||
.identities()
|
||||
.into_iter()
|
||||
.find(|(_, name)| *name == alias)
|
||||
.unwrap()
|
||||
.0
|
||||
}
|
||||
|
||||
fn assert_common_omissions(project: &Project, compiled: &CompiledSourceProject) {
|
||||
if project.description.is_empty() {
|
||||
assert!(compiled.index.project_description.is_none());
|
||||
}
|
||||
let descriptions = project
|
||||
.elements
|
||||
.values()
|
||||
.map(|e| (e.id, &e.description))
|
||||
.chain(project.relations.values().map(|r| (r.id, &r.description)))
|
||||
.chain(project.diagrams.values().map(|d| (d.id, &d.description)))
|
||||
.chain(
|
||||
project
|
||||
.artifact_links
|
||||
.values()
|
||||
.map(|a| (a.id, &a.description)),
|
||||
)
|
||||
.chain(project.traces.values().map(|t| (t.id, &t.description)));
|
||||
for (id, description) in descriptions {
|
||||
if description.is_empty() {
|
||||
assert!(
|
||||
!compiled
|
||||
.index
|
||||
.fields
|
||||
.contains_key(&(id, "description".into()))
|
||||
);
|
||||
}
|
||||
}
|
||||
for element in project.elements.values().filter(|e| e.parent.is_none()) {
|
||||
assert!(
|
||||
!compiled
|
||||
.index
|
||||
.fields
|
||||
.contains_key(&(element.id, "parent".into()))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_fidelity(label: &str, project: &Project) -> (Project, String) {
|
||||
let flat = language::format(project);
|
||||
let compact_model = read(&flat);
|
||||
assert_eq!(
|
||||
compact_model, *project,
|
||||
"{label}: every persistent field survives"
|
||||
);
|
||||
|
||||
let input = SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), flat.clone())]),
|
||||
};
|
||||
let compiled = compile_bundle(&input, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
compiled.decoded.project, *project,
|
||||
"{label}: source-project compile"
|
||||
);
|
||||
assert_eq!(
|
||||
compiled.bundle, input,
|
||||
"{label}: compact identities/source are stable"
|
||||
);
|
||||
|
||||
assert_common_omissions(project, &compiled);
|
||||
assert_eq!(
|
||||
language::format(&compact_model),
|
||||
flat,
|
||||
"{label}: flat idempotence"
|
||||
);
|
||||
|
||||
let modular = format_bundle(project);
|
||||
assert!(
|
||||
modular.files.len() > 1,
|
||||
"{label}: exercise generated includes"
|
||||
);
|
||||
let modular_compiled = compile_bundle(&modular, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
modular_compiled.decoded.project, *project,
|
||||
"{label}: complete modular model"
|
||||
);
|
||||
assert_eq!(
|
||||
modular_compiled.bundle, modular,
|
||||
"{label}: modular source/IDs are stable"
|
||||
);
|
||||
assert_common_omissions(project, &modular_compiled);
|
||||
assert_eq!(
|
||||
format_bundle(&compact_model),
|
||||
modular,
|
||||
"{label}: flat-to-modular determinism"
|
||||
);
|
||||
assert_eq!(
|
||||
format_bundle(&modular_compiled.decoded.project),
|
||||
modular,
|
||||
"{label}: modular idempotence"
|
||||
);
|
||||
|
||||
// Pinned measured compact bytes from the published fidelity-1 stderr.log at
|
||||
// 2a64344, not a comparison against today's (now compact) canonical writer.
|
||||
// A small header-layout allowance avoids enforcing incidental blank lines.
|
||||
let measured_compact_bytes = match label {
|
||||
"coastal-source3" => 28_465,
|
||||
"keyed-source5-history" => 12_066,
|
||||
"state-actions-source5" => 6_673,
|
||||
"dense40-source6" => 19_342,
|
||||
"boundary-operations-source6" => 3_660,
|
||||
"state-negative-zero" => 6_672,
|
||||
"keyed-present-empty-default" => 12_108,
|
||||
"coastal-present-empty-artifact-strings" => 28_483,
|
||||
"boundary-selected-and-unresolved-operations" => 3_806,
|
||||
_ => panic!("missing independent compact measurement for {label}"),
|
||||
};
|
||||
assert!(
|
||||
flat.len() <= measured_compact_bytes + 16,
|
||||
"{label}: {} bytes exceeds compact evidence budget {}",
|
||||
flat.len(),
|
||||
measured_compact_bytes + 16
|
||||
);
|
||||
(compact_model, flat)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn migrated_coastal_oa_sa_views_ports_artifacts_and_traces_roundtrip() {
|
||||
assert!(COASTAL.starts_with("arcadia 3;"));
|
||||
let project = read(COASTAL);
|
||||
assert!(project.elements.values().any(|e| e.layer() == Layer::Oa));
|
||||
assert!(project.elements.values().any(|e| e.layer() == Layer::Sa));
|
||||
assert!(
|
||||
project
|
||||
.elements
|
||||
.values()
|
||||
.any(|e| matches!(e.shared(), Some(SharedBody::Port { .. })))
|
||||
);
|
||||
assert!(project.elements.values().any(
|
||||
|e| matches!(e.shared(), Some(SharedBody::Scenario { steps, .. }) if !steps.is_empty())
|
||||
));
|
||||
assert!(project.diagrams.values().any(|d| d.layer == Layer::Oa
|
||||
&& d.projection == ProjectionKind::FunctionalDataflow
|
||||
&& !d.nodes.is_empty()));
|
||||
assert!(project.diagrams.values().any(|d| d.layer == Layer::Sa
|
||||
&& d.projection == ProjectionKind::Allocation
|
||||
&& !d.nodes.is_empty()));
|
||||
assert!(!project.artifact_links.is_empty());
|
||||
assert!(project.traces.values().any(|t| t.baseline.is_some()));
|
||||
assert_fidelity("coastal-source3", &project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn keyed_scenarios_records_and_historical_binding_annotation_facets_roundtrip() {
|
||||
let project = read(KEYED);
|
||||
for layer in [Layer::Oa, Layer::Sa] {
|
||||
assert!(project.elements.values().any(|e| e.layer() == layer
|
||||
&& matches!(
|
||||
e.shared(),
|
||||
Some(SharedBody::DataType {
|
||||
definition: DataTypeDefinition::Record { .. },
|
||||
..
|
||||
})
|
||||
)));
|
||||
assert!(project.elements.values().any(|e| e.layer() == layer && matches!(e.shared(), Some(SharedBody::Occurrence { body: OccurrenceBody::ScenarioUse { bindings, .. }, .. }) if !bindings.is_empty())));
|
||||
}
|
||||
assert!(project.elements.values().any(|e| matches!(e.shared(), Some(SharedBody::Occurrence { body: OccurrenceBody::Exchange { values, .. }, .. }) if values.iter().any(|v| !v.path.is_empty() && !v.expression.is_empty()))));
|
||||
let facets: Vec<_> = project
|
||||
.traces
|
||||
.values()
|
||||
.filter_map(|t| t.baseline.as_ref()?.semantic.as_ref())
|
||||
.flat_map(|baseline| &baseline.facets)
|
||||
.collect();
|
||||
assert!(
|
||||
facets
|
||||
.iter()
|
||||
.any(|facet| matches!(facet, semantic::FacetReview::Binding { .. }))
|
||||
);
|
||||
assert!(
|
||||
facets
|
||||
.iter()
|
||||
.any(|facet| matches!(facet, semantic::FacetReview::Annotation { .. }))
|
||||
);
|
||||
assert!(
|
||||
KEYED.contains("uuid \""),
|
||||
"fixture contains historical identity atoms"
|
||||
);
|
||||
let (_, source) = assert_fidelity("keyed-source5-history", &project);
|
||||
assert!(
|
||||
source.contains("uuid \""),
|
||||
"historical atoms remain historical"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn state_machine_projection_typed_actions_and_bounded_integer_roundtrip() {
|
||||
let project = read(STATES);
|
||||
let machine = identity(&project, "operating");
|
||||
let view = &project.diagrams[&identity(&project, "state_view")];
|
||||
assert_eq!(view.projection, ProjectionKind::StateMachine { machine });
|
||||
assert!(!view.nodes.is_empty());
|
||||
for phase in [
|
||||
StateActionKind::Entry,
|
||||
StateActionKind::Do,
|
||||
StateActionKind::Exit,
|
||||
] {
|
||||
assert!(project.relations.values().any(|r| matches!(&r.body, RelationBody::StateAction { phase: actual, .. } if *actual == phase)));
|
||||
}
|
||||
assert!(project.relations.values().any(|r| matches!(&r.body, RelationBody::StateTransition { transition_kind: TransitionKind::Internal, triggers, effects, .. } if !triggers.is_empty() && !effects.is_empty())));
|
||||
assert!(
|
||||
matches!(project.elements[&identity(&project, "retry_budget")].shared(), Some(SharedBody::DataType { definition: DataTypeDefinition::Integer { minimum: Some(0), maximum: Some(4) }, unit, .. }) if unit == "attempts")
|
||||
);
|
||||
assert_fidelity("state-actions-source5", &project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn forty_exchange_diagram_with_categories_and_processes_roundtrip() {
|
||||
let project = read(DENSE);
|
||||
assert_eq!(
|
||||
project
|
||||
.relations
|
||||
.values()
|
||||
.filter(|r| r.kind() == RelationKind::Interaction)
|
||||
.count(),
|
||||
40
|
||||
);
|
||||
assert_eq!(
|
||||
project
|
||||
.elements
|
||||
.values()
|
||||
.filter(|e| e.kind() == Kind::ExchangeCategory)
|
||||
.count(),
|
||||
5
|
||||
);
|
||||
assert_eq!(
|
||||
project
|
||||
.elements
|
||||
.values()
|
||||
.filter(|e| e.kind() == Kind::Process)
|
||||
.count(),
|
||||
3
|
||||
);
|
||||
let view = &project.diagrams[&identity(&project, "forty_exchange_view")];
|
||||
assert_eq!(view.projection, ProjectionKind::FunctionalDataflow);
|
||||
assert_eq!(view.nodes.len(), 2);
|
||||
assert!(view.routes.is_empty());
|
||||
assert_eq!(
|
||||
view.view_options.relation_kinds,
|
||||
view_options::RelationKinds::All
|
||||
);
|
||||
assert_fidelity("dense40-source6", &project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn component_ports_interface_operations_and_boundary_calls_roundtrip() {
|
||||
let project = read(OPERATIONS);
|
||||
assert_eq!(
|
||||
project
|
||||
.relations
|
||||
.values()
|
||||
.filter(|r| r.kind() == RelationKind::InterfaceItemAllocation)
|
||||
.count(),
|
||||
2
|
||||
);
|
||||
assert_eq!(
|
||||
project
|
||||
.elements
|
||||
.values()
|
||||
.filter(|e| matches!(
|
||||
e.shared(),
|
||||
Some(SharedBody::Port {
|
||||
contract: PortContract::Component {
|
||||
kind: ComponentPortKind::Standard,
|
||||
..
|
||||
},
|
||||
..
|
||||
})
|
||||
))
|
||||
.count(),
|
||||
2
|
||||
);
|
||||
assert!(project.elements.values().any(|e| matches!(
|
||||
e.shared(),
|
||||
Some(SharedBody::ExchangeItem {
|
||||
mechanism: ExchangeMechanism::Operation,
|
||||
..
|
||||
})
|
||||
)));
|
||||
assert!(project.elements.values().any(|e| matches!(e.shared(), Some(SharedBody::Scenario { viewpoint: ScenarioViewpoint::BoundaryInterface, steps, .. }) if steps.len() == 2)));
|
||||
assert_eq!(
|
||||
project
|
||||
.elements
|
||||
.values()
|
||||
.filter(|e| matches!(
|
||||
e.shared(),
|
||||
Some(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
message_kind: MessageKind::Call,
|
||||
operation: None,
|
||||
..
|
||||
},
|
||||
..
|
||||
})
|
||||
))
|
||||
.count(),
|
||||
2
|
||||
);
|
||||
assert_fidelity("boundary-operations-source6", &project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn negative_zero_node_coordinate_survives_canonical_compact_and_bundle_compile() {
|
||||
let mut project = read(STATES);
|
||||
let diagram = identity(&project, "state_view");
|
||||
let node = identity(&project, "view_machine");
|
||||
project
|
||||
.diagrams
|
||||
.get_mut(&diagram)
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&node)
|
||||
.unwrap()
|
||||
.position = Position { x: -0.0, y: 0.0 };
|
||||
let (decoded, flat) = assert_fidelity("state-negative-zero", &project);
|
||||
let bundle = SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), flat)]),
|
||||
};
|
||||
let compiled = compile_bundle(&bundle, ProjectLimits::default()).unwrap();
|
||||
let modular = compile_bundle(&format_bundle(&project), ProjectLimits::default()).unwrap();
|
||||
// Project/Position PartialEq alone equates the signs of zero. Check bits in
|
||||
// each independently decoded representation, including source-project compile.
|
||||
for actual in [
|
||||
&decoded,
|
||||
&compiled.decoded.project,
|
||||
&modular.decoded.project,
|
||||
] {
|
||||
let position = &actual.diagrams[&diagram].nodes[&node].position;
|
||||
assert_eq!(position.x.to_bits(), (-0.0_f32).to_bits());
|
||||
assert_eq!(position.y.to_bits(), 0.0_f32.to_bits());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn present_empty_field_default_and_unbounded_maximum_remain_distinct_from_omission() {
|
||||
let mut project = read(KEYED);
|
||||
let field_id = identity(&project, "oa_navigation_latitude");
|
||||
let Some(SharedBody::DataField {
|
||||
minimum,
|
||||
maximum,
|
||||
default,
|
||||
storage,
|
||||
..
|
||||
}) = project.elements.get_mut(&field_id).unwrap().shared_mut()
|
||||
else {
|
||||
panic!("fixture must contain the claimed DataField");
|
||||
};
|
||||
assert_eq!(*minimum, 0);
|
||||
assert_eq!(*maximum, Some(1));
|
||||
assert_eq!(*default, None);
|
||||
assert_eq!(*storage, FieldStorage::Value);
|
||||
*maximum = None;
|
||||
*default = Some(vec![]);
|
||||
let (decoded, _) = assert_fidelity("keyed-present-empty-default", &project);
|
||||
assert!(
|
||||
matches!(decoded.elements[&field_id].shared(), Some(SharedBody::DataField { maximum: None, default: Some(values), .. }) if values.is_empty())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn present_empty_artifact_revision_and_fragment_survive() {
|
||||
let mut project = read(COASTAL);
|
||||
let artifact_id = identity(&project, "console_enclosure_cad");
|
||||
let artifact = project.artifact_links.get_mut(&artifact_id).unwrap();
|
||||
artifact.revision = Some(String::new());
|
||||
artifact.fragment = Some(String::new());
|
||||
let (decoded, _) = assert_fidelity("coastal-present-empty-artifact-strings", &project);
|
||||
assert_eq!(
|
||||
decoded.artifact_links[&artifact_id].revision.as_deref(),
|
||||
Some("")
|
||||
);
|
||||
assert_eq!(
|
||||
decoded.artifact_links[&artifact_id].fragment.as_deref(),
|
||||
Some("")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn selected_and_unresolved_operation_intent_survive_as_distinct_present_records() {
|
||||
let mut project = read(OPERATIONS);
|
||||
let allocation = identity(&project, "operation_probe_30");
|
||||
assert_eq!(
|
||||
project.relations[&allocation].kind(),
|
||||
RelationKind::InterfaceItemAllocation
|
||||
);
|
||||
let selected = identity(&project, "operation_probe_43");
|
||||
let unresolved = identity(&project, "operation_probe_44");
|
||||
for (subject, value) in [(selected, Some(allocation)), (unresolved, None)] {
|
||||
let Some(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange { operation, .. },
|
||||
..
|
||||
}) = project.elements.get_mut(&subject).unwrap().shared_mut()
|
||||
else {
|
||||
panic!("fixture must contain a Call Exchange");
|
||||
};
|
||||
assert_eq!(*operation, None);
|
||||
*operation = Some(OperationUse { allocation: value });
|
||||
}
|
||||
let (decoded, _) = assert_fidelity("boundary-selected-and-unresolved-operations", &project);
|
||||
assert!(
|
||||
matches!(decoded.elements[&selected].shared(), Some(SharedBody::Occurrence { body: OccurrenceBody::Exchange { operation: Some(OperationUse { allocation: Some(actual) }), .. }, .. }) if *actual == allocation)
|
||||
);
|
||||
assert!(matches!(
|
||||
decoded.elements[&unresolved].shared(),
|
||||
Some(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
operation: Some(OperationUse { allocation: None }),
|
||||
..
|
||||
},
|
||||
..
|
||||
})
|
||||
));
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
//! Focused public-output contracts. Field locations come from the real compiler;
|
||||
//! token comparisons ignore layout while retaining typed tags and required syntax.
|
||||
use oa_core::{language, source_project::*, *};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
fn project(declarations: &str) -> Project {
|
||||
language::parse(&format!(
|
||||
"arcadia 7; project p \"P\" id \"00000000-0000-4000-8000-000000000001\" {{ {declarations} }}"
|
||||
)).unwrap()
|
||||
}
|
||||
|
||||
fn exports(project: &Project) -> Vec<CompiledSourceProject> {
|
||||
let flat = language::format(project);
|
||||
assert_eq!(language::parse(&flat).unwrap(), *project);
|
||||
let flat_bundle = SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), flat)]),
|
||||
};
|
||||
[flat_bundle, format_bundle(project)]
|
||||
.into_iter()
|
||||
.map(|bundle| {
|
||||
let compiled = compile_bundle(&bundle, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(compiled.decoded.project, *project);
|
||||
assert_eq!(
|
||||
compiled.bundle, bundle,
|
||||
"all identities are explicit and stable"
|
||||
);
|
||||
compiled
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn identity(project: &Project, alias: &str) -> Id {
|
||||
project
|
||||
.identities()
|
||||
.into_iter()
|
||||
.find(|(_, name)| *name == alias)
|
||||
.unwrap()
|
||||
.0
|
||||
}
|
||||
|
||||
fn field(compiled: &CompiledSourceProject, alias: &str, name: &str) -> Option<String> {
|
||||
let location = compiled
|
||||
.index
|
||||
.fields
|
||||
.get(&(identity(&compiled.decoded.project, alias), name.into()))?;
|
||||
let text = &compiled.bundle.files[&location.path][location.span.start..location.span.end];
|
||||
Some(
|
||||
language::tokenize(text)
|
||||
.into_iter()
|
||||
.filter(|token| {
|
||||
!matches!(
|
||||
token.class,
|
||||
language::TokenClass::Whitespace | language::TokenClass::Comment
|
||||
)
|
||||
})
|
||||
.map(|token| &text[token.span.start..token.span.end])
|
||||
.collect::<Vec<_>>()
|
||||
.join(" "),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_project_has_no_synthetic_description_or_module() {
|
||||
let empty = project("");
|
||||
for compiled in exports(&empty) {
|
||||
assert!(compiled.index.project_description.is_none());
|
||||
assert!(compiled.index.fields.is_empty());
|
||||
assert!(compiled.index.includes.is_empty());
|
||||
assert_eq!(compiled.bundle.files.len(), 1);
|
||||
assert_eq!(compiled.index.declarations.len(), 1);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn only_empty_descriptions_disappear_whitespace_and_text_survive_exactly() {
|
||||
let mut model =
|
||||
project("oa_activity work \"Work\" id \"00000000-0000-4000-8000-000000000002\" {}");
|
||||
let work = identity(&model, "work");
|
||||
for description in ["", " \t\n", "A quoted \"requirement\" — 雨"] {
|
||||
model.description = description.into();
|
||||
model.elements.get_mut(&work).unwrap().description = description.into();
|
||||
for compiled in exports(&model) {
|
||||
assert_eq!(
|
||||
compiled.index.project_description.is_some(),
|
||||
!description.is_empty()
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "work", "description").is_some(),
|
||||
!description.is_empty()
|
||||
);
|
||||
assert!(field(&compiled, "work", "parent").is_none());
|
||||
// exports compares the complete model, including exact whitespace
|
||||
// and escapes in both project and element descriptions.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sa_view_keeps_its_layer_and_node_references_but_omits_presentation_defaults() {
|
||||
let model = project(
|
||||
r#"
|
||||
sa_function work "Work" id "00000000-0000-4000-8000-000000000002" {}
|
||||
diagram view "View" id "00000000-0000-4000-8000-000000000003" { layer Sa; }
|
||||
node placement id "00000000-0000-4000-8000-000000000004" {
|
||||
diagram @view; element @work;
|
||||
position { x 0.0; y 0.0; }; size { width 224.0; height 94.0; };
|
||||
collapsed false; port_anchors [];
|
||||
}
|
||||
"#,
|
||||
);
|
||||
for compiled in exports(&model) {
|
||||
assert_eq!(field(&compiled, "view", "layer").as_deref(), Some("Sa"));
|
||||
for name in ["description", "projection", "routes", "view_options"] {
|
||||
assert!(field(&compiled, "view", name).is_none(), "view.{name}");
|
||||
}
|
||||
assert_eq!(
|
||||
field(&compiled, "placement", "diagram").as_deref(),
|
||||
Some("@ view")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "placement", "element").as_deref(),
|
||||
Some("@ work")
|
||||
);
|
||||
for name in ["position", "size", "collapsed", "port_anchors"] {
|
||||
assert!(
|
||||
field(&compiled, "placement", name).is_none(),
|
||||
"placement.{name}"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nested_type_defaults_disappear_without_losing_required_or_present_empty_values() {
|
||||
let model = project(
|
||||
r#"
|
||||
sa_data_type implicit "Implicit" id "00000000-0000-4000-8000-000000000002" {}
|
||||
sa_data_type integer "Integer" id "00000000-0000-4000-8000-000000000003" {
|
||||
definition { Integer { minimum none; maximum none; }; };
|
||||
}
|
||||
sa_data_type text "Text" id "00000000-0000-4000-8000-000000000004" {
|
||||
definition { String { minimum_length 4; maximum_length none; }; };
|
||||
}
|
||||
sa_data_type record "Record" id "00000000-0000-4000-8000-000000000005" {
|
||||
definition { Record { supertype none; }; };
|
||||
}
|
||||
sa_data_type flag "Flag" id "00000000-0000-4000-8000-000000000006" {
|
||||
definition Boolean; default { Boolean false; };
|
||||
}
|
||||
sa_data_field optional "Optional" id "00000000-0000-4000-8000-000000000007" {
|
||||
parent @record; minimum 0; maximum none; default [];
|
||||
}
|
||||
"#,
|
||||
);
|
||||
for compiled in exports(&model) {
|
||||
assert!(field(&compiled, "implicit", "definition").is_none());
|
||||
assert_eq!(
|
||||
field(&compiled, "integer", "definition").as_deref(),
|
||||
Some("{ Integer { } ; }")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "text", "definition").as_deref(),
|
||||
Some("{ String { minimum_length 4 ; } ; }")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "record", "definition").as_deref(),
|
||||
Some("{ Record { } ; }")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "flag", "definition").as_deref(),
|
||||
Some("Boolean")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "flag", "default").as_deref(),
|
||||
Some("{ Boolean false ; }")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "optional", "minimum").as_deref(),
|
||||
Some("0")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "optional", "maximum").as_deref(),
|
||||
Some("none")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "optional", "default").as_deref(),
|
||||
Some("[ ]")
|
||||
);
|
||||
assert!(field(&compiled, "optional", "type_ref").is_none());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn required_port_contract_and_empty_item_list_survive_while_optional_interface_disappears() {
|
||||
let model = project(
|
||||
r#"
|
||||
sa_function work "Work" id "00000000-0000-4000-8000-000000000002" {}
|
||||
sa_port sink "Sink" id "00000000-0000-4000-8000-000000000003" {
|
||||
parent @work; contract { FunctionInput { incoming_items []; }; };
|
||||
}
|
||||
sa_system host "Host" id "00000000-0000-4000-8000-000000000004" {}
|
||||
sa_port preserved "Preserved" id "00000000-0000-4000-8000-000000000005" {
|
||||
parent @host; contract Legacy; legacy { direction Out; interface none; };
|
||||
}
|
||||
"#,
|
||||
);
|
||||
for compiled in exports(&model) {
|
||||
assert_eq!(
|
||||
field(&compiled, "sink", "contract").as_deref(),
|
||||
Some("{ FunctionInput { incoming_items [ ] ; } ; }")
|
||||
);
|
||||
assert!(field(&compiled, "sink", "legacy").is_none());
|
||||
assert_eq!(
|
||||
field(&compiled, "preserved", "contract").as_deref(),
|
||||
Some("Legacy")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "preserved", "legacy").as_deref(),
|
||||
Some("{ direction Out ; }")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_scenario_default_and_selected_occurrence_constructor_remain_distinct() {
|
||||
let model = project(
|
||||
r#"
|
||||
sa_scenario mixed "Mixed" id "00000000-0000-4000-8000-000000000002" { viewpoint MixedLegacy; }
|
||||
sa_scenario strict "Strict" id "00000000-0000-4000-8000-000000000003" { viewpoint Functional; }
|
||||
oa_process flow "Flow" id "00000000-0000-4000-8000-000000000004" { steps [@exchange, @action]; }
|
||||
oa_occurrence exchange "Exchange" id "00000000-0000-4000-8000-000000000005" {
|
||||
parent @flow; body { Exchange {}; };
|
||||
}
|
||||
oa_occurrence action "Action" id "00000000-0000-4000-8000-000000000006" {
|
||||
parent @flow; body { Action { action none; lifeline none; }; };
|
||||
}
|
||||
"#,
|
||||
);
|
||||
for compiled in exports(&model) {
|
||||
assert!(field(&compiled, "mixed", "viewpoint").is_none());
|
||||
assert_eq!(
|
||||
field(&compiled, "strict", "viewpoint").as_deref(),
|
||||
Some("Functional")
|
||||
);
|
||||
assert!(field(&compiled, "exchange", "body").is_none());
|
||||
assert_eq!(
|
||||
field(&compiled, "action", "body").as_deref(),
|
||||
Some("{ Action { } ; }")
|
||||
);
|
||||
assert_eq!(
|
||||
field(&compiled, "action", "parent").as_deref(),
|
||||
Some("@ flow")
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,612 @@
|
||||
//! Exact-source regressions for fields skipped by persistence serialization.
|
||||
//!
|
||||
//! The archived Windows baseline confirmed three exact-source failures after
|
||||
//! full model equality passed. Complete comparison now preserves these fields;
|
||||
//! the former ignored witnesses are normal regression tests.
|
||||
//! No-op and same-record header controls remain normal tests: they must preserve
|
||||
//! the same fixtures without entering the changed-payload record-erasure branch.
|
||||
|
||||
use oa_core::{source_project::*, *};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
const EXCHANGE_SOURCE: &str = r#"arcadia 7;
|
||||
project p "Preservation" id "00000000-0000-4000-8000-000000000001" {
|
||||
oa_activity first "First" id "00000000-0000-4000-8000-000000000002" {}
|
||||
oa_activity second "Second" id "00000000-0000-4000-8000-000000000003" {}
|
||||
interaction flow "Flow" id "00000000-0000-4000-8000-000000000004" {
|
||||
source @first; target @second;
|
||||
}
|
||||
oa_process owner "Owner" id "00000000-0000-4000-8000-000000000005" {
|
||||
steps [@subject];
|
||||
}
|
||||
oa_occurrence subject "Subject" id "00000000-0000-4000-8000-000000000006" {
|
||||
parent @owner;
|
||||
body { Exchange {
|
||||
exchange none;
|
||||
sender none; receiver none;
|
||||
message_kind Asynchronous; reply_to none; values [];
|
||||
operation none ; // Keep this authored default and its spelling.
|
||||
}; };
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
const NODE_SOURCE: &str = r#"arcadia 7;
|
||||
project p "Preservation" id "00000000-0000-4000-8000-000000000001" {
|
||||
oa_activity work "Work" id "00000000-0000-4000-8000-000000000002" {}
|
||||
diagram view "View" id "00000000-0000-4000-8000-000000000003" {}
|
||||
node placement id "00000000-0000-4000-8000-000000000004" {
|
||||
diagram @view; element @work;
|
||||
position { x 12.5; y -4.0; };
|
||||
port_anchors [] ; // Keep explicit automatic placement.
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
const TRACE_SOURCE: &str = r#"arcadia 7;
|
||||
project p "Preservation" id "00000000-0000-4000-8000-000000000001" {
|
||||
oa_activity work "Work" id "00000000-0000-4000-8000-000000000002" {}
|
||||
sa_function function "Function" id "00000000-0000-4000-8000-000000000003" {}
|
||||
trace mapping "Mapping" id "00000000-0000-4000-8000-000000000004" {
|
||||
oa @work; sa @function; kind Manual;
|
||||
baseline {
|
||||
oa { name "Work"; description "Old OA snapshot"; };
|
||||
sa { name "Function"; description "Old SA snapshot"; };
|
||||
semantic none ; // Keep the explicit prose-only baseline.
|
||||
};
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
const CONSTRUCTOR_SOURCE: &str = r#"arcadia 7;
|
||||
project p "Preservation" id "00000000-0000-4000-8000-000000000001" {
|
||||
oa_scenario owner "Owner" id "00000000-0000-4000-8000-000000000002" {
|
||||
steps [@subject];
|
||||
}
|
||||
oa_occurrence subject "Subject" id "00000000-0000-4000-8000-000000000003" {
|
||||
parent @owner;
|
||||
body { Action {
|
||||
action none;
|
||||
lifeline none ; // Keep this shared field's distinctive spelling.
|
||||
}; };
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
const RELATION_CONTEXT_SOURCE: &str = r#"arcadia 7;
|
||||
project p "Preservation" id "00000000-0000-4000-8000-000000000001" {
|
||||
oa_entity first "First" id "00000000-0000-4000-8000-000000000002" {}
|
||||
oa_entity second "Second" id "00000000-0000-4000-8000-000000000003" {}
|
||||
// These port declarations are untouched by the relation context change.
|
||||
oa_port output "Output" id "00000000-0000-4000-8000-000000000005" {
|
||||
parent @first; contract Legacy;
|
||||
legacy { direction Out; interface none; };
|
||||
}
|
||||
oa_port input "Input" id "00000000-0000-4000-8000-000000000006" {
|
||||
parent @second; contract Legacy;
|
||||
legacy { direction In; interface none; };
|
||||
}
|
||||
boundary_exchange link "Link" id "00000000-0000-4000-8000-000000000004" {
|
||||
source @output; target @input;
|
||||
oriented true ; // Retain this rationale when changing the default value.
|
||||
items [];
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
fn id(number: u8) -> Id {
|
||||
Id::parse_str(&format!("00000000-0000-4000-8000-{number:012}")).unwrap()
|
||||
}
|
||||
|
||||
fn source_bundle(source: &str) -> SourceBundle {
|
||||
SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), source.into())]),
|
||||
}
|
||||
}
|
||||
|
||||
fn project() -> Project {
|
||||
Project {
|
||||
schema_version: 7,
|
||||
id: id(1),
|
||||
alias: "p".into(),
|
||||
name: "Preservation".into(),
|
||||
description: String::new(),
|
||||
elements: BTreeMap::new(),
|
||||
relations: BTreeMap::new(),
|
||||
diagrams: BTreeMap::new(),
|
||||
artifact_links: BTreeMap::new(),
|
||||
traces: BTreeMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn element(number: u8, alias: &str, name: &str, parent: Option<Id>, body: ElementBody) -> Element {
|
||||
Element {
|
||||
id: id(number),
|
||||
alias: alias.into(),
|
||||
name: name.into(),
|
||||
description: String::new(),
|
||||
parent,
|
||||
body,
|
||||
}
|
||||
}
|
||||
|
||||
// Handwritten typed expectations are independent of canonical serialization and
|
||||
// source hydration. No model factories or generated/random identities are used.
|
||||
fn exchange_project() -> Project {
|
||||
let mut expected = project();
|
||||
expected.elements = [
|
||||
element(2, "first", "First", None, ElementBody::Oa(OaBody::Activity)),
|
||||
element(
|
||||
3,
|
||||
"second",
|
||||
"Second",
|
||||
None,
|
||||
ElementBody::Oa(OaBody::Activity),
|
||||
),
|
||||
element(
|
||||
5,
|
||||
"owner",
|
||||
"Owner",
|
||||
None,
|
||||
ElementBody::Oa(OaBody::Process { steps: vec![id(6)] }),
|
||||
),
|
||||
element(
|
||||
6,
|
||||
"subject",
|
||||
"Subject",
|
||||
Some(id(5)),
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange {
|
||||
exchange: None,
|
||||
sender: None,
|
||||
receiver: None,
|
||||
message_kind: MessageKind::Asynchronous,
|
||||
reply_to: None,
|
||||
values: vec![],
|
||||
operation: None,
|
||||
},
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
})),
|
||||
),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|element| (element.id, element))
|
||||
.collect();
|
||||
expected.relations.insert(
|
||||
id(4),
|
||||
Relation {
|
||||
id: id(4),
|
||||
alias: "flow".into(),
|
||||
name: "Flow".into(),
|
||||
description: String::new(),
|
||||
body: RelationBody::Interaction {
|
||||
source: id(2),
|
||||
target: id(3),
|
||||
items: vec![],
|
||||
},
|
||||
},
|
||||
);
|
||||
expected
|
||||
}
|
||||
|
||||
fn node_project() -> Project {
|
||||
let mut expected = project();
|
||||
expected.elements.insert(
|
||||
id(2),
|
||||
element(2, "work", "Work", None, ElementBody::Oa(OaBody::Activity)),
|
||||
);
|
||||
expected.diagrams.insert(
|
||||
id(3),
|
||||
Diagram {
|
||||
id: id(3),
|
||||
alias: "view".into(),
|
||||
name: "View".into(),
|
||||
description: String::new(),
|
||||
layer: Layer::Oa,
|
||||
projection: ProjectionKind::Overview,
|
||||
view_options: view_options::ViewOptions {
|
||||
hidden_edges: vec![],
|
||||
relation_kinds: view_options::RelationKinds::All,
|
||||
work_categories: view_options::CategorySelection::All,
|
||||
participant_categories: view_options::CategorySelection::All,
|
||||
coverage: view_options::Coverage::All,
|
||||
work_contexts: view_options::ContextSelection::All,
|
||||
exchange_labels: view_options::ExchangeLabels::Name,
|
||||
},
|
||||
nodes: BTreeMap::from([(
|
||||
id(4),
|
||||
NodePlacement {
|
||||
id: id(4),
|
||||
alias: "placement".into(),
|
||||
element: id(2),
|
||||
position: Position { x: 12.5, y: -4.0 },
|
||||
size: Size {
|
||||
width: 224.0,
|
||||
height: 94.0,
|
||||
},
|
||||
collapsed: false,
|
||||
port_anchors: vec![],
|
||||
},
|
||||
)]),
|
||||
routes: vec![],
|
||||
},
|
||||
);
|
||||
expected
|
||||
}
|
||||
|
||||
fn trace_project() -> Project {
|
||||
let mut expected = project();
|
||||
expected.elements = [
|
||||
element(2, "work", "Work", None, ElementBody::Oa(OaBody::Activity)),
|
||||
element(
|
||||
3,
|
||||
"function",
|
||||
"Function",
|
||||
None,
|
||||
ElementBody::Sa(SaBody::Function),
|
||||
),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|element| (element.id, element))
|
||||
.collect();
|
||||
expected.traces.insert(
|
||||
id(4),
|
||||
Trace {
|
||||
id: id(4),
|
||||
alias: "mapping".into(),
|
||||
name: "Mapping".into(),
|
||||
description: String::new(),
|
||||
oa: id(2),
|
||||
sa: id(3),
|
||||
kind: TraceKind::Manual,
|
||||
baseline: Some(TraceBaseline {
|
||||
oa: TracedProperties {
|
||||
name: "Work".into(),
|
||||
description: "Old OA snapshot".into(),
|
||||
},
|
||||
sa: TracedProperties {
|
||||
name: "Function".into(),
|
||||
description: "Old SA snapshot".into(),
|
||||
},
|
||||
semantic: None,
|
||||
}),
|
||||
},
|
||||
);
|
||||
expected
|
||||
}
|
||||
|
||||
fn checked_fixture(source: &str, expected: &Project) -> CompiledSourceProject {
|
||||
let input = source_bundle(source);
|
||||
let compiled = compile_bundle(&input, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
compiled.decoded.project, *expected,
|
||||
"fixture model admission"
|
||||
);
|
||||
assert_eq!(
|
||||
compiled.bundle, input,
|
||||
"fixed IDs must avoid stabilization edits"
|
||||
);
|
||||
compiled
|
||||
}
|
||||
|
||||
fn replacement(source: &str, before: &str, after: &str) -> String {
|
||||
assert_eq!(
|
||||
source.matches(before).count(),
|
||||
1,
|
||||
"unique authored edit token"
|
||||
);
|
||||
source.replacen(before, after, 1)
|
||||
}
|
||||
|
||||
fn assert_preserved_update(
|
||||
original: &CompiledSourceProject,
|
||||
expected: &Project,
|
||||
expected_source: &str,
|
||||
) {
|
||||
// Independently admit the exact expected spelling before testing the updater.
|
||||
let expected_bundle = source_bundle(expected_source);
|
||||
let authored = compile_bundle(&expected_bundle, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
authored.decoded.project, *expected,
|
||||
"expected source/model agree"
|
||||
);
|
||||
assert_eq!(
|
||||
authored.bundle, expected_bundle,
|
||||
"expected source is already stable"
|
||||
);
|
||||
|
||||
let updated = update_bundle(original, expected, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
updated.decoded.project, *expected,
|
||||
"entire intended model survives"
|
||||
);
|
||||
assert_eq!(
|
||||
updated.bundle, expected_bundle,
|
||||
"only the requested token may change; preserve explicit defaults and all trivia"
|
||||
);
|
||||
}
|
||||
|
||||
// Context changes may introduce/remove redundant default syntax. Admit each
|
||||
// narrowly enumerated spelling against the same literal target model, and then
|
||||
// compare complete source bundles. No normalization may mask edits to unrelated
|
||||
// fields, declarations, whitespace, or comments.
|
||||
fn assert_context_update(
|
||||
original: &CompiledSourceProject,
|
||||
expected: &Project,
|
||||
allowed_sources: &[String],
|
||||
) {
|
||||
let allowed: Vec<_> = allowed_sources
|
||||
.iter()
|
||||
.map(|source| {
|
||||
let bundle = source_bundle(source);
|
||||
let authored = compile_bundle(&bundle, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
authored.decoded.project, *expected,
|
||||
"allowed source/model agree"
|
||||
);
|
||||
assert_eq!(authored.bundle, bundle, "allowed source is already stable");
|
||||
bundle
|
||||
})
|
||||
.collect();
|
||||
let updated = update_bundle(original, expected, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
updated.decoded.project, *expected,
|
||||
"entire context-change model survives"
|
||||
);
|
||||
assert!(
|
||||
allowed.contains(&updated.bundle),
|
||||
"preserve unchanged source exactly; only listed changed/default syntax alternatives are allowed\nactual: {:?}\nallowed: {:?}",
|
||||
updated.bundle,
|
||||
allowed
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_exchange_operation_none_survives_noop() {
|
||||
let expected = exchange_project();
|
||||
let original = checked_fixture(EXCHANGE_SOURCE, &expected);
|
||||
assert_preserved_update(&original, &expected, EXCHANGE_SOURCE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_exchange_operation_none_survives_header_rename() {
|
||||
let mut expected = exchange_project();
|
||||
let original = checked_fixture(EXCHANGE_SOURCE, &expected);
|
||||
expected.elements.get_mut(&id(6)).unwrap().name = "Renamed subject".into();
|
||||
let source = replacement(EXCHANGE_SOURCE, "\"Subject\"", "\"Renamed subject\"");
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_exchange_operation_none_survives_exchange_binding_edit() {
|
||||
let mut expected = exchange_project();
|
||||
let original = checked_fixture(EXCHANGE_SOURCE, &expected);
|
||||
let Some(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Exchange { exchange, .. },
|
||||
..
|
||||
}) = expected.elements.get_mut(&id(6)).unwrap().body.shared_mut()
|
||||
else {
|
||||
panic!("literal fixture must be an Exchange occurrence");
|
||||
};
|
||||
*exchange = Some(id(4));
|
||||
let source = replacement(EXCHANGE_SOURCE, "exchange none;", "exchange @flow;");
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_node_empty_port_anchors_survive_noop() {
|
||||
let expected = node_project();
|
||||
let original = checked_fixture(NODE_SOURCE, &expected);
|
||||
assert_preserved_update(&original, &expected, NODE_SOURCE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_node_empty_port_anchors_survive_header_alias_rename() {
|
||||
let mut expected = node_project();
|
||||
let original = checked_fixture(NODE_SOURCE, &expected);
|
||||
// Nodes have no display-name header. Rename the same node's header alias.
|
||||
expected
|
||||
.diagrams
|
||||
.get_mut(&id(3))
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&id(4))
|
||||
.unwrap()
|
||||
.alias = "renamed_placement".into();
|
||||
let source = replacement(
|
||||
NODE_SOURCE,
|
||||
"node placement id",
|
||||
"node renamed_placement id",
|
||||
);
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_node_empty_port_anchors_survive_position_edit() {
|
||||
let mut expected = node_project();
|
||||
let original = checked_fixture(NODE_SOURCE, &expected);
|
||||
expected
|
||||
.diagrams
|
||||
.get_mut(&id(3))
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&id(4))
|
||||
.unwrap()
|
||||
.position
|
||||
.x = 25.0;
|
||||
let source = replacement(NODE_SOURCE, "x 12.5;", "x 25.0;");
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_trace_semantic_none_survives_noop() {
|
||||
let expected = trace_project();
|
||||
let original = checked_fixture(TRACE_SOURCE, &expected);
|
||||
assert_preserved_update(&original, &expected, TRACE_SOURCE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_trace_semantic_none_survives_header_rename() {
|
||||
let mut expected = trace_project();
|
||||
let original = checked_fixture(TRACE_SOURCE, &expected);
|
||||
expected.traces.get_mut(&id(4)).unwrap().name = "Renamed mapping".into();
|
||||
let source = replacement(TRACE_SOURCE, "\"Mapping\"", "\"Renamed mapping\"");
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn explicit_trace_semantic_none_survives_snapshot_prose_edit() {
|
||||
let mut expected = trace_project();
|
||||
let original = checked_fixture(TRACE_SOURCE, &expected);
|
||||
expected
|
||||
.traces
|
||||
.get_mut(&id(4))
|
||||
.unwrap()
|
||||
.baseline
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.oa
|
||||
.description = "Revised OA snapshot".into();
|
||||
let source = replacement(
|
||||
TRACE_SOURCE,
|
||||
"\"Old OA snapshot\"",
|
||||
"\"Revised OA snapshot\"",
|
||||
);
|
||||
assert_preserved_update(&original, &expected, &source);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn constructor_change_removes_inapplicable_default_and_keeps_shared_default() {
|
||||
let mut expected = project();
|
||||
expected.elements = [
|
||||
element(
|
||||
2,
|
||||
"owner",
|
||||
"Owner",
|
||||
None,
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Scenario {
|
||||
viewpoint: ScenarioViewpoint::MixedLegacy,
|
||||
context: None,
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
steps: vec![id(3)],
|
||||
})),
|
||||
),
|
||||
element(
|
||||
3,
|
||||
"subject",
|
||||
"Subject",
|
||||
Some(id(2)),
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::Action {
|
||||
action: None,
|
||||
lifeline: None,
|
||||
},
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
})),
|
||||
),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|element| (element.id, element))
|
||||
.collect();
|
||||
let original = checked_fixture(CONSTRUCTOR_SOURCE, &expected);
|
||||
expected.elements.get_mut(&id(3)).unwrap().body =
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Occurrence {
|
||||
body: OccurrenceBody::State {
|
||||
state: None,
|
||||
lifeline: None,
|
||||
},
|
||||
precondition: String::new(),
|
||||
postcondition: String::new(),
|
||||
}));
|
||||
// Remove only the inapplicable field's syntax: its separating space and all
|
||||
// surrounding trivia stay. The shared lifeline spelling/comment is exact.
|
||||
let source = replacement(CONSTRUCTOR_SOURCE, "body { Action {", "body { State {");
|
||||
let compact = replacement(&source, "action none;", " ");
|
||||
let expanded = replacement(
|
||||
&compact,
|
||||
" }; };",
|
||||
" state none;\n }; };",
|
||||
);
|
||||
// Omission of newly applicable state and explicit state none both mean the
|
||||
// literal State target; neither may retain the old action field.
|
||||
assert_context_update(&original, &expected, &[compact, expanded]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn relation_kind_change_updates_explicit_value_when_context_default_changes() {
|
||||
let mut expected = project();
|
||||
expected.elements = [
|
||||
element(2, "first", "First", None, ElementBody::Oa(OaBody::Entity)),
|
||||
element(3, "second", "Second", None, ElementBody::Oa(OaBody::Entity)),
|
||||
element(
|
||||
5,
|
||||
"output",
|
||||
"Output",
|
||||
Some(id(2)),
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Port {
|
||||
contract: PortContract::Legacy,
|
||||
legacy: Some(LegacyPortContract {
|
||||
direction: PortDirection::Out,
|
||||
interface: None,
|
||||
}),
|
||||
})),
|
||||
),
|
||||
element(
|
||||
6,
|
||||
"input",
|
||||
"Input",
|
||||
Some(id(3)),
|
||||
ElementBody::Oa(OaBody::Shared(SharedBody::Port {
|
||||
contract: PortContract::Legacy,
|
||||
legacy: Some(LegacyPortContract {
|
||||
direction: PortDirection::In,
|
||||
interface: None,
|
||||
}),
|
||||
})),
|
||||
),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|element| (element.id, element))
|
||||
.collect();
|
||||
expected.relations.insert(
|
||||
id(4),
|
||||
Relation {
|
||||
id: id(4),
|
||||
alias: "link".into(),
|
||||
name: "Link".into(),
|
||||
description: String::new(),
|
||||
body: RelationBody::BoundaryExchange {
|
||||
source: id(5),
|
||||
target: id(6),
|
||||
oriented: true,
|
||||
items: vec![],
|
||||
},
|
||||
},
|
||||
);
|
||||
let original = checked_fixture(RELATION_CONTEXT_SOURCE, &expected);
|
||||
// BoundaryExchange connects participant ports; CommunicationMean connects
|
||||
// their OA entity owners. Endpoint changes are explicit parts of this target,
|
||||
// not inferred or normalized away. Port records remain exactly unchanged.
|
||||
expected.relations.get_mut(&id(4)).unwrap().body = RelationBody::CommunicationMean {
|
||||
source: id(2),
|
||||
target: id(3),
|
||||
oriented: false,
|
||||
items: vec![],
|
||||
};
|
||||
let source = replacement(
|
||||
RELATION_CONTEXT_SOURCE,
|
||||
"boundary_exchange link",
|
||||
"communication_mean link",
|
||||
);
|
||||
let source = replacement(&source, "source @output;", "source @first;");
|
||||
let source = replacement(&source, "target @input;", "target @second;");
|
||||
let explicit = replacement(&source, "oriented true ;", "oriented false ;");
|
||||
// Three spaces between name/value plus one before the semicolon survive
|
||||
// syntax removal. The following rationale comment and all other bytes stay.
|
||||
let omitted = replacement(&source, "oriented true ;", " ");
|
||||
assert_context_update(&original, &expected, &[explicit, omitted]);
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
//! Public update witnesses for compact insertion and complete comparison.
|
||||
use oa_core::{language, source_project::*, *};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
fn compile(body: &str) -> CompiledSourceProject {
|
||||
compile_bundle(
|
||||
&SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([
|
||||
(
|
||||
"project.arcadia".into(),
|
||||
"arcadia 7; project p \"P\" { include \"model.arcadia\"; }".into(),
|
||||
),
|
||||
("model.arcadia".into(), body.into()),
|
||||
]),
|
||||
},
|
||||
ProjectLimits::default(),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
fn id(project: &Project, alias: &str) -> Id {
|
||||
project
|
||||
.identities()
|
||||
.into_iter()
|
||||
.find(|(_, a)| *a == alias)
|
||||
.unwrap()
|
||||
.0
|
||||
}
|
||||
fn update(before: &CompiledSourceProject, project: &Project) -> CompiledSourceProject {
|
||||
let result = update_bundle(before, project, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(result.decoded.project, *project);
|
||||
assert_eq!(
|
||||
result.bundle.files["project.arcadia"],
|
||||
before.bundle.files["project.arcadia"]
|
||||
);
|
||||
assert_eq!(
|
||||
compile_bundle(&result.bundle, ProjectLimits::default())
|
||||
.unwrap()
|
||||
.bundle,
|
||||
result.bundle
|
||||
);
|
||||
assert_eq!(
|
||||
update_bundle(&result, project, ProjectLimits::default())
|
||||
.unwrap()
|
||||
.bundle,
|
||||
result.bundle
|
||||
);
|
||||
result
|
||||
}
|
||||
fn words(text: &str) -> Vec<&str> {
|
||||
language::tokenize(text)
|
||||
.into_iter()
|
||||
.filter(|t| {
|
||||
!matches!(
|
||||
t.class,
|
||||
language::TokenClass::Whitespace | language::TokenClass::Comment
|
||||
)
|
||||
})
|
||||
.map(|t| &text[t.span.start..t.span.end])
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn omitted_exchange_body_changes_to_one_compact_action_constructor() {
|
||||
let before = compile(
|
||||
"oa_scenario s \"S\" { steps [@o]; }\noa_occurrence o \"O\" { parent @s; // keep this\n}\n",
|
||||
);
|
||||
let mut project = before.decoded.project.clone();
|
||||
let occurrence = id(&project, "o");
|
||||
let Some(SharedBody::Occurrence { body, .. }) =
|
||||
project.elements.get_mut(&occurrence).unwrap().shared_mut()
|
||||
else {
|
||||
panic!("occurrence")
|
||||
};
|
||||
assert!(matches!(body, OccurrenceBody::Exchange { .. }));
|
||||
*body = OccurrenceBody::Action {
|
||||
action: None,
|
||||
lifeline: None,
|
||||
};
|
||||
let result = update(&before, &project);
|
||||
let text = &result.bundle.files["model.arcadia"];
|
||||
let tokens = words(text);
|
||||
assert_eq!(tokens.iter().filter(|&&t| t == "body").count(), 1);
|
||||
assert!(tokens.contains(&"Action"));
|
||||
for absent in ["Exchange", "action", "lifeline", "operation", "description"] {
|
||||
assert!(!tokens.contains(&absent), "{absent}: {text}");
|
||||
}
|
||||
assert!(text.contains("parent @s; // keep this"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_signal_constructor_still_inserts_its_required_empty_items() {
|
||||
let before =
|
||||
compile("oa_event e \"E\" { body { Time { expression \"1 s\"; kind After; }; }; }\n");
|
||||
let mut project = before.decoded.project.clone();
|
||||
let event = id(&project, "e");
|
||||
let Some(SharedBody::Event { body }) = project.elements.get_mut(&event).unwrap().shared_mut()
|
||||
else {
|
||||
panic!("event")
|
||||
};
|
||||
*body = EventBody::Signal { items: vec![] };
|
||||
let result = update(&before, &project);
|
||||
let tokens = words(&result.bundle.files["model.arcadia"]);
|
||||
assert!(tokens.contains(&"Signal"));
|
||||
assert!(tokens.windows(4).any(|w| w == ["items", "[", "]", ";"]));
|
||||
assert!(!tokens.contains(&"expression"));
|
||||
assert!(!tokens.contains(&"kind"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scalar_to_default_string_record_retains_required_minimum_only() {
|
||||
let before = compile("oa_data_type t \"T\" { definition Boolean; // typed rationale\n}\n");
|
||||
let mut project = before.decoded.project.clone();
|
||||
let datatype = id(&project, "t");
|
||||
let Some(SharedBody::DataType { definition, .. }) =
|
||||
project.elements.get_mut(&datatype).unwrap().shared_mut()
|
||||
else {
|
||||
panic!("data type")
|
||||
};
|
||||
*definition = DataTypeDefinition::String {
|
||||
minimum_length: 0,
|
||||
maximum_length: None,
|
||||
};
|
||||
let result = update(&before, &project);
|
||||
let text = &result.bundle.files["model.arcadia"];
|
||||
let tokens = words(text);
|
||||
assert!(tokens.contains(&"String"));
|
||||
assert!(tokens.windows(3).any(|w| w == ["minimum_length", "0", ";"]));
|
||||
assert!(!tokens.contains(&"maximum_length"));
|
||||
assert!(text.contains("// typed rationale"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn inserted_route_list_item_omits_only_optional_fields() {
|
||||
let before = compile(
|
||||
"oa_activity a \"A\" {}\noa_activity b \"B\" {}\ninteraction flow \"Flow\" { source @a; target @b; }\ndiagram d \"D\" { routes []; // routing rationale\n}\n",
|
||||
);
|
||||
let mut project = before.decoded.project.clone();
|
||||
let diagram = id(&project, "d");
|
||||
let edge = id(&project, "flow");
|
||||
// Deserialize only the explicit witness value, independently of omission policy.
|
||||
project.diagrams.get_mut(&diagram).unwrap().routes =
|
||||
serde_json::from_value(serde_json::json!([{"edge":edge,"waypoints":[],"label":null}]))
|
||||
.unwrap();
|
||||
let result = update(&before, &project);
|
||||
let text = &result.bundle.files["model.arcadia"];
|
||||
let tokens = words(text);
|
||||
assert!(tokens.windows(4).any(|w| w == ["edge", "@", "flow", ";"]));
|
||||
assert!(!tokens.contains(&"waypoints"));
|
||||
assert!(!tokens.contains(&"label"));
|
||||
assert!(text.contains("// routing rationale"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn zero_sign_change_inserts_position_without_default_siblings() {
|
||||
let before = compile(
|
||||
"oa_activity a \"A\" {}\ndiagram d \"D\" {}\nnode n { diagram @d; element @a; // placement rationale\n}\n",
|
||||
);
|
||||
let mut project = before.decoded.project.clone();
|
||||
let diagram = id(&project, "d");
|
||||
let node = id(&project, "n");
|
||||
assert_eq!(
|
||||
project.diagrams[&diagram].nodes[&node].position.x.to_bits(),
|
||||
0.0_f32.to_bits()
|
||||
);
|
||||
project
|
||||
.diagrams
|
||||
.get_mut(&diagram)
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&node)
|
||||
.unwrap()
|
||||
.position
|
||||
.x = -0.0;
|
||||
let result = update(&before, &project);
|
||||
assert_eq!(
|
||||
result.decoded.project.diagrams[&diagram].nodes[&node]
|
||||
.position
|
||||
.x
|
||||
.to_bits(),
|
||||
(-0.0_f32).to_bits()
|
||||
);
|
||||
let text = &result.bundle.files["model.arcadia"];
|
||||
let tokens = words(text);
|
||||
assert!(tokens.windows(3).any(|w| w == ["x", "-0.0", ";"]));
|
||||
for absent in ["size", "collapsed", "port_anchors"] {
|
||||
assert!(!tokens.contains(&absent));
|
||||
}
|
||||
assert!(text.contains("// placement rationale"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn kind_change_materializes_unchanged_value_when_its_old_omission_default_changes() {
|
||||
let before = compile(
|
||||
"oa_entity a \"A\" {}\noa_entity b \"B\" {}\noa_port out \"Out\" { parent @a; contract Legacy; legacy { direction Out; }; }\noa_port input \"In\" { parent @b; contract Legacy; legacy { direction In; }; }\nboundary_exchange flow \"Flow\" { source @out; target @input; // orientation inherited\n}\n",
|
||||
);
|
||||
let mut project = before.decoded.project.clone();
|
||||
let flow = id(&project, "flow");
|
||||
assert!(matches!(
|
||||
project.relations[&flow].body,
|
||||
RelationBody::BoundaryExchange { oriented: true, .. }
|
||||
));
|
||||
project.relations.get_mut(&flow).unwrap().body = RelationBody::CommunicationMean {
|
||||
source: id(&before.decoded.project, "a"),
|
||||
target: id(&before.decoded.project, "b"),
|
||||
oriented: true,
|
||||
items: vec![],
|
||||
};
|
||||
let result = update(&before, &project);
|
||||
let text = &result.bundle.files["model.arcadia"];
|
||||
assert!(
|
||||
words(text)
|
||||
.windows(3)
|
||||
.any(|w| w == ["oriented", "true", ";"])
|
||||
);
|
||||
assert!(text.contains("// orientation inherited"));
|
||||
let before_ports = &before.bundle.files["model.arcadia"];
|
||||
assert_eq!(
|
||||
text.split("communication_mean").next().unwrap(),
|
||||
before_ports.split("boundary_exchange").next().unwrap()
|
||||
);
|
||||
}
|
||||
@@ -3,6 +3,16 @@ use oa_core::{language, persistence, validation, *};
|
||||
fn read(source: &str) -> Project {
|
||||
language::parse(source).unwrap_or_else(|e| panic!("{e:?}\n{source}"))
|
||||
}
|
||||
fn replace_once(source: &str, before: &str, after: &str) -> String {
|
||||
assert_eq!(
|
||||
source.matches(before).count(),
|
||||
1,
|
||||
"unique mutation anchor {before:?}"
|
||||
);
|
||||
let changed = source.replacen(before, after, 1);
|
||||
assert_ne!(changed, source, "test mutation must change the source");
|
||||
changed
|
||||
}
|
||||
fn rejected(source: &str, fragment: &str) {
|
||||
let errors = language::parse(source).expect_err(source);
|
||||
assert!(
|
||||
@@ -753,8 +763,8 @@ fn typed_events_vertices_and_transition_kinds_round_trip_in_both_layers() {
|
||||
source.push('}');
|
||||
let model = read(&source);
|
||||
let canonical = language::format(&model);
|
||||
assert!(!canonical.contains("transition_kind External;"));
|
||||
for fragment in [
|
||||
"transition_kind External;",
|
||||
"transition_kind Local;",
|
||||
"transition_kind Internal;",
|
||||
"triggers [@deadline, @assess];",
|
||||
@@ -776,6 +786,7 @@ fn typed_events_vertices_and_transition_kinds_round_trip_in_both_layers() {
|
||||
.find(|r| r.alias == "recover")
|
||||
.unwrap();
|
||||
let RelationBody::StateTransition {
|
||||
transition_kind,
|
||||
trigger,
|
||||
guard,
|
||||
effect,
|
||||
@@ -784,32 +795,42 @@ fn typed_events_vertices_and_transition_kinds_round_trip_in_both_layers() {
|
||||
else {
|
||||
panic!("expected transition")
|
||||
};
|
||||
assert_eq!(*transition_kind, TransitionKind::External);
|
||||
assert_eq!(trigger, "Operator confirms\nНе запускать код");
|
||||
assert_eq!(guard, "available && status == \"Ready\"");
|
||||
assert_eq!(effect, "Record the assessment");
|
||||
// External is omitted in compact output. Insert an explicit invalid
|
||||
// discriminator into Recover using its unique, nondefault trigger list.
|
||||
let invalid_kind = replace_once(
|
||||
&canonical,
|
||||
"triggers [@deadline, @assess];",
|
||||
"transition_kind Unsupported;\n triggers [@deadline, @assess];",
|
||||
);
|
||||
rejected(&invalid_kind, "Unsupported");
|
||||
for invalid in [
|
||||
canonical.replace("transition_kind External;", "transition_kind Unsupported;"),
|
||||
canonical.replace(
|
||||
replace_once(
|
||||
&canonical,
|
||||
"triggers [@deadline, @assess];",
|
||||
"triggers [\"deadline\", @assess];",
|
||||
),
|
||||
canonical.replace(
|
||||
replace_once(
|
||||
&canonical,
|
||||
"triggers [@deadline, @assess];",
|
||||
"triggers [@deadline, @deadline];",
|
||||
),
|
||||
canonical.replace("effects [@assess];", "effects [@payload];"),
|
||||
canonical.replace("kind After;", "kind Relative;"),
|
||||
canonical.replace("items [@payload];", "items [@assess];"),
|
||||
replace_once(&canonical, "effects [@assess];", "effects [@payload];"),
|
||||
replace_once(&canonical, "kind After;", "kind Relative;"),
|
||||
replace_once(&canonical, "items [@payload];", "items [@assess];"),
|
||||
] {
|
||||
assert!(
|
||||
language::parse(&invalid).is_err(),
|
||||
"invalid typed state/event source accepted"
|
||||
);
|
||||
}
|
||||
let legacy = canonical
|
||||
.replace("transition_kind External;", "")
|
||||
.replace("triggers [@deadline, @assess];", "")
|
||||
.replace("effects [@assess];", "");
|
||||
// Canonical source already omits External. Removing the supplied lists
|
||||
// independently exercises their empty omission defaults and retained prose.
|
||||
let legacy = replace_once(&canonical, "triggers [@deadline, @assess];", "");
|
||||
let legacy = replace_once(&legacy, "effects [@assess];", "");
|
||||
let legacy = read(&legacy);
|
||||
let RelationBody::StateTransition {
|
||||
transition_kind,
|
||||
@@ -829,7 +850,7 @@ fn typed_events_vertices_and_transition_kinds_round_trip_in_both_layers() {
|
||||
(retained_trigger, retained_guard, retained_effect),
|
||||
(trigger, guard, effect)
|
||||
);
|
||||
let draft = canonical.replace("expression \"30 s\";", "expression \"\";");
|
||||
let draft = replace_once(&canonical, "expression \"30 s\";", "expression \"\";");
|
||||
assert!(language::parse(&draft).is_ok());
|
||||
let deadline = model
|
||||
.elements
|
||||
@@ -1038,7 +1059,7 @@ fn original_v2_text_and_json_preserve_identity_and_mixed_scenarios_after_extensi
|
||||
"fixture must cover actual old scenario content"
|
||||
);
|
||||
let canonical = language::format(&from_source);
|
||||
assert!(canonical.contains("viewpoint MixedLegacy;"));
|
||||
assert!(!canonical.contains("viewpoint MixedLegacy;"));
|
||||
for relation in from_source.relations.values() {
|
||||
if let RelationBody::StateTransition {
|
||||
transition_kind,
|
||||
|
||||
@@ -767,7 +767,15 @@ fn resetting_last_source_anchors_preserves_comments_and_can_add_a_new_manual_rec
|
||||
assert_eq!(cleared.decoded.project, prepared.project);
|
||||
let text = &cleared.bundle.files["project.arcadia"];
|
||||
assert!(text.contains("// first rationale") && text.contains("// second rationale"));
|
||||
assert!(!text.contains("port_anchors"));
|
||||
// Lossless editing may retain the authored empty field and its annotations.
|
||||
// Canonical export, rather than a model update, normalizes default syntax.
|
||||
assert!(!language::format(&cleared.decoded.project).contains("port_anchors"));
|
||||
assert_eq!(
|
||||
update_bundle(&cleared, &cleared.decoded.project, ProjectLimits::default())
|
||||
.unwrap()
|
||||
.bundle,
|
||||
cleared.bundle
|
||||
);
|
||||
let prepared = prepare_command(
|
||||
&cleared.decoded.project,
|
||||
&Command::SetPortAnchor {
|
||||
|
||||
@@ -269,9 +269,6 @@ impl App {
|
||||
.map(|request| request.job);
|
||||
return task;
|
||||
}
|
||||
nav::SymbolEvent::Close => {
|
||||
return self.show_text_drawer(None);
|
||||
}
|
||||
nav::SymbolEvent::Back => {
|
||||
self.source_symbol_back();
|
||||
// A successful Back needs no empty results panel. Retain an
|
||||
|
||||
@@ -85,6 +85,11 @@ fn symbol(app: &mut App, event: nav::SymbolEvent) {
|
||||
send(app, message);
|
||||
}
|
||||
|
||||
fn close_drawer(app: &mut App) {
|
||||
let message = Message::TextWorkspace(TextEvent::HideDrawer(app.text_drawer_context()));
|
||||
send(app, message);
|
||||
}
|
||||
|
||||
fn choice(app: &App, stamp: query::QueryStamp, reference: bool, index: usize) -> Message {
|
||||
app.source_symbol_message(nav::SymbolEvent::Choose {
|
||||
stamp,
|
||||
@@ -414,7 +419,7 @@ fn close_during_busy_retains_hidden_completion_without_reopening_or_navigation()
|
||||
let raw = app.source_workspace.bundle();
|
||||
let cursor = app.source_editor.cursor();
|
||||
assert!(references_visible(&app));
|
||||
symbol(&mut app, nav::SymbolEvent::Close);
|
||||
close_drawer(&mut app);
|
||||
assert!(app.text_workspace.drawer().is_none());
|
||||
assert_eq!(app.source_symbols.in_flight, Some(request.job));
|
||||
assert!(app.source_symbols.request.is_none());
|
||||
@@ -561,7 +566,7 @@ fn closed_results_stay_closed_on_exact_back_and_reopen_only_for_a_return_notice(
|
||||
let origin = app.source_editor.cursor();
|
||||
finish(&mut app, query::Action::Definition);
|
||||
reveal(&mut app);
|
||||
symbol(&mut app, nav::SymbolEvent::Close);
|
||||
close_drawer(&mut app);
|
||||
assert!(app.text_workspace.drawer().is_none() && app.source_symbols.results.is_some());
|
||||
if changed {
|
||||
// Use the workspace edit API to give the origin a new generation.
|
||||
@@ -1433,7 +1438,7 @@ fn stale_envelope_trial(reset: bool) {
|
||||
let old_messages = [
|
||||
app.source_symbol_message(nav::SymbolEvent::Query(query::Action::Definition)),
|
||||
app.source_symbol_message(nav::SymbolEvent::Back),
|
||||
app.source_symbol_message(nav::SymbolEvent::Close),
|
||||
Message::TextWorkspace(TextEvent::HideDrawer(app.text_drawer_context())),
|
||||
choice(&app, old_results.stamp, false, 0),
|
||||
];
|
||||
if reset {
|
||||
@@ -1494,7 +1499,7 @@ fn stale_envelope_trial(reset: bool) {
|
||||
// Replay once more with no busy-slot fallback and visible current results.
|
||||
assert_stale_envelopes_preserve_current(&mut app, &old_messages);
|
||||
let interaction = app.source_symbols.interaction;
|
||||
symbol(&mut app, nav::SymbolEvent::Close);
|
||||
close_drawer(&mut app);
|
||||
assert_ne!(app.source_symbols.interaction, interaction);
|
||||
assert!(app.text_workspace.drawer().is_none() && app.source_symbols.results.is_some());
|
||||
let next = begin(&mut app, query::Action::References);
|
||||
|
||||
@@ -10,7 +10,6 @@ pub enum SymbolEvent {
|
||||
DiagramUsages,
|
||||
Query(query::Action),
|
||||
Back,
|
||||
Close,
|
||||
Choose {
|
||||
stamp: query::QueryStamp,
|
||||
visit: Id,
|
||||
|
||||
@@ -1531,6 +1531,16 @@ fn checks(app: &App) -> View<'_, Message> {
|
||||
scrollable(out.padding(24)).into()
|
||||
}
|
||||
|
||||
#[cfg(all(test, debug_assertions))]
|
||||
pub(crate) fn captured_text_drawer_resize(app: &App) -> Message {
|
||||
text_workspace::capture_drawer_resize(app)
|
||||
}
|
||||
|
||||
#[cfg(all(test, debug_assertions))]
|
||||
pub(crate) fn captured_source_reference_stale_summary(app: &App) -> bool {
|
||||
text_workspace::summary_visibility_tests::rendered_stale(app)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::short;
|
||||
@@ -1584,13 +1594,3 @@ mod tests {
|
||||
assert_eq!(short("e\u{0301}B", 1), "…");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, debug_assertions))]
|
||||
pub(crate) fn captured_text_drawer_resize(app: &App) -> Message {
|
||||
text_workspace::capture_drawer_resize(app)
|
||||
}
|
||||
|
||||
#[cfg(all(test, debug_assertions))]
|
||||
pub(crate) fn captured_source_reference_stale_summary(app: &App) -> bool {
|
||||
text_workspace::summary_visibility_tests::rendered_stale(app)
|
||||
}
|
||||
|
||||
@@ -75,6 +75,164 @@ fn assert_pair(current: &StoredProject) {
|
||||
assert_eq!(compiled.bundle, current.source_project);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn explicit_empty_port_anchors_survive_http_move_and_restart_but_export_compactly() {
|
||||
fn replace_once(source: &mut String, before: &str, after: &str) {
|
||||
assert_eq!(
|
||||
source.matches(before).count(),
|
||||
1,
|
||||
"ambiguous or absent anchor: {before}"
|
||||
);
|
||||
let replacement = source.replacen(before, after, 1);
|
||||
assert_ne!(*source, replacement, "fixture mutation must change source");
|
||||
*source = replacement;
|
||||
}
|
||||
|
||||
async fn assert_exports(server: &TestServer, current: &StoredProject, node: Id) -> String {
|
||||
let response = server
|
||||
.client
|
||||
.get(server.url(&format!("/projects/{}/source-project", current.resource_id)))
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
assert_eq!(response.headers()["etag"], current.etag());
|
||||
assert_eq!(
|
||||
response.json::<SourceBundle>().await.unwrap(),
|
||||
current.source_project
|
||||
);
|
||||
|
||||
let response = server
|
||||
.client
|
||||
.get(server.url(&format!("/projects/{}/source", current.resource_id)))
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
let canonical = response.text().await.unwrap();
|
||||
assert_eq!(oa_core::language::parse(&canonical).unwrap(), current.model);
|
||||
assert_eq!(canonical, oa_core::language::format(¤t.model));
|
||||
let exported = compile_bundle(
|
||||
&SourceBundle {
|
||||
entry: "project.arcadia".into(),
|
||||
files: BTreeMap::from([("project.arcadia".into(), canonical.clone())]),
|
||||
},
|
||||
ProjectLimits::default(),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(exported.decoded.project, current.model);
|
||||
assert!(exported.index.declarations.contains_key(&node));
|
||||
assert!(
|
||||
!exported
|
||||
.index
|
||||
.fields
|
||||
.contains_key(&(node, "port_anchors".into()))
|
||||
);
|
||||
canonical
|
||||
}
|
||||
|
||||
let mut authored = source_bundle();
|
||||
replace_once(
|
||||
authored.files.get_mut("views.arcadia").unwrap(),
|
||||
"diagram @architecture; element @vessel;",
|
||||
"diagram @architecture; element @vessel;\n position { x 12.5; y -4.0; };\n port_anchors [] ; // Keep explicit automatic placement.\n",
|
||||
);
|
||||
let compiled = compile_bundle(&authored, ProjectLimits::default()).unwrap();
|
||||
assert_eq!(
|
||||
compiled.bundle, authored,
|
||||
"the HTTP fixture must already be stable"
|
||||
);
|
||||
let diagram = id(&compiled.decoded.project, "architecture");
|
||||
let node = id(&compiled.decoded.project, "actor_view");
|
||||
assert!(
|
||||
compiled
|
||||
.index
|
||||
.fields
|
||||
.contains_key(&(node, "port_anchors".into()))
|
||||
);
|
||||
assert_eq!(
|
||||
compiled.decoded.project.diagrams[&diagram].nodes[&node].position,
|
||||
oa_core::Position { x: 12.5, y: -4.0 }
|
||||
);
|
||||
assert!(
|
||||
compiled.decoded.project.diagrams[&diagram].nodes[&node]
|
||||
.port_anchors
|
||||
.is_empty()
|
||||
);
|
||||
|
||||
// Independent full-model oracle: only this placement coordinate changes.
|
||||
let mut expected_model = compiled.decoded.project.clone();
|
||||
expected_model
|
||||
.diagrams
|
||||
.get_mut(&diagram)
|
||||
.unwrap()
|
||||
.nodes
|
||||
.get_mut(&node)
|
||||
.unwrap()
|
||||
.position
|
||||
.x = 25.0;
|
||||
let mut expected_source = authored.clone();
|
||||
replace_once(
|
||||
expected_source.files.get_mut("views.arcadia").unwrap(),
|
||||
"x 12.5;",
|
||||
"x 25.0;",
|
||||
);
|
||||
|
||||
let directory = tempfile::tempdir().unwrap();
|
||||
let server = TestServer::start(directory.path(), None).await;
|
||||
let response = server
|
||||
.client
|
||||
.post(server.url("/projects/import-source-project"))
|
||||
.json(&authored)
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
let status = response.status();
|
||||
let value: Value = response.json().await.unwrap();
|
||||
assert_eq!(status, StatusCode::CREATED, "{value}");
|
||||
let original = server
|
||||
.get(value["resource_id"].as_str().unwrap().parse().unwrap())
|
||||
.await;
|
||||
assert_eq!(original.model, compiled.decoded.project);
|
||||
assert_eq!(original.source_project, authored);
|
||||
assert_pair(&original);
|
||||
assert_exports(&server, &original, node).await;
|
||||
|
||||
let response = transact(
|
||||
&server,
|
||||
&original,
|
||||
json!([{"MoveNode": {"diagram": diagram, "node": node,
|
||||
"position": {"x": 25.0, "y": -4.0}, "with_descendants": false}}]),
|
||||
false,
|
||||
)
|
||||
.await;
|
||||
let status = response.status();
|
||||
let value: Value = response.json().await.unwrap();
|
||||
assert_eq!(status, StatusCode::OK, "{value}");
|
||||
assert_eq!(value["changed"], true);
|
||||
let current = server.get(original.resource_id).await;
|
||||
assert_eq!(current.revision, original.revision + 1);
|
||||
assert_eq!(current.model, expected_model);
|
||||
// Exact bundle equality covers the explicit empty field, its rationale,
|
||||
// sibling placement, and all untouched files and source trivia.
|
||||
assert_eq!(current.source_project, expected_source);
|
||||
assert_pair(¤t);
|
||||
let canonical = assert_exports(&server, ¤t, node).await;
|
||||
|
||||
server.stop().await;
|
||||
let server = TestServer::start(directory.path(), None).await;
|
||||
let reopened = server.get(current.resource_id).await;
|
||||
assert_eq!(reopened.model, expected_model);
|
||||
assert_eq!(reopened.source_project, expected_source);
|
||||
assert_eq!(
|
||||
serde_json::to_value(&reopened).unwrap(),
|
||||
serde_json::to_value(¤t).unwrap()
|
||||
);
|
||||
assert_pair(&reopened);
|
||||
assert_eq!(assert_exports(&server, &reopened, node).await, canonical);
|
||||
server.stop().await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn port_anchor_http_commands_and_source_edits_preserve_per_view_state_after_restart() {
|
||||
let directory = tempfile::tempdir().unwrap();
|
||||
|
||||
+107
-16
@@ -2,7 +2,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="Docutils 0.22.2: https://docutils.sourceforge.io/" />
|
||||
<meta name="generator" content="Docutils 0.23: https://docutils.sourceforge.io/" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Arcadia Studio OA / SA Language and Editing Contract</title>
|
||||
<style type="text/css">
|
||||
@@ -806,11 +806,11 @@ references may be omitted and then mean <span class="docutils literal">none</spa
|
||||
These omissions are accepted in newly authored source 7, not only in schema-2
|
||||
compatibility input. Earlier schema admission of constructors and fields is
|
||||
still governed by its version rules.</p>
|
||||
<p>Canonical formatting writes the hydrated occurrence references and default
|
||||
<span class="docutils literal">message_kind</span>, <span class="docutils literal">reply_to</span> and <span class="docutils literal">values</span> explicitly. An absent
|
||||
<span class="docutils literal">operation</span> remains omitted in canonical output. Lossless no-op updates and
|
||||
unrelated name edits retain authored omissions; canonical formatting is a
|
||||
different operation. An admitted incomplete occurrence can still produce model
|
||||
<p>Canonical formatting omits optional occurrence references equal to <span class="docutils literal">none</span>,
|
||||
the default Asynchronous <span class="docutils literal">message_kind</span>, empty <span class="docutils literal">values</span>, and absent
|
||||
<span class="docutils literal">operation</span>. Required fields of a selected constructor remain present.
|
||||
Lossless updates retain unchanged explicit defaults and authored omissions;
|
||||
canonical formatting is a different operation. An admitted incomplete occurrence can still produce model
|
||||
checks requesting its missing work, exchange, lifeline or referenced scenario.</p>
|
||||
<table>
|
||||
<caption>Occurrence body constructors</caption>
|
||||
@@ -1569,29 +1569,40 @@ has no explicit default, and does not convey ownership or deletion of the type.<
|
||||
<thead>
|
||||
<tr><th class="head"><p>Constructor</p></th>
|
||||
<th class="head"><p>Required fields</p></th>
|
||||
<th class="head"><p>Optional fields (omission value)</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><p>Boolean</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Integer</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional signed 64-bit integers</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: signed 64-bit integers? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Real</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: optional finite IEEE-754 binary64 values</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">minimum</span>, <span class="docutils literal">maximum</span>: finite IEEE-754 binary64 values? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>String</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32; <span class="docutils literal">maximum_length</span>: optional u32</p></td>
|
||||
<td><p><span class="docutils literal">minimum_length</span>: u32</p></td>
|
||||
<td><p><span class="docutils literal">maximum_length</span>: u32? (none)</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Enumeration</p></td>
|
||||
<td><p><span class="docutils literal">literals</span>: unique nonempty, case-sensitive strings</p></td>
|
||||
<td><p>None</p></td>
|
||||
</tr>
|
||||
<tr><td><p>Record</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref?</p></td>
|
||||
<td><p>None</p></td>
|
||||
<td><p><span class="docutils literal">supertype</span>: same-layer Record ref? (none)</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Optional fields may be absent or explicitly <span class="docutils literal">none</span>. Selected String and
|
||||
Enumeration constructors still require <span class="docutils literal">minimum_length</span> and <span class="docutils literal">literals</span>,
|
||||
respectively, including zero and an empty list. Selecting a constructor does
|
||||
not merge fields from the default String definition. Unknown fields reject.</p>
|
||||
<p>Bounds are inclusive and ordered; an absent bound means unbounded within the
|
||||
represented numeric domain. Integer comparisons MUST NOT convert to binary64.
|
||||
NaN, infinities, overflow and reversed bounds reject. String length counts Unicode
|
||||
@@ -2439,10 +2450,27 @@ references, placements, artifacts, trace baselines, and ordered occurrences.
|
||||
Map order is irrelevant. The writer preserves signed coordinate zero and
|
||||
emits decimals that recover the original binary32 value.</p>
|
||||
<p>Canonical output uses LF, four-space indentation, explicit identities,
|
||||
defaults, and JSON-escaped strings. Elements are emitted in UUID order, then
|
||||
and JSON-escaped strings. It omits fields equal to the omission defaults of
|
||||
their actual declaration or selected constructor, as specified in the field
|
||||
tables. This includes an empty project description. It MUST NOT omit a required
|
||||
field merely because its value is zero, false, empty, or <span class="docutils literal">none</span>. Elements are emitted in UUID order, then
|
||||
relations; diagrams and their nodes follow, then artifacts, then traces.
|
||||
Fields use deterministic name order. Output ends with LF. Alias values come
|
||||
from the model, never from regenerating display names.</p>
|
||||
<p>Omission is context-sensitive: Scenario uses the source default MixedLegacy;
|
||||
BoundaryExchange and CommunicationMean have different orientation defaults;
|
||||
state declarations determine their state-kind discriminator. A nonempty or
|
||||
whitespace-only description remains exact. Present-empty optional strings or
|
||||
collections, unbounded multiplicity versus a finite default, selected operation
|
||||
intent, and negative coordinate zero remain distinct values. A nondefault
|
||||
geometry record retains all required coordinates or dimensions.</p>
|
||||
<p>Only specified optional fields inside selected constructors may be omitted.
|
||||
For example, Integer bounds and LegacyPortContract.interface may be absent;
|
||||
String.minimum_length, Signal.items, port-contract payload lists, and historical
|
||||
snapshot name/description fields remain required. A LegacyPortContract record
|
||||
still requires direction. Historical semantic baseline payloads are retained
|
||||
without generic empty/default pruning. Compact output MUST preserve every
|
||||
persistent model field after parsing, including these distinctions.</p>
|
||||
<p>Comments and input whitespace are lexical trivia to the canonical writer.
|
||||
Canonical export does not preserve them. The source-project editor and compiler
|
||||
preserve authored comments and whitespace on Apply while inserting missing
|
||||
@@ -2484,11 +2512,19 @@ independent parent and child moves are resolved together. Leading whitespace
|
||||
adjusts to the destination scope; other token spelling remains authored.</p>
|
||||
<p>Updates MUST NOT canonicalize surviving declarations in full. Header, field and
|
||||
nested value positions are derived from the existing syntax parser. Unchanged
|
||||
fields retain their exact bytes, including field order, omitted defaults, number
|
||||
fields retain their exact bytes, including field order, explicit and omitted defaults, number
|
||||
and string spelling, comments, indentation and line endings. Changed literals and
|
||||
references replace only the required tokens; a reference with comments between
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted default is
|
||||
inserted only if its semantic value changes. New fields use the existing record's
|
||||
<span class="docutils literal">@</span> and its alias retains those comments. A previously omitted field is
|
||||
inserted only when needed to express the requested value in its new declaration
|
||||
context. This includes an unchanged value whose omission default changes with
|
||||
the declaration kind. For example, changing BoundaryExchange to CommunicationMean
|
||||
while retaining orientation true requires <span class="docutils literal">oriented true;</span> if previously
|
||||
implicit. Unchanged explicit defaults MUST survive unrelated sibling edits,
|
||||
including persistence-serializer omissions such as <span class="docutils literal">operation none</span>,
|
||||
<span class="docutils literal">port_anchors []</span> and <span class="docutils literal">baseline.semantic none</span>. New fields and value fragments
|
||||
use compact generation while retaining required selected-constructor payloads.
|
||||
New fields use the existing record's
|
||||
indentation and line-ending style without reformatting its other fields.</p>
|
||||
<p>A constructor tag change retains shared nested fields in place. Removed fields,
|
||||
constructors and declarations remove syntax tokens, retaining their comments
|
||||
@@ -2618,6 +2654,26 @@ placement move are different transactions. The UI MUST identify which operation
|
||||
will occur. Reparenting work must not silently change its performer. A computed
|
||||
parent summary must remain distinguishable from direct allocation. A collapse
|
||||
operation hides presentation detail without deleting the children.</p>
|
||||
<p>In an Allocation view, dragging an Activity or Function body MAY combine a
|
||||
performer change with diagram placement. The preview MUST identify the
|
||||
destination and preserve readable work and destination identity. Destination
|
||||
identity is shown outside the canvas, independently of explanatory or refusal
|
||||
text. The outlined target's hit region remains fixed throughout the gesture;
|
||||
feedback MUST NOT obscure the work or change its pointer-relative placement.
|
||||
A clean click selects without applying unrelated drafts. A refused work press
|
||||
with an unapplied property draft MUST preserve its text, caret and focused
|
||||
editor. An accepted drag is one atomic model/source/history transaction:
|
||||
semantic ownership and work identities are
|
||||
preserved; only leaf direct Allocation relations, their own retired routes and
|
||||
the affected view geometry change. Existing Allocation identities are retained
|
||||
on reassignment. Role realizations and assignments MUST NOT be silently changed. Uniform work groups
|
||||
may move their leaf responsibilities together; ambiguous or distributed groups
|
||||
and changes requiring collateral record edits MUST be refused with an explanation.
|
||||
Moving outside performer regions removes direct assignment only when the
|
||||
effective role responsibility is also absent. Releasing outside the viewport
|
||||
cancels the gesture. Explicit Arrange next drag applies geometry alone for one
|
||||
gesture. Refused and snapped no-op drops MUST NOT create history entries or
|
||||
discard Redo. Undo restores the exact source bundle and identities together.</p>
|
||||
<p>Applying a reachable source bundle is one model transaction. Graphical edits
|
||||
update its owning declarations through the source-preserving updater. Both
|
||||
paths validate their candidate and model/source equality before
|
||||
@@ -2719,6 +2775,40 @@ leaving dangling references. Deleting a sequence does not delete the semantic
|
||||
exchanges it references. Cross-layer counterparts are not owned descendants.
|
||||
Text edits describe a complete candidate and must remove or repair dependencies
|
||||
explicitly before Apply succeeds.</p>
|
||||
<section id="focused-diagram-removal">
|
||||
<h3>8.1. Focused diagram removal</h3>
|
||||
<p>Delete is scoped to the focused diagram and the exact visible selection.
|
||||
Text fields retain their own Delete behavior; diagram shortcuts MUST NOT apply
|
||||
pending property, source or behavior drafts. Keyboard traversal retires diagram
|
||||
input admission before subsequent keys in the same event batch are processed.
|
||||
Active placement, creation, connection, reorder and pan gestures do not authorize
|
||||
removal. A stale document, revision, owner or selection MUST NOT redirect removal.</p>
|
||||
<p>For an explicit architecture or state placement, Delete removes that placement
|
||||
only. The semantic element and its placements in other views remain. Shift+Delete
|
||||
requests confirmed deletion of the semantic element, including when selection
|
||||
originated from Placement properties. A selected architecture route bend takes
|
||||
priority: plain Delete removes the bend without removing its edge.</p>
|
||||
<p>A visible relation with no placement, including a state action or internal
|
||||
transition row, uses confirmed relation deletion for either key. States and
|
||||
referenced Activity/Function definitions remain. Hidden or collapsed rows are
|
||||
not keyboard deletion targets.</p>
|
||||
<p>Process and scenario projections have no independent occurrence placements.
|
||||
Delete and Shift+Delete request confirmed removal of the selected occurrence,
|
||||
participant or maintained link. A link's endpoints and outbound reusable
|
||||
definitions are preserved. Removing a fragment or branch removes its owned
|
||||
subtree. Removing a scenario participant preserves its represented element and
|
||||
retains occurrences with affected participant references cleared; resulting
|
||||
incomplete references remain visible for repair. The modeled scenario Delete
|
||||
message is a separate domain event and is not this editing shortcut.</p>
|
||||
<p>A qualified selection inside an expanded reusable process MUST NOT silently
|
||||
delete the outer reference or shared definition item. The editor directs the
|
||||
user to open the definition or explicitly select the outer reference.</p>
|
||||
<p>Confirmation identifies the captured object and removal effect. Cancel and
|
||||
Escape preserve model, source and history. A confirmation token belongs to one
|
||||
dialog; changes to its document, revision, owner or selected identity invalidate
|
||||
it. Accepted deletion uses one ordinary model/source transaction, and Undo
|
||||
restores the exact complete accepted source bundle and model.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="persistence-and-explicit-migration">
|
||||
<h2>9. Persistence and explicit migration</h2>
|
||||
@@ -2793,8 +2883,9 @@ This compatibility applies equally to source and JSON. It adds explicit
|
||||
defaults without changing any prior identity, name, reference, order, geometry,
|
||||
artifact or trace field. The original V2 golden source/JSON in
|
||||
<span class="docutils literal"><span class="pre">crates/oa-core/tests/fixtures</span></span> MUST NOT be regenerated from the newer demo;
|
||||
they verify that every old persistent field survives. Canonical output writes
|
||||
the added defaults through explicit migration to the current schema 7.</p>
|
||||
they verify that every old persistent field survives. Canonical output uses
|
||||
the current schema 7 and omits values equal to its specified source defaults;
|
||||
parsing recovers the complete migrated model.</p>
|
||||
<p>The V2 adapter preserves every original identity, alias, prose, parent,
|
||||
placement, trace and artifact. Generic ports become Legacy with their original
|
||||
direction/interface record. Existing FE endpoint IDs remain unchanged. For
|
||||
|
||||
+56
-16
@@ -171,11 +171,11 @@ These omissions are accepted in newly authored source 7, not only in schema-2
|
||||
compatibility input. Earlier schema admission of constructors and fields is
|
||||
still governed by its version rules.
|
||||
|
||||
Canonical formatting writes the hydrated occurrence references and default
|
||||
``message_kind``, ``reply_to`` and ``values`` explicitly. An absent
|
||||
``operation`` remains omitted in canonical output. Lossless no-op updates and
|
||||
unrelated name edits retain authored omissions; canonical formatting is a
|
||||
different operation. An admitted incomplete occurrence can still produce model
|
||||
Canonical formatting omits optional occurrence references equal to ``none``,
|
||||
the default Asynchronous ``message_kind``, empty ``values``, and absent
|
||||
``operation``. Required fields of a selected constructor remain present.
|
||||
Lossless updates retain unchanged explicit defaults and authored omissions;
|
||||
canonical formatting is a different operation. An admitted incomplete occurrence can still produce model
|
||||
checks requesting its missing work, exchange, lifeline or referenced scenario.
|
||||
|
||||
.. list-table:: Occurrence body constructors
|
||||
@@ -933,18 +933,30 @@ DataTypeDefinition has exactly the following constructors:
|
||||
|
||||
* - Constructor
|
||||
- Required fields
|
||||
- Optional fields (omission value)
|
||||
* - Boolean
|
||||
- None
|
||||
- None
|
||||
* - Integer
|
||||
- ``minimum``, ``maximum``: optional signed 64-bit integers
|
||||
- None
|
||||
- ``minimum``, ``maximum``: signed 64-bit integers? (none)
|
||||
* - Real
|
||||
- ``minimum``, ``maximum``: optional finite IEEE-754 binary64 values
|
||||
- None
|
||||
- ``minimum``, ``maximum``: finite IEEE-754 binary64 values? (none)
|
||||
* - String
|
||||
- ``minimum_length``: u32; ``maximum_length``: optional u32
|
||||
- ``minimum_length``: u32
|
||||
- ``maximum_length``: u32? (none)
|
||||
* - Enumeration
|
||||
- ``literals``: unique nonempty, case-sensitive strings
|
||||
- None
|
||||
* - Record
|
||||
- ``supertype``: same-layer Record ref?
|
||||
- None
|
||||
- ``supertype``: same-layer Record ref? (none)
|
||||
|
||||
Optional fields may be absent or explicitly ``none``. Selected String and
|
||||
Enumeration constructors still require ``minimum_length`` and ``literals``,
|
||||
respectively, including zero and an empty list. Selecting a constructor does
|
||||
not merge fields from the default String definition. Unknown fields reject.
|
||||
|
||||
Bounds are inclusive and ordered; an absent bound means unbounded within the
|
||||
represented numeric domain. Integer comparisons MUST NOT convert to binary64.
|
||||
@@ -1840,11 +1852,30 @@ Map order is irrelevant. The writer preserves signed coordinate zero and
|
||||
emits decimals that recover the original binary32 value.
|
||||
|
||||
Canonical output uses LF, four-space indentation, explicit identities,
|
||||
defaults, and JSON-escaped strings. Elements are emitted in UUID order, then
|
||||
and JSON-escaped strings. It omits fields equal to the omission defaults of
|
||||
their actual declaration or selected constructor, as specified in the field
|
||||
tables. This includes an empty project description. It MUST NOT omit a required
|
||||
field merely because its value is zero, false, empty, or ``none``. Elements are emitted in UUID order, then
|
||||
relations; diagrams and their nodes follow, then artifacts, then traces.
|
||||
Fields use deterministic name order. Output ends with LF. Alias values come
|
||||
from the model, never from regenerating display names.
|
||||
|
||||
Omission is context-sensitive: Scenario uses the source default MixedLegacy;
|
||||
BoundaryExchange and CommunicationMean have different orientation defaults;
|
||||
state declarations determine their state-kind discriminator. A nonempty or
|
||||
whitespace-only description remains exact. Present-empty optional strings or
|
||||
collections, unbounded multiplicity versus a finite default, selected operation
|
||||
intent, and negative coordinate zero remain distinct values. A nondefault
|
||||
geometry record retains all required coordinates or dimensions.
|
||||
|
||||
Only specified optional fields inside selected constructors may be omitted.
|
||||
For example, Integer bounds and LegacyPortContract.interface may be absent;
|
||||
String.minimum_length, Signal.items, port-contract payload lists, and historical
|
||||
snapshot name/description fields remain required. A LegacyPortContract record
|
||||
still requires direction. Historical semantic baseline payloads are retained
|
||||
without generic empty/default pruning. Compact output MUST preserve every
|
||||
persistent model field after parsing, including these distinctions.
|
||||
|
||||
Comments and input whitespace are lexical trivia to the canonical writer.
|
||||
Canonical export does not preserve them. The source-project editor and compiler
|
||||
preserve authored comments and whitespace on Apply while inserting missing
|
||||
@@ -1890,11 +1921,19 @@ adjusts to the destination scope; other token spelling remains authored.
|
||||
|
||||
Updates MUST NOT canonicalize surviving declarations in full. Header, field and
|
||||
nested value positions are derived from the existing syntax parser. Unchanged
|
||||
fields retain their exact bytes, including field order, omitted defaults, number
|
||||
fields retain their exact bytes, including field order, explicit and omitted defaults, number
|
||||
and string spelling, comments, indentation and line endings. Changed literals and
|
||||
references replace only the required tokens; a reference with comments between
|
||||
``@`` and its alias retains those comments. A previously omitted default is
|
||||
inserted only if its semantic value changes. New fields use the existing record's
|
||||
``@`` and its alias retains those comments. A previously omitted field is
|
||||
inserted only when needed to express the requested value in its new declaration
|
||||
context. This includes an unchanged value whose omission default changes with
|
||||
the declaration kind. For example, changing BoundaryExchange to CommunicationMean
|
||||
while retaining orientation true requires ``oriented true;`` if previously
|
||||
implicit. Unchanged explicit defaults MUST survive unrelated sibling edits,
|
||||
including persistence-serializer omissions such as ``operation none``,
|
||||
``port_anchors []`` and ``baseline.semantic none``. New fields and value fragments
|
||||
use compact generation while retaining required selected-constructor payloads.
|
||||
New fields use the existing record's
|
||||
indentation and line-ending style without reformatting its other fields.
|
||||
|
||||
A constructor tag change retains shared nested fields in place. Removed fields,
|
||||
@@ -2173,7 +2212,7 @@ Text edits describe a complete candidate and must remove or repair dependencies
|
||||
explicitly before Apply succeeds.
|
||||
|
||||
8.1. Focused diagram removal
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Delete is scoped to the focused diagram and the exact visible selection.
|
||||
Text fields retain their own Delete behavior; diagram shortcuts MUST NOT apply
|
||||
@@ -2294,8 +2333,9 @@ This compatibility applies equally to source and JSON. It adds explicit
|
||||
defaults without changing any prior identity, name, reference, order, geometry,
|
||||
artifact or trace field. The original V2 golden source/JSON in
|
||||
``crates/oa-core/tests/fixtures`` MUST NOT be regenerated from the newer demo;
|
||||
they verify that every old persistent field survives. Canonical output writes
|
||||
the added defaults through explicit migration to the current schema 7.
|
||||
they verify that every old persistent field survives. Canonical output uses
|
||||
the current schema 7 and omits values equal to its specified source defaults;
|
||||
parsing recovers the complete migrated model.
|
||||
|
||||
The V2 adapter preserves every original identity, alias, prose, parent,
|
||||
placement, trace and artifact. Generic ports become Legacy with their original
|
||||
|
||||
@@ -1,43 +1,34 @@
|
||||
oa_activity oa_restore_work "Restore safe pressure" id "1b91f8a7-0bdb-514e-b1cd-955658e09927" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_activity oa_assess "Assess pressure alarm" id "61f7bbfb-74a4-5540-9182-2583dfb27a49" {
|
||||
description "";
|
||||
parent @oa_restore_work;
|
||||
}
|
||||
|
||||
oa_activity oa_confirm "Confirm safe pressure" id "727c0b5c-8db6-5eb7-83d6-735519c5949f" {
|
||||
description "";
|
||||
parent @oa_restore_work;
|
||||
}
|
||||
|
||||
oa_activity oa_repair "Repair valve in the field" id "a21465af-05f3-5fb5-8983-de26932422fb" {
|
||||
description "";
|
||||
parent @oa_restore_work;
|
||||
}
|
||||
|
||||
oa_activity oa_reset "Reset valve remotely" id "d0c8be87-d238-503a-a549-7558a210507f" {
|
||||
description "";
|
||||
parent @oa_restore_work;
|
||||
}
|
||||
|
||||
capability_involvement oa_assessment_support "Capability involvement: Assess an alarm" id "ffdbfcd0-d423-5707-a880-0dfbe1400f72" {
|
||||
description "";
|
||||
source @oa_assess;
|
||||
target @oa_triage;
|
||||
}
|
||||
|
||||
interaction oa_repair_request "Request field repair" id "cf423ea2-8b2e-5a27-93d4-5e8542d9db8d" {
|
||||
description "";
|
||||
items [@oa_repair_operation];
|
||||
source @oa_assess;
|
||||
target @oa_repair;
|
||||
}
|
||||
|
||||
interaction oa_repair_report "Report repair result" id "b436d0b3-c824-5a96-af6b-2c269816d1cc" {
|
||||
description "";
|
||||
items [@oa_repair_operation];
|
||||
source @oa_repair;
|
||||
target @oa_confirm;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
oa_process oa_assessment_procedure "Assess an alarm procedure" id "022d3cfa-bbaf-5e13-924a-8e55099b8745" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@oa_assessment_action];
|
||||
}
|
||||
|
||||
@@ -8,17 +6,12 @@ oa_occurrence oa_assessment_action "Assess pressure alarm" id "942975b8-0bef-5ae
|
||||
body {
|
||||
Action {
|
||||
action @oa_assess;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_assessment_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
chain_involvement oa_assessment_delivery "Chain involvement: Assess an alarm" id "628cb4fc-fe63-5f6b-b364-6268f26b5740" {
|
||||
description "";
|
||||
source @oa_assessment_procedure;
|
||||
target @oa_triage;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
oa_process oa_field_procedure "Field repair procedure" id "5d3af417-244c-54bb-9588-16daedda4e1f" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@oa_request_step, @oa_repair_step, @oa_report_step];
|
||||
}
|
||||
|
||||
@@ -8,59 +6,35 @@ oa_occurrence oa_repair_step "Repair the valve" id "c59432fe-6092-5ee0-908d-9dbf
|
||||
body {
|
||||
Action {
|
||||
action @oa_repair;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_report_step "Report the measured result" id "df2fd3f8-6bc2-5380-a13f-36643ed35ac7" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @oa_repair_report;
|
||||
message_kind Asynchronous;
|
||||
receiver none;
|
||||
reply_to none;
|
||||
sender none;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_request_step "Request the field repair" id "5ba8079c-2dbe-5e98-ae82-2b60c6020a02" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @oa_repair_request;
|
||||
message_kind Asynchronous;
|
||||
receiver none;
|
||||
reply_to none;
|
||||
sender none;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sequence_link oa_repair_then_report "Sequence link: Report the measured result" id "c8196d35-2168-5fef-8b03-ba0d139bc00f" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_repair_step;
|
||||
target @oa_report_step;
|
||||
}
|
||||
|
||||
sequence_link oa_request_then_repair "Sequence link: Repair the valve" id "3f54d890-4ca5-5e36-873b-abb5c92d578c" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_request_step;
|
||||
target @oa_repair_step;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
oa_process oa_response "Handle a pressure alarm" id "58bae2b0-f560-50f2-818d-19091d22d18a" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@oa_assess_step, @oa_decision, @oa_reset_step, @oa_use_field, @oa_merge, @oa_confirm_step];
|
||||
}
|
||||
|
||||
@@ -10,23 +8,16 @@ oa_occurrence oa_assess_step "Assess the alarm" id "0b07b9ed-492d-57f6-b0b1-ce8a
|
||||
sequence @oa_assessment_procedure;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_confirm_step "Confirm safe pressure" id "e00594a3-6122-5a6b-b3c2-ecb5506c741d" {
|
||||
body {
|
||||
Action {
|
||||
action @oa_confirm;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_decision "Can a remote reset safely recover pressure?" id "b280c6ca-e5f9-5424-a5c1-5676e01c2371" {
|
||||
@@ -35,10 +26,7 @@ oa_occurrence oa_decision "Can a remote reset safely recover pressure?" id "b280
|
||||
kind Choice;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_merge "Recovery path completed" id "6b945a6d-6aa0-5dd3-96e6-2e8d757d167d" {
|
||||
@@ -47,23 +35,16 @@ oa_occurrence oa_merge "Recovery path completed" id "6b945a6d-6aa0-5dd3-96e6-2e8
|
||||
kind Merge;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_reset_step "Try the authorized remote reset" id "d2026fc2-74a8-5e22-9942-ff3eb68a3677" {
|
||||
body {
|
||||
Action {
|
||||
action @oa_reset;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_occurrence oa_use_field "Use the field repair procedure" id "fc6763bf-a534-54bf-afcd-57ab285ff07d" {
|
||||
@@ -72,56 +53,42 @@ oa_occurrence oa_use_field "Use the field repair procedure" id "fc6763bf-a534-54
|
||||
sequence @oa_field_procedure;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sequence_link oa_assess_then_decide "Continue" id "109e2d6b-7e86-5934-93a5-fab56eced84e" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_assess_step;
|
||||
target @oa_decision;
|
||||
}
|
||||
|
||||
sequence_link oa_field_path "else" id "c1adbbd0-a762-5ee3-8b9a-5c18af377771" {
|
||||
description "";
|
||||
guard "else";
|
||||
source @oa_decision;
|
||||
target @oa_use_field;
|
||||
}
|
||||
|
||||
sequence_link oa_remote_path "remote reset is authorized" id "76218d89-68fd-531d-b35b-90c5b769a5ef" {
|
||||
description "";
|
||||
guard "remote reset is authorized";
|
||||
source @oa_decision;
|
||||
target @oa_reset_step;
|
||||
}
|
||||
|
||||
sequence_link oa_confirm_path "Continue" id "229ee94f-d147-50f6-9769-b5bd0c03a084" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_merge;
|
||||
target @oa_confirm_step;
|
||||
}
|
||||
|
||||
sequence_link oa_remote_merge "Continue" id "bac43d3b-910b-5bdc-be9b-f78cf973e1ed" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_reset_step;
|
||||
target @oa_merge;
|
||||
}
|
||||
|
||||
chain_involvement oa_response_delivery "Chain involvement: Restore a safe supply" id "c7c248f8-28b8-55be-9023-0991d44021e3" {
|
||||
description "";
|
||||
source @oa_response;
|
||||
target @oa_restore;
|
||||
}
|
||||
|
||||
sequence_link oa_field_merge "Continue" id "c8593670-8906-530f-b6a2-3ada77a9c219" {
|
||||
description "";
|
||||
guard "";
|
||||
source @oa_use_field;
|
||||
target @oa_merge;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
oa_scenario oa_conversation "Repair request and measured reply" id "20472233-5ce6-5ffe-b4ad-0bdbccf3e423" {
|
||||
context @oa_restore;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "The controller has received the measured pressure after repair";
|
||||
precondition "A pressure alarm has been assessed";
|
||||
steps [@oa_call, @oa_reply];
|
||||
@@ -14,23 +12,17 @@ oa_occurrence oa_call "Request valve repair" id "b97437c6-cd7a-5a05-b537-b30a17d
|
||||
exchange @oa_contact;
|
||||
message_kind Call;
|
||||
receiver @oa_responder;
|
||||
reply_to none;
|
||||
sender @oa_caller;
|
||||
values [{
|
||||
expression "420.0";
|
||||
field @oa_pressure_parameter;
|
||||
path [];
|
||||
}];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_conversation;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_lifeline oa_caller "Controller" id "41859a65-ded2-547b-ab03-14e2fa740cf9" {
|
||||
description "";
|
||||
parent @oa_conversation;
|
||||
represented @oa_control;
|
||||
}
|
||||
@@ -46,18 +38,13 @@ oa_occurrence oa_reply "Return pressure after repair" id "cc2d497a-fd15-5455-9ee
|
||||
values [{
|
||||
expression "320.0";
|
||||
field @oa_pressure_parameter;
|
||||
path [];
|
||||
}];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_conversation;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
oa_lifeline oa_responder "Technician" id "fc81c5f0-0442-5b88-992b-e5b10f351c59" {
|
||||
description "";
|
||||
parent @oa_conversation;
|
||||
represented @oa_technician;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
oa_scenario oa_full_scenario "Restore supply through field repair" id "d6f881a4-95da-54e9-ad97-1b8965532629" {
|
||||
context @oa_restore;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "The controller has received the measured pressure after repair";
|
||||
precondition "A pressure alarm has been assessed";
|
||||
steps [@oa_use_conversation];
|
||||
@@ -9,13 +7,11 @@ oa_scenario oa_full_scenario "Restore supply through field repair" id "d6f881a4-
|
||||
}
|
||||
|
||||
oa_lifeline oa_outer_controller "Controller" id "2011b3ac-614b-5a47-8891-7ff81965f425" {
|
||||
description "";
|
||||
parent @oa_full_scenario;
|
||||
represented @oa_control;
|
||||
}
|
||||
|
||||
oa_lifeline oa_outer_technician "Technician" id "fffff882-78fd-5415-928d-c1ef7fac6576" {
|
||||
description "";
|
||||
parent @oa_full_scenario;
|
||||
represented @oa_technician;
|
||||
}
|
||||
@@ -33,9 +29,6 @@ oa_occurrence oa_use_conversation "Use the reviewed repair conversation" id "9ff
|
||||
scenario @oa_conversation;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @oa_full_scenario;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,80 +1,43 @@
|
||||
oa_state_machine oa_monitor "Pressure supervision" id "1970608f-85d1-5234-ac86-5e2b0df27dc3" {
|
||||
description "";
|
||||
parent @oa_control;
|
||||
}
|
||||
|
||||
oa_region oa_monitor_region "Supervision cycle" id "8412e9c6-96fe-5ed6-a903-1d37ec3c3bf7" {
|
||||
description "";
|
||||
parent @oa_monitor;
|
||||
}
|
||||
|
||||
oa_initial oa_monitor_initial "Start" id "a7ffb869-9dde-5e76-b276-c719c5c143a9" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind Initial;
|
||||
parent @oa_monitor_region;
|
||||
}
|
||||
|
||||
oa_state oa_monitoring "Monitoring" id "6cbde0d8-9f5f-510a-a8c1-e29cb99ad4ae" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @oa_monitor_region;
|
||||
}
|
||||
|
||||
oa_state oa_waiting "Awaiting repair" id "58c15833-6e75-523a-b57f-a88f19f6d672" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @oa_monitor_region;
|
||||
}
|
||||
|
||||
state_transition oa_start_monitoring "State transition: Monitoring" id "2b00270c-79a5-52a5-af96-33346bea531b" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @oa_monitor_initial;
|
||||
target @oa_monitoring;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [];
|
||||
}
|
||||
|
||||
state_transition oa_alarm_transition "State transition: Awaiting repair" id "fbde9d5e-c7e9-55db-a2be-497345c491b3" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @oa_monitoring;
|
||||
target @oa_waiting;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [@oa_high_pressure];
|
||||
}
|
||||
|
||||
state_action oa_assess_on_entry "Assess when repair is needed" id "7fa37e63-db65-5aa7-88f2-31ff4347a787" {
|
||||
description "";
|
||||
phase Entry;
|
||||
source @oa_waiting;
|
||||
target @oa_assess;
|
||||
}
|
||||
|
||||
state_transition oa_normal_transition "State transition: Monitoring" id "21fe5e8e-cbc2-5dad-b3e8-1df46e167d97" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "repair confirmed and pressure is safe";
|
||||
source @oa_waiting;
|
||||
target @oa_monitoring;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
oa_mission oa_mission "Maintain safe water supply" id "c9c61f50-06e0-5d17-973d-dcc57cd5cc90" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_capability oa_restore "Restore a safe supply" id "3dfee23a-148b-5cec-ad2d-b774e84ea5bb" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_capability oa_triage "Assess an alarm" id "6a30b763-cc51-546d-907f-5c63657cfd03" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
mission_capability oa_mission_delivery "Mission capability: Restore a safe supply" id "1f8b1898-65f6-5360-99cf-b78a71bd50ec" {
|
||||
description "";
|
||||
source @oa_mission;
|
||||
target @oa_restore;
|
||||
}
|
||||
|
||||
capability_include oa_include_triage "Capability include: Assess an alarm" id "e21d9a54-ae8e-5618-a4f8-67ee22b92638" {
|
||||
description "";
|
||||
source @oa_restore;
|
||||
target @oa_triage;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
oa_exchange_category oa_contact_category "Field contact" id "19bd3a3a-4d0c-56d5-bf50-a6b43fd81771" {
|
||||
description "";
|
||||
exchanges [@oa_contact];
|
||||
family "Participant";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_event oa_high_pressure "Pressure alarm detected" id "65d6b8d6-271a-5c84-8b42-abbe310c955e" {
|
||||
@@ -11,14 +9,9 @@ oa_event oa_high_pressure "Pressure alarm detected" id "65d6b8d6-271a-5c84-8b42-
|
||||
expression "measured_pressure > operating_limit";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_exchange_category oa_repair_traffic "Repair work exchanges" id "9349b353-53f2-56f8-b571-a05b09335cdf" {
|
||||
description "";
|
||||
exchanges [@oa_repair_request, @oa_repair_report];
|
||||
family "Work";
|
||||
parent none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,59 +1,46 @@
|
||||
oa_entity oa_control "Control room" id "32aa9940-df6e-5a12-b9bd-6337e2d2ed22" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
oa_actor oa_technician "Field technician" id "e07c3952-4a1a-5cc7-b7d5-03a01101ce49" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
allocation oa_assess_allocation "Allocation: Assess pressure alarm" id "594c61cd-94e0-5c07-890d-edfd520d7df9" {
|
||||
description "";
|
||||
source @oa_control;
|
||||
target @oa_assess;
|
||||
}
|
||||
|
||||
allocation oa_confirm_allocation "Allocation: Confirm safe pressure" id "bfd4326e-ea65-5269-b5e6-e063a355d1e9" {
|
||||
description "";
|
||||
source @oa_control;
|
||||
target @oa_confirm;
|
||||
}
|
||||
|
||||
communication_mean oa_contact "Technician service conversation" id "27b47887-baf0-518b-bf87-f5acbf7d0b93" {
|
||||
description "";
|
||||
items [@oa_repair_operation];
|
||||
oriented false;
|
||||
source @oa_control;
|
||||
target @oa_technician;
|
||||
}
|
||||
|
||||
exchange_allocation oa_report_carriage "Exchange allocation: Report repair result" id "4549d3fa-5ab9-52a9-b4f9-3a78fc9d625a" {
|
||||
description "";
|
||||
source @oa_contact;
|
||||
target @oa_repair_report;
|
||||
}
|
||||
|
||||
exchange_allocation oa_request_carriage "Exchange allocation: Request field repair" id "094b888c-450c-5c4f-971a-7d75db059574" {
|
||||
description "";
|
||||
source @oa_contact;
|
||||
target @oa_repair_request;
|
||||
}
|
||||
|
||||
mission_involvement oa_mission_participant "Mission involvement: Maintain safe water supply" id "0c4c9e58-ff32-5c00-b82a-d408a4be0183" {
|
||||
description "";
|
||||
source @oa_control;
|
||||
target @oa_mission;
|
||||
}
|
||||
|
||||
allocation oa_reset_allocation "Allocation: Reset valve remotely" id "1853df1f-30f4-5b1a-baac-2dcaf73c7b3a" {
|
||||
description "";
|
||||
source @oa_control;
|
||||
target @oa_reset;
|
||||
}
|
||||
|
||||
allocation oa_repair_allocation "Allocation: Repair valve in the field" id "ae53f363-0dec-5a7c-9afd-8fcd1b778ab2" {
|
||||
description "";
|
||||
source @oa_technician;
|
||||
target @oa_repair;
|
||||
}
|
||||
|
||||
@@ -1,35 +1,22 @@
|
||||
oa_data_type oa_pressure "Measured pressure" id "e7824764-5db9-5384-8198-2fbaea2b10b2" {
|
||||
default none;
|
||||
definition {
|
||||
Real {
|
||||
maximum 600.0;
|
||||
minimum 0.0;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent none;
|
||||
unit "kPa";
|
||||
}
|
||||
|
||||
oa_exchange_item oa_repair_operation "Valve repair" id "d736c7d6-d369-550a-8ba4-dae223e40bb3" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
oa_data_field oa_pressure_parameter "Pressure before / after repair" id "8bc6d0a4-3e87-559b-8bd7-1b679a2db5b7" {
|
||||
default none;
|
||||
description "";
|
||||
direction InOut;
|
||||
maximum 1;
|
||||
minimum 1;
|
||||
parent @oa_repair_operation;
|
||||
storage Value;
|
||||
type_ref {
|
||||
Named @oa_pressure;
|
||||
};
|
||||
unit "";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
sa_functional_chain sa_assessment_procedure "Assess an alarm procedure" id "acd5a018-f559-5298-a40d-1cf6e1353e74" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@sa_assessment_action];
|
||||
}
|
||||
|
||||
@@ -8,17 +6,12 @@ sa_occurrence sa_assessment_action "Assess pressure alarm" id "bae5b192-5b8e-51c
|
||||
body {
|
||||
Action {
|
||||
action @sa_assess;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_assessment_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
chain_involvement sa_assessment_delivery "Chain involvement: Assess an alarm" id "a6d5a6be-fa6e-5fa0-a309-08e87ba40c57" {
|
||||
description "";
|
||||
source @sa_assessment_procedure;
|
||||
target @sa_triage;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
sa_functional_chain sa_field_procedure "Field repair procedure" id "93eb6479-54e9-59cb-ac7b-16912347bfc0" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@sa_request_step, @sa_repair_step, @sa_report_step];
|
||||
}
|
||||
|
||||
@@ -8,59 +6,35 @@ sa_occurrence sa_repair_step "Repair the valve" id "0f195fea-3493-5ebd-966d-da9e
|
||||
body {
|
||||
Action {
|
||||
action @sa_repair;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_report_step "Report the measured result" id "ea32e4ec-8bdc-57ea-8a90-7b09ba4f0eac" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @sa_repair_report;
|
||||
message_kind Asynchronous;
|
||||
receiver none;
|
||||
reply_to none;
|
||||
sender none;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_request_step "Request the field repair" id "40d94322-baa2-5c81-b261-ff47cdc33782" {
|
||||
body {
|
||||
Exchange {
|
||||
exchange @sa_repair_request;
|
||||
message_kind Asynchronous;
|
||||
receiver none;
|
||||
reply_to none;
|
||||
sender none;
|
||||
values [];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_field_procedure;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sequence_link sa_repair_then_report "Sequence link: Report the measured result" id "7fb30b1d-195c-5f0e-a19c-a536f519a899" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_repair_step;
|
||||
target @sa_report_step;
|
||||
}
|
||||
|
||||
sequence_link sa_request_then_repair "Sequence link: Repair the valve" id "6a6d968f-26d6-5dbb-b721-5a27d362779a" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_request_step;
|
||||
target @sa_repair_step;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
sa_functional_chain sa_response "Handle a pressure alarm" id "5139ce73-56fd-5875-ba3a-e569fc890231" {
|
||||
description "";
|
||||
parent none;
|
||||
steps [@sa_assess_step, @sa_decision, @sa_reset_step, @sa_use_field, @sa_merge, @sa_confirm_step];
|
||||
}
|
||||
|
||||
@@ -10,23 +8,16 @@ sa_occurrence sa_assess_step "Assess the alarm" id "9024243c-ccc1-5edb-8477-2aa1
|
||||
sequence @sa_assessment_procedure;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_confirm_step "Confirm safe pressure" id "47bec4f9-d6d0-5ed1-adca-fa0d960dc416" {
|
||||
body {
|
||||
Action {
|
||||
action @sa_confirm;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_decision "Can a remote reset safely recover pressure?" id "30c8fad9-a49b-5692-9542-3148e76afd7b" {
|
||||
@@ -35,10 +26,7 @@ sa_occurrence sa_decision "Can a remote reset safely recover pressure?" id "30c8
|
||||
kind Choice;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_merge "Recovery path completed" id "4ed0dd9d-c9e0-5652-aedf-5f0ab4328a07" {
|
||||
@@ -47,23 +35,16 @@ sa_occurrence sa_merge "Recovery path completed" id "4ed0dd9d-c9e0-5652-aedf-5f0
|
||||
kind Merge;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_reset_step "Try the authorized remote reset" id "bfa2ef0b-ce68-55c2-a9e5-31ea8a74fce6" {
|
||||
body {
|
||||
Action {
|
||||
action @sa_reset;
|
||||
lifeline none;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_occurrence sa_use_field "Use the field repair procedure" id "d5e61c5d-510b-5091-a878-da46f3a9e152" {
|
||||
@@ -72,56 +53,42 @@ sa_occurrence sa_use_field "Use the field repair procedure" id "d5e61c5d-510b-50
|
||||
sequence @sa_field_procedure;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_response;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sequence_link sa_assess_then_decide "Continue" id "9d4a131f-36ad-5125-b21f-c3dd033b8c82" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_assess_step;
|
||||
target @sa_decision;
|
||||
}
|
||||
|
||||
sequence_link sa_field_path "else" id "1bbd5957-1173-51d8-97e3-ba4f084227ae" {
|
||||
description "";
|
||||
guard "else";
|
||||
source @sa_decision;
|
||||
target @sa_use_field;
|
||||
}
|
||||
|
||||
sequence_link sa_remote_path "remote reset is authorized" id "d8b6710a-e713-5979-934f-e5ca7d155bb4" {
|
||||
description "";
|
||||
guard "remote reset is authorized";
|
||||
source @sa_decision;
|
||||
target @sa_reset_step;
|
||||
}
|
||||
|
||||
sequence_link sa_confirm_path "Continue" id "1e738f27-a3a1-526d-b330-6384088b9689" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_merge;
|
||||
target @sa_confirm_step;
|
||||
}
|
||||
|
||||
sequence_link sa_remote_merge "Continue" id "e5279265-8eac-52e8-98dc-571b20475e1f" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_reset_step;
|
||||
target @sa_merge;
|
||||
}
|
||||
|
||||
chain_involvement sa_response_delivery "Chain involvement: Restore a safe supply" id "66efc484-53c7-51a3-89e9-422429344b38" {
|
||||
description "";
|
||||
source @sa_response;
|
||||
target @sa_restore;
|
||||
}
|
||||
|
||||
sequence_link sa_field_merge "Continue" id "0f6ac3fb-4ad6-581e-ad14-336472072d5e" {
|
||||
description "";
|
||||
guard "";
|
||||
source @sa_use_field;
|
||||
target @sa_merge;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
sa_scenario sa_conversation "Repair request and measured reply" id "730b27ca-b039-5a3b-8dc6-03418f9061b3" {
|
||||
context @sa_restore;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "The controller has received the measured pressure after repair";
|
||||
precondition "A pressure alarm has been assessed";
|
||||
steps [@sa_call, @sa_reply];
|
||||
@@ -14,23 +12,17 @@ sa_occurrence sa_call "Request valve repair" id "8bab4783-a098-5984-9e36-493957c
|
||||
exchange @sa_contact;
|
||||
message_kind Call;
|
||||
receiver @sa_responder;
|
||||
reply_to none;
|
||||
sender @sa_caller;
|
||||
values [{
|
||||
expression "420.0";
|
||||
field @sa_pressure_parameter;
|
||||
path [];
|
||||
}];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_conversation;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_lifeline sa_caller "Controller" id "98c61788-2fee-51f4-8cf9-de48e8c70e9e" {
|
||||
description "";
|
||||
parent @sa_conversation;
|
||||
represented @sa_control;
|
||||
}
|
||||
@@ -46,18 +38,13 @@ sa_occurrence sa_reply "Return pressure after repair" id "4e1c0a56-ce80-5f13-a93
|
||||
values [{
|
||||
expression "320.0";
|
||||
field @sa_pressure_parameter;
|
||||
path [];
|
||||
}];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_conversation;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
sa_lifeline sa_responder "Technician" id "6249b54a-e396-5338-82b9-89266c55670d" {
|
||||
description "";
|
||||
parent @sa_conversation;
|
||||
represented @sa_technician;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
sa_scenario sa_full_scenario "Restore supply through field repair" id "f746a1cd-ff9f-55c0-b325-01c03d2f4fae" {
|
||||
context @sa_restore;
|
||||
description "";
|
||||
parent none;
|
||||
postcondition "The controller has received the measured pressure after repair";
|
||||
precondition "A pressure alarm has been assessed";
|
||||
steps [@sa_use_conversation];
|
||||
@@ -9,13 +7,11 @@ sa_scenario sa_full_scenario "Restore supply through field repair" id "f746a1cd-
|
||||
}
|
||||
|
||||
sa_lifeline sa_outer_controller "Controller" id "1edfcf9e-9bfa-51f1-80d5-62b8fd8bb023" {
|
||||
description "";
|
||||
parent @sa_full_scenario;
|
||||
represented @sa_control;
|
||||
}
|
||||
|
||||
sa_lifeline sa_outer_technician "Technician" id "155e4fe4-9e3b-5f4e-b886-28abcc3f086b" {
|
||||
description "";
|
||||
parent @sa_full_scenario;
|
||||
represented @sa_technician;
|
||||
}
|
||||
@@ -33,9 +29,6 @@ sa_occurrence sa_use_conversation "Use the reviewed repair conversation" id "1c9
|
||||
scenario @sa_conversation;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent @sa_full_scenario;
|
||||
postcondition "";
|
||||
precondition "";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,80 +1,43 @@
|
||||
sa_state_machine sa_monitor "Pressure supervision" id "132b3f28-3f88-5327-9868-8c8b645ed412" {
|
||||
description "";
|
||||
parent @sa_control;
|
||||
}
|
||||
|
||||
sa_region sa_monitor_region "Supervision cycle" id "3ab11e24-4140-58fc-b3fa-da5f51c7fe2c" {
|
||||
description "";
|
||||
parent @sa_monitor;
|
||||
}
|
||||
|
||||
sa_initial sa_monitor_initial "Start" id "57eb5348-14d8-560e-996a-8dbf993243e2" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind Initial;
|
||||
parent @sa_monitor_region;
|
||||
}
|
||||
|
||||
sa_state sa_monitoring "Monitoring" id "8af21f9b-c21e-5aae-af0d-0958840f6655" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @sa_monitor_region;
|
||||
}
|
||||
|
||||
sa_state sa_waiting "Awaiting repair" id "a6bb10b1-f1e5-5b31-8afd-5bad5a7b6c37" {
|
||||
description "";
|
||||
do_activity "";
|
||||
entry "";
|
||||
exit "";
|
||||
kind State;
|
||||
parent @sa_monitor_region;
|
||||
}
|
||||
|
||||
state_transition sa_start_monitoring "State transition: Monitoring" id "47730532-0372-5cc5-9d6d-0b8953aebdd8" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @sa_monitor_initial;
|
||||
target @sa_monitoring;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [];
|
||||
}
|
||||
|
||||
state_transition sa_alarm_transition "State transition: Awaiting repair" id "13c3bfa4-9254-5ab2-b96f-f65f402adf81" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "";
|
||||
source @sa_monitoring;
|
||||
target @sa_waiting;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [@sa_high_pressure];
|
||||
}
|
||||
|
||||
state_action sa_assess_on_entry "Assess when repair is needed" id "a887f96a-37cb-5891-8070-011fa276e5b5" {
|
||||
description "";
|
||||
phase Entry;
|
||||
source @sa_waiting;
|
||||
target @sa_assess;
|
||||
}
|
||||
|
||||
state_transition sa_normal_transition "State transition: Monitoring" id "6e2c1b47-764c-577a-b325-ff66dd2a2768" {
|
||||
description "";
|
||||
effect "";
|
||||
effects [];
|
||||
guard "repair confirmed and pressure is safe";
|
||||
source @sa_waiting;
|
||||
target @sa_monitoring;
|
||||
transition_kind External;
|
||||
trigger "";
|
||||
triggers [];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
sa_mission sa_mission "Maintain safe water supply" id "5ad034b1-084d-5273-9e70-971671766132" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_capability sa_restore "Restore a safe supply" id "81259051-370a-512d-a3b5-6420a6f933b6" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_capability sa_triage "Assess an alarm" id "bad8fa7c-f634-55fd-98d3-e1eb2da05d8f" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
mission_capability sa_mission_delivery "Mission capability: Restore a safe supply" id "a0902e0f-3d18-576a-9aca-975a136dfdd7" {
|
||||
description "";
|
||||
source @sa_mission;
|
||||
target @sa_restore;
|
||||
}
|
||||
|
||||
capability_include sa_include_triage "Capability include: Assess an alarm" id "f3fe7690-734a-5877-8b57-a6599a4033c4" {
|
||||
description "";
|
||||
source @sa_restore;
|
||||
target @sa_triage;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
sa_function sa_audit_thresholds "Audit pressure thresholds" id "4149a872-3440-59de-9879-8981e78d27ab" {
|
||||
description "Deliberately unfinished: assigned to the service, but no behavior context yet. Model checks should expose this one work_without_behavior_context warning.";
|
||||
parent none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
sa_function sa_restore_work "Restore safe pressure" id "58867e7d-916e-5ebc-9e4c-8dbed1314be3" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_function sa_assess "Assess pressure alarm" id "dddae020-a444-5d48-acc8-139d2696a672" {
|
||||
description "";
|
||||
parent @sa_restore_work;
|
||||
}
|
||||
|
||||
@@ -14,13 +11,10 @@ sa_port sa_repair_request_out "Request field repair output" id "24a6850e-b819-57
|
||||
outgoing_items [@sa_repair_operation];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @sa_assess;
|
||||
}
|
||||
|
||||
sa_function sa_confirm "Confirm safe pressure" id "d75eb3fa-a27d-52d5-8782-8b342b3865f6" {
|
||||
description "";
|
||||
parent @sa_restore_work;
|
||||
}
|
||||
|
||||
@@ -30,13 +24,10 @@ sa_port sa_repair_report_in "Report repair result input" id "391af7c4-b07d-53a7-
|
||||
incoming_items [@sa_repair_operation];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @sa_confirm;
|
||||
}
|
||||
|
||||
sa_function sa_repair "Repair valve in the field" id "9497e10f-04c4-5586-8738-2464a6f00bd4" {
|
||||
description "";
|
||||
parent @sa_restore_work;
|
||||
}
|
||||
|
||||
@@ -46,8 +37,6 @@ sa_port sa_repair_report_out "Report repair result output" id "994faed7-dbc8-5b9
|
||||
outgoing_items [@sa_repair_operation];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @sa_repair;
|
||||
}
|
||||
|
||||
@@ -57,24 +46,19 @@ sa_port sa_repair_request_in "Request field repair input" id "d2113fb0-a531-54ef
|
||||
incoming_items [@sa_repair_operation];
|
||||
};
|
||||
};
|
||||
description "";
|
||||
legacy none;
|
||||
parent @sa_repair;
|
||||
}
|
||||
|
||||
sa_function sa_reset "Reset valve remotely" id "09342ccb-044b-5483-ac58-87dc3cf7831c" {
|
||||
description "";
|
||||
parent @sa_restore_work;
|
||||
}
|
||||
|
||||
capability_involvement sa_assessment_support "Capability involvement: Assess an alarm" id "93eaad8d-83b7-5980-b9bb-86c9e3f31da4" {
|
||||
description "";
|
||||
source @sa_assess;
|
||||
target @sa_triage;
|
||||
}
|
||||
|
||||
functional_exchange sa_repair_request "Request field repair" id "93474111-f23e-56c1-b61b-b7c2396b91bd" {
|
||||
description "";
|
||||
items [@sa_repair_operation];
|
||||
source @sa_assess;
|
||||
source_port @sa_repair_request_out;
|
||||
@@ -83,7 +67,6 @@ functional_exchange sa_repair_request "Request field repair" id "93474111-f23e-5
|
||||
}
|
||||
|
||||
functional_exchange sa_repair_report "Report repair result" id "684eadc3-e670-5779-a60f-bbc9a5bfb062" {
|
||||
description "";
|
||||
items [@sa_repair_operation];
|
||||
source @sa_repair;
|
||||
source_port @sa_repair_report_out;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
sa_exchange_category sa_contact_category "Field contact" id "781cbe75-410f-5cc5-aeb8-a43491f77b99" {
|
||||
description "";
|
||||
exchanges [@sa_contact];
|
||||
family "Participant";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_event sa_high_pressure "Pressure alarm detected" id "01490fa8-2f01-5ac8-9722-d55d45414379" {
|
||||
@@ -11,14 +9,9 @@ sa_event sa_high_pressure "Pressure alarm detected" id "01490fa8-2f01-5ac8-9722-
|
||||
expression "measured_pressure > operating_limit";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_exchange_category sa_repair_traffic "Repair work exchanges" id "a9a47e48-100c-57a8-95f0-7fe24da94f94" {
|
||||
description "";
|
||||
exchanges [@sa_repair_request, @sa_repair_report];
|
||||
family "Work";
|
||||
parent none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
sa_system sa_control "Pressure coordination service" id "435bf87c-73fd-5e4d-978a-4c471bc9eaf0" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port sa_control_port "Repair service client" id "98d411e7-7c65-5c3f-b543-8bf0f2522ea2" {
|
||||
@@ -11,13 +9,10 @@ sa_port sa_control_port "Repair service client" id "98d411e7-7c65-5c3f-b543-8bf0
|
||||
};
|
||||
};
|
||||
description "Explicitly chosen Standard component port for the repair service.";
|
||||
legacy none;
|
||||
parent @sa_control;
|
||||
}
|
||||
|
||||
sa_actor sa_technician "Field technician" id "c05b9422-b9da-5de5-b21d-07ad23bd2b8a" {
|
||||
description "";
|
||||
parent none;
|
||||
}
|
||||
|
||||
sa_port sa_technician_port "Repair service provider" id "e6d69cbd-99d7-596b-bbe3-dada6118a600" {
|
||||
@@ -28,36 +23,30 @@ sa_port sa_technician_port "Repair service provider" id "e6d69cbd-99d7-596b-bbe3
|
||||
};
|
||||
};
|
||||
description "Explicitly chosen Standard component port for the repair service.";
|
||||
legacy none;
|
||||
parent @sa_technician;
|
||||
}
|
||||
|
||||
allocation sa_assess_allocation "Allocation: Assess pressure alarm" id "9b9356d7-2db2-5a94-a47e-ea892cf02afe" {
|
||||
description "";
|
||||
source @sa_control;
|
||||
target @sa_assess;
|
||||
}
|
||||
|
||||
allocation sa_audit_allocation "Allocation: Audit pressure thresholds" id "1b245065-7242-5d81-8472-aaeb932054c9" {
|
||||
description "";
|
||||
source @sa_control;
|
||||
target @sa_audit_thresholds;
|
||||
}
|
||||
|
||||
allocation sa_confirm_allocation "Allocation: Confirm safe pressure" id "b76bf8de-2fa4-563f-a540-dd30f30e6c49" {
|
||||
description "";
|
||||
source @sa_control;
|
||||
target @sa_confirm;
|
||||
}
|
||||
|
||||
interface_requirement sa_client_requires "Interface requirement: Valve repair service" id "4f85337b-f6eb-533c-a45a-9a5d1d9567ca" {
|
||||
description "";
|
||||
source @sa_control_port;
|
||||
target @sa_repair_interface;
|
||||
}
|
||||
|
||||
boundary_exchange sa_contact "Technician service conversation" id "63009b5f-539e-5914-b630-ec6b7fefb4d5" {
|
||||
description "";
|
||||
items [@sa_repair_operation];
|
||||
oriented false;
|
||||
source @sa_control_port;
|
||||
@@ -65,61 +54,51 @@ boundary_exchange sa_contact "Technician service conversation" id "63009b5f-539e
|
||||
}
|
||||
|
||||
exchange_allocation sa_report_carriage "Exchange allocation: Report repair result" id "ff9897b3-a23a-5994-a5b3-99a5b4d34ceb" {
|
||||
description "";
|
||||
source @sa_contact;
|
||||
target @sa_repair_report;
|
||||
}
|
||||
|
||||
exchange_allocation sa_request_carriage "Exchange allocation: Request field repair" id "4c4c4851-5a3d-5bb9-94df-b19f9cf39819" {
|
||||
description "";
|
||||
source @sa_contact;
|
||||
target @sa_repair_request;
|
||||
}
|
||||
|
||||
port_allocation sa_port_report_in "Port allocation: Report repair result input" id "568c5c01-de21-52a2-83bd-afdddc158085" {
|
||||
description "";
|
||||
source @sa_control_port;
|
||||
target @sa_repair_report_in;
|
||||
}
|
||||
|
||||
port_allocation sa_port_request_out "Port allocation: Request field repair output" id "55ec4dbf-bd17-5b0c-b3a3-95b2194aa8b9" {
|
||||
description "";
|
||||
source @sa_control_port;
|
||||
target @sa_repair_request_out;
|
||||
}
|
||||
|
||||
mission_involvement sa_mission_participant "Mission involvement: Maintain safe water supply" id "1c1e5634-ba8c-591f-b143-90a27cdc6cd2" {
|
||||
description "";
|
||||
source @sa_control;
|
||||
target @sa_mission;
|
||||
}
|
||||
|
||||
allocation sa_reset_allocation "Allocation: Reset valve remotely" id "3cc9ab52-2b00-57fd-8709-aabc75e5d3e3" {
|
||||
description "";
|
||||
source @sa_control;
|
||||
target @sa_reset;
|
||||
}
|
||||
|
||||
allocation sa_repair_allocation "Allocation: Repair valve in the field" id "725f2e1b-aa2c-5615-9b1f-28da178168fa" {
|
||||
description "";
|
||||
source @sa_technician;
|
||||
target @sa_repair;
|
||||
}
|
||||
|
||||
port_allocation sa_port_report_out "Port allocation: Report repair result output" id "e53b7a40-e8a3-5b3f-826d-c2b5c164a84a" {
|
||||
description "";
|
||||
source @sa_technician_port;
|
||||
target @sa_repair_report_out;
|
||||
}
|
||||
|
||||
port_allocation sa_port_request_in "Port allocation: Request field repair input" id "09eaa992-4cdf-5ea3-b748-f10fd74b8cba" {
|
||||
description "";
|
||||
source @sa_technician_port;
|
||||
target @sa_repair_request_in;
|
||||
}
|
||||
|
||||
interface_provision sa_provider_provides "Interface provision: Valve repair service" id "55f89fbf-aa3c-5ae1-95ef-ac676f9c1ada" {
|
||||
description "";
|
||||
source @sa_technician_port;
|
||||
target @sa_repair_interface;
|
||||
}
|
||||
|
||||
@@ -1,48 +1,30 @@
|
||||
sa_data_type sa_pressure "Measured pressure" id "87d0a95b-af1b-5352-b753-e4c6533671a5" {
|
||||
default none;
|
||||
definition {
|
||||
Real {
|
||||
maximum 600.0;
|
||||
minimum 0.0;
|
||||
};
|
||||
};
|
||||
description "";
|
||||
parent none;
|
||||
unit "kPa";
|
||||
}
|
||||
|
||||
sa_interface sa_repair_interface "Valve repair service" id "a4b8942e-a975-5f88-ad14-8f38c345baac" {
|
||||
description "";
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_exchange_item sa_repair_operation "Valve repair" id "a962fc5e-3ab0-5296-8b0d-fd84633f9218" {
|
||||
description "";
|
||||
kind Information;
|
||||
mechanism Operation;
|
||||
parent none;
|
||||
supertype none;
|
||||
}
|
||||
|
||||
sa_data_field sa_pressure_parameter "Pressure before / after repair" id "bb12ba5d-aab5-5a1b-99de-c767f5365b57" {
|
||||
default none;
|
||||
description "";
|
||||
direction InOut;
|
||||
maximum 1;
|
||||
minimum 1;
|
||||
parent @sa_repair_operation;
|
||||
storage Value;
|
||||
type_ref {
|
||||
Named @sa_pressure;
|
||||
};
|
||||
unit "";
|
||||
}
|
||||
|
||||
interface_item_allocation sa_repair_interface_item "Repair operation contract" id "f074e041-23cf-54ad-af9c-f171e30621e7" {
|
||||
acquisition Accept;
|
||||
description "";
|
||||
order 0;
|
||||
source @sa_repair_interface;
|
||||
target @sa_repair_operation;
|
||||
transmission Synchronous;
|
||||
|
||||
@@ -9,7 +9,6 @@ trace trace_oa_alarm_transition "State transition: Awaiting repair ↔ State tra
|
||||
name "State transition: Awaiting repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_alarm_transition;
|
||||
sa @sa_alarm_transition;
|
||||
@@ -26,8 +25,6 @@ trace trace_oa_assess "Assess pressure alarm ↔ Assess pressure alarm" id "5309
|
||||
name "Assess pressure alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @oa_assess;
|
||||
sa @sa_assess;
|
||||
}
|
||||
@@ -43,7 +40,6 @@ trace trace_oa_assess_allocation "Allocation: Assess pressure alarm ↔ Allocati
|
||||
name "Allocation: Assess pressure alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_assess_allocation;
|
||||
sa @sa_assess_allocation;
|
||||
@@ -60,7 +56,6 @@ trace trace_oa_assess_on_entry "Assess when repair is needed ↔ Assess when rep
|
||||
name "Assess when repair is needed";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_assess_on_entry;
|
||||
sa @sa_assess_on_entry;
|
||||
@@ -77,7 +72,6 @@ trace trace_oa_assess_step "Assess the alarm ↔ Assess the alarm" id "e848da41-
|
||||
name "Assess the alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_assess_step;
|
||||
sa @sa_assess_step;
|
||||
@@ -94,7 +88,6 @@ trace trace_oa_assess_then_decide "Continue ↔ Continue" id "a5c1eb01-a95f-5f7a
|
||||
name "Continue";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_assess_then_decide;
|
||||
sa @sa_assess_then_decide;
|
||||
@@ -111,7 +104,6 @@ trace trace_oa_assessment_action "Assess pressure alarm ↔ Assess pressure alar
|
||||
name "Assess pressure alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_assessment_action;
|
||||
sa @sa_assessment_action;
|
||||
@@ -128,7 +120,6 @@ trace trace_oa_assessment_delivery "Chain involvement: Assess an alarm ↔ Chain
|
||||
name "Chain involvement: Assess an alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_assessment_delivery;
|
||||
sa @sa_assessment_delivery;
|
||||
@@ -145,7 +136,6 @@ trace trace_oa_assessment_procedure "Assess an alarm procedure ↔ Assess an ala
|
||||
name "Assess an alarm procedure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_assessment_procedure;
|
||||
sa @sa_assessment_procedure;
|
||||
@@ -162,7 +152,6 @@ trace trace_oa_assessment_support "Capability involvement: Assess an alarm ↔ C
|
||||
name "Capability involvement: Assess an alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_assessment_support;
|
||||
sa @sa_assessment_support;
|
||||
@@ -179,7 +168,6 @@ trace trace_oa_call "Request valve repair ↔ Request valve repair" id "f0cc86e5
|
||||
name "Request valve repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_call;
|
||||
sa @sa_call;
|
||||
@@ -196,7 +184,6 @@ trace trace_oa_caller "Controller ↔ Controller" id "241dfdac-2450-5704-a4cb-9f
|
||||
name "Controller";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_caller;
|
||||
sa @sa_caller;
|
||||
@@ -213,8 +200,6 @@ trace trace_oa_confirm "Confirm safe pressure ↔ Confirm safe pressure" id "d77
|
||||
name "Confirm safe pressure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @oa_confirm;
|
||||
sa @sa_confirm;
|
||||
}
|
||||
@@ -230,7 +215,6 @@ trace trace_oa_confirm_allocation "Allocation: Confirm safe pressure ↔ Allocat
|
||||
name "Allocation: Confirm safe pressure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_confirm_allocation;
|
||||
sa @sa_confirm_allocation;
|
||||
@@ -247,7 +231,6 @@ trace trace_oa_confirm_path "Continue ↔ Continue" id "a106d183-c239-5c9f-b1f1-
|
||||
name "Continue";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_confirm_path;
|
||||
sa @sa_confirm_path;
|
||||
@@ -264,7 +247,6 @@ trace trace_oa_confirm_step "Confirm safe pressure ↔ Confirm safe pressure" id
|
||||
name "Confirm safe pressure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_confirm_step;
|
||||
sa @sa_confirm_step;
|
||||
@@ -281,7 +263,6 @@ trace trace_oa_contact "Technician service conversation ↔ Technician service c
|
||||
name "Technician service conversation";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Exchange;
|
||||
oa @oa_contact;
|
||||
sa @sa_contact;
|
||||
@@ -298,7 +279,6 @@ trace trace_oa_contact_category "Field contact ↔ Field contact" id "e96ff119-b
|
||||
name "Field contact";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_contact_category;
|
||||
sa @sa_contact_category;
|
||||
@@ -315,7 +295,6 @@ trace trace_oa_control "Control room ↔ Pressure coordination service" id "aba5
|
||||
name "Pressure coordination service";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Participant;
|
||||
oa @oa_control;
|
||||
sa @sa_control;
|
||||
@@ -332,7 +311,6 @@ trace trace_oa_conversation "Repair request and measured reply ↔ Repair reques
|
||||
name "Repair request and measured reply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_conversation;
|
||||
sa @sa_conversation;
|
||||
@@ -349,7 +327,6 @@ trace trace_oa_decision "Can a remote reset safely recover pressure? ↔ Can a r
|
||||
name "Can a remote reset safely recover pressure?";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_decision;
|
||||
sa @sa_decision;
|
||||
@@ -366,7 +343,6 @@ trace trace_oa_field_merge "Continue ↔ Continue" id "d32dd433-9c9e-5b57-9355-2
|
||||
name "Continue";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_field_merge;
|
||||
sa @sa_field_merge;
|
||||
@@ -383,7 +359,6 @@ trace trace_oa_field_path "else ↔ else" id "2e849e31-35aa-5aef-a989-26948038e5
|
||||
name "else";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_field_path;
|
||||
sa @sa_field_path;
|
||||
@@ -400,7 +375,6 @@ trace trace_oa_field_procedure "Field repair procedure ↔ Field repair procedur
|
||||
name "Field repair procedure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_field_procedure;
|
||||
sa @sa_field_procedure;
|
||||
@@ -417,7 +391,6 @@ trace trace_oa_full_scenario "Restore supply through field repair ↔ Restore su
|
||||
name "Restore supply through field repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_full_scenario;
|
||||
sa @sa_full_scenario;
|
||||
@@ -434,7 +407,6 @@ trace trace_oa_high_pressure "Pressure alarm detected ↔ Pressure alarm detecte
|
||||
name "Pressure alarm detected";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_high_pressure;
|
||||
sa @sa_high_pressure;
|
||||
@@ -451,7 +423,6 @@ trace trace_oa_include_triage "Capability include: Assess an alarm ↔ Capabilit
|
||||
name "Capability include: Assess an alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_include_triage;
|
||||
sa @sa_include_triage;
|
||||
@@ -468,7 +439,6 @@ trace trace_oa_merge "Recovery path completed ↔ Recovery path completed" id "0
|
||||
name "Recovery path completed";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_merge;
|
||||
sa @sa_merge;
|
||||
@@ -485,7 +455,6 @@ trace trace_oa_mission "Maintain safe water supply ↔ Maintain safe water suppl
|
||||
name "Maintain safe water supply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Mission;
|
||||
oa @oa_mission;
|
||||
sa @sa_mission;
|
||||
@@ -502,7 +471,6 @@ trace trace_oa_mission_delivery "Mission capability: Restore a safe supply ↔ M
|
||||
name "Mission capability: Restore a safe supply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_mission_delivery;
|
||||
sa @sa_mission_delivery;
|
||||
@@ -519,7 +487,6 @@ trace trace_oa_mission_participant "Mission involvement: Maintain safe water sup
|
||||
name "Mission involvement: Maintain safe water supply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_mission_participant;
|
||||
sa @sa_mission_participant;
|
||||
@@ -536,7 +503,6 @@ trace trace_oa_monitor "Pressure supervision ↔ Pressure supervision" id "b5386
|
||||
name "Pressure supervision";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_monitor;
|
||||
sa @sa_monitor;
|
||||
@@ -553,7 +519,6 @@ trace trace_oa_monitor_initial "Start ↔ Start" id "48d243f0-553f-507e-acb0-947
|
||||
name "Start";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_monitor_initial;
|
||||
sa @sa_monitor_initial;
|
||||
@@ -570,7 +535,6 @@ trace trace_oa_monitor_region "Supervision cycle ↔ Supervision cycle" id "2087
|
||||
name "Supervision cycle";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_monitor_region;
|
||||
sa @sa_monitor_region;
|
||||
@@ -587,7 +551,6 @@ trace trace_oa_monitoring "Monitoring ↔ Monitoring" id "12ec320f-2e14-5a5a-8c6
|
||||
name "Monitoring";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_monitoring;
|
||||
sa @sa_monitoring;
|
||||
@@ -604,7 +567,6 @@ trace trace_oa_normal_transition "State transition: Monitoring ↔ State transit
|
||||
name "State transition: Monitoring";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_normal_transition;
|
||||
sa @sa_normal_transition;
|
||||
@@ -621,7 +583,6 @@ trace trace_oa_outer_controller "Controller ↔ Controller" id "fd195498-dbba-52
|
||||
name "Controller";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_outer_controller;
|
||||
sa @sa_outer_controller;
|
||||
@@ -638,7 +599,6 @@ trace trace_oa_outer_technician "Technician ↔ Technician" id "c132a0df-1270-55
|
||||
name "Technician";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_outer_technician;
|
||||
sa @sa_outer_technician;
|
||||
@@ -655,7 +615,6 @@ trace trace_oa_pressure "Measured pressure ↔ Measured pressure" id "d9d47371-e
|
||||
name "Measured pressure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Item;
|
||||
oa @oa_pressure;
|
||||
sa @sa_pressure;
|
||||
@@ -672,7 +631,6 @@ trace trace_oa_pressure_parameter "Pressure before / after repair ↔ Pressure b
|
||||
name "Pressure before / after repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Item;
|
||||
oa @oa_pressure_parameter;
|
||||
sa @sa_pressure_parameter;
|
||||
@@ -689,7 +647,6 @@ trace trace_oa_remote_merge "Continue ↔ Continue" id "1b788e74-36b2-5c17-a936-
|
||||
name "Continue";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_remote_merge;
|
||||
sa @sa_remote_merge;
|
||||
@@ -706,7 +663,6 @@ trace trace_oa_remote_path "remote reset is authorized ↔ remote reset is autho
|
||||
name "remote reset is authorized";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_remote_path;
|
||||
sa @sa_remote_path;
|
||||
@@ -723,8 +679,6 @@ trace trace_oa_repair "Repair valve in the field ↔ Repair valve in the field"
|
||||
name "Repair valve in the field";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @oa_repair;
|
||||
sa @sa_repair;
|
||||
}
|
||||
@@ -740,7 +694,6 @@ trace trace_oa_repair_allocation "Allocation: Repair valve in the field ↔ Allo
|
||||
name "Allocation: Repair valve in the field";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_repair_allocation;
|
||||
sa @sa_repair_allocation;
|
||||
@@ -757,7 +710,6 @@ trace trace_oa_repair_operation "Valve repair ↔ Valve repair" id "cf92cedf-ea1
|
||||
name "Valve repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Item;
|
||||
oa @oa_repair_operation;
|
||||
sa @sa_repair_operation;
|
||||
@@ -774,7 +726,6 @@ trace trace_oa_repair_report "Report repair result ↔ Report repair result" id
|
||||
name "Report repair result";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Exchange;
|
||||
oa @oa_repair_report;
|
||||
sa @sa_repair_report;
|
||||
@@ -791,7 +742,6 @@ trace trace_oa_repair_request "Request field repair ↔ Request field repair" id
|
||||
name "Request field repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Exchange;
|
||||
oa @oa_repair_request;
|
||||
sa @sa_repair_request;
|
||||
@@ -808,7 +758,6 @@ trace trace_oa_repair_step "Repair the valve ↔ Repair the valve" id "ac3aa6b0-
|
||||
name "Repair the valve";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_repair_step;
|
||||
sa @sa_repair_step;
|
||||
@@ -825,7 +774,6 @@ trace trace_oa_repair_then_report "Sequence link: Report the measured result ↔
|
||||
name "Sequence link: Report the measured result";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_repair_then_report;
|
||||
sa @sa_repair_then_report;
|
||||
@@ -842,7 +790,6 @@ trace trace_oa_repair_traffic "Repair work exchanges ↔ Repair work exchanges"
|
||||
name "Repair work exchanges";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_repair_traffic;
|
||||
sa @sa_repair_traffic;
|
||||
@@ -859,7 +806,6 @@ trace trace_oa_reply "Return pressure after repair ↔ Return pressure after rep
|
||||
name "Return pressure after repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_reply;
|
||||
sa @sa_reply;
|
||||
@@ -876,7 +822,6 @@ trace trace_oa_report_step "Report the measured result ↔ Report the measured r
|
||||
name "Report the measured result";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_report_step;
|
||||
sa @sa_report_step;
|
||||
@@ -893,7 +838,6 @@ trace trace_oa_request_step "Request the field repair ↔ Request the field repa
|
||||
name "Request the field repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_request_step;
|
||||
sa @sa_request_step;
|
||||
@@ -910,7 +854,6 @@ trace trace_oa_request_then_repair "Sequence link: Repair the valve ↔ Sequence
|
||||
name "Sequence link: Repair the valve";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_request_then_repair;
|
||||
sa @sa_request_then_repair;
|
||||
@@ -927,8 +870,6 @@ trace trace_oa_reset "Reset valve remotely ↔ Reset valve remotely" id "82a5be1
|
||||
name "Reset valve remotely";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @oa_reset;
|
||||
sa @sa_reset;
|
||||
}
|
||||
@@ -944,7 +885,6 @@ trace trace_oa_reset_allocation "Allocation: Reset valve remotely ↔ Allocation
|
||||
name "Allocation: Reset valve remotely";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_reset_allocation;
|
||||
sa @sa_reset_allocation;
|
||||
@@ -961,7 +901,6 @@ trace trace_oa_reset_step "Try the authorized remote reset ↔ Try the authorize
|
||||
name "Try the authorized remote reset";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_reset_step;
|
||||
sa @sa_reset_step;
|
||||
@@ -978,7 +917,6 @@ trace trace_oa_responder "Technician ↔ Technician" id "c5051628-b7af-5fb1-a014
|
||||
name "Technician";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_responder;
|
||||
sa @sa_responder;
|
||||
@@ -995,7 +933,6 @@ trace trace_oa_response "Handle a pressure alarm ↔ Handle a pressure alarm" id
|
||||
name "Handle a pressure alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_response;
|
||||
sa @sa_response;
|
||||
@@ -1012,7 +949,6 @@ trace trace_oa_response_delivery "Chain involvement: Restore a safe supply ↔ C
|
||||
name "Chain involvement: Restore a safe supply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_response_delivery;
|
||||
sa @sa_response_delivery;
|
||||
@@ -1029,7 +965,6 @@ trace trace_oa_restore "Restore a safe supply ↔ Restore a safe supply" id "0fb
|
||||
name "Restore a safe supply";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Capability;
|
||||
oa @oa_restore;
|
||||
sa @sa_restore;
|
||||
@@ -1046,8 +981,6 @@ trace trace_oa_restore_work "Restore safe pressure ↔ Restore safe pressure" id
|
||||
name "Restore safe pressure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Refinement;
|
||||
oa @oa_restore_work;
|
||||
sa @sa_restore_work;
|
||||
}
|
||||
@@ -1063,7 +996,6 @@ trace trace_oa_start_monitoring "State transition: Monitoring ↔ State transiti
|
||||
name "State transition: Monitoring";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Manual;
|
||||
oa @oa_start_monitoring;
|
||||
sa @sa_start_monitoring;
|
||||
@@ -1080,7 +1012,6 @@ trace trace_oa_technician "Field technician ↔ Field technician" id "d47d3c36-5
|
||||
name "Field technician";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Participant;
|
||||
oa @oa_technician;
|
||||
sa @sa_technician;
|
||||
@@ -1097,7 +1028,6 @@ trace trace_oa_triage "Assess an alarm ↔ Assess an alarm" id "6acd072d-431e-58
|
||||
name "Assess an alarm";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Capability;
|
||||
oa @oa_triage;
|
||||
sa @sa_triage;
|
||||
@@ -1114,7 +1044,6 @@ trace trace_oa_use_conversation "Use the reviewed repair conversation ↔ Use th
|
||||
name "Use the reviewed repair conversation";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Scenario;
|
||||
oa @oa_use_conversation;
|
||||
sa @sa_use_conversation;
|
||||
@@ -1131,7 +1060,6 @@ trace trace_oa_use_field "Use the field repair procedure ↔ Use the field repai
|
||||
name "Use the field repair procedure";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind Sequence;
|
||||
oa @oa_use_field;
|
||||
sa @sa_use_field;
|
||||
@@ -1148,7 +1076,6 @@ trace trace_oa_waiting "Awaiting repair ↔ Awaiting repair" id "0754be23-e4b8-5
|
||||
name "Awaiting repair";
|
||||
};
|
||||
};
|
||||
description "";
|
||||
kind State;
|
||||
oa @oa_waiting;
|
||||
sa @sa_waiting;
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
diagram oa_allocation_view "1 · OA responsibility and repair traffic" id "103ea62c-ac56-5827-94e7-cf09bca96ccc" {
|
||||
description "Teaching view: positions and filters do not change ownership or exchange identities.";
|
||||
layer Oa;
|
||||
projection Allocation;
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "Name";
|
||||
hidden_edges [];
|
||||
participant_categories "All";
|
||||
relation_kinds "All";
|
||||
work_categories "All";
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_assess id "5ae1c46d-59a3-50fd-8cc3-b292df21f951" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_assess;
|
||||
position {
|
||||
@@ -29,7 +17,6 @@ node oa_allocation_view_oa_assess id "5ae1c46d-59a3-50fd-8cc3-b292df21f951" {
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_confirm id "edd74060-ac61-5450-a57c-a6577daa5d50" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_confirm;
|
||||
position {
|
||||
@@ -43,7 +30,6 @@ node oa_allocation_view_oa_confirm id "edd74060-ac61-5450-a57c-a6577daa5d50" {
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_control id "3191e05c-1c7f-5f0e-beb0-5f3bded54c48" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_control;
|
||||
position {
|
||||
@@ -57,7 +43,6 @@ node oa_allocation_view_oa_control id "3191e05c-1c7f-5f0e-beb0-5f3bded54c48" {
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_repair id "202ebe37-ddb4-5099-8ce9-ec3e895ab9e9" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_repair;
|
||||
position {
|
||||
@@ -71,7 +56,6 @@ node oa_allocation_view_oa_repair id "202ebe37-ddb4-5099-8ce9-ec3e895ab9e9" {
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_reset id "7066f78c-9736-5349-b94a-0587331b980e" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_reset;
|
||||
position {
|
||||
@@ -85,7 +69,6 @@ node oa_allocation_view_oa_reset id "7066f78c-9736-5349-b94a-0587331b980e" {
|
||||
}
|
||||
|
||||
node oa_allocation_view_oa_technician id "d27f28ef-f10a-5355-9a05-6f2fd39b7de6" {
|
||||
collapsed false;
|
||||
diagram @oa_allocation_view;
|
||||
element @oa_technician;
|
||||
position {
|
||||
|
||||
@@ -2,20 +2,9 @@ diagram sa_allocation_view "2 · SA service boundary and functions" id "35d3c24b
|
||||
description "Teaching view: positions and filters do not change ownership or exchange identities.";
|
||||
layer Sa;
|
||||
projection Allocation;
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "Name";
|
||||
hidden_edges [];
|
||||
participant_categories "All";
|
||||
relation_kinds "All";
|
||||
work_categories "All";
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_assess id "60f6ad74-b69e-5aef-b832-f1bd60b903ae" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_assess;
|
||||
position {
|
||||
@@ -29,7 +18,6 @@ node sa_allocation_view_sa_assess id "60f6ad74-b69e-5aef-b832-f1bd60b903ae" {
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_confirm id "7e3ba36f-bc68-5520-bdb9-77083bb7bba2" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_confirm;
|
||||
position {
|
||||
@@ -43,7 +31,6 @@ node sa_allocation_view_sa_confirm id "7e3ba36f-bc68-5520-bdb9-77083bb7bba2" {
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_control id "8345c76a-8d85-5c31-902e-ec1cd33ed4a3" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_control;
|
||||
position {
|
||||
@@ -57,7 +44,6 @@ node sa_allocation_view_sa_control id "8345c76a-8d85-5c31-902e-ec1cd33ed4a3" {
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_repair id "34630a18-41b0-5fdd-bff4-ee86e93e8651" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_repair;
|
||||
position {
|
||||
@@ -71,7 +57,6 @@ node sa_allocation_view_sa_repair id "34630a18-41b0-5fdd-bff4-ee86e93e8651" {
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_reset id "73406244-ebd7-5995-86c7-e17c73c50b32" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_reset;
|
||||
position {
|
||||
@@ -85,7 +70,6 @@ node sa_allocation_view_sa_reset id "73406244-ebd7-5995-86c7-e17c73c50b32" {
|
||||
}
|
||||
|
||||
node sa_allocation_view_sa_technician id "f7225d1c-e506-505d-bb20-916950269d4b" {
|
||||
collapsed false;
|
||||
diagram @sa_allocation_view;
|
||||
element @sa_technician;
|
||||
position {
|
||||
|
||||
@@ -2,20 +2,9 @@ diagram sa_capability_view "4 · SA mission and included capability" id "3e6ad19
|
||||
description "Teaching view: positions and filters do not change ownership or exchange identities.";
|
||||
layer Sa;
|
||||
projection Capabilities;
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "Name";
|
||||
hidden_edges [];
|
||||
participant_categories "All";
|
||||
relation_kinds "All";
|
||||
work_categories "All";
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node sa_capability_view_sa_control id "41ddb68b-bd2b-5f91-82eb-efde01157828" {
|
||||
collapsed false;
|
||||
diagram @sa_capability_view;
|
||||
element @sa_control;
|
||||
position {
|
||||
@@ -29,7 +18,6 @@ node sa_capability_view_sa_control id "41ddb68b-bd2b-5f91-82eb-efde01157828" {
|
||||
}
|
||||
|
||||
node sa_capability_view_sa_mission id "4b814335-bf98-5b68-85d5-ea549766517a" {
|
||||
collapsed false;
|
||||
diagram @sa_capability_view;
|
||||
element @sa_mission;
|
||||
position {
|
||||
@@ -43,7 +31,6 @@ node sa_capability_view_sa_mission id "4b814335-bf98-5b68-85d5-ea549766517a" {
|
||||
}
|
||||
|
||||
node sa_capability_view_sa_restore id "d3bc13f9-7726-5280-83fe-63f391c45afb" {
|
||||
collapsed false;
|
||||
diagram @sa_capability_view;
|
||||
element @sa_restore;
|
||||
position {
|
||||
@@ -57,7 +44,6 @@ node sa_capability_view_sa_restore id "d3bc13f9-7726-5280-83fe-63f391c45afb" {
|
||||
}
|
||||
|
||||
node sa_capability_view_sa_triage id "069a3fb3-077c-59d8-91da-27b0665143c7" {
|
||||
collapsed false;
|
||||
diagram @sa_capability_view;
|
||||
element @sa_triage;
|
||||
position {
|
||||
|
||||
@@ -2,24 +2,18 @@ diagram sa_service_view "3 · SA service conversation only" id "50af4c9b-93ce-5f
|
||||
description "Teaching view: positions and filters do not change ownership or exchange identities.";
|
||||
layer Sa;
|
||||
projection Allocation;
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "NameAndItems";
|
||||
hidden_edges [];
|
||||
participant_categories {
|
||||
Any [@sa_contact_category];
|
||||
};
|
||||
relation_kinds "All";
|
||||
work_categories {
|
||||
Any [];
|
||||
};
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node sa_service_view_sa_assess id "439f1e45-e5ed-567c-978b-4c93ef267db1" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_assess;
|
||||
position {
|
||||
@@ -33,7 +27,6 @@ node sa_service_view_sa_assess id "439f1e45-e5ed-567c-978b-4c93ef267db1" {
|
||||
}
|
||||
|
||||
node sa_service_view_sa_confirm id "6f138672-149b-5f88-ab07-7fc413a42262" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_confirm;
|
||||
position {
|
||||
@@ -47,7 +40,6 @@ node sa_service_view_sa_confirm id "6f138672-149b-5f88-ab07-7fc413a42262" {
|
||||
}
|
||||
|
||||
node sa_service_view_sa_control id "f53d4352-b042-56a6-8b3e-c51cd27254f9" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_control;
|
||||
position {
|
||||
@@ -61,7 +53,6 @@ node sa_service_view_sa_control id "f53d4352-b042-56a6-8b3e-c51cd27254f9" {
|
||||
}
|
||||
|
||||
node sa_service_view_sa_repair id "ae36489d-6ec8-5f1c-b603-8b497227efba" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_repair;
|
||||
position {
|
||||
@@ -75,7 +66,6 @@ node sa_service_view_sa_repair id "ae36489d-6ec8-5f1c-b603-8b497227efba" {
|
||||
}
|
||||
|
||||
node sa_service_view_sa_reset id "d52da4e6-40b7-5dbc-84fb-80c443711c69" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_reset;
|
||||
position {
|
||||
@@ -89,7 +79,6 @@ node sa_service_view_sa_reset id "d52da4e6-40b7-5dbc-84fb-80c443711c69" {
|
||||
}
|
||||
|
||||
node sa_service_view_sa_technician id "40210589-69f7-5209-b329-10bb83cf615c" {
|
||||
collapsed false;
|
||||
diagram @sa_service_view;
|
||||
element @sa_technician;
|
||||
position {
|
||||
|
||||
@@ -6,20 +6,9 @@ diagram sa_state_view "5 · SA pressure supervision" id "30d5baf9-6581-5cb6-846a
|
||||
machine @sa_monitor;
|
||||
};
|
||||
};
|
||||
routes [];
|
||||
view_options {
|
||||
coverage "All";
|
||||
exchange_labels "Name";
|
||||
hidden_edges [];
|
||||
participant_categories "All";
|
||||
relation_kinds "All";
|
||||
work_categories "All";
|
||||
work_contexts "All";
|
||||
};
|
||||
}
|
||||
|
||||
node sa_state_view_sa_monitor id "a676fbb9-0833-59a8-98cf-a10d8f4b7434" {
|
||||
collapsed false;
|
||||
diagram @sa_state_view;
|
||||
element @sa_monitor;
|
||||
position {
|
||||
@@ -33,7 +22,6 @@ node sa_state_view_sa_monitor id "a676fbb9-0833-59a8-98cf-a10d8f4b7434" {
|
||||
}
|
||||
|
||||
node sa_state_view_sa_monitor_initial id "5e2326a0-0f6c-5f8d-8a21-fdded18a9281" {
|
||||
collapsed false;
|
||||
diagram @sa_state_view;
|
||||
element @sa_monitor_initial;
|
||||
position {
|
||||
@@ -47,7 +35,6 @@ node sa_state_view_sa_monitor_initial id "5e2326a0-0f6c-5f8d-8a21-fdded18a9281"
|
||||
}
|
||||
|
||||
node sa_state_view_sa_monitor_region id "55a74f91-2025-5001-8db8-9566b1dbe783" {
|
||||
collapsed false;
|
||||
diagram @sa_state_view;
|
||||
element @sa_monitor_region;
|
||||
position {
|
||||
@@ -61,7 +48,6 @@ node sa_state_view_sa_monitor_region id "55a74f91-2025-5001-8db8-9566b1dbe783" {
|
||||
}
|
||||
|
||||
node sa_state_view_sa_monitoring id "b3af7b04-5a45-5b82-ab69-7eada4b876f0" {
|
||||
collapsed false;
|
||||
diagram @sa_state_view;
|
||||
element @sa_monitoring;
|
||||
position {
|
||||
@@ -75,7 +61,6 @@ node sa_state_view_sa_monitoring id "b3af7b04-5a45-5b82-ab69-7eada4b876f0" {
|
||||
}
|
||||
|
||||
node sa_state_view_sa_waiting id "57acbb71-ca86-57fc-ae90-42dad195f0e0" {
|
||||
collapsed false;
|
||||
diagram @sa_state_view;
|
||||
element @sa_waiting;
|
||||
position {
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# Ordinary-text union: subsequent gates
|
||||
|
||||
Closed automated-gates checkpoint. Preserve the separately published initial evidence package
|
||||
at `../ordinary-text-integration-20260913/`.
|
||||
|
||||
Run `python verify.py` with Python 3.10 or newer. Verification uses only these
|
||||
five files and the standard library: no archived code execution, extraction,
|
||||
network, Git, Cargo, binaries or original-machine paths. All outer text files
|
||||
are UTF-8 with LF before hashing. Raw ZIP contents retain original bytes.
|
||||
`files.json` pins the archive, manifest, verifier and README; the manifest pins
|
||||
each member and maps each capture to exact source inventory/archive objects.
|
||||
Only byte-identical objects are deduplicated, including ZIP timestamps.
|
||||
|
||||
| Capture | Outcome |
|
||||
| --- | --- |
|
||||
| desktop-list-1 | 1,185 actual listed test names |
|
||||
| core-2 | 537 passed, 0 failed, 1 ignored |
|
||||
| desktop-1 | 1,179 passed, 0 failed, 6 ignored |
|
||||
| clippy-1 | Failed items_after_test_module lint; raw logs retained |
|
||||
| clippy-2 | Failed unused SymbolEvent::Close lint; raw logs retained |
|
||||
| clippy-3 | Passed strict workspace/all-target lint |
|
||||
| desktop-affected-2 | 83 passed, 0 failed, 1 known ignored, 1,101 filtered |
|
||||
| windows-build-1 | Workspace binaries built successfully; 3 binary artifact receipts |
|
||||
|
||||
The full suites use the e624d5b9c4f848eff3fba2ed83f9decf959e14d8 input
|
||||
state. The final lint inputs include the reviewed four-file fix committed as
|
||||
f714a25bbcd435941404104ad0cbb0fea3b89149. That change moves test-only
|
||||
helpers, removes the unconstructed Close variant and its handler, and changes
|
||||
existing tests to send the captured HideDrawer event already used by production
|
||||
UI. `fullSuiteToFinalInputChanges` records the exact four file/digest pairs.
|
||||
Per-run source inventories are authoritative; receipt HEADs can predate dirty
|
||||
changes. Full-suite outcomes are scoped to their recorded inputs; they are not
|
||||
a full-suite rerun of the later fix. The final affected-test recheck uses the
|
||||
same 707 input hashes as clippy-3. Its 84 names equal the OR-filter selection
|
||||
from the prior 1,185-name listing: `source_symbols::tests`, `text_workspace::`,
|
||||
`views::tests`, `palette_union`. All 83 enabled selected tests passed; the
|
||||
known ignored case is the source-symbol 100-module performance probe. This
|
||||
check introduces no test names and leaves 1,101 previous tests unexecuted on
|
||||
the final source state.
|
||||
The final Windows build uses those same 707 input hashes. Its three binary
|
||||
artifact records are preserved; the binaries themselves are not in this package.
|
||||
|
||||
Verification checks archive membership/hashes, nested source manifests and all
|
||||
707 inputs including 71 vendored iced_widget files, receipt relationships,
|
||||
helper identity, commands, outcomes, exact test summary rows, and artifact
|
||||
receipt records. It independently recomputes actual desktop names/outcomes,
|
||||
listing/execution equality, all 150 required matches (144 passed, 6 ignored),
|
||||
removed/retained names, and 24 original checklist Git blob bindings from archived
|
||||
source bytes. It checks the full-suite-to-final four-file input delta. The
|
||||
checklist's original pending-listing wording is preserved as raw historical
|
||||
input; desktop-admission.json records the completed admission.
|
||||
|
||||
`final-input-commit-readback.json` is a secondary parent-produced summary of
|
||||
comparison between all 707 final lint inputs and f714a25 committed blobs. Its
|
||||
helper and Git stream were not archived. Verification checks its relationship
|
||||
to the captured input manifest; it does not independently reproduce the Git
|
||||
comparison or authenticate that commit.
|
||||
|
||||
Integrity and internal consistency do not establish independent reproduction or
|
||||
authenticated provenance. Expected summary rows are frozen from raw logs.
|
||||
Ignored probes did not execute. Test membership/pass outcomes do not establish
|
||||
complete requirement coverage or native GUI acceptance. Compiler artifact hashes
|
||||
are retained as observations; binaries are intentionally absent and cannot be
|
||||
verified here. Source archives are not a hermetic compiler/dependency bundle.
|
||||
This package makes no native interaction, release publication or packaged-build
|
||||
claim. No credentials, dependency caches or whole user profile are included.
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"evidence.zip": {
|
||||
"bytes": 8624040,
|
||||
"sha256": "b0da6611dd86e83c8f779c025786e473834298f9b9990b19a76b250b61137780"
|
||||
},
|
||||
"manifest.json": {
|
||||
"bytes": 19056,
|
||||
"sha256": "752d4c8e703cdbac361f959716a8a752096280727f9f0c966854d479aa68750d"
|
||||
},
|
||||
"verify.py": {
|
||||
"bytes": 12815,
|
||||
"sha256": "5157b5cadf38e59bd59693fe1d14235d2007788bb6c8bd9cbac938cb048b14f4"
|
||||
},
|
||||
"README.md": {
|
||||
"bytes": 4177,
|
||||
"sha256": "9bfafd6506d1eb322e6efb8070a1599766d6d09532a678251a8b2414387edc6e"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,819 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fullSuiteInputsCommit": "e624d5b9c4f848eff3fba2ed83f9decf959e14d8",
|
||||
"reviewedFixCommit": "f714a25bbcd435941404104ad0cbb0fea3b89149",
|
||||
"runs": {
|
||||
"desktop-list-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json",
|
||||
"archive": "inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--list"
|
||||
],
|
||||
"head": "e624d5b9c4f848eff3fba2ed83f9decf959e14d8",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"core-2": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json",
|
||||
"archive": "inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--no-fail-fast",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "cb941367d7748f7bfe7dda53641d395ad60a499f",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
102,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
9,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
9,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
11,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
16,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
35,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
15,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
11,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
15,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
18,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
16,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
12,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
33,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
28,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
537,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"desktop-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json",
|
||||
"archive": "inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--no-fail-fast",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "cb941367d7748f7bfe7dda53641d395ad60a499f",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
1179,
|
||||
0,
|
||||
6,
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
1179,
|
||||
0,
|
||||
6,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"clippy-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json",
|
||||
"archive": "inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"clippy",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--workspace",
|
||||
"--all-targets",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"-D",
|
||||
"warnings"
|
||||
],
|
||||
"head": "cb941367d7748f7bfe7dda53641d395ad60a499f",
|
||||
"exitCode": 101,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"clippy-2": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/6b2c2925c732b79150b1d3c2f9dc215f9221b89796bb1d8668d3ecc138095f82.json",
|
||||
"archive": "inputs/c5080fa78cb5cac2c6bdbf53f00d9d19313fa08de351153b9c5babd3a55b2f7d.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"clippy",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--workspace",
|
||||
"--all-targets",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"-D",
|
||||
"warnings"
|
||||
],
|
||||
"head": "cb941367d7748f7bfe7dda53641d395ad60a499f",
|
||||
"exitCode": 101,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"clippy-3": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95.json",
|
||||
"archive": "inputs/9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"clippy",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--workspace",
|
||||
"--all-targets",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"-D",
|
||||
"warnings"
|
||||
],
|
||||
"head": "cb941367d7748f7bfe7dda53641d395ad60a499f",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"desktop-affected-2": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95.json",
|
||||
"archive": "inputs/9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-desktop",
|
||||
"--bin",
|
||||
"arcadia-studio",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"source_symbols::tests",
|
||||
"text_workspace::",
|
||||
"views::tests",
|
||||
"palette_union",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "f714a25bbcd435941404104ad0cbb0fea3b89149",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
83,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1101
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
83,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1101
|
||||
]
|
||||
},
|
||||
"windows-build-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95.json",
|
||||
"archive": "inputs/9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"build",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"--workspace",
|
||||
"--bins",
|
||||
"--message-format=json"
|
||||
],
|
||||
"head": "f714a25bbcd435941404104ad0cbb0fea3b89149",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"members": {
|
||||
"helpers/desktop-admission.json": {
|
||||
"bytes": 289720,
|
||||
"sha256": "af2d601032f1f98217d841d181255dda5e123f48078f8d09815b498ee8975eb9"
|
||||
},
|
||||
"helpers/final-input-commit-readback.json": {
|
||||
"bytes": 260,
|
||||
"sha256": "9670f7400e358c5033b09ae4388cf577fb3db3f288a51d7ffe7b47c87bc377c0"
|
||||
},
|
||||
"helpers/gate-union.py": {
|
||||
"bytes": 3495,
|
||||
"sha256": "9cca2646b1bcf09961a9ad1a276d633d8e4296ff2c6f2f356f028afaf789f503"
|
||||
},
|
||||
"helpers/required-desktop-tests.json": {
|
||||
"bytes": 125261,
|
||||
"sha256": "6672e3f7ccfb92b7710310836af6933a8e58ef113353505ec4fc0c3d6908c136"
|
||||
},
|
||||
"inputs/6b2c2925c732b79150b1d3c2f9dc215f9221b89796bb1d8668d3ecc138095f82.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "6b2c2925c732b79150b1d3c2f9dc215f9221b89796bb1d8668d3ecc138095f82"
|
||||
},
|
||||
"inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip": {
|
||||
"bytes": 2831327,
|
||||
"sha256": "86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1"
|
||||
},
|
||||
"inputs/9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c.zip": {
|
||||
"bytes": 2831326,
|
||||
"sha256": "9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c"
|
||||
},
|
||||
"inputs/a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95"
|
||||
},
|
||||
"inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48"
|
||||
},
|
||||
"inputs/c5080fa78cb5cac2c6bdbf53f00d9d19313fa08de351153b9c5babd3a55b2f7d.zip": {
|
||||
"bytes": 2831320,
|
||||
"sha256": "c5080fa78cb5cac2c6bdbf53f00d9d19313fa08de351153b9c5babd3a55b2f7d"
|
||||
},
|
||||
"runs/clippy-1/process.json": {
|
||||
"bytes": 199,
|
||||
"sha256": "1af72ef6a92af65144a1faea8cae4f5c868799894bf539385b8f40912b0b50ae"
|
||||
},
|
||||
"runs/clippy-1/result.json": {
|
||||
"bytes": 1799,
|
||||
"sha256": "355929311a614bfd682e9dc47fa1afef98e14b22f76c856771564b9eb282af57"
|
||||
},
|
||||
"runs/clippy-1/started.json": {
|
||||
"bytes": 1400,
|
||||
"sha256": "4671c110e5e26a34e48470b0002322fc450b3844ee849f90ae6523091528ece1"
|
||||
},
|
||||
"runs/clippy-1/stderr.log": {
|
||||
"bytes": 1368,
|
||||
"sha256": "741e0cd2a2418cdb748703cf02cc72064e5b88b123a6fdacb5c6f87a2a6959c6"
|
||||
},
|
||||
"runs/clippy-1/stdout.log": {
|
||||
"bytes": 272957,
|
||||
"sha256": "37c21ea32cba74fbb54bc9e9f962fc7dfd5c018ac7f3750c2ae905e7cb51a542"
|
||||
},
|
||||
"runs/clippy-2/process.json": {
|
||||
"bytes": 199,
|
||||
"sha256": "6d11bf41b9461e19f6a06b64841ef1fa30c5129de4a4dad215866fc14c8f29d1"
|
||||
},
|
||||
"runs/clippy-2/result.json": {
|
||||
"bytes": 1797,
|
||||
"sha256": "0583fa653d2b2be928250b1845d2eec36886a5ea1dc12013ea853b68a79fe4be"
|
||||
},
|
||||
"runs/clippy-2/started.json": {
|
||||
"bytes": 1400,
|
||||
"sha256": "9d290135f4125ac119601b2704f1ac9b03ec5800a80624155ead21a35e7a4ec6"
|
||||
},
|
||||
"runs/clippy-2/stderr.log": {
|
||||
"bytes": 155,
|
||||
"sha256": "93a6965e0904eb30abe0657f4a9c30b5ba9e148c9d5274b3c3fb5e78d898c562"
|
||||
},
|
||||
"runs/clippy-2/stdout.log": {
|
||||
"bytes": 270250,
|
||||
"sha256": "bdc2338aab9fc18fb4e29fbb9e9192ccf9b67e1e9fb2cca828ec50acc90c1437"
|
||||
},
|
||||
"runs/clippy-3/process.json": {
|
||||
"bytes": 199,
|
||||
"sha256": "0d3a92e71ae9b33b703479a54fd1ca2491b67c1374b1a1e259816eebea9bb3b0"
|
||||
},
|
||||
"runs/clippy-3/result.json": {
|
||||
"bytes": 1796,
|
||||
"sha256": "cf49e16fa5cbecacf24edbf054036b1190a02771c61f1178c12c6f3d7d9477b0"
|
||||
},
|
||||
"runs/clippy-3/started.json": {
|
||||
"bytes": 1400,
|
||||
"sha256": "5499895565380e2efb1ccf6a9acc825318dfe09135815adf9512bf50530524a5"
|
||||
},
|
||||
"runs/clippy-3/stderr.log": {
|
||||
"bytes": 325,
|
||||
"sha256": "d2811192fb769c1a0f2e4258dd31c76f6a475e43bc6214e49db7c0757e7dad00"
|
||||
},
|
||||
"runs/clippy-3/stdout.log": {
|
||||
"bytes": 307989,
|
||||
"sha256": "319cad11af00c742a1436734b5daee273a112859c7775b06fada1948d54e93d6"
|
||||
},
|
||||
"runs/core-2/process.json": {
|
||||
"bytes": 197,
|
||||
"sha256": "50d3c62701417b7cf49de72139a71d5b26ede0ebec36eac6ecc254cf45f1594a"
|
||||
},
|
||||
"runs/core-2/result.json": {
|
||||
"bytes": 67027,
|
||||
"sha256": "2eb69042c0c6eecb89b11e739b9598005b8a26479564d299275817310011b5bb"
|
||||
},
|
||||
"runs/core-2/started.json": {
|
||||
"bytes": 1398,
|
||||
"sha256": "eadc9d64a5fedc1bea614c2ccae4d19616e2f7b0538bc5e08e84e9ee92f532e0"
|
||||
},
|
||||
"runs/core-2/stderr.log": {
|
||||
"bytes": 8930,
|
||||
"sha256": "0d5a5d2a4e64bd38c89fffafd8089de7b74a52f1dbbccb8cc59dae640bebba3b"
|
||||
},
|
||||
"runs/core-2/stdout.log": {
|
||||
"bytes": 131042,
|
||||
"sha256": "4185a25e52e52f3c6ee1dcd942a45e1a3ef57b3961ec7e7c4ca0aacc86967cfc"
|
||||
},
|
||||
"runs/desktop-1/process.json": {
|
||||
"bytes": 227,
|
||||
"sha256": "38ff4960fbcdf8282c8fc323a337b25f19b1ab424d7ed590917e6765f8a643c1"
|
||||
},
|
||||
"runs/desktop-1/result.json": {
|
||||
"bytes": 3154,
|
||||
"sha256": "f254ec40b83763f1398ab96fff16d96c9a0ff8a3113c2d16556c973eb5eaf93e"
|
||||
},
|
||||
"runs/desktop-1/started.json": {
|
||||
"bytes": 1438,
|
||||
"sha256": "ba43fbd949da1d6e453217c2f534d661b81dbe4b42fc1fe198c811234dc48aaf"
|
||||
},
|
||||
"runs/desktop-1/stderr.log": {
|
||||
"bytes": 552,
|
||||
"sha256": "c975782e7df7ce13b9f298d164fd4cc8e8161b6da7fd77c4607920fd8b3bf900"
|
||||
},
|
||||
"runs/desktop-1/stdout.log": {
|
||||
"bytes": 430091,
|
||||
"sha256": "1bfcc88362ef725cb3e4b9af7967d4bd18e65db3eccd342fe3264ea6ef95ec19"
|
||||
},
|
||||
"runs/desktop-affected-2/process.json": {
|
||||
"bytes": 287,
|
||||
"sha256": "b72fb9ac1c7400ef7af2ed80f26a1e13fc718342779c868e4cbad4a5152b131f"
|
||||
},
|
||||
"runs/desktop-affected-2/result.json": {
|
||||
"bytes": 3228,
|
||||
"sha256": "cfb3f9563f35977efe26d69d6a12040278f725bf09fb30ec812a984cab72dc02"
|
||||
},
|
||||
"runs/desktop-affected-2/started.json": {
|
||||
"bytes": 1513,
|
||||
"sha256": "cca30f43f1d79c10a996422f9a506a08fc91eba7fc15a02615105f7fed89a20a"
|
||||
},
|
||||
"runs/desktop-affected-2/stderr.log": {
|
||||
"bytes": 281,
|
||||
"sha256": "90504f37b7256fd61af78a6c636560b3646ec9bdb2bc954c6e5bc77f69f21306"
|
||||
},
|
||||
"runs/desktop-affected-2/stdout.log": {
|
||||
"bytes": 304036,
|
||||
"sha256": "adf50044a9f6947e7384dbd0193fe069276c2e78da1d6c45a55150d2b1defa26"
|
||||
},
|
||||
"runs/desktop-list-1/process.json": {
|
||||
"bytes": 204,
|
||||
"sha256": "139e8f5d11f45dd2b6d2151e0b0628d892f3ad228134032ab8c9bfb1989059db"
|
||||
},
|
||||
"runs/desktop-list-1/result.json": {
|
||||
"bytes": 3128,
|
||||
"sha256": "24eacbb644a6b82be7439e4f8895562356eb63485e82c30292b2951cb090d29d"
|
||||
},
|
||||
"runs/desktop-list-1/started.json": {
|
||||
"bytes": 1410,
|
||||
"sha256": "33adc56c5fad5bd53dd425f5c6ccf8faf550bd382867b848d04ebaafcb3d5c66"
|
||||
},
|
||||
"runs/desktop-list-1/stderr.log": {
|
||||
"bytes": 1427,
|
||||
"sha256": "97885faf304979ca43898f88d3ca7118100fd1c2358f9d4729984f7369788704"
|
||||
},
|
||||
"runs/desktop-list-1/stdout.log": {
|
||||
"bytes": 421428,
|
||||
"sha256": "32f0025d9205288e92c4031dc1b53298b8e79f1ccb8ce990a40d7c3d66f4305f"
|
||||
},
|
||||
"runs/windows-build-1/process.json": {
|
||||
"bytes": 167,
|
||||
"sha256": "b400c1f8076bcddb583424fe34d155655a41d25b5ccf0db8af26bda6b9b2685e"
|
||||
},
|
||||
"runs/windows-build-1/result.json": {
|
||||
"bytes": 5532,
|
||||
"sha256": "5e9e227c66a4b71ade734b8ebeb12070b8a5c64a9a6cf9d8d0b6d70379d4ffc2"
|
||||
},
|
||||
"runs/windows-build-1/started.json": {
|
||||
"bytes": 1353,
|
||||
"sha256": "15c54be09a881e6860735395569b22a7a9114789a1f8276cf79bc6fb095c8163"
|
||||
},
|
||||
"runs/windows-build-1/stderr.log": {
|
||||
"bytes": 261,
|
||||
"sha256": "480dff999944c756fff581db0f3fac088717e0d73cae20af9a28829446df746f"
|
||||
},
|
||||
"runs/windows-build-1/stdout.log": {
|
||||
"bytes": 295092,
|
||||
"sha256": "5a824ca91877328acd332585b39194b27fd2cb167279b99c4c78a89bf13bd19b"
|
||||
}
|
||||
},
|
||||
"fullSuiteToFinalInputChanges": {
|
||||
"crates/oa-desktop/src/app/source_symbols.rs": {
|
||||
"before": {
|
||||
"bytes": 26476,
|
||||
"sha256": "230b2d19b0aeb767a311bdc0eddfd69986ebc5f65b8892382cd033a69f86cb2d"
|
||||
},
|
||||
"after": {
|
||||
"bytes": 26369,
|
||||
"sha256": "9dbcb70a7eaa0b2f7ec011da1fcc808ba1e53ec1c29a3c9a09cf7517e058c7b7"
|
||||
}
|
||||
},
|
||||
"crates/oa-desktop/src/app/source_symbols/tests.rs": {
|
||||
"before": {
|
||||
"bytes": 85389,
|
||||
"sha256": "0e3ae6861ded52e7d137736f4ffe6bf55a00291bf685d3bbe6141174210eee9c"
|
||||
},
|
||||
"after": {
|
||||
"bytes": 85506,
|
||||
"sha256": "aebd05f3fa9f1e9c2e744948d4478d9f267365d063f01f8b8f4e67560bc23f32"
|
||||
}
|
||||
},
|
||||
"crates/oa-desktop/src/source_navigation/controller.rs": {
|
||||
"before": {
|
||||
"bytes": 3691,
|
||||
"sha256": "2042d608a4e9698c614c0d308d02896983480087908ecc353369b424eca3d124"
|
||||
},
|
||||
"after": {
|
||||
"bytes": 3680,
|
||||
"sha256": "938b8264c2d5166bd979439723d6fbec34c4cc5ed7f872f58c2cb9ba06a4a93d"
|
||||
}
|
||||
},
|
||||
"crates/oa-desktop/src/views.rs": {
|
||||
"before": {
|
||||
"bytes": 58364,
|
||||
"sha256": "46bb9410567d47e3043723fc3b8c7342c04e85b1b4a4c06a84e8497757cc04dc"
|
||||
},
|
||||
"after": {
|
||||
"bytes": 58364,
|
||||
"sha256": "e74da124914a54a3b757eb4728a5093157f172cd7f5e90b7744e526e3ec3f8d2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
"""Read-only, Python-standard-library verification. Never executes archived code."""
|
||||
from pathlib import Path, PurePosixPath
|
||||
from datetime import datetime
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import re
|
||||
import zipfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
|
||||
def require(ok, message):
|
||||
if not ok:
|
||||
raise ValueError(message)
|
||||
|
||||
def digest(data):
|
||||
return {'bytes': len(data), 'sha256': hashlib.sha256(data).hexdigest()}
|
||||
|
||||
def members(z, expected):
|
||||
names = z.namelist()
|
||||
require(len(names) == len(set(names)), 'duplicate ZIP members')
|
||||
require(set(names) == set(expected), 'archive membership mismatch')
|
||||
require(all(not PurePosixPath(n).is_absolute() and '..' not in PurePosixPath(n).parts
|
||||
and '\\' not in n and ':' not in n for n in names), 'unsafe member')
|
||||
|
||||
def main():
|
||||
inventory = json.loads((ROOT / 'files.json').read_text())
|
||||
for name, expected in inventory.items():
|
||||
require(digest((ROOT / name).read_bytes()) == expected, 'external file hash: ' + name)
|
||||
manifest = json.loads((ROOT / 'manifest.json').read_text())
|
||||
with zipfile.ZipFile(ROOT / 'evidence.zip') as z:
|
||||
members(z, manifest['members'])
|
||||
for name, expected in manifest['members'].items():
|
||||
require(digest(z.read(name)) == expected, 'member hash: ' + name)
|
||||
def raw(name): return z.read(name)
|
||||
def obj(name): return json.loads(raw(name))
|
||||
checked = set()
|
||||
for run, spec in manifest['runs'].items():
|
||||
if spec['kind'] != 'cargo':
|
||||
continue
|
||||
prefix = 'runs/' + run + '/'
|
||||
start, result, process = (obj(prefix + n + '.json') for n in ('started', 'result', 'process'))
|
||||
require(all(result[k] == v for k, v in start.items()), run + ': start/result relationship')
|
||||
require(result['command'] == spec['command'] == process['command'], run + ': command')
|
||||
require(result['head'] == spec['head'], run + ': HEAD')
|
||||
require(result['exitCode'] == spec['exitCode'] and result['inputsUnchanged'] is True, run + ': outcome')
|
||||
require(datetime.fromisoformat(result['finish']) >= datetime.fromisoformat(start['start']), run + ': times')
|
||||
require(result['seconds'] >= 0, run + ': duration')
|
||||
require(result['helper'] == digest(raw('helpers/gate-union.py')), run + ': helper')
|
||||
for field, file in [('inputs', spec['inputs']), ('archive', spec['archive']), ('stdout', prefix+'stdout.log'), ('stderr', prefix+'stderr.log')]:
|
||||
require(result[field] == digest(raw(file)), run + ': receipt ' + field)
|
||||
inputs = obj(spec['inputs'])
|
||||
require(len(inputs) == result['inputCount'] == spec['inputCount'] == 707, run + ': input count')
|
||||
require(sum(p.startswith('crates/vendor/iced_widget/') for p in inputs) == 71, run + ': vendor count')
|
||||
pair = (spec['inputs'], spec['archive'])
|
||||
if pair not in checked:
|
||||
with zipfile.ZipFile(io.BytesIO(raw(spec['archive']))) as source:
|
||||
members(source, inputs)
|
||||
for name, expected in inputs.items():
|
||||
require(digest(source.read(name)) == expected, run + ': source hash ' + name)
|
||||
checked.add(pair)
|
||||
stdout = raw(prefix+'stdout.log').decode('utf-8', errors='replace')
|
||||
rows = [[int(x) for x in row] for row in re.findall(r'test result: (?:ok|FAILED)\. (\d+) passed; (\d+) failed; (\d+) ignored; (\d+) measured; (\d+) filtered out;', stdout)]
|
||||
require(rows == spec['testRows'], run + ': exact test summaries')
|
||||
require([sum(row[i] for row in rows) for i in range(5)] == spec['testTotals'], run + ': test totals')
|
||||
artifacts = []
|
||||
for line in stdout.splitlines():
|
||||
try: item = json.loads(line)
|
||||
except json.JSONDecodeError: continue
|
||||
if isinstance(item, dict) and item.get('reason') == 'compiler-artifact' and item.get('executable'):
|
||||
artifacts.append(item)
|
||||
require(artifacts == [a['cargo'] for a in result['artifacts']], run + ': artifact receipt relationship')
|
||||
print(run, 'exit', result['exitCode'], 'test totals', spec['testTotals'])
|
||||
admission(z, manifest)
|
||||
print('PASS:', len(manifest['runs']), 'closed captures;', len(manifest['members']), 'members;', len(checked), 'input manifest/archive pairs')
|
||||
print('Integrity and recorded outcomes only; no rerun, binary verification, or native GUI claim.')
|
||||
|
||||
def admission(z, manifest):
|
||||
def obj(p): return json.loads(z.read(p))
|
||||
report = obj('helpers/desktop-admission.json')
|
||||
checklist = obj('helpers/required-desktop-tests.json')
|
||||
require(report['status'] == 'PASS', 'admission status')
|
||||
require({k:report['checklist'][k] for k in ('bytes','sha256')} == digest(z.read('helpers/required-desktop-tests.json')), 'checklist receipt')
|
||||
require(report['checklist']['sourceCommit'] == checklist['sourceCommit'], 'checklist source pin')
|
||||
for run, receipt in report['runs'].items():
|
||||
result = obj('runs/'+run+'/result.json')
|
||||
for field in ('head','command','exitCode','inputsUnchanged','inputCount'):
|
||||
require(receipt[field] == result[field], 'admission run relationship '+field)
|
||||
require(receipt['inputManifest'] == result['inputs'] and receipt['stdout'] == result['stdout'], 'admission inputs/log')
|
||||
require(receipt['resultReceipt'] == digest(z.read('runs/'+run+'/result.json')), 'admission result hash')
|
||||
listing = z.read('runs/desktop-list-1/stdout.log').decode('utf-8')
|
||||
execution = z.read('runs/desktop-1/stdout.log').decode('utf-8')
|
||||
names = re.findall(r'^([A-Za-z0-9_:]+): test$', listing, re.M)
|
||||
outcomes = re.findall(r'^test ([A-Za-z0-9_:]+) \.\.\. (ok|FAILED|ignored)(?:, (.*))?$', execution, re.M)
|
||||
require(len(names) == len(set(names)) == 1185, 'listing names/count/uniqueness')
|
||||
require(len(outcomes) == len({r[0] for r in outcomes}) == 1185, 'execution names/count/uniqueness')
|
||||
require(set(names) == {r[0] for r in outcomes}, 'listing/execution set equality')
|
||||
actual = {n:(status, reason or None) for n,status,reason in outcomes}
|
||||
require(actual == {r['name']:(r['status'],r['reason']) for r in report['allActualNamesAndOutcomes']}, 'admission raw outcomes')
|
||||
require(len(report['allActualNamesAndOutcomes']) == len(actual), 'admission duplicate outcomes')
|
||||
required = []
|
||||
for spec in checklist['required']:
|
||||
matches = [n for n in names if n.endswith(spec['match']['suffix'])]
|
||||
require(len(matches) == spec['match']['expectedOccurrences'] == 1, 'required unique match '+spec['name'])
|
||||
n = matches[0]
|
||||
require(actual[n][0] == ('ignored' if spec['expectedIgnored'] else 'ok'), 'required outcome '+n)
|
||||
required.append({'sourcePath':spec['sourcePath'],'expectedBasename':spec['name'],'actualName':n,'expectedIgnored':spec['expectedIgnored'],'status':actual[n][0],'reason':actual[n][1]})
|
||||
require(required == report['requiredOutcomes'], 'required admission relationships')
|
||||
removed=[]
|
||||
for spec in checklist['removedOrReplaced']:
|
||||
require(not any(n.endswith('::'+spec['name']) for n in names), 'removed test present')
|
||||
replacements=[n for replacement in spec.get('replacementNames',[]) for n in names if n.endswith('::'+replacement)]
|
||||
removed.append({'name':spec['name'],'absent':True,'replacementActualNames':replacements})
|
||||
require(removed == report['removedOrReplaced'], 'removed admission relationship')
|
||||
retained=[]
|
||||
for spec in checklist['duplicateDeparture']:
|
||||
require(actual[spec['requiredFullName']][0] == 'ok' and spec['removedFullName'] not in names, 'retained duplicate admission')
|
||||
require(sum(n.endswith('::'+spec['name']) for n in names) == spec['expectedTotalOccurrences'] == 1, 'retained duplicate count')
|
||||
retained.append({'name':spec['name'],'retainedName':spec['requiredFullName'],'retainedStatus':'ok','removedParentNameAbsent':True})
|
||||
require(retained == report['retainedDepartureCases'], 'retained admission relationship')
|
||||
before = obj(manifest['runs']['desktop-1']['inputs'])
|
||||
require(before == obj(manifest['runs']['desktop-list-1']['inputs']), 'listing/execution source equality')
|
||||
require(before == obj(manifest['runs']['core-2']['inputs']), 'core/desktop full-suite source equality')
|
||||
with zipfile.ZipFile(io.BytesIO(z.read(manifest['runs']['desktop-1']['archive']))) as source:
|
||||
bindings=[]
|
||||
for spec in checklist['sourceBindings']:
|
||||
b=source.read(spec['path'])
|
||||
blob=hashlib.sha1(b'blob '+str(len(b)).encode()+b'\0'+b).hexdigest()
|
||||
require(blob == spec['gitBlob'], 'original checklist source blob '+spec['path'])
|
||||
bindings.append({**spec,'capturedAndCurrentDigest':digest(b),'matchesOriginalChecklistBlob':True})
|
||||
require(bindings == report['sourceBindings'], 'source binding admission')
|
||||
summary={'listed':len(names),'executed':len(actual),'exactNameSetEquality':True,'duplicateListedNames':0,'duplicateExecutedNames':0,
|
||||
'passed':sum(v[0]=='ok' for v in actual.values()),'failed':sum(v[0]=='FAILED' for v in actual.values()),'ignored':sum(v[0]=='ignored' for v in actual.values()),
|
||||
'required':len(required),'requiredPassed':sum(r['status']=='ok' for r in required),'requiredIgnored':sum(r['status']=='ignored' for r in required),
|
||||
'removedNamesAbsent':len(checklist['removedOrReplaced']),'retainedDuplicateCasesPassExactlyOnce':len(checklist['duplicateDeparture']),
|
||||
'originalChecklistSourceFilesVerified':len(checklist['sourceBindings']),'listingAndExecutionInputManifestsEqual':True}
|
||||
require(summary == report['summary'], 'admission summary')
|
||||
after = obj(manifest['runs']['clippy-3']['inputs'])
|
||||
changed={p:{'before':before.get(p),'after':after.get(p)} for p in sorted(set(before)|set(after)) if before.get(p)!=after.get(p)}
|
||||
require(changed == manifest['fullSuiteToFinalInputChanges'] and len(changed)==4, 'four-file source delta')
|
||||
require(set(changed) == {'crates/oa-desktop/src/source_navigation/controller.rs','crates/oa-desktop/src/app/source_symbols.rs','crates/oa-desktop/src/app/source_symbols/tests.rs','crates/oa-desktop/src/views.rs'}, 'reviewed four-file scope')
|
||||
readback=obj('helpers/final-input-commit-readback.json')
|
||||
require(readback['status']=='PASS' and readback['commit']==manifest['reviewedFixCommit'], 'secondary readback summary')
|
||||
require(readback['inputCount']==len(after) and readback['inputManifestSha256']==digest(z.read(manifest['runs']['clippy-3']['inputs']))['sha256'], 'secondary readback input relationship')
|
||||
for run in ('desktop-affected-2','windows-build-1'):
|
||||
if run in manifest['runs']:
|
||||
require(obj(manifest['runs'][run]['inputs']) == after, run+': final source equality')
|
||||
if 'windows-build-1' in manifest['runs']:
|
||||
result=obj('runs/windows-build-1/result.json')
|
||||
require(result['exitCode']==0 and len(result['artifacts'])==3, 'final build outcome/artifacts')
|
||||
require({a['cargo']['target']['name'] for a in result['artifacts']}=={'arcadia','arcadia-server','arcadia-studio'}, 'final build target membership')
|
||||
if 'desktop-affected-2' in manifest['runs']:
|
||||
spec=manifest['runs']['desktop-affected-2']
|
||||
args=spec['command'][spec['command'].index('--')+1:]
|
||||
filters=[arg for arg in args if not arg.startswith('--')]
|
||||
require(filters==['source_symbols::tests','text_workspace::','views::tests','palette_union'], 'affected OR filters')
|
||||
selected={n for n in names if any(f in n for f in filters)}
|
||||
log=z.read('runs/desktop-affected-2/stdout.log').decode('utf-8')
|
||||
affected=re.findall(r'^test ([A-Za-z0-9_:]+) \.\.\. (ok|FAILED|ignored)(?:, (.*))?$',log,re.M)
|
||||
require(len(affected)==len({r[0] for r in affected})==len(selected)==84, 'affected count/unique names')
|
||||
require({n for n,s,r in affected}==selected, 'affected exact OR-filter selection from prior listing')
|
||||
require(sum(s=='ok' for n,s,r in affected)==83 and sum(s=='FAILED' for n,s,r in affected)==0, 'affected enabled passes')
|
||||
require([n for n,s,r in affected if s=='ignored']==['app::source_symbols::tests::source_symbols_100_modules_1000_definitions_10000_uses'], 'affected known ignored probe')
|
||||
require(spec['testTotals']==[83,0,1,0,len(names)-len(selected)], 'affected summary and filtered count')
|
||||
print('Affected recheck: exact prior-list OR selection; 83 passed, 1 known ignored, 1101 filtered')
|
||||
print('Desktop admission:', summary['passed'], 'passed,', summary['ignored'], 'ignored;',len(required),'required; four final changed input files')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,52 @@
|
||||
# Ordinary-text union: closed-run checkpoint
|
||||
|
||||
Run `python verify.py` with Python 3.10 or newer in this directory. The verifier
|
||||
uses only the standard library and these five files. It reads archives in memory,
|
||||
does not extract or execute source/binaries, and does not consult Git, Cargo,
|
||||
network services, or paths recorded from the original machine.
|
||||
|
||||
`files.json` hashes the ZIP, manifest, verifier and this README. `manifest.json`
|
||||
lists every ZIP member and maps each run to its exact input manifest and ZIP.
|
||||
Only byte-identical input files are deduplicated; ZIPs with different timestamps
|
||||
remain separate even when their source inventories match. Receipts and raw logs
|
||||
are retained verbatim, including failures and original local path strings.
|
||||
|
||||
The production composition is d7c065991d3f63cc41341d23a546739de8837ac3.
|
||||
The checkpoint is e624d5b9c4f848eff3fba2ed83f9decf959e14d8, including generated
|
||||
teaching fixtures and normative language documentation. Individual receipt HEADs
|
||||
and input inventories are authoritative for each run; a HEAD alone does not
|
||||
describe dirty fixture/document changes during capture.
|
||||
|
||||
| Closed capture | Recorded outcome |
|
||||
| --- | --- |
|
||||
| core-consumers-1 | Offline dependency resolution failed: num-bigint missing |
|
||||
| windows-dependencies-1 | Dependency preparation completed |
|
||||
| core-1 | 536 passed, 1 failed, 1 ignored; stale generated teaching fixture failure preserved |
|
||||
| teaching-generate-1 | Teaching generator completed; raw generated-release1 outputs included |
|
||||
| teaching-check-2 | 4 passed after fixture regeneration |
|
||||
| language-doc-1 | Warning log from failed strict render preserved |
|
||||
| language-doc-2 | Strict docutils 0.23 render succeeded; empty warning log |
|
||||
| consumers-1 | 63 passed |
|
||||
|
||||
The verifier checks exact archive membership, hashes and lengths, nested input
|
||||
archive membership/content, input counts (including 71 vendored iced_widget
|
||||
files), start/result/process command relationships, unchanged-input assertions,
|
||||
helper hashes, exit codes, exact test summary rows and aggregate counts,
|
||||
compiler-artifact receipt relationships, composition patch hash, generated output
|
||||
inventory, and successful document source/output/warning receipts.
|
||||
|
||||
Limitations: integrity and internal consistency are not independent reproduction
|
||||
or authenticated provenance. Test expectations in the manifest are frozen from
|
||||
the raw capture. No runtime binaries, dependency cache, credentials or user
|
||||
profile are packaged. Recorded artifact readback hashes cannot be independently
|
||||
checked without the excluded binaries. Input archives contain project sources,
|
||||
not a hermetic toolchain or complete dependency distribution. The gate helper is
|
||||
receipt-pinned; the included render helper is its current successful-render
|
||||
version, with no historical helper hash receipt. language-doc-1 contains only
|
||||
warnings.log: its original helper, exact failed input and process/exit receipt
|
||||
were not captured. The successful render inputs and outputs are hash-pinned by
|
||||
its result receipt. Generated outputs are archived as observed, without a
|
||||
separate generation-output hash receipt. This package does not claim a full
|
||||
core rerun after regeneration, complete desktop/GUI validation, lint success,
|
||||
release packaging, or publication. Active desktop-list-1 and any later runs are
|
||||
excluded from this initial checkpoint.
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"evidence.zip": {
|
||||
"bytes": 8584848,
|
||||
"sha256": "f220433f8f6fe99cea762aca98ee471c14411b5f6762745cf91432e6bfaca440"
|
||||
},
|
||||
"manifest.json": {
|
||||
"bytes": 24274,
|
||||
"sha256": "ad731f45fda8eb8678160315de00a4c77037d49ee40f0774496e7a2a970342aa"
|
||||
},
|
||||
"README.md": {
|
||||
"bytes": 3328,
|
||||
"sha256": "98c900e5c83e13da6c6edc11521df8edb87f4e1ebebb004fd1d6cc8acc91683b"
|
||||
},
|
||||
"verify.py": {
|
||||
"bytes": 5526,
|
||||
"sha256": "65136bbf0074c63a1478a56e0a66523d785081c368a50cd698d1231f6b0618ba"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,901 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"productionCommit": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"checkpointCommit": "e624d5b9c4f848eff3fba2ed83f9decf959e14d8",
|
||||
"runs": {
|
||||
"core-consumers-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4.json",
|
||||
"archive": "inputs/12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"-p",
|
||||
"oa-server",
|
||||
"--test",
|
||||
"http",
|
||||
"-p",
|
||||
"oa-cli",
|
||||
"--test",
|
||||
"source_cli",
|
||||
"--no-fail-fast",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 101,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"windows-dependencies-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4.json",
|
||||
"archive": "inputs/12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"fetch",
|
||||
"--locked",
|
||||
"--target",
|
||||
"x86_64-pc-windows-gnullvm"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"core-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4.json",
|
||||
"archive": "inputs/12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--no-fail-fast",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 101,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
102,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
9,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
9,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
11,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
16,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
35,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
15,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
11,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
15,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
18,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
16,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
12,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
33,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
13,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
28,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
536,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"teaching-generate-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4.json",
|
||||
"archive": "inputs/12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"run",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--example",
|
||||
"generate_release1",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
".local/ordinary-text-integration/generated-release1"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [],
|
||||
"testTotals": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"teaching-check-2": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/0fa1da63d71c984cd99b079de661e88154b5a31818b384f557deefd40b8ead3a.json",
|
||||
"archive": "inputs/81bd006f10034bc0c203187af179548a549fda6e58bc7cde0702cc26994fd28d.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-core",
|
||||
"--test",
|
||||
"release1_teaching",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"language-doc-1": {
|
||||
"kind": "render"
|
||||
},
|
||||
"language-doc-2": {
|
||||
"kind": "render"
|
||||
},
|
||||
"consumers-1": {
|
||||
"kind": "cargo",
|
||||
"inputs": "inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json",
|
||||
"archive": "inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip",
|
||||
"command": [
|
||||
"cargo",
|
||||
"test",
|
||||
"--locked",
|
||||
"--offline",
|
||||
"-p",
|
||||
"oa-server",
|
||||
"--test",
|
||||
"http",
|
||||
"-p",
|
||||
"oa-cli",
|
||||
"--test",
|
||||
"source_cli",
|
||||
"--no-fail-fast",
|
||||
"--message-format=json",
|
||||
"--",
|
||||
"--nocapture"
|
||||
],
|
||||
"head": "d7c065991d3f63cc41341d23a546739de8837ac3",
|
||||
"exitCode": 0,
|
||||
"inputCount": 707,
|
||||
"testRows": [
|
||||
[
|
||||
12,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
51,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
],
|
||||
"testTotals": [
|
||||
63,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"members": {
|
||||
"generated-release1/expected-diagnostics.json": {
|
||||
"bytes": 288,
|
||||
"sha256": "3700393d76b940cfc076bf52861bd7b1f43370f8eabce3594531bd0bf1fc851e"
|
||||
},
|
||||
"generated-release1/model.json": {
|
||||
"bytes": 134520,
|
||||
"sha256": "ef0ef4006c3e09d5db6e1b621256b3f7d6642f3a7b09cc34607cfbcca830c727"
|
||||
},
|
||||
"generated-release1/oa/activities/activity_oa_restore_work.arcadia": {
|
||||
"bytes": 1130,
|
||||
"sha256": "21cbd7176af8fad68453306f2371ff03e127a994b8796cdf044567332de9686f"
|
||||
},
|
||||
"generated-release1/oa/behavior/process_oa_assessment_procedure.arcadia": {
|
||||
"bytes": 550,
|
||||
"sha256": "23cabc213c264a16c8595414db6acb09248c1cef9cd699f1b0316e5bb82c062a"
|
||||
},
|
||||
"generated-release1/oa/behavior/process_oa_field_procedure.arcadia": {
|
||||
"bytes": 1178,
|
||||
"sha256": "9c52086759b7344b4809ceb8d372f65647b16fc24153a03b887faa378c37fe96"
|
||||
},
|
||||
"generated-release1/oa/behavior/process_oa_response.arcadia": {
|
||||
"bytes": 2560,
|
||||
"sha256": "675798bd19e6b40d03e7076b0e59b110cdaaab7b6d16c47c3ac80fa960072e84"
|
||||
},
|
||||
"generated-release1/oa/behavior/scenario_oa_conversation.arcadia": {
|
||||
"bytes": 1515,
|
||||
"sha256": "e217e5394a0771dc16206ed9437a231da27905d2f19be64b3f48281c0a32fb6b"
|
||||
},
|
||||
"generated-release1/oa/behavior/scenario_oa_full_scenario.arcadia": {
|
||||
"bytes": 1121,
|
||||
"sha256": "c5a285f2d7c61bd2a136107f267fbf9cddb1cba3f63ff36a6f53f7ab98f33df5"
|
||||
},
|
||||
"generated-release1/oa/behavior/state_machine_oa_monitor.arcadia": {
|
||||
"bytes": 1358,
|
||||
"sha256": "e7349e1e5336282eed3f5a103129db33d3ae4ed500788ee7129e8fc193ac57f6"
|
||||
},
|
||||
"generated-release1/oa/capabilities.arcadia": {
|
||||
"bytes": 630,
|
||||
"sha256": "26a3d9b615a3251ff010e0b47127f2d16bc2dcd45ed95967208b0076d725843a"
|
||||
},
|
||||
"generated-release1/oa/model.arcadia": {
|
||||
"bytes": 531,
|
||||
"sha256": "069a5eaaf525089935cc9d73ae7b916866ed78c6534705d75739650ecdea7ada"
|
||||
},
|
||||
"generated-release1/oa/participants.arcadia": {
|
||||
"bytes": 1580,
|
||||
"sha256": "591a75a9ecad280302be4d4ae0171ad616377ed11ead5e233848ca2dc0a71819"
|
||||
},
|
||||
"generated-release1/oa/types.arcadia": {
|
||||
"bytes": 554,
|
||||
"sha256": "f02c391d584674c879f662a418abba3a220f1fee88471ca49322ac9873de628d"
|
||||
},
|
||||
"generated-release1/project.arcadia": {
|
||||
"bytes": 1958,
|
||||
"sha256": "b2674e6bf77cfe0f6f0ba79c81d2e96d92f39c02ca2c6266d80e91723bfb9fda"
|
||||
},
|
||||
"generated-release1/sa/behavior/process_sa_assessment_procedure.arcadia": {
|
||||
"bytes": 559,
|
||||
"sha256": "5c414fbdaabf9f9e402b0441fcacf1cacf4dbbc6c822162f028de35abf59be2d"
|
||||
},
|
||||
"generated-release1/sa/behavior/process_sa_field_procedure.arcadia": {
|
||||
"bytes": 1187,
|
||||
"sha256": "ece846fdf93857e71a9ab0efcbdf64a5c41c71180f62afa3f79077fffb53b8f2"
|
||||
},
|
||||
"generated-release1/sa/behavior/process_sa_response.arcadia": {
|
||||
"bytes": 2569,
|
||||
"sha256": "af7fdda280a917cf626f6e077162d481f9aaad280f8e81330c07d7fe384b1c52"
|
||||
},
|
||||
"generated-release1/sa/behavior/scenario_sa_conversation.arcadia": {
|
||||
"bytes": 1847,
|
||||
"sha256": "01339699ec3ee409418d9bb232542f2bcd9419f1e67b183e77700c56bb9f71d2"
|
||||
},
|
||||
"generated-release1/sa/behavior/scenario_sa_full_scenario.arcadia": {
|
||||
"bytes": 1116,
|
||||
"sha256": "5dce6b00a3a441162e8dee3e23d9ca5ab7bed4a24de669b1fba03664a3086dda"
|
||||
},
|
||||
"generated-release1/sa/behavior/state_machine_sa_monitor.arcadia": {
|
||||
"bytes": 1358,
|
||||
"sha256": "17dbcfa5bbfd10fc8e23a325fc950ce853c219b4aa89c74f96278cbb3f34acc8"
|
||||
},
|
||||
"generated-release1/sa/capabilities.arcadia": {
|
||||
"bytes": 630,
|
||||
"sha256": "81706a0ca9d7db2aa0350888b9c00d853885185db2e6b90557d3d51a11c3d645"
|
||||
},
|
||||
"generated-release1/sa/functions/function_sa_audit_thresholds.arcadia": {
|
||||
"bytes": 280,
|
||||
"sha256": "27f798f78f36e72b38edab3725af2feb0eaa010fd52a60b5c6b6bef57ad3b686"
|
||||
},
|
||||
"generated-release1/sa/functions/function_sa_restore_work.arcadia": {
|
||||
"bytes": 2251,
|
||||
"sha256": "357c6acb80f86b4e8d8f5c98f9f79d140f85fbe09f3406b41b7ac6eba464ec8c"
|
||||
},
|
||||
"generated-release1/sa/model.arcadia": {
|
||||
"bytes": 531,
|
||||
"sha256": "805b90262e27090ae7da81a51bcefa49c97fb0b3d3220b4a72323b4c4351c395"
|
||||
},
|
||||
"generated-release1/sa/participants.arcadia": {
|
||||
"bytes": 3604,
|
||||
"sha256": "ca144d6a8f45fe720b5d18c7b59c7671444baa8c37e5ce9117bcba34b3a6aa84"
|
||||
},
|
||||
"generated-release1/sa/types.arcadia": {
|
||||
"bytes": 903,
|
||||
"sha256": "540ddbc2bcd0ccf45298e3ea5660637341aff63ff65fd87ac2f26469d1adc064"
|
||||
},
|
||||
"generated-release1/traceability.arcadia": {
|
||||
"bytes": 28041,
|
||||
"sha256": "474bd28d955ff7af7722f6e9a23220d816879e3f46202e79a233544b9c593116"
|
||||
},
|
||||
"generated-release1/transition-before.json": {
|
||||
"bytes": 35801,
|
||||
"sha256": "2253e6434f741687e22327c37d520ed15c043bc36025498650bc2366bb6a874d"
|
||||
},
|
||||
"generated-release1/transition-request.json": {
|
||||
"bytes": 4276,
|
||||
"sha256": "43b9a22e5f95ad3bc0ebd2478ead0e14406854abc989ae94ded9367b013d812a"
|
||||
},
|
||||
"generated-release1/views/diagram_oa_allocation_view.arcadia": {
|
||||
"bytes": 1786,
|
||||
"sha256": "c45d7467839219d894804c1ef2d22ff4d4a5a84a6a273c526bafd4c1facde624"
|
||||
},
|
||||
"generated-release1/views/diagram_sa_allocation_view.arcadia": {
|
||||
"bytes": 1797,
|
||||
"sha256": "352a3ca745517592b5c9b1239b5770f62f0466a329a91fd03457ef2b53c06ed6"
|
||||
},
|
||||
"generated-release1/views/diagram_sa_capability_view.arcadia": {
|
||||
"bytes": 1286,
|
||||
"sha256": "8f18fcccbcddcf3c1ea0ffe727b5b23b77fc148c5da4fde953abe681e4c20cd2"
|
||||
},
|
||||
"generated-release1/views/diagram_sa_service_view.arcadia": {
|
||||
"bytes": 1960,
|
||||
"sha256": "4c72cb7593d9c4be8d2600b0656a7a3a6ce84c45bb2f3e58a4ee5ae3bf91913c"
|
||||
},
|
||||
"generated-release1/views/diagram_sa_state_view.arcadia": {
|
||||
"bytes": 1576,
|
||||
"sha256": "dd1bea81ac7dc549a53f9b190be6f13052e00ede345bd180444cc31edb892230"
|
||||
},
|
||||
"helpers/composition.json": {
|
||||
"bytes": 1190,
|
||||
"sha256": "78a98f3a034cda4d0cc1abfe33efb785e847bb6278b49c2071d70ee5f1dc23f3"
|
||||
},
|
||||
"helpers/gate-union.py": {
|
||||
"bytes": 3495,
|
||||
"sha256": "9cca2646b1bcf09961a9ad1a276d633d8e4296ff2c6f2f356f028afaf789f503"
|
||||
},
|
||||
"helpers/ordinary-contract.patch": {
|
||||
"bytes": 7301,
|
||||
"sha256": "931a5822dbfa5ad34a0dc961035e060ccdc7aed15712c4a9b5dc15a852675f71"
|
||||
},
|
||||
"helpers/ordinary.patch": {
|
||||
"bytes": 145928,
|
||||
"sha256": "e319a5151b7e6713880eaaab632f3f1c01aee6df3cd534d85a1c099fb501dcb7"
|
||||
},
|
||||
"helpers/render-language.py": {
|
||||
"bytes": 1009,
|
||||
"sha256": "82909cf11b0bdb0594b424cba51e71ec0abdead78d878f101b7ae8ff6c4281f8"
|
||||
},
|
||||
"helpers/required-desktop-tests.json": {
|
||||
"bytes": 125261,
|
||||
"sha256": "6672e3f7ccfb92b7710310836af6933a8e58ef113353505ec4fc0c3d6908c136"
|
||||
},
|
||||
"inputs/0fa1da63d71c984cd99b079de661e88154b5a31818b384f557deefd40b8ead3a.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "0fa1da63d71c984cd99b079de661e88154b5a31818b384f557deefd40b8ead3a"
|
||||
},
|
||||
"inputs/12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880.zip": {
|
||||
"bytes": 2830239,
|
||||
"sha256": "12ce1ca9c1185d7a91a1dea322cdc0c7fc4372db5d879386595acdbfd412d880"
|
||||
},
|
||||
"inputs/81bd006f10034bc0c203187af179548a549fda6e58bc7cde0702cc26994fd28d.zip": {
|
||||
"bytes": 2828619,
|
||||
"sha256": "81bd006f10034bc0c203187af179548a549fda6e58bc7cde0702cc26994fd28d"
|
||||
},
|
||||
"inputs/86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1.zip": {
|
||||
"bytes": 2831327,
|
||||
"sha256": "86ac50e9cec8b39db91bbc98e5388e8c0f8466e6c217cf2f4eca5f1db087dde1"
|
||||
},
|
||||
"inputs/bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "bbe8290d9cb11a7ee5dba250350451c5b7ec88069aa65f6be786a67922408c48"
|
||||
},
|
||||
"inputs/e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4.json": {
|
||||
"bytes": 118404,
|
||||
"sha256": "e3d2d504b18bb1f7c4c3fa1f26abff425b957f18b418d8556888151723ba67b4"
|
||||
},
|
||||
"render/language.html": {
|
||||
"bytes": 188141,
|
||||
"sha256": "57e71090f56ae27aa50f757886d6cadf63d49f5641fe4a365547cbd9e59685b6"
|
||||
},
|
||||
"render/language.rst": {
|
||||
"bytes": 142931,
|
||||
"sha256": "5deafe3f75a503ab5fb3d05c5ad8f126d82668f89bef02067ce5d56c3045a2bb"
|
||||
},
|
||||
"runs/consumers-1/process.json": {
|
||||
"bytes": 257,
|
||||
"sha256": "85b18634abd4ccf90144b44b01cbcade2521ef6706b2e46abc2e1d60a4dfc346"
|
||||
},
|
||||
"runs/consumers-1/result.json": {
|
||||
"bytes": 6986,
|
||||
"sha256": "5501663ed1f845b8d18487c90fb827faab2a1c2319cf8ea8c127324fdd9add15"
|
||||
},
|
||||
"runs/consumers-1/started.json": {
|
||||
"bytes": 1488,
|
||||
"sha256": "908dda6bce0013b3c5db9bc5cf678a9df3b221845e9c29d29409bf440bab52d3"
|
||||
},
|
||||
"runs/consumers-1/stderr.log": {
|
||||
"bytes": 652,
|
||||
"sha256": "6dca8394973a95c080a0b8858926efe7779512adf0fd5e64b47d1239f9446618"
|
||||
},
|
||||
"runs/consumers-1/stdout.log": {
|
||||
"bytes": 144498,
|
||||
"sha256": "f1ff82c06e0e1b0f0c3eadb5533402bfea42983c89fa3581340768f3d953de3e"
|
||||
},
|
||||
"runs/core-1/process.json": {
|
||||
"bytes": 197,
|
||||
"sha256": "1bf0f358d94b6e95eab5cf3823a4230a72f0363b77c75b8222c73f1122739f21"
|
||||
},
|
||||
"runs/core-1/result.json": {
|
||||
"bytes": 67077,
|
||||
"sha256": "a9f111627d5a2a7fa33e525cbd43150b803505e3e201b8465f94d2060fce143e"
|
||||
},
|
||||
"runs/core-1/started.json": {
|
||||
"bytes": 1398,
|
||||
"sha256": "56fb8a8824c031ed8f831561241a3bf321158f75cc0a2acdca6b0a77d9b648f6"
|
||||
},
|
||||
"runs/core-1/stderr.log": {
|
||||
"bytes": 12121,
|
||||
"sha256": "ca7ae2dfd0b6eecec811fce5831ea0dc7fb3b6209ffcad88d45eb6c5afd65103"
|
||||
},
|
||||
"runs/core-1/stdout.log": {
|
||||
"bytes": 131218,
|
||||
"sha256": "0d683632d1046f102e6b70af56d67ea6841134d99c923f0648261b4832a860fa"
|
||||
},
|
||||
"runs/core-consumers-1/process.json": {
|
||||
"bytes": 274,
|
||||
"sha256": "16bba7d4e4e3eb39c0ae89ecdbbfe38818c2ed329a32ac52a8db3cea69ed7fd4"
|
||||
},
|
||||
"runs/core-consumers-1/result.json": {
|
||||
"bytes": 1907,
|
||||
"sha256": "4bb8e79cd647aacebe2c4790a18ac37d07bbc29b0f7c8eca1933f1c5020474f8"
|
||||
},
|
||||
"runs/core-consumers-1/started.json": {
|
||||
"bytes": 1515,
|
||||
"sha256": "2ff77ca7601800340bf458d0707aaeef742a010ec7f6a55cf1577a1c33f5c543"
|
||||
},
|
||||
"runs/core-consumers-1/stderr.log": {
|
||||
"bytes": 327,
|
||||
"sha256": "5ded46d388f7ecc597c5e468621e84a297b1231f4eab8c2aa413697dd005e286"
|
||||
},
|
||||
"runs/core-consumers-1/stdout.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"runs/language-doc-1/warnings.log": {
|
||||
"bytes": 144,
|
||||
"sha256": "82cf5ddae4d21aa3730437a7962e6582507aa8032cc75fb8164ff7cf9003b7ae"
|
||||
},
|
||||
"runs/language-doc-2/result.json": {
|
||||
"bytes": 415,
|
||||
"sha256": "620a449b2995fbbb27aa769cadf603dd01d9f7036c595d012e66b74469102bde"
|
||||
},
|
||||
"runs/language-doc-2/warnings.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"runs/teaching-check-2/process.json": {
|
||||
"bytes": 210,
|
||||
"sha256": "18e9d3ee3e9c0d2d21c196c811ae543c899cc4580ad3288eca3a544f20f7a9cc"
|
||||
},
|
||||
"runs/teaching-check-2/result.json": {
|
||||
"bytes": 3147,
|
||||
"sha256": "cfc8dad31b1d8ba45face31f7986a30066c3bc464d19bd3b8495c9a013b45c0e"
|
||||
},
|
||||
"runs/teaching-check-2/started.json": {
|
||||
"bytes": 1416,
|
||||
"sha256": "259944f97150c87b2c95e9f53ae5cbb09264b03284510c9ac44272a70fdc9c87"
|
||||
},
|
||||
"runs/teaching-check-2/stderr.log": {
|
||||
"bytes": 218,
|
||||
"sha256": "9c90adb28961f087f33b905352c50c5d2aaa46785f47f3061dbe7dc161bc95d9"
|
||||
},
|
||||
"runs/teaching-check-2/stdout.log": {
|
||||
"bytes": 42153,
|
||||
"sha256": "d53a7d2d3d726302111aab71208814f487489080d250c1f555ad18312e80d86c"
|
||||
},
|
||||
"runs/teaching-generate-1/process.json": {
|
||||
"bytes": 252,
|
||||
"sha256": "c97f65ec53807bca963754b767ab21a88c3476c3639f0b54b38880281aff8a22"
|
||||
},
|
||||
"runs/teaching-generate-1/result.json": {
|
||||
"bytes": 3171,
|
||||
"sha256": "bd0095f78b4ff3cbaf7c1c3183bc280dbb1eec1cb68a528507af27ac35f34f83"
|
||||
},
|
||||
"runs/teaching-generate-1/started.json": {
|
||||
"bytes": 1458,
|
||||
"sha256": "e0526c09c8baa67bdb753ed1b0f15e237d3db2b1c60f097a145a141b9d174169"
|
||||
},
|
||||
"runs/teaching-generate-1/stderr.log": {
|
||||
"bytes": 229,
|
||||
"sha256": "464f44f1eaa5cabe25b7f66bcd689912977482c3eaad0e65328e0210749491fa"
|
||||
},
|
||||
"runs/teaching-generate-1/stdout.log": {
|
||||
"bytes": 41964,
|
||||
"sha256": "c7b195917f9b5b15aaf654703349b713b788f4cfbf00dce966539ff0764f892b"
|
||||
},
|
||||
"runs/windows-dependencies-1/process.json": {
|
||||
"bytes": 146,
|
||||
"sha256": "3901471653ef98f1abe326244dc639c6a2f0f53d3fff72db82acf068d8afabf9"
|
||||
},
|
||||
"runs/windows-dependencies-1/result.json": {
|
||||
"bytes": 1712,
|
||||
"sha256": "f1aa540938e09c5f4b92d13b293861a9e2cd08681e3f6b285b9e85f848a44935"
|
||||
},
|
||||
"runs/windows-dependencies-1/started.json": {
|
||||
"bytes": 1321,
|
||||
"sha256": "a54a7f78b455414d592b7ca3daf3d824487583a844097db76265e564bfb531d7"
|
||||
},
|
||||
"runs/windows-dependencies-1/stderr.log": {
|
||||
"bytes": 117,
|
||||
"sha256": "a82eeeb2d2fffd4d9e5d6e20ef76ed29e9e365923e2cc33bac0ab8f21a7a88d8"
|
||||
},
|
||||
"runs/windows-dependencies-1/stdout.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
}
|
||||
},
|
||||
"generatedFiles": [
|
||||
"generated-release1/expected-diagnostics.json",
|
||||
"generated-release1/model.json",
|
||||
"generated-release1/oa/activities/activity_oa_restore_work.arcadia",
|
||||
"generated-release1/oa/behavior/process_oa_assessment_procedure.arcadia",
|
||||
"generated-release1/oa/behavior/process_oa_field_procedure.arcadia",
|
||||
"generated-release1/oa/behavior/process_oa_response.arcadia",
|
||||
"generated-release1/oa/behavior/scenario_oa_conversation.arcadia",
|
||||
"generated-release1/oa/behavior/scenario_oa_full_scenario.arcadia",
|
||||
"generated-release1/oa/behavior/state_machine_oa_monitor.arcadia",
|
||||
"generated-release1/oa/capabilities.arcadia",
|
||||
"generated-release1/oa/model.arcadia",
|
||||
"generated-release1/oa/participants.arcadia",
|
||||
"generated-release1/oa/types.arcadia",
|
||||
"generated-release1/project.arcadia",
|
||||
"generated-release1/sa/behavior/process_sa_assessment_procedure.arcadia",
|
||||
"generated-release1/sa/behavior/process_sa_field_procedure.arcadia",
|
||||
"generated-release1/sa/behavior/process_sa_response.arcadia",
|
||||
"generated-release1/sa/behavior/scenario_sa_conversation.arcadia",
|
||||
"generated-release1/sa/behavior/scenario_sa_full_scenario.arcadia",
|
||||
"generated-release1/sa/behavior/state_machine_sa_monitor.arcadia",
|
||||
"generated-release1/sa/capabilities.arcadia",
|
||||
"generated-release1/sa/functions/function_sa_audit_thresholds.arcadia",
|
||||
"generated-release1/sa/functions/function_sa_restore_work.arcadia",
|
||||
"generated-release1/sa/model.arcadia",
|
||||
"generated-release1/sa/participants.arcadia",
|
||||
"generated-release1/sa/types.arcadia",
|
||||
"generated-release1/traceability.arcadia",
|
||||
"generated-release1/transition-before.json",
|
||||
"generated-release1/transition-request.json",
|
||||
"generated-release1/views/diagram_oa_allocation_view.arcadia",
|
||||
"generated-release1/views/diagram_sa_allocation_view.arcadia",
|
||||
"generated-release1/views/diagram_sa_capability_view.arcadia",
|
||||
"generated-release1/views/diagram_sa_service_view.arcadia",
|
||||
"generated-release1/views/diagram_sa_state_view.arcadia"
|
||||
],
|
||||
"generatedCount": 34
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
"""Read-only, Python-standard-library verification. Never executes archived code."""
|
||||
from pathlib import Path, PurePosixPath
|
||||
from datetime import datetime
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import re
|
||||
import zipfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
|
||||
def require(ok, message):
|
||||
if not ok:
|
||||
raise ValueError(message)
|
||||
|
||||
def digest(data):
|
||||
return {'bytes': len(data), 'sha256': hashlib.sha256(data).hexdigest()}
|
||||
|
||||
def members(z, expected):
|
||||
names = z.namelist()
|
||||
require(len(names) == len(set(names)), 'duplicate ZIP members')
|
||||
require(set(names) == set(expected), 'archive membership mismatch')
|
||||
require(all(not PurePosixPath(n).is_absolute() and '..' not in PurePosixPath(n).parts
|
||||
and '\\' not in n and ':' not in n for n in names), 'unsafe member')
|
||||
|
||||
def main():
|
||||
inventory = json.loads((ROOT / 'files.json').read_text())
|
||||
for name, expected in inventory.items():
|
||||
require(digest((ROOT / name).read_bytes()) == expected, 'external file hash: ' + name)
|
||||
manifest = json.loads((ROOT / 'manifest.json').read_text())
|
||||
with zipfile.ZipFile(ROOT / 'evidence.zip') as z:
|
||||
members(z, manifest['members'])
|
||||
for name, expected in manifest['members'].items():
|
||||
require(digest(z.read(name)) == expected, 'member hash: ' + name)
|
||||
def raw(name): return z.read(name)
|
||||
def obj(name): return json.loads(raw(name))
|
||||
checked = set()
|
||||
for run, spec in manifest['runs'].items():
|
||||
if spec['kind'] != 'cargo':
|
||||
continue
|
||||
prefix = 'runs/' + run + '/'
|
||||
start, result, process = (obj(prefix + n + '.json') for n in ('started', 'result', 'process'))
|
||||
require(all(result[k] == v for k, v in start.items()), run + ': start/result relationship')
|
||||
require(result['command'] == spec['command'] == process['command'], run + ': command')
|
||||
require(result['head'] == spec['head'], run + ': HEAD')
|
||||
require(result['exitCode'] == spec['exitCode'] and result['inputsUnchanged'] is True, run + ': outcome')
|
||||
require(datetime.fromisoformat(result['finish']) >= datetime.fromisoformat(start['start']), run + ': times')
|
||||
require(result['seconds'] >= 0, run + ': duration')
|
||||
require(result['helper'] == digest(raw('helpers/gate-union.py')), run + ': helper')
|
||||
for field, file in [('inputs', spec['inputs']), ('archive', spec['archive']), ('stdout', prefix+'stdout.log'), ('stderr', prefix+'stderr.log')]:
|
||||
require(result[field] == digest(raw(file)), run + ': receipt ' + field)
|
||||
inputs = obj(spec['inputs'])
|
||||
require(len(inputs) == result['inputCount'] == spec['inputCount'], run + ': input count')
|
||||
require(sum(p.startswith('crates/vendor/iced_widget/') for p in inputs) == 71, run + ': vendor count')
|
||||
pair = (spec['inputs'], spec['archive'])
|
||||
if pair not in checked:
|
||||
with zipfile.ZipFile(io.BytesIO(raw(spec['archive']))) as source:
|
||||
members(source, inputs)
|
||||
for name, expected in inputs.items():
|
||||
require(digest(source.read(name)) == expected, run + ': source hash ' + name)
|
||||
checked.add(pair)
|
||||
stdout = raw(prefix+'stdout.log').decode('utf-8', errors='replace')
|
||||
rows = [[int(x) for x in row] for row in re.findall(r'test result: (?:ok|FAILED)\. (\d+) passed; (\d+) failed; (\d+) ignored; (\d+) measured; (\d+) filtered out;', stdout)]
|
||||
require(rows == spec['testRows'], run + ': exact test summaries')
|
||||
require([sum(row[i] for row in rows) for i in range(5)] == spec['testTotals'], run + ': test totals')
|
||||
artifacts = []
|
||||
for line in stdout.splitlines():
|
||||
try: item = json.loads(line)
|
||||
except json.JSONDecodeError: continue
|
||||
if isinstance(item, dict) and item.get('reason') == 'compiler-artifact' and item.get('executable'):
|
||||
artifacts.append(item)
|
||||
require(artifacts == [a['cargo'] for a in result['artifacts']], run + ': artifact receipt relationship')
|
||||
print(run, 'exit', result['exitCode'], 'test totals', spec['testTotals'])
|
||||
composition = obj('helpers/composition.json')
|
||||
require(composition['patch'] == digest(raw('helpers/ordinary.patch')), 'composition patch')
|
||||
doc = obj('runs/language-doc-2/result.json')
|
||||
require(doc['strict'] is True and doc['docutils'] == '0.23', 'render settings')
|
||||
for field, path in [('source','render/language.rst'), ('html','render/language.html'), ('warnings','runs/language-doc-2/warnings.log')]:
|
||||
require(doc[field] == digest(raw(path)), 'render receipt ' + field)
|
||||
require(raw('runs/language-doc-2/warnings.log') == b'', 'successful render warnings')
|
||||
require(bool(raw('runs/language-doc-1/warnings.log')), 'failed render warning missing')
|
||||
for path in manifest['generatedFiles']:
|
||||
require(path.startswith('generated-release1/') and path in manifest['members'], 'generated mapping')
|
||||
require(len(manifest['generatedFiles']) == manifest['generatedCount'], 'generated count')
|
||||
print('PASS:', len(manifest['runs']), 'closed captures;', len(manifest['members']), 'members;', len(checked), 'input manifest/archive pairs')
|
||||
print('Integrity and receipt consistency only; no rerun, signature, binary verification, or GUI claim.')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,45 @@
|
||||
# Ordinary-text union: native trial evidence
|
||||
|
||||
Run `python verify.py` with Python 3.10 or newer. These five files form a portable
|
||||
read-only package. The verifier uses only the Python standard library, reads
|
||||
ZIPs without extraction, and executes neither archived helpers nor binaries.
|
||||
It requires no Git checkout, original machine, network, UI or dependency cache.
|
||||
Outer files are UTF-8 LF before hash pins; all archived raw bytes are unchanged.
|
||||
|
||||
The complete closed trial-1 capture set is preserved, including small auxiliary
|
||||
picker frames, extra captures, resumed-state capture, and repeated save-path
|
||||
attempts. Filename numbering labels recorded observations; it is not a complete
|
||||
action log and does not assert an unrecorded intermediate transition. Screenshots
|
||||
and accessibility snapshots support human review; their interpretation is not
|
||||
automatically proven by this verifier.
|
||||
|
||||
`native/independent-review.md` preserves the separate review of screenshots,
|
||||
source/CLI evidence and claim boundaries. Its judgments are human-readable review
|
||||
evidence, distinct from machine-verified byte and receipt relationships. Dialog
|
||||
states are archived; operator/tool calls are not a complete archived action log.
|
||||
|
||||
Archived material includes original input, both saved bundles, all trial receipts,
|
||||
logs and frames, capture/launch helpers, saved-bundle check helper and raw results.
|
||||
The exact successful windows-build-1 receipts, logs, gate helper, input manifest
|
||||
and 707-file input archive are included for a self-contained receipt chain.
|
||||
Those build captures also appear in the gates package committed at
|
||||
7836a93edb98d2f9dcbf9c0290352e38f9acbb39. The production build source is
|
||||
f714a25bbcd435941404104ad0cbb0fea3b89149. Binaries are intentionally excluded;
|
||||
hashes establish receipt consistency, not independent binary reproduction.
|
||||
|
||||
Verification checks every archive member/hash, nested source membership and
|
||||
content, build and native start/result/helper relationships, GUI/CLI binary
|
||||
receipt links, original input archive, capture timestamps/image references,
|
||||
normal GUI exit and empty logs. It recomputes exact saved-source membership and
|
||||
bytes: compact added activity and include, stable recorded IDs, and only the
|
||||
intended existing diagram x coordinate changing from 120 to 190 between saved
|
||||
bundles. Both CLI captures report checked status, four warnings, no writes or
|
||||
changes, and zero identities to stabilize.
|
||||
|
||||
These are saved-byte and recorded CLI parsing/validation oracles, not a comparison
|
||||
of the complete parsed models. Undo/Redo, reopening, diagnostic freshness and
|
||||
navigation observations require inspecting the actual frames and review. Empty
|
||||
logs and exit zero alone do not establish usability or complete acceptance.
|
||||
The hashes are integrity checks, not authenticated provenance. Raw captures
|
||||
retain original local path strings and timestamps; no credentials, user profile,
|
||||
runtime binaries or dependency cache are packaged.
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"evidence.zip": {
|
||||
"bytes": 5704887,
|
||||
"sha256": "b827d0bdaec76b7b86d8a169530dcf98767c9883187ecdda02b4ea87171a42b5"
|
||||
},
|
||||
"manifest.json": {
|
||||
"bytes": 24911,
|
||||
"sha256": "49d0bf1c4c4732c9db8a44ae525fb4516cca4883e1a209aa736b913550396037"
|
||||
},
|
||||
"README.md": {
|
||||
"bytes": 2931,
|
||||
"sha256": "2422dd76bfcd3e81d57d1db48db27b36e7505ff6b17a68c3b393518f623de256"
|
||||
},
|
||||
"verify.py": {
|
||||
"bytes": 9043,
|
||||
"sha256": "7242e9ecc68f21349f0073379391d7890367e0b4f5f32697af306cc2346e50d0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,624 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"productionCommit": "f714a25bbcd435941404104ad0cbb0fea3b89149",
|
||||
"relatedGatesCommit": "7836a93edb98d2f9dcbf9c0290352e38f9acbb39",
|
||||
"captures": [
|
||||
"native/trial-1/01-start.json",
|
||||
"native/trial-1/02-open-dialog.json",
|
||||
"native/trial-1/03-open-dialog-ready.json",
|
||||
"native/trial-1/04-open-picker.json",
|
||||
"native/trial-1/05-open-filename-focus.json",
|
||||
"native/trial-1/06-open-fixture-path.json",
|
||||
"native/trial-1/07-opened-fixture.json",
|
||||
"native/trial-1/08-model-explorer.json",
|
||||
"native/trial-1/09-created-activity.json",
|
||||
"native/trial-1/10-text-created-source.json",
|
||||
"native/trial-1/11-source-folder.json",
|
||||
"native/trial-1/12-activity-folder.json",
|
||||
"native/trial-1/13-compact-activity.json",
|
||||
"native/trial-1/14-save-before-dialog.json",
|
||||
"native/trial-1/15-save-before-picker.json",
|
||||
"native/trial-1/16-save-before-focus.json",
|
||||
"native/trial-1/17-save-before-selected.json",
|
||||
"native/trial-1/18-save-before-selection-confirmed.json",
|
||||
"native/trial-1/19-save-before-path.json",
|
||||
"native/trial-1/20-baseline-saved.json",
|
||||
"native/trial-1/21-before-drag.json",
|
||||
"native/trial-1/22-after-drag.json",
|
||||
"native/trial-1/23-text-after-drag.json",
|
||||
"native/trial-1/24-root-after-drag.json",
|
||||
"native/trial-1/25-text-actions.json",
|
||||
"native/trial-1/25a-resumed-state.json",
|
||||
"native/trial-1/26-model-undo.json",
|
||||
"native/trial-1/27-redo-menu.json",
|
||||
"native/trial-1/28-model-redo.json",
|
||||
"native/trial-1/29-save-after-pending.json",
|
||||
"native/trial-1/30-save-after-dialog.json",
|
||||
"native/trial-1/31a-save-after-field.json",
|
||||
"native/trial-1/32-save-after-path.json",
|
||||
"native/trial-1/33-save-after-path-ready.json",
|
||||
"native/trial-1/34-save-after-path.json",
|
||||
"native/trial-1/35-saved-after.json",
|
||||
"native/trial-1/36-new-cleared.json",
|
||||
"native/trial-1/37-home-reopen.json",
|
||||
"native/trial-1/38-reopened-after.json",
|
||||
"native/trial-1/39-reopened-source.json",
|
||||
"native/trial-1/40-problems-menu.json",
|
||||
"native/trial-1/41-fresh-diagnostics.json",
|
||||
"native/trial-1/42-fresh-warning-navigation.json",
|
||||
"native/trial-1/43-comment-insertion-point.json",
|
||||
"native/trial-1/44-edited-diagnostics-stale.json",
|
||||
"native/trial-1/45-refreshed-diagnostics.json",
|
||||
"native/trial-1/46-refreshed-warning-navigation.json",
|
||||
"native/trial-1/47-restore-menu.json",
|
||||
"native/trial-1/48-diagnostic-edit-undone.json"
|
||||
],
|
||||
"captureCount": 49,
|
||||
"imageCount": 62,
|
||||
"members": {
|
||||
"build/gate-union.py": {
|
||||
"bytes": 3495,
|
||||
"sha256": "9cca2646b1bcf09961a9ad1a276d633d8e4296ff2c6f2f356f028afaf789f503"
|
||||
},
|
||||
"build/inputs.json": {
|
||||
"bytes": 118403,
|
||||
"sha256": "a36e2cbc29eb7a9217774464cda9da8aa1d3c39caae9b9aacd6cdb28df5bad95"
|
||||
},
|
||||
"build/inputs.zip": {
|
||||
"bytes": 2831326,
|
||||
"sha256": "9346fba1be9bf4dd2225fe9965fd76a30429f086fd6a101f92d0963d3822f71c"
|
||||
},
|
||||
"build/process.json": {
|
||||
"bytes": 167,
|
||||
"sha256": "b400c1f8076bcddb583424fe34d155655a41d25b5ccf0db8af26bda6b9b2685e"
|
||||
},
|
||||
"build/result.json": {
|
||||
"bytes": 5532,
|
||||
"sha256": "5e9e227c66a4b71ade734b8ebeb12070b8a5c64a9a6cf9d8d0b6d70379d4ffc2"
|
||||
},
|
||||
"build/started.json": {
|
||||
"bytes": 1353,
|
||||
"sha256": "15c54be09a881e6860735395569b22a7a9114789a1f8276cf79bc6fb095c8163"
|
||||
},
|
||||
"build/stderr.log": {
|
||||
"bytes": 261,
|
||||
"sha256": "480dff999944c756fff581db0f3fac088717e0d73cae20af9a28829446df746f"
|
||||
},
|
||||
"build/stdout.log": {
|
||||
"bytes": 295092,
|
||||
"sha256": "5a824ca91877328acd332585b39194b27fd2cb167279b99c4c78a89bf13bd19b"
|
||||
},
|
||||
"native/bundle-checks/saved-after.result.json": {
|
||||
"bytes": 1930,
|
||||
"sha256": "34e2e8754026f35f4d57b24f8bde39f5b354aea703cd9c6650c673f674c2d167"
|
||||
},
|
||||
"native/bundle-checks/saved-after.stderr.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"native/bundle-checks/saved-after.stdout.json": {
|
||||
"bytes": 2592,
|
||||
"sha256": "095f83e38f6c59b69fd72d0d7d0825b7849d34b963ff35e7f9a4ab7434bae5f2"
|
||||
},
|
||||
"native/bundle-checks/saved-before.result.json": {
|
||||
"bytes": 1931,
|
||||
"sha256": "52d3f54ce37412fe6f0bf23484d7ada549ed26f8b16501e0ddff1261df673f6c"
|
||||
},
|
||||
"native/bundle-checks/saved-before.stderr.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"native/bundle-checks/saved-before.stdout.json": {
|
||||
"bytes": 2593,
|
||||
"sha256": "966ee3fac987156a8b9e5e1ebf9d10dd7f7a89c84d0f42645874d153a404517e"
|
||||
},
|
||||
"native/bundle-checks/summary.json": {
|
||||
"bytes": 484,
|
||||
"sha256": "7f9f6ddd98b303caf0edebef19aa507257c176168f94218ac86f3ac180d13631"
|
||||
},
|
||||
"native/capture-snippet.js": {
|
||||
"bytes": 1579,
|
||||
"sha256": "55279ed080289ccf5ba482cb24b5a807669a9360012e2d87f794d4465227cb2c"
|
||||
},
|
||||
"native/check-saved-bundles.py": {
|
||||
"bytes": 4216,
|
||||
"sha256": "beaf19c8d07e63fbc462c555f5e486fc6d035f0175ae9567ac1217414a63038c"
|
||||
},
|
||||
"native/independent-review.md": {
|
||||
"bytes": 5534,
|
||||
"sha256": "7e952270478fb0f57b0ed44d54bba6c2b09b5c315cebe11ac7ab613155ed299f"
|
||||
},
|
||||
"native/input/project.arcadia": {
|
||||
"bytes": 451,
|
||||
"sha256": "375c80aaf2b26bb7a638e79d76e4374454e0a86b9698b888d39dc5cad0206818"
|
||||
},
|
||||
"native/run-native.py": {
|
||||
"bytes": 2609,
|
||||
"sha256": "2d2a63bcfccad32c2b5db09cd723dcff9877d3cbe813853e278cb3df49ed7b88"
|
||||
},
|
||||
"native/saved-after/oa/activities/activity_new_activity.arcadia": {
|
||||
"bytes": 89,
|
||||
"sha256": "7d2a6a27fecb94eaf42a13b330fed5a269d0e80cad75688a9f26d4e08db0dfe7"
|
||||
},
|
||||
"native/saved-after/project.arcadia": {
|
||||
"bytes": 511,
|
||||
"sha256": "c93bd35eaaf3a19bc07b5c6a4ee5839ab565e9fd90a2605261b7618fc8a7ecef"
|
||||
},
|
||||
"native/saved-before/oa/activities/activity_new_activity.arcadia": {
|
||||
"bytes": 89,
|
||||
"sha256": "7d2a6a27fecb94eaf42a13b330fed5a269d0e80cad75688a9f26d4e08db0dfe7"
|
||||
},
|
||||
"native/saved-before/project.arcadia": {
|
||||
"bytes": 511,
|
||||
"sha256": "dad153f45038ed9ae79ea7263364e6cdedc40737fe7f63fdad7fb198ee7f65c8"
|
||||
},
|
||||
"native/trial-1/01-start-0.jpg": {
|
||||
"bytes": 117627,
|
||||
"sha256": "0778c21336a401d30316ed3ef5c93abe9ed349082a64cf78e8643edc0b29ee9e"
|
||||
},
|
||||
"native/trial-1/01-start.json": {
|
||||
"bytes": 919,
|
||||
"sha256": "986aab266f45d9871bd5b134d318a38ce7d8a7c992e2a78a38c54dcfa4a86baa"
|
||||
},
|
||||
"native/trial-1/02-open-dialog-0.jpg": {
|
||||
"bytes": 116197,
|
||||
"sha256": "e6248082f0dbe81d8d387906686538061ce1cf0f1be4b68aa70156238ea991c0"
|
||||
},
|
||||
"native/trial-1/02-open-dialog.json": {
|
||||
"bytes": 925,
|
||||
"sha256": "e9852679994314e8ede462a414787841ed8254b8ea660f83543b1bf4e4ab3979"
|
||||
},
|
||||
"native/trial-1/03-open-dialog-ready-0.jpg": {
|
||||
"bytes": 90928,
|
||||
"sha256": "2a931629a94f94660af8b189f919ab3e41400ca860ae8eac486f4b90184083ce"
|
||||
},
|
||||
"native/trial-1/03-open-dialog-ready.json": {
|
||||
"bytes": 735,
|
||||
"sha256": "5aea33223bfdb19456c182f9c7cd55eaedaa8c62a6af63c33b5d334d6b7a4af6"
|
||||
},
|
||||
"native/trial-1/04-open-picker-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/04-open-picker-1.jpg": {
|
||||
"bytes": 53413,
|
||||
"sha256": "61176947f83f35fe13aa1e31b0aa61ea478d0537b9a08fbf45ab6442ab4e2296"
|
||||
},
|
||||
"native/trial-1/04-open-picker.json": {
|
||||
"bytes": 4951,
|
||||
"sha256": "c8f356251dafcf9465555c629d32e68d6d905d5c221e9580853f6f378123dbe4"
|
||||
},
|
||||
"native/trial-1/05-open-filename-focus-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/05-open-filename-focus-1.jpg": {
|
||||
"bytes": 53809,
|
||||
"sha256": "fc29b6c470522c8d8c024a9ce43477b507525b4c5ad6482f812f69b526a321eb"
|
||||
},
|
||||
"native/trial-1/05-open-filename-focus.json": {
|
||||
"bytes": 4967,
|
||||
"sha256": "4ad084f9d123899129c9c7cb4faa53f4727b14bc901fc1cc1dce45e0a15702b4"
|
||||
},
|
||||
"native/trial-1/06-open-fixture-path-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/06-open-fixture-path-1.jpg": {
|
||||
"bytes": 56049,
|
||||
"sha256": "fc7d2cd6b12111e9bca60cc786b82f1f8f42ee37654a29bd058345ce10b77eaf"
|
||||
},
|
||||
"native/trial-1/06-open-fixture-path.json": {
|
||||
"bytes": 4963,
|
||||
"sha256": "1eb51f68dc204ad419d54cc3d7bf1e5335b41bd65a083d23bed53dfc90f9a374"
|
||||
},
|
||||
"native/trial-1/07-opened-fixture-0.jpg": {
|
||||
"bytes": 98357,
|
||||
"sha256": "eddb3b2e85487bc4e53da399a2062c6bd138b6022216dc0b01c3cffc811c2c99"
|
||||
},
|
||||
"native/trial-1/07-opened-fixture.json": {
|
||||
"bytes": 956,
|
||||
"sha256": "d384ab6efa1fbf49e1b2afd93f933c64d865aa2b6baf6c7a69e2ac372da50449"
|
||||
},
|
||||
"native/trial-1/08-model-explorer-0.jpg": {
|
||||
"bytes": 90072,
|
||||
"sha256": "65a6e4f0545f6a5e104b9a2896e9b1f82851528a9e91651a31915d9a4f7a0058"
|
||||
},
|
||||
"native/trial-1/08-model-explorer.json": {
|
||||
"bytes": 963,
|
||||
"sha256": "3a772406fe219f21d954590f6c96f47adc9901d130c2d7bb087acc086cf6079b"
|
||||
},
|
||||
"native/trial-1/09-created-activity-0.jpg": {
|
||||
"bytes": 100572,
|
||||
"sha256": "115443b3ac12e32fc5a9d0736c9a475a431ed7423a84275a17fa1b4b10496185"
|
||||
},
|
||||
"native/trial-1/09-created-activity.json": {
|
||||
"bytes": 975,
|
||||
"sha256": "49a134749f520039a5390fc4b4110e5411822c6fb7573e31e1ffb1bff428a4d0"
|
||||
},
|
||||
"native/trial-1/10-text-created-source-0.jpg": {
|
||||
"bytes": 103031,
|
||||
"sha256": "6999c782d6b38719757898cd7d1575e71239fab882b040ce3125e823e734d995"
|
||||
},
|
||||
"native/trial-1/10-text-created-source.json": {
|
||||
"bytes": 978,
|
||||
"sha256": "56af19e09aa7d9bd4ef315a80d5060bfd52bd8e08d111c3647ead2bfff9f8b12"
|
||||
},
|
||||
"native/trial-1/11-source-folder-0.jpg": {
|
||||
"bytes": 103956,
|
||||
"sha256": "72656e598bfef0ad4355ca53d85b88a0d62ad186b3189b0a3e3f5900461e16b1"
|
||||
},
|
||||
"native/trial-1/11-source-folder.json": {
|
||||
"bytes": 972,
|
||||
"sha256": "e59af1c50e4f374cd840bd62fd0b8676e18e47a45ad820dd8b6a8dd835315c27"
|
||||
},
|
||||
"native/trial-1/12-activity-folder-0.jpg": {
|
||||
"bytes": 105653,
|
||||
"sha256": "2aff6c99a3845c334b94ba3e7b27fbdb3c31056784ce3ec4e76ef45ebb32911f"
|
||||
},
|
||||
"native/trial-1/12-activity-folder.json": {
|
||||
"bytes": 974,
|
||||
"sha256": "383be400c6317b571546e51d0c40128e7381b5ce1686ab3aaa20ece1a5e801ee"
|
||||
},
|
||||
"native/trial-1/13-compact-activity-0.jpg": {
|
||||
"bytes": 88781,
|
||||
"sha256": "87b367c8fe3017d221228ec63aa5192aaee19b4f80db6a07007b32f10f41d242"
|
||||
},
|
||||
"native/trial-1/13-compact-activity.json": {
|
||||
"bytes": 975,
|
||||
"sha256": "ba4daa10aeb0d9cd555d03cfbcb6bf5a7c6777d9247a46859f35d6fe740fa347"
|
||||
},
|
||||
"native/trial-1/14-save-before-dialog-0.jpg": {
|
||||
"bytes": 83376,
|
||||
"sha256": "9fd9bd5067f57dc0f297f5d02442e41e3395bd3f6964d726e852746c54a0cff7"
|
||||
},
|
||||
"native/trial-1/14-save-before-dialog.json": {
|
||||
"bytes": 977,
|
||||
"sha256": "91884e38ade4bd4fa93474a1076d84a4228b4d65a3d4c70afe296166150335b5"
|
||||
},
|
||||
"native/trial-1/15-save-before-picker-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/15-save-before-picker-1.jpg": {
|
||||
"bytes": 55054,
|
||||
"sha256": "3529090d92bf9ea0375a8e95cc6f1b67d9159872367c89e3bf308e3d024a7ff7"
|
||||
},
|
||||
"native/trial-1/15-save-before-picker.json": {
|
||||
"bytes": 4764,
|
||||
"sha256": "febecff84014510968d802845126b9935a1c5b40a92dc2795d7bd05d4b11ecbf"
|
||||
},
|
||||
"native/trial-1/16-save-before-focus-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/16-save-before-focus-1.jpg": {
|
||||
"bytes": 55425,
|
||||
"sha256": "2544f1ccc8ed5a21e682f6e3c836daa684a60f5ee0e4eb39de8ec4f05aca5daa"
|
||||
},
|
||||
"native/trial-1/16-save-before-focus.json": {
|
||||
"bytes": 4762,
|
||||
"sha256": "e07187e7179555f84a8b3ad7c87e707ba686945bf60dc89b2bfe86ce34d4fb42"
|
||||
},
|
||||
"native/trial-1/17-save-before-selected-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/17-save-before-selected-1.jpg": {
|
||||
"bytes": 55437,
|
||||
"sha256": "7e12139b558f7427de23cf4a611c6a0a8b20be25e6a0b0799832ddc715ba1fd5"
|
||||
},
|
||||
"native/trial-1/17-save-before-selected.json": {
|
||||
"bytes": 4768,
|
||||
"sha256": "96d7d8468d87e24808617aea0cd42b52acdf4126c601b10e6f98b614beaf5f75"
|
||||
},
|
||||
"native/trial-1/18-save-before-selection-confirmed-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/18-save-before-selection-confirmed-1.jpg": {
|
||||
"bytes": 54676,
|
||||
"sha256": "4cc51ff7fa2af6325879b442aea5eee1992f0fd41c4b6455fab3540601691a49"
|
||||
},
|
||||
"native/trial-1/18-save-before-selection-confirmed.json": {
|
||||
"bytes": 4790,
|
||||
"sha256": "a24fb0576c3339fa281c96d82055428d1e947ea8e0fbda3d9304fbec2410ea62"
|
||||
},
|
||||
"native/trial-1/19-save-before-path-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/19-save-before-path-1.jpg": {
|
||||
"bytes": 57797,
|
||||
"sha256": "3e5f67d8125353318557c1fffc3aa3184e7870b79f57fb2b272f784a55438854"
|
||||
},
|
||||
"native/trial-1/19-save-before-path.json": {
|
||||
"bytes": 4760,
|
||||
"sha256": "0af8bed5fa5a3d93b59d046b48623992321d2436275d835ba39550df0edf3a89"
|
||||
},
|
||||
"native/trial-1/20-baseline-saved-0.jpg": {
|
||||
"bytes": 85738,
|
||||
"sha256": "2a1cb7c65ce2ae68c6c8e1b60c052fec4ccad5574da8e8900d452b41324150c0"
|
||||
},
|
||||
"native/trial-1/20-baseline-saved.json": {
|
||||
"bytes": 965,
|
||||
"sha256": "5990919d8cdb16e9f5445bb858b0d014015ef02d9157cbc2dc84f75a74f02b00"
|
||||
},
|
||||
"native/trial-1/21-before-drag-0.jpg": {
|
||||
"bytes": 101486,
|
||||
"sha256": "81f4bb4b0cb7314011b8acd829e9905993b596175139c482cef6030ec542e078"
|
||||
},
|
||||
"native/trial-1/21-before-drag.json": {
|
||||
"bytes": 960,
|
||||
"sha256": "e35a0357f5b334c8e519cb83116b2d516e9f19bb1ac794cfde0aaf3f6c98d62d"
|
||||
},
|
||||
"native/trial-1/22-after-drag-0.jpg": {
|
||||
"bytes": 103060,
|
||||
"sha256": "6a8f8c1bd011bd6224050236736e90a982c2102ec2a4700d09e7fc0ecd6ee9a6"
|
||||
},
|
||||
"native/trial-1/22-after-drag.json": {
|
||||
"bytes": 967,
|
||||
"sha256": "68e018c9d5b9e28b9a138f8085539bc9d87b0e0e48761049fd57d67334313715"
|
||||
},
|
||||
"native/trial-1/23-text-after-drag-0.jpg": {
|
||||
"bytes": 83460,
|
||||
"sha256": "dfb676eca325444b0383f47d056621d62c9cba3a522739a0015eb1d4a04a36f3"
|
||||
},
|
||||
"native/trial-1/23-text-after-drag.json": {
|
||||
"bytes": 974,
|
||||
"sha256": "100687443402acff33f2c9eba03a57d1146475e2225e6e90baa9d36624fec96f"
|
||||
},
|
||||
"native/trial-1/24-root-after-drag-0.jpg": {
|
||||
"bytes": 104490,
|
||||
"sha256": "25a2302b69bd367ea04c4b1ca28030c34e4a5b32a7c88c7c21c5a721fa69c60d"
|
||||
},
|
||||
"native/trial-1/24-root-after-drag.json": {
|
||||
"bytes": 974,
|
||||
"sha256": "ebbd8e200f431ad99760ed94895a74bc0b01d33f1fb67a6ab1464a1cf008c40a"
|
||||
},
|
||||
"native/trial-1/25-text-actions-0.jpg": {
|
||||
"bytes": 117335,
|
||||
"sha256": "4627be733b9c84798ff8324fe8bb8bba98dd7c8f3c7be5563d1a24c99e66b59c"
|
||||
},
|
||||
"native/trial-1/25-text-actions.json": {
|
||||
"bytes": 971,
|
||||
"sha256": "4d0a137244adf721a04dc17af1ae0ef380db737c3ab7478fbf6661bab24ce835"
|
||||
},
|
||||
"native/trial-1/25a-resumed-state-0.jpg": {
|
||||
"bytes": 117221,
|
||||
"sha256": "f509ed4e37b675d4cbcf1c075a983654b016d5459905a68b45514e24891ced3f"
|
||||
},
|
||||
"native/trial-1/25a-resumed-state.json": {
|
||||
"bytes": 973,
|
||||
"sha256": "304de4fa36d0b97b891455b26a14850b43bfd0811eb7e7be22bdcae9814da703"
|
||||
},
|
||||
"native/trial-1/26-model-undo-0.jpg": {
|
||||
"bytes": 103052,
|
||||
"sha256": "a8966f1244e9bbe9be4ad75278f3a492e748029c3fff3174ce38250997250a11"
|
||||
},
|
||||
"native/trial-1/26-model-undo.json": {
|
||||
"bytes": 959,
|
||||
"sha256": "9cd25b0f2d954f7772ae139c8d5afcb04ab1bf4c965aae6c6e22af37c352618b"
|
||||
},
|
||||
"native/trial-1/27-redo-menu-0.jpg": {
|
||||
"bytes": 117521,
|
||||
"sha256": "13634900648a485f38fd5183aa097ae544688b5a6112b821362b7128709d06c1"
|
||||
},
|
||||
"native/trial-1/27-redo-menu.json": {
|
||||
"bytes": 958,
|
||||
"sha256": "4cb0672342dd468ce4a403993e22613abe7498cdceb6111eb39747e7a24a8c86"
|
||||
},
|
||||
"native/trial-1/28-model-redo-0.jpg": {
|
||||
"bytes": 103295,
|
||||
"sha256": "8202074761aca9c067f5851a17c0586cc6698426473c1621defd3739cbbb817b"
|
||||
},
|
||||
"native/trial-1/28-model-redo.json": {
|
||||
"bytes": 969,
|
||||
"sha256": "252817aafe641c994ddba7fa244435371b4e75f6b9bbd16d355f02e1b35f0d9d"
|
||||
},
|
||||
"native/trial-1/29-save-after-pending-0.jpg": {
|
||||
"bytes": 102718,
|
||||
"sha256": "57a731a2b96cd9685ed0dc206a49b7804231d83d763503308fe73e6e326e725d"
|
||||
},
|
||||
"native/trial-1/29-save-after-pending.json": {
|
||||
"bytes": 977,
|
||||
"sha256": "32490225d11e793b31168cbd00ce184d38190c6e7c4420dba0e4c20424b19533"
|
||||
},
|
||||
"native/trial-1/30-save-after-dialog-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/30-save-after-dialog-1.jpg": {
|
||||
"bytes": 56737,
|
||||
"sha256": "58dab12435a2f7b258e0c83ab0edd4a95379b0d6ec95f16184d63f8d76b94daf"
|
||||
},
|
||||
"native/trial-1/30-save-after-dialog.json": {
|
||||
"bytes": 5057,
|
||||
"sha256": "c9515daa0a573ee5510a421a205d1697835dfeaa3d2d69a64d93e4d66c94310e"
|
||||
},
|
||||
"native/trial-1/31a-save-after-field-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/31a-save-after-field-1.jpg": {
|
||||
"bytes": 56737,
|
||||
"sha256": "58dab12435a2f7b258e0c83ab0edd4a95379b0d6ec95f16184d63f8d76b94daf"
|
||||
},
|
||||
"native/trial-1/31a-save-after-field.json": {
|
||||
"bytes": 5057,
|
||||
"sha256": "39e59a6120ad31528e55d379eeb2a463af05b5bea8710020c659687b414208fc"
|
||||
},
|
||||
"native/trial-1/32-save-after-path-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/32-save-after-path-1.jpg": {
|
||||
"bytes": 55986,
|
||||
"sha256": "cb789f536317fff99d6f55133297a8d8511ef280a6b82c5e6e2960da6d0ceafe"
|
||||
},
|
||||
"native/trial-1/32-save-after-path.json": {
|
||||
"bytes": 5053,
|
||||
"sha256": "9167fd1352cfe5bb1b70631d1413cb7dac3a49311f459c39df374cdfe2d453d8"
|
||||
},
|
||||
"native/trial-1/33-save-after-path-ready-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/33-save-after-path-ready-1.jpg": {
|
||||
"bytes": 56034,
|
||||
"sha256": "b41240172f775f45e4f19c1240784595004134baace690ccc5388097c9776104"
|
||||
},
|
||||
"native/trial-1/33-save-after-path-ready.json": {
|
||||
"bytes": 5065,
|
||||
"sha256": "00f3dc075eb6e446a6e7b85790a6d7e913151de53ff8041d9a63c6acd2597c47"
|
||||
},
|
||||
"native/trial-1/34-save-after-path-0.jpg": {
|
||||
"bytes": 674,
|
||||
"sha256": "5a2387a1a593a32ea169b56b9a3e59333936ee1da95164564e4d9be61bf5a24b"
|
||||
},
|
||||
"native/trial-1/34-save-after-path-1.jpg": {
|
||||
"bytes": 59217,
|
||||
"sha256": "182c41675727c07555b126f0e7876b32e7c8f141b0d7254e1511299318e08c9d"
|
||||
},
|
||||
"native/trial-1/34-save-after-path.json": {
|
||||
"bytes": 5053,
|
||||
"sha256": "2c356eeff45b49e9ce17919042929382027445ee07917a80eb8432581ede66e3"
|
||||
},
|
||||
"native/trial-1/35-saved-after-0.jpg": {
|
||||
"bytes": 102789,
|
||||
"sha256": "cb90a19d855faf3bab39cdb9468c788d72cf840366ef41b98e99d2cd4d9160fc"
|
||||
},
|
||||
"native/trial-1/35-saved-after.json": {
|
||||
"bytes": 962,
|
||||
"sha256": "f96d3e0c7d0c83603ae14ec4231250e7be9f12113b465050c101852de1755548"
|
||||
},
|
||||
"native/trial-1/36-new-cleared-0.jpg": {
|
||||
"bytes": 90719,
|
||||
"sha256": "dfc505fa7c2ce48fea5a04aa90b2745d11b144704c16cec0b2431a92291a8966"
|
||||
},
|
||||
"native/trial-1/36-new-cleared.json": {
|
||||
"bytes": 925,
|
||||
"sha256": "04c4e7a5de7af7974b5ecff290582854cb07979ffca6ca3e468eda09af403b09"
|
||||
},
|
||||
"native/trial-1/37-home-reopen-0.jpg": {
|
||||
"bytes": 115448,
|
||||
"sha256": "79680f4fbe8ea41a8318d175959d9bf80b8f28ae161b81818f6daa1a97ff294f"
|
||||
},
|
||||
"native/trial-1/37-home-reopen.json": {
|
||||
"bytes": 925,
|
||||
"sha256": "93b4c5dedb87e64bfd4ebead90b9fb6e6cc89a96983312b70260d8b1cd2ea430"
|
||||
},
|
||||
"native/trial-1/38-reopened-after-0.jpg": {
|
||||
"bytes": 98471,
|
||||
"sha256": "1a463750e7eeca04b36db7d1ebd3e093f44c92cff40bc68ce603e2e788c23fe7"
|
||||
},
|
||||
"native/trial-1/38-reopened-after.json": {
|
||||
"bytes": 956,
|
||||
"sha256": "154ba579c620a7d4adaf6c303e045b73223e69996ebaa5841d751dc9cf3f090f"
|
||||
},
|
||||
"native/trial-1/39-reopened-source-0.jpg": {
|
||||
"bytes": 103219,
|
||||
"sha256": "2bf7bc9dc32c265c303453c054a032af780cb091fb4cc9e8830b0c8d1019c4cd"
|
||||
},
|
||||
"native/trial-1/39-reopened-source.json": {
|
||||
"bytes": 964,
|
||||
"sha256": "5faf1b0d7810c67d17c77d914824b111b945915a1cf97020e544d3df5c2378d8"
|
||||
},
|
||||
"native/trial-1/40-problems-menu-0.jpg": {
|
||||
"bytes": 117324,
|
||||
"sha256": "ffdbb858d382d5eb7f5c02769fb6ca0fea64a223280f27366c95087ee5a1f618"
|
||||
},
|
||||
"native/trial-1/40-problems-menu.json": {
|
||||
"bytes": 962,
|
||||
"sha256": "a2f4a64ce2619952ce1983af22400c13f28f496ba69cc2c9e09eb3b19d0d045b"
|
||||
},
|
||||
"native/trial-1/41-fresh-diagnostics-0.jpg": {
|
||||
"bytes": 124773,
|
||||
"sha256": "25f26374a247b7188a8458950ded42eeb1635919a54b4bfd33cedc17446f7506"
|
||||
},
|
||||
"native/trial-1/41-fresh-diagnostics.json": {
|
||||
"bytes": 966,
|
||||
"sha256": "3c227b0e93aa63082536324498c01a47df905fe7677bda072bd8309dc369e78f"
|
||||
},
|
||||
"native/trial-1/42-fresh-warning-navigation-0.jpg": {
|
||||
"bytes": 107742,
|
||||
"sha256": "2d5d6b4dc722d63313f8aaa2bb6943d3bec11a1bcf9087cdc56ad287e5b5936d"
|
||||
},
|
||||
"native/trial-1/42-fresh-warning-navigation.json": {
|
||||
"bytes": 973,
|
||||
"sha256": "0a3fd08f2e994530dd41b6fdc6d28bcb0d665e5d9c16a2e89f8bd54dcb797048"
|
||||
},
|
||||
"native/trial-1/43-comment-insertion-point-0.jpg": {
|
||||
"bytes": 108879,
|
||||
"sha256": "4267f2294d6ceb9ffdb1ea5e72cfbd9aa17ef14df72ea410c0e80128ef854520"
|
||||
},
|
||||
"native/trial-1/43-comment-insertion-point.json": {
|
||||
"bytes": 972,
|
||||
"sha256": "182b10cdcaf379defeb0fc448cf1e933aab4f783aa383a97bdbf73a3338af69d"
|
||||
},
|
||||
"native/trial-1/44-edited-diagnostics-stale-0.jpg": {
|
||||
"bytes": 91431,
|
||||
"sha256": "206a1ea8360ca766a17d12594265edc5c54abeda976456259315569879aa4165"
|
||||
},
|
||||
"native/trial-1/44-edited-diagnostics-stale.json": {
|
||||
"bytes": 983,
|
||||
"sha256": "222c7915eb406f618e8e10caf8b02bb57545a3668fe32f20ef4381eb3780d67a"
|
||||
},
|
||||
"native/trial-1/45-refreshed-diagnostics-0.jpg": {
|
||||
"bytes": 107187,
|
||||
"sha256": "0c9309378f1bac39941836312b926eddf52a78c164329955f677df1000c8c4c1"
|
||||
},
|
||||
"native/trial-1/45-refreshed-diagnostics.json": {
|
||||
"bytes": 980,
|
||||
"sha256": "42a51a6eccce6b983368981c194a54c2e3172cee61302bc75b9ee555ace9c367"
|
||||
},
|
||||
"native/trial-1/46-refreshed-warning-navigation-0.jpg": {
|
||||
"bytes": 109007,
|
||||
"sha256": "e2e23d83f8e5ad9ddbc98f53858276990e27e59550de94dcf6e96054ee0f6a00"
|
||||
},
|
||||
"native/trial-1/46-refreshed-warning-navigation.json": {
|
||||
"bytes": 987,
|
||||
"sha256": "39d8e7cc945cb444b5f664c243e9ad373ccc1d18b6c04e8cc6dd37a8ce46c643"
|
||||
},
|
||||
"native/trial-1/47-restore-menu-0.jpg": {
|
||||
"bytes": 120506,
|
||||
"sha256": "a5f11f64e091b20caa628c3253ad92b8b98b2647c19e798f150f3a2d7a3f87e8"
|
||||
},
|
||||
"native/trial-1/47-restore-menu.json": {
|
||||
"bytes": 971,
|
||||
"sha256": "4a7e3bc9c23f95df538a488d0186f37dc54a5bb1dd184d06d2d6268bf1ccf256"
|
||||
},
|
||||
"native/trial-1/48-diagnostic-edit-undone-0.jpg": {
|
||||
"bytes": 105205,
|
||||
"sha256": "cf550b51b74b6fef8e21cd2d50f41f1797e22b4b7f38214d8311062bee3e0483"
|
||||
},
|
||||
"native/trial-1/48-diagnostic-edit-undone.json": {
|
||||
"bytes": 971,
|
||||
"sha256": "43c970d94c53c31a570ab92c6855566a6e2ce690768f6ed7836d64c5a6120f81"
|
||||
},
|
||||
"native/trial-1/input.zip": {
|
||||
"bytes": 343,
|
||||
"sha256": "f73fb93e2ee2eae45d1df2f63cdbb838a60cdda3f09b8977af6ded6e4ab424f0"
|
||||
},
|
||||
"native/trial-1/process.json": {
|
||||
"bytes": 61,
|
||||
"sha256": "8a60a20728ea02517d7c22812d27f9814bc3aa98fee597820e8351076f32e7c2"
|
||||
},
|
||||
"native/trial-1/result.json": {
|
||||
"bytes": 1665,
|
||||
"sha256": "6e615456856f30b8c25dedcd881d7dff6918535916a62b39b4de15c591960dd2"
|
||||
},
|
||||
"native/trial-1/started.json": {
|
||||
"bytes": 1198,
|
||||
"sha256": "39425278d31c29db4f293b4be7f3e9b2616a85e09c2f6a124dbab2b7ea0ac48c"
|
||||
},
|
||||
"native/trial-1/stderr.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
},
|
||||
"native/trial-1/stdout.log": {
|
||||
"bytes": 0,
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
"""Portable read-only evidence verification; no archived helper or binary runs."""
|
||||
from pathlib import Path, PurePosixPath
|
||||
from datetime import datetime
|
||||
import hashlib, io, json, zipfile
|
||||
|
||||
ROOT=Path(__file__).resolve().parent
|
||||
def require(ok,message):
|
||||
if not ok: raise ValueError(message)
|
||||
def pin(b): return {'bytes':len(b),'sha256':hashlib.sha256(b).hexdigest()}
|
||||
def membership(z,expected):
|
||||
names=z.namelist()
|
||||
require(len(names)==len(set(names)) and set(names)==set(expected),'ZIP membership')
|
||||
require(all(not PurePosixPath(n).is_absolute() and '..' not in PurePosixPath(n).parts and '\\' not in n and ':' not in n for n in names),'unsafe ZIP path')
|
||||
def main():
|
||||
files=json.loads((ROOT/'files.json').read_bytes())
|
||||
for name,p in files.items(): require(pin((ROOT/name).read_bytes())==p,'outer hash '+name)
|
||||
manifest=json.loads((ROOT/'manifest.json').read_bytes())
|
||||
with zipfile.ZipFile(ROOT/'evidence.zip') as z:
|
||||
membership(z,manifest['members'])
|
||||
for name,p in manifest['members'].items():require(pin(z.read(name))==p,'member hash '+name)
|
||||
def raw(p):return z.read(p)
|
||||
def obj(p):return json.loads(raw(p))
|
||||
build=obj('build/result.json'); start=obj('build/started.json')
|
||||
require(all(build[k]==v for k,v in start.items()),'build start/result')
|
||||
require(build['exitCode']==0 and build['inputsUnchanged'] is True,'build success')
|
||||
require(build['head']==manifest['productionCommit'],'build commit')
|
||||
require(datetime.fromisoformat(build['start'])<=datetime.fromisoformat(build['finish']),'build time order')
|
||||
require(build['command']==obj('build/process.json')['command'],'build process command')
|
||||
for field,path in [('inputs','build/inputs.json'),('archive','build/inputs.zip'),('helper','build/gate-union.py'),('stdout','build/stdout.log'),('stderr','build/stderr.log')]:
|
||||
require(build[field]==pin(raw(path)),'build receipt '+field)
|
||||
inputs=obj('build/inputs.json')
|
||||
require(len(inputs)==build['inputCount']==707,'707 build inputs')
|
||||
require(sum(p.startswith('crates/vendor/iced_widget/') for p in inputs)==71,'vendor inventory')
|
||||
with zipfile.ZipFile(io.BytesIO(raw('build/inputs.zip'))) as source:
|
||||
membership(source,inputs)
|
||||
for name,p in inputs.items():require(pin(source.read(name))==p,'source input '+name)
|
||||
artifacts=[]
|
||||
for line in raw('build/stdout.log').decode('utf-8').splitlines():
|
||||
try:a=json.loads(line)
|
||||
except json.JSONDecodeError:continue
|
||||
if a.get('reason')=='compiler-artifact' and a.get('executable'):artifacts.append(a)
|
||||
require(artifacts==[a['cargo'] for a in build['artifacts']],'build artifact receipts')
|
||||
binaries={a['cargo']['target']['name']:a['readback'] for a in build['artifacts']}
|
||||
executables={a['cargo']['target']['name']:a['cargo']['executable'] for a in build['artifacts']}
|
||||
require(set(binaries)=={'arcadia','arcadia-server','arcadia-studio'},'build artifact targets')
|
||||
result=obj('native/trial-1/result.json');start=obj('native/trial-1/started.json')
|
||||
require(all(result[k]==v for k,v in start.items()),'native start/result')
|
||||
require(result['exitCode']==0 and result['inputUnchanged'] is True,'native closure/input')
|
||||
require(result['command']==[executables['arcadia-studio']],'native exact GUI command')
|
||||
process=obj('native/trial-1/process.json')
|
||||
require(isinstance(process['pid'],int) and process['pid']>0,'native positive process ID')
|
||||
require(datetime.fromisoformat(result['start'])<=datetime.fromisoformat(process['observed'])<=datetime.fromisoformat(result['finish']),'native process observation time')
|
||||
require(result['binary']==result['binaryAfter']==binaries['arcadia-studio'],'GUI binary receipt chain')
|
||||
require(result['buildReceipt']==pin(raw('build/result.json')) and result['buildInputs']==pin(raw('build/inputs.json')) and result['buildHead']==build['head'],'native build receipt chain')
|
||||
for field,path in [('helper','native/run-native.py'),('captureHelper','native/capture-snippet.js'),('inputArchive','native/trial-1/input.zip'),('stdout','native/trial-1/stdout.log'),('stderr','native/trial-1/stderr.log')]:
|
||||
require(result[field]==pin(raw(path)),'native receipt '+field)
|
||||
require(not raw('native/trial-1/stdout.log') and not raw('native/trial-1/stderr.log'),'native empty streams')
|
||||
with zipfile.ZipFile(io.BytesIO(raw('native/trial-1/input.zip'))) as fixture:
|
||||
membership(fixture,result['input'])
|
||||
for name,p in result['input'].items():require(pin(fixture.read(name))==p and fixture.read(name)==raw('native/input/'+name),'fixture bytes')
|
||||
captures=manifest['captures']; seen=[]
|
||||
for name in captures:
|
||||
capture=obj(name)
|
||||
require(datetime.fromisoformat(result['start'])<=datetime.fromisoformat(capture['time'])<=datetime.fromisoformat(result['finish']),'capture timestamp')
|
||||
for image in capture['images']:
|
||||
path='native/trial-1/'+image['file']
|
||||
require(path in manifest['members'] and image['width']>0 and image['height']>0,'capture image reference')
|
||||
require(raw(path).startswith(b'\xff\xd8'),'JPEG signature')
|
||||
seen.append(path)
|
||||
images=[n for n in manifest['members'] if n.startswith('native/trial-1/') and n.endswith('.jpg')]
|
||||
require(len(seen)==len(set(seen)) and set(seen)==set(images),'all raw frames referenced exactly once')
|
||||
require(len(captures)==manifest['captureCount'] and len(images)==manifest['imageCount'],'capture counts')
|
||||
original=raw('native/input/project.arcadia')
|
||||
expected={'project.arcadia':original[:-2]+b'\n include "oa/activities/activity_new_activity.arcadia";\n}\n',
|
||||
'oa/activities/activity_new_activity.arcadia':b'\noa_activity new_activity "New activity" id "d2b6d784-dea5-433d-aea9-214c604744e5" {\n}\n\n\n'}
|
||||
require(original.endswith(b'}\n') and expected['project.arcadia'].count(b'position { x 120.0; y 80.0; };')==1,'fixture oracle preconditions')
|
||||
for bundle in ['saved-before','saved-after']:
|
||||
if bundle=='saved-after':expected['project.arcadia']=expected['project.arcadia'].replace(b'position { x 120.0; y 80.0; };',b'position { x 190.0; y 80.0; };',1)
|
||||
prefix='native/'+bundle+'/'
|
||||
actual={n[len(prefix):]:raw(n) for n in manifest['members'] if n.startswith(prefix)}
|
||||
require(actual==expected,bundle+' exact source-byte oracle')
|
||||
receipt=obj('native/bundle-checks/'+bundle+'.result.json')
|
||||
report=obj('native/bundle-checks/'+bundle+'.stdout.json')
|
||||
expected_entry=result['cwd'].replace('\\','/').rstrip('/')+'/.local/union-native/'+bundle+'/project.arcadia'
|
||||
require(len(receipt['command'])==4 and receipt['command'][0]==executables['arcadia'] and receipt['command'][1]=='check' and receipt['command'][2].replace('\\','/')==expected_entry and receipt['command'][3]=='--json',bundle+' exact CLI command')
|
||||
require(datetime.fromisoformat(receipt['start'])<=datetime.fromisoformat(receipt['finish']),bundle+' CLI time order')
|
||||
require(receipt['files']=={n:pin(b) for n,b in actual.items()} and receipt['filesUnchanged'] is True,bundle+' file receipts')
|
||||
require(receipt['binary']==binaries['arcadia'] and receipt['buildReceipt']==pin(raw('build/result.json')),bundle+' CLI build receipt')
|
||||
require(receipt['producer']==pin(raw('native/check-saved-bundles.py')),bundle+' producer')
|
||||
require(receipt['exitCode']==0 and report['status']=='checked',bundle+' CLI status')
|
||||
for field,suffix in [('stdout','.stdout.json'),('stderr','.stderr.log')]:require(receipt[field]==pin(raw('native/bundle-checks/'+bundle+suffix)),bundle+' '+field)
|
||||
require(not raw('native/bundle-checks/'+bundle+'.stderr.log'),bundle+' empty stderr')
|
||||
require(len(report['diagnostics'])==4 and all(d['severity']=='warning' for d in report['diagnostics']),bundle+' warnings')
|
||||
require(receipt['diagnostics']==[{k:d[k] for k in ('severity','code','object_id')} for d in report['diagnostics']],bundle+' diagnostic receipt')
|
||||
require(not report['changes'] and not report['written'] and report['identities_to_stabilize']==0,bundle+' nonmutating stable-ID check')
|
||||
summary=obj('native/bundle-checks/summary.json')
|
||||
require(summary['status']=='PASS' and summary['runs']==['saved-before','saved-after'] and summary['producer']==pin(raw('native/check-saved-bundles.py')),'bundle summary')
|
||||
print('PASS:',len(manifest['members']),'members;',len(captures),'captures;',len(images),'unaltered frames; 707 build inputs; native closure and both saved-byte/CLI receipt oracles.')
|
||||
print('No archived code executed. Screenshot interpretation and full parsed-model equality are not machine-verified.')
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,192 @@
|
||||
# Ordinary compact source and Text workspace integration
|
||||
|
||||
This proposal composes ordinary source-default omission with the published Text
|
||||
workspace. It does not replace the release owner's branch or establish release
|
||||
acceptance. [Issue 11](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/11)
|
||||
owns this contribution; [issue 27](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/27)
|
||||
retains release integration. Source-8 analysis composition and Linux verification
|
||||
remain outside this candidate; Linux work is paused at the user's instruction.
|
||||
|
||||
## Source composition
|
||||
|
||||
Production commit `d7c065991d3f63cc41341d23a546739de8837ac3` applies the exact
|
||||
14-file ordinary code/test delta from `74cc0e09119f9fa9e1287988bdd98c4cbf9db79e`
|
||||
to `3d067041d1c8b62bc4b2bd1e2ae81eb2713bf4e2` onto published Text/root
|
||||
`136ed6e5868200165fbb1c2ae8a7230067bf9c1e`. Thirteen preimages match, including
|
||||
seven paths absent on both bases. The only other preimage difference is
|
||||
`lib.rs`'s independent `pub mod analysis_numeric;`, retained with the new private
|
||||
`mod source_defaults;`. Thirteen resulting files match the ordinary head exactly;
|
||||
the combined `lib.rs` additionally retains the numeric module. The original
|
||||
145,928-byte patch has SHA-256
|
||||
`e319a5151b7e6713880eaaab632f3f1c01aee6df3cd534d85a1c099fb501dcb7`.
|
||||
|
||||
Follow-up `e624d5b9c4f848eff3fba2ed83f9decf959e14d8` brings over the ordinary
|
||||
normative language-contract delta and regenerates the current teaching example.
|
||||
The full core run identified the latter dependency: its exact generated-source
|
||||
assertion still expected verbose defaults. The documented generator produced
|
||||
30 source files and four JSON files. Twenty-nine source files changed, removing
|
||||
514 default-field lines; the root entry, all four JSON files, and all 68 historical
|
||||
trace baseline blocks remained byte-identical. Generation asserts complete
|
||||
decoded Project equality. The test assertion was preserved.
|
||||
|
||||
Strict Docutils 0.23 rendering exposed an existing one-character-short underline
|
||||
on the focused diagram removal heading. Repairing it allowed warning-free HTML
|
||||
generation. Regeneration also restores the root's existing allocation/removal
|
||||
sections that were missing from its previous HTML. No semantic prose from those
|
||||
sections changed.
|
||||
|
||||
## Verification to date
|
||||
|
||||
Windows toolchain: Rust/Cargo 1.98.1, `stable-x86_64-pc-windows-gnullvm`, LLVM-MinGW
|
||||
20260826 UCRT, one build job, `CARGO_INCREMENTAL=0`. Each Cargo run captures its
|
||||
707 source inputs before and after, including all 71 vendored Iced widget files,
|
||||
raw logs, process identity, and executable artifact hashes. A captured HEAD with
|
||||
local deltas is not represented as a clean-commit run.
|
||||
|
||||
- The initial combined-consumer attempt stopped before compilation because
|
||||
`num-bigint` was absent from the offline cache. A locked Windows-target fetch
|
||||
installed `num-bigint 0.5.1` and `num-integer 0.1.47`; sources and lock stayed
|
||||
unchanged.
|
||||
- Full core at clean `d7c0659`: **536 passed, one failed, one existing opt-in
|
||||
scaling probe ignored**, across 46 result summaries. The sole failure was
|
||||
`release1_teaching_regeneration_and_shipped_source_are_exact_with_one_intentional_warning`.
|
||||
The source-transaction panic messages are deliberate interruption injections
|
||||
in passing recovery tests.
|
||||
- The documented teaching generator completed successfully against the same
|
||||
production inputs, writing to a separate scratch folder. All 34 generated
|
||||
files were compared with the repaired shipped fixture.
|
||||
- `cargo test --locked --offline -p oa-core --test release1_teaching` against the
|
||||
repaired fixture: **four passed**, including exact source/JSON parity and the
|
||||
one intentional coverage warning. This run captured `d7c0659` plus the 29
|
||||
fixture changes subsequently committed in `e624d5b`; production was unchanged.
|
||||
- Strict language HTML generation: passed with an empty warning log.
|
||||
- CLI/HTTP consumers: **12 CLI and 51 HTTP passed**, no failed or ignored
|
||||
cases. The HTTP preservation witness exercises an actual move and server
|
||||
restart with an explicitly authored empty port-anchor list. The two Windows
|
||||
storage-refusal messages are expected from atomic-storage failure tests.
|
||||
This run started at `d7c0659` plus the 31 fixture/documentation changes now in
|
||||
`e624d5b`; all 707 captured inputs remained unchanged through execution.
|
||||
|
||||
Actual desktop listing admission, desktop execution, strict workspace
|
||||
Clippy, matching Windows binaries, and native combined-workflow acceptance are
|
||||
not established by the results above. Earlier ordinary-only native and automated
|
||||
evidence remains scoped to its original published inputs.
|
||||
|
||||
## Independent review
|
||||
|
||||
Astra review checked exact Git-blob composition and the source-preserving updater,
|
||||
raw diagnostic coordinates, source publication ordering, warning authority after
|
||||
recovery, rename/history/save ownership, schema-7 boundary, and historical payloads.
|
||||
No actionable source defect was found. Separate follow-up review confirmed all
|
||||
34 regenerated files and 68 unchanged historical blocks, then checked the scoped
|
||||
reST delta, preserved root sections, generated HTML, and strict-render receipts.
|
||||
|
||||
A source-pinned checklist identifies 150 critical desktop declarations: all 89
|
||||
imported desktop additions, both later recovery-warning fixes, retained selection
|
||||
and departure cases, additional recovery/Save As/rename/navigation controls, and
|
||||
six explicitly ignored probes. This is expected membership only; lexical counts
|
||||
are not executable admission or passing runtime results.
|
||||
|
||||
## Portable closed-run checkpoint
|
||||
|
||||
[The evidence package](experiments/ordinary-text-integration-20260913/README.md)
|
||||
contains the eight closed captures described above, including failed runs, exact
|
||||
input snapshots, raw generated outputs, and the source-admission checklist.
|
||||
Its ZIP contains 81 members with three distinct input manifest/archive pairs:
|
||||
8,584,848 bytes, SHA-256
|
||||
`f220433f8f6fe99cea762aca98ee471c14411b5f6762745cf91432e6bfaca440`.
|
||||
Run the package's `verify.py` with Python 3.10 or newer; it requires only the
|
||||
standard library and the five adjacent package files. It verifies integrity and
|
||||
receipt relationships without executing archived code or consulting this machine.
|
||||
The README records provenance limitations and the absence of runtime binaries.
|
||||
All 707 consumer inputs were independently compared with committed Git blobs at
|
||||
`e624d5b9c4f848eff3fba2ed83f9decf959e14d8` and matched exactly.
|
||||
|
||||
## Subsequent combined checks and lint repair
|
||||
|
||||
The final fixture/documentation state completed the full core suite: **537 passed,
|
||||
zero failed, one existing opt-in probe ignored**. Desktop listing and execution
|
||||
have exactly the same 1,185 unique names: **1,179 passed, zero failed, six existing
|
||||
opt-in probes ignored**. Independent admission checked all 144 enabled critical
|
||||
checklist cases, all six expected ignored cases and their reasons, five replaced
|
||||
names absent, four retained departure cases present exactly once, and all 24
|
||||
checklist source-file bindings. These runs use the same 707 input bytes as the
|
||||
successful consumers; full listing and execution are recorded separately.
|
||||
|
||||
Strict all-target Clippy then exposed two integration cleanups. The first was
|
||||
two unchanged test-only helper functions appearing after a test module in
|
||||
`views.rs`. The second was the unused internal `SymbolEvent::Close`: production
|
||||
already emits captured `TextWorkspace(Event::HideDrawer)` instead. Commit
|
||||
`f714a25bbcd435941404104ad0cbb0fea3b89149` moves the helpers before the test module,
|
||||
removes the obsolete event/handler, and switches four existing test sites to the
|
||||
actual UI close message without weakening their assertions. Current close tests
|
||||
therefore exercise document/session/visit authority and the presentation boundary;
|
||||
Query/Back/Choose continue to test source-file authority. Independent review
|
||||
accepted both changes. No production sender used the removed event.
|
||||
|
||||
Strict `cargo clippy --locked --offline --workspace --all-targets -- -D warnings`
|
||||
now passes. Its captured HEAD was `cb94136` plus those four files, with all 707
|
||||
inputs unchanged; exact Git-blob comparison binds those inputs to `f714a25`.
|
||||
The earlier complete suites remain scoped to the preceding input state.
|
||||
Affected desktop execution on `f714a25` passed: **83 passed, zero failed, one
|
||||
existing manual source-navigation performance probe ignored**, with 1,101 cases
|
||||
outside the selected scope. The filters cover source-symbol tests, Text workspace
|
||||
tests, surrounding view tests and the palette/drawer integration cases. The
|
||||
updated close assertions and both recovery-warning regressions passed. The
|
||||
matching Windows GUI, CLI and server then built successfully from `f714a25` with
|
||||
the same final inputs. The native workflow is recorded separately below.
|
||||
|
||||
[The subsequent gate package](experiments/ordinary-text-gates-20260913/README.md)
|
||||
preserves these eight closed gates, both failed lint attempts, complete listing
|
||||
admission, the exact affected-test selection, and the three build artifact
|
||||
receipts. Its 8,624,040-byte ZIP has SHA-256
|
||||
`b0da6611dd86e83c8f779c025786e473834298f9b9990b19a76b250b61137780`.
|
||||
Independent review verified all 50 stored members against raw captures, source
|
||||
relationships, the safe read-only verifier, and prospective Git-clean outer bytes.
|
||||
|
||||
## Native Windows workflow
|
||||
|
||||
The combined GUI built from `f714a25` ran from 14:16:18 to 14:32:24 UTC on
|
||||
2026-09-13 and closed with exit zero and empty stdout/stderr. Its 117,674,496-byte
|
||||
executable had SHA-256
|
||||
`f7405a95a499c31972934b8efdd8a37ee3981cefc5b2b7c82a4f16c4e5a935ed`
|
||||
before and after the trial, matching the captured build receipt and final 707
|
||||
inputs. The original 451-byte input remained unchanged.
|
||||
|
||||
Computer Use exercised creation of a new activity in Model explorer, its compact
|
||||
included declaration in Text, Save As, a graphical move, model Undo and Redo,
|
||||
a second Save As, New, and reopening that saved model from Home. The move changed
|
||||
the source x coordinate from 120.0 to 190.0; Undo restored 120.0 and the saved
|
||||
state, and Redo restored 190.0. The authored empty `port_anchors` field, spacing,
|
||||
comment and include remained intact. Reopening showed the same 190.0 source
|
||||
coordinate and the new activity.
|
||||
|
||||
The Problems drawer navigated from a current warning to the included activity
|
||||
at line 2. Inserting a temporary comment removed the old warning rows and
|
||||
underlines while reporting drafts pending. Apply all restored the four warnings
|
||||
with the included declaration at line 3; selecting its warning highlighted that
|
||||
updated declaration. Undo model change removed the comment, restored line 2
|
||||
diagnostics and returned the saved state before normal exit. These observations
|
||||
establish visible invalidation and refresh; they do not simulate delivery of a
|
||||
previously captured stale UI message. Automated authority regressions cover that
|
||||
separate case.
|
||||
|
||||
An exact-byte oracle checked both saved bundles: each has precisely two source
|
||||
files, the new activity identity is stable, and their only difference is the
|
||||
intended x-coordinate change. Both passed `arcadia check <entry> --json` using the
|
||||
matching built CLI, without writes or stderr. Each reported the expected four
|
||||
modeling warnings for two unallocated activities without behavior context and
|
||||
zero errors. The checks do not assert equality of the entire in-memory Project;
|
||||
saved bytes, CLI validation, GUI observations and process receipts are distinct
|
||||
evidence. Original screenshots retain intermediate file-dialog states. The
|
||||
operator encountered an unavailable UI Automation value-setting call, reported
|
||||
in the tool transcript rather than the screenshot archive; the exact intended
|
||||
path was visibly verified before saving.
|
||||
|
||||
Independent native review inspected 25 original frames, checked all 49 capture
|
||||
metadata records, and independently reconstructed the source-byte oracles and
|
||||
receipt relationships. It found no functional defect or source corruption. Its
|
||||
one evidence-attribution wording correction is resolved above. The review does
|
||||
not certify exhaustive accessibility, Linux, source-8 composition or release
|
||||
readiness. The raw trial and review are in the
|
||||
[native evidence package](experiments/ordinary-text-native-20260913/README.md).
|
||||
Reference in New Issue
Block a user