Conformance / Test suite

The test suite

56 tests across four groups. Every test names the clause it enforces and the exact condition that constitutes a pass. A conformance statement MUST list the tests it fails.

56 tests

PK — Package validity 17 tests · target: package

PK-1MUSTContainer formBUS-1 16.2

Procedure. Open the package as a ZIP archive.

Pass. The archive opens, the first entry is named 'mimetype', it is stored uncompressed, and its content is exactly the registered media type string with no trailing newline.

PK-2MUSTManifest present and validBUS-1 16.3

Procedure. Read manifest.json at the package root and validate against bus-manifest.schema.json.

Pass. The manifest exists and validates with no errors.

PK-3MUSTDocument validityBUS-1 17.4

Procedure. Validate every file listed in manifest.documents against bus-document.schema.json.

Pass. Every listed document exists and validates with no errors.

PK-4MUSTDigest integrityBUS-1 16.5

Procedure. Recompute the digest of every entry in manifest.documents and manifest.resources.

Pass. Every recomputed digest equals the declared digest, and every declared byteLength matches.

PK-5MUSTNo undeclared payloadBUS-1 16.4

Procedure. Enumerate all archive entries.

Pass. Every entry other than 'mimetype' and 'manifest.json' appears in manifest.documents or manifest.resources.

PK-6MUSTPath safetyBUS-1 16.4

Procedure. Inspect every archive entry name.

Pass. No entry is absolute, contains a '..' segment, or resolves outside the package root.

PK-7MUSTIdentifier uniquenessBUS-1 6.2

Procedure. Collect every entity id in the package.

Pass. No id occurs twice.

PK-8MUSTReferential closureBUS-1 9.2

Procedure. Resolve every subject, object, deviceRef, targetOf, appliesToRef, scheduleRef and ChangeRecord subject.

Pass. Every reference resolves to an entity present in the package, or to an entity explicitly declared external in the manifest.

PK-9MUSTExtension declarationBUS-1 15.3

Procedure. Collect every namespace prefix used in type names, predicates and extension keys.

Pass. Every non-bus prefix is declared in manifest.extensions.

PK-10MUSTCompleteness declarationBUS-1 16.6

Procedure. Inspect manifest.completeness.domains.

Pass. All twelve substrate domains are present, and every domain in state partial or absent carries a reason.

PK-11SHOULDProfile supportBUS-1 2.3

Procedure. Compare the declared profile against the domains actually populated.

Pass. Every domain required by the declared profile is in state complete or partial, not absent.

PK-12MUSTProperty definition coverageBUS-1 7.8

Procedure. Collect every property value in the package and resolve its definition.

Pass. Every property value references a bus:PropertyDefinition present in the package. No bare key-value property data appears anywhere.

PK-13MUSTProperty value agrees with its definitionBUS-1 7.8

Procedure. For each property value, compare its shape against the declared datatype and unit.

Pass. Quantity values carry the unit declared by the definition; string, number and enum values match their declared datatype.

PK-14MUSTPresentation referential integrityBUS-1 13

Procedure. Resolve every element drawing and layer, every layer drawing, every represents and navigatesTo, and every binding element and target.

Pass. All resolve. Every element's layer belongs to the same drawing as the element. Every navigatesTo names a drawing.

PK-15MUSTActuation declaration is accurateBUS-1 16.7

Procedure. Count write and readWrite bindings and compare against manifest.actuation.

Pass. present matches whether any write binding exists; bindingCount and highestPriority match the content. A package containing write bindings and declaring actuation absent fails.

PK-16MUSTWrite bindings are well formedBUS-1 13.7

Procedure. For each write binding, inspect its write block and its target.

Pass. A command priority is declared, the target point is writable, the priority is within the target's declared priority model, and any constraintRef or interlockRef resolves to a bus:Constraint.

PK-17SHOULDDrawing scale is checkableBUS-1 13.3

Procedure. Inspect each drawing for a reference dimension.

Pass. A reference dimension is present and its stated length agrees with the distance between its two drawing coordinates under the declared units.

RT — Round-trip reconstruction 24 tests · target: roundTrip

RT-1MUSTIdentity preservationBUS-1 6.4

Procedure. Compare the id of every entity in A with its counterpart in B.

Pass. Every id in A appears unchanged in B, or B contains a bus:IdentityMapping with equivalence 'same' linking the new id to the original. No entity is silently reidentified.

RT-2MUSTObject meaningBUS-1 8

Procedure. Compare type, pointKind, dataType, unit, range, enumeration, classifications and attributes for every entity.

Pass. All are preserved. Unit codes are preserved without conversion, or converted with the original code recorded in provenance.

RT-3MUSTRelationship graphBUS-1 9

Procedure. Construct the labeled directed graph of relationships in A and in B and test for isomorphism under the identity mapping from RT-1.

Pass. The graphs are isomorphic, including predicate, direction, medium and qualifiers. Inverse-form substitution is permitted; loss of a relationship is not.

RT-4MUSTIntent distinguishabilityBUS-1 10

Procedure. For each Objective, Target, Constraint, Schedule and SequenceReference in A, locate it in B.

Pass. The receiving system can still distinguish what should happen from what is happening and what happened. Constraints retain their constraintKind and bounds; schedules retain their recurrence and exceptions.

RT-5MUSTProvenance retentionBUS-1 14

Procedure. Compare provenance blocks and ChangeRecords.

Pass. assertedBy, assertedAt, method, source, confidence and approvals survive. The receiving system MAY add its own provenance; it MUST NOT overwrite the original.

RT-6MUSTUnknown extension preservationBUS-1 15.4

Procedure. Include in A an extension namespace the receiving system does not implement, with mustUnderstand false, attached to at least one entity of each core class.

Pass. Every extension value reappears in B byte-identical after canonicalization, and the namespace is still declared in B's manifest.

RT-7MUSTMust-understand refusalBUS-1 15.4

Procedure. Include in A an extension with mustUnderstand true that the receiving system does not implement.

Pass. The importer reports the import as incomplete and names the namespace. It MUST NOT report success, and it MUST still preserve the data.

RT-8MUSTResource integrityBUS-1 16.5

Procedure. Compare resource payloads and digests between A and B.

Pass. Included resources are byte-identical and digests match. Externally referenced resources retain their URI and digest.

RT-9MUSTTelemetry binding retentionBUS-1 8.6

Procedure. Compare the binding object of every point.

Pass. protocol, address, network and parameters are preserved verbatim, so acquisition can be re-established without rediscovery.

RT-10MUSTKnowledge retentionBUS-1 8.9

Procedure. Compare every KnowledgeNote and its attachment relationship.

Pass. Body text, noteKind, observedAt and the appliesTo relationship survive unaltered.

RT-11MUSTLifecycle continuityBUS-1 9.3

Procedure. In A, replace an asset and record bus:replaces and bus:replacedBy. Round-trip.

Pass. B retains both the superseded and the superseding entity and the replacement relationship, so history remains attributable across the change.

RT-12MUSTOmission honestyBUS-1 16.6

Procedure. Compare B's completeness declaration against what B actually contains, and against A.

Pass. Anything present in A but absent from B is declared in B's completeness block with a reason. Silent loss is a failure of this test even when every other test passes.

RT-13SHOULDIdempotenceBUS-1 17.5

Procedure. Import B and re-export as C.

Pass. C and B are identical after canonicalization. Drift between successive round trips indicates unstable identity or unstable ordering.

RT-14INFOScaleBUS-1 16.4

Procedure. Round-trip a package with at least 50000 points and 250000 relationships.

Pass. Report wall-clock export time, import time and peak memory. No pass or fail threshold is set in v0.1.

RT-15MUSTBinding preservationBUS-1 13.6

Procedure. Compare every binding in A with its counterpart in B: element, target, channel, direction, mapping, quality.

Pass. All survive. A binding lost, repointed, or reduced to a different channel is a failure, even where the graphic still renders.

RT-16MUSTCommand priority is not substitutedBUS-1 13.7

Procedure. Round-trip a write binding whose priority the receiving system does not natively support.

Pass. The priority is re-exported unchanged and the importer reported that it could not honor it. Silent substitution is a failure even though the graphic appears identical.

RT-17MUSTQuality behavior preservationBUS-1 13.6

Procedure. Compare the quality block of every binding.

Pass. staleAfter, onStale, onUnavailable and onOutOfService survive unchanged.

RT-18MUSTGeometry fidelityBUS-1 13.5

Procedure. Compare drawing coordinate systems, extents, layer purposes, and every element geometry and transform.

Pass. Coordinates agree within one part in 10000 of the drawing extent. The coordinate system, georeference, and layer purposes are unchanged.

RT-19MUSTSymbol role fallbackBUS-1 13.4

Procedure. Include an element whose leaf symbol role the receiving system does not implement but whose ancestor it does.

Pass. The receiver renders using the ancestor role and re-exports the original leaf role unchanged. Substituting the ancestor into the exported data is a failure.

RT-20MUSTBespoke figure preservationBUS-1 13.4

Procedure. Round-trip an element carrying a figure payload for which no symbol role applies.

Pass. The figure survives byte-identical after canonicalization and is rendered substantially as given rather than replaced by a library symbol.

RT-21MUSTProperty definitions surviveBUS-1 7.8

Procedure. Compare every property definition and every property value.

Pass. Definitions survive with their meaning text intact. No property is re-exported without its definition, and no definition is silently merged with another of the same name but different meaning.

RT-22MUSTAlarm configuration survivesBUS-1 11

Procedure. Compare every alarm definition: limits, deadband, delays, priority, acknowledgment, shelving and routing.

Pass. All survive. Routing that the receiver cannot execute is preserved and reported as unenforced, not dropped.

RT-23MUSTEvents survive with their subjectsBUS-1 12

Procedure. Compare every event and its subject reference.

Pass. Event kind, timestamps, actor, values and subject survive. An override event that loses its subject is a failure.

RT-24MUSTRevision continuityBUS-1 6.6

Procedure. Compare the versioning block of every entity across the round-trip.

Pass. Revision numbers are preserved or advanced, never reset. An entity re-exported at revision 1 having arrived at revision 4 is a failure.

IM — Importer behavior 8 tests · target: importer

IM-1MUSTRejects a corrupt digestBUS-1 16.5

Procedure. Present a package in which one document digest does not match.

Pass. The importer refuses the package and names the failing path. Partial silent ingestion is a failure.

IM-2MUSTRejects an unknown major versionBUS-1 18.2

Procedure. Present a package whose busVersion has a higher major number.

Pass. The importer refuses and reports the version it supports.

IM-3MUSTAccepts an unknown minor versionBUS-1 18.2

Procedure. Present a package whose busVersion has the same major and a higher minor number.

Pass. The importer accepts it, preserves what it does not understand, and reports which constructs it ignored.

IM-4MUSTTolerates unknown enumeration membersBUS-1 18.3

Procedure. Present a package using an enumeration member added after the importer was built.

Pass. The importer preserves the value and does not coerce it to a default.

IM-5SHOULDReports a coverage summaryBUS-1 2.5

Procedure. Import a valid package.

Pass. The importer produces a machine-readable summary of entities ingested, entities preserved but not interpreted, and constructs not understood.

IM-6MUSTUnknown symbol role degrades rather than failsBUS-1 13.4

Procedure. Present an element with a symbol role several levels deeper than the importer implements.

Pass. The importer walks the dotted path upward, renders at the deepest ancestor it knows, and preserves the original role. Refusing the package or dropping the element is a failure.

IM-7MUSTReports unenforceable actuationBUS-1 13.7

Procedure. Present write bindings whose priority model, interlock, or confirmation requirement the importer cannot enforce.

Pass. Each is named in the import report as unenforced. Importing them as ordinary writes without report is a failure.

IM-8MUSTRefuses undefined propertiesBUS-1 7.8

Procedure. Present a package containing a property value whose definition is absent.

Pass. The importer reports the package as invalid and names the property. Accepting it as an untyped string is a failure.

EX — Exporter behavior 7 tests · target: exporter

EX-1MUSTExports without a live vendor dependencyBUS-1 2.4

Procedure. Produce a package and inspect it for references that can only be resolved by the exporting vendor.

Pass. Every reference is either resolvable inside the package or is a durable external locator with a digest. No reference requires a proprietary service to interpret.

EX-2MUSTIdentifier stability across exportsBUS-1 6.4

Procedure. Export the same building twice with no intervening change.

Pass. Every entity id is identical in both exports.

EX-3MUSTIdentifier stability across changeBUS-1 6.4

Procedure. Rename an asset, then export again.

Pass. The id is unchanged and the rename appears as a ChangeRecord.

EX-4MUSTExport is not narrower than operationBUS-1 2.4

Procedure. Compare the exported model against the model the system uses to operate the building.

Pass. No construct the system relies on to operate is omitted without a completeness declaration naming it.

EX-5SHOULDOwner-initiated exportBUS-1 2.2

Procedure. Attempt an export as an operator-role user without vendor assistance.

Pass. The export completes without vendor involvement, professional services, or a support ticket.

EX-6MUSTGraphics export is unaidedBUS-1 2.4

Procedure. Export a floor plan and an equipment graphic as an operator-role user.

Pass. Both export with geometry, roles and bindings intact, without vendor involvement or professional services. This is the test the rebuild tax is measured against.

EX-7MUSTProperty definitions are published, not invented per exportBUS-1 7.8

Procedure. Export the same building twice and compare property definition identifiers.

Pass. Definition identifiers are stable between exports. Regenerating identifiers each time defeats RT-21 and makes cross-package comparison impossible.

Machine-readable: bus-conformance-tests.json