diffpes.certify tests¶
Validation and regression tests for diffpes.certify.
Validate deterministic canonical scientific records.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_canonical.TestCanonicalPytree[source]¶
Bases:
objectVerify
canonical_pytree().The cases cover the public behavior in the supported certification regime.
- See:
- test_record_is_stable() None[source]¶
Verify equal typed values produce identical canonical bytes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
Encodes the same nested value twice and compares exact bytes.
- Return type:
- test_numpy_and_jax_arrays_have_identical_canonical_bytes() None[source]¶
Treat equal concrete NumPy and JAX arrays as one normalized content.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_array_canonicalization_retains_dtype_shape_and_complex_values() None[source]¶
Keep numerical layout semantics and canonical complex bytes distinct.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_canonical_record_is_stable_in_a_fresh_process() None[source]¶
Keep canonical content stable across independent Python processes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_nonfinite_values_are_rejected(value: Any) None[source]¶
Exclude unstable NaN and infinity encodings from scientific records.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_canonical.TestCanonicalJson[source]¶
Bases:
objectVerify
canonical_json().The cases cover the public behavior in the supported certification regime.
- See:
- test_canonical_json_golden_record_and_mapping_order() None[source]¶
Pin typed scalars, NFC text, and deterministic mapping order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_canonical_json_distinguishes_list_tuple_null_and_absent() None[source]¶
Retain meaning-bearing container and presence distinctions.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_canonical_text_normalizes_unicode_and_rejects_key_collision() None[source]¶
Normalize equivalent text while refusing ambiguous normalized keys.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_canonical.TestIterCanonicalPytreeChunks[source]¶
Bases:
objectVerify
iter_canonical_pytree_chunks().The cases cover the public behavior in the supported certification regime.
- test_streamed_and_materialized_records_are_identical() None[source]¶
Make bounded chunks exactly reproduce the full canonical record.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_unsupported_values_and_invalid_chunk_size_are_rejected() None[source]¶
Keep the canonical vocabulary deliberately closed and bounded.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate the stable pure-JAX certification-check registry.
The tests exercise explicit registration, exact lookup, and deterministic listing without treating registry bookkeeping as a physics result.
- class tests.test_diffpes.test_certify.test_checks.TestRegisterCheck[source]¶
Bases:
objectVerify
register_check().The cases cover the public behavior in the supported certification regime.
- See:
- test_registered_check_is_resolved_exactly() None[source]¶
Verify lookup returns the registered pure JAX predicate.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
Registers one unique identity and evaluates the resolved callable on a scalar JAX input.
- Return type:
- class tests.test_diffpes.test_certify.test_checks.TestGetCheck[source]¶
Bases:
objectVerify
get_check().The cases cover exact lookup and explicit failure for an unknown identity.
- See:
- test_unknown_check_is_rejected() None[source]¶
Reject an unregistered stable check identity.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checks.TestListChecks[source]¶
Bases:
objectVerify
list_checks().The cases cover the deterministic order of process-local check identities.
- See:
- test_registered_checks_are_sorted() None[source]¶
List registered identities in deterministic lexical order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate non-security scientific-record checksums.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_checksums.TestParseChecksum[source]¶
Bases:
objectVerify
parse_checksum().The cases cover the public behavior in the supported certification regime.
- See:
- test_checksum_round_trip() None[source]¶
Verify a checksum round-trips through its explicit parser.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test checks algorithm, record kind, and fixed-width CRC32 text.
- Return type:
- test_invalid_checksum_record_is_rejected() None[source]¶
Refuse incomplete and hand-written checksum forms.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestChecksumChunks[source]¶
Bases:
objectVerify
checksum_chunks().The cases cover the public behavior in the supported certification regime.
- See:
- test_checksum_is_typed_versioned_and_streaming_stable() None[source]¶
Record bookkeeping context and remain invariant to chunk boundaries.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_invalid_record_kind_is_rejected(record_kind: Any) None[source]¶
Reject record labels that make the checksum format ambiguous.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestChecksumBytes[source]¶
Bases:
objectVerify
checksum_bytes().The cases cover the public behavior in the supported certification regime.
- See:
- test_record_kind_and_one_bit_change_checksum() None[source]¶
Detect accidental byte disagreement and distinguish record purposes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestSemanticChecksum[source]¶
Bases:
objectVerify
semantic_checksum().The cases cover the public behavior in the supported certification regime.
- See:
- test_semantic_and_numerical_declarations_affect_identity() None[source]¶
Distinguish equal arrays with different units or precision contracts.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestChecksumPytree[source]¶
Bases:
objectVerify
checksum_pytree().The cases cover the public behavior in the supported certification regime.
- See:
- test_streaming_pytree_matches_equal_jax_values() None[source]¶
Produce stable normalized-content bookkeeping for equal carriers.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestArtifactRef[source]¶
Bases:
objectVerify
artifact_ref().The cases cover the public behavior in the supported certification regime.
- See:
- test_artifact_ref_separates_byte_content_and_semantics(tmp_path: Any) None[source]¶
Record exact source bytes separately from parsed scientific meaning.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestChecksumFile[source]¶
Bases:
objectVerify
checksum_file().The cases cover streaming identity for exact bytes in a local artifact.
- See:
- test_file_checksum_matches_byte_checksum(tmp_path: Any) None[source]¶
Match the checksum of a file with the checksum of its exact bytes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_checksums.TestResultChecksum[source]¶
Bases:
objectVerify
result_checksum().The cases cover numerical settings that form part of result identity.
- See:
- test_numerical_settings_change_result_identity() None[source]¶
Distinguish equal values produced with different precision settings.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate semantic transformation contracts.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_contracts.TestValidateComposition[source]¶
Bases:
objectVerify
validate_composition().The cases cover the public behavior in the supported certification regime.
- test_empty_composition_is_valid() None[source]¶
Verify an empty pipeline preserves its declared input semantics.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
Composes no transforms and checks the deterministic report directly.
- Return type:
- class tests.test_diffpes.test_certify.test_contracts.TestComposeTransformations[source]¶
Bases:
objectVerify
compose_transformations().The cases cover the public behavior in the supported certification regime.
- test_composition_propagates_information_loss_and_invalidations() None[source]¶
Carry explicit semantics and all downstream losses conservatively.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_missing_requirement_is_reported_and_strict_composition_raises() None[source]¶
Refuse a transformation whose parent semantics do not satisfy it.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_contracts.TestValidateContract[source]¶
Bases:
objectVerify
validate_contract().The cases cover the public behavior in the supported certification regime.
- See:
- test_contradictory_contract_is_rejected() None[source]¶
Reject a property declared both preserved and destroyed.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_contract_identity_and_version_are_validated(identifier: Any, version: Any) None[source]¶
Require stable reverse-DNS identities and semantic versions.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate JAX-native certification dependency analysis.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_dependencies.TestDependencyMap[source]¶
Bases:
objectVerify
dependency_map().The cases cover the public behavior in the supported certification regime.
- See:
- test_dependency_map_distinguishes_disconnected_leaf() None[source]¶
Trace only leaves consumed by the output JAXPR.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_dependencies.TestLinearizedForward[source]¶
Bases:
objectVerify
linearized_forward().The cases cover the public behavior in the supported certification regime.
- See:
- test_linearization_reuses_exact_jvp() None[source]¶
Retain the linear map of a cubic function.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_dependencies.TestInformationSpectrum[source]¶
Bases:
objectVerify
information_spectrum().The cases cover the public behavior in the supported certification regime.
- test_information_spectrum_and_gradient() None[source]¶
Recover and differentiate the singular value of x squared.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_dependencies.TestSensitivityMap[source]¶
Bases:
objectVerify
sensitivity_map().The cases cover the public behavior in the supported certification regime.
- See:
- test_sensitivity_map_has_output_by_input_orientation() None[source]¶
Store output projections along rows and input probes in columns.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_dependencies.TestClearDependencyCache[source]¶
Bases:
objectVerify
clear_dependency_cache().The case clears all structural entries and all counters.
- class tests.test_diffpes.test_certify.test_dependencies.TestDependencyCacheInfo[source]¶
Bases:
objectVerify
dependency_cache_info().The case counts one cache hit for one repeated static model shape.
Validate differentiable certification evidence.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_evidence.TestEvaluateClaim[source]¶
Bases:
objectVerify
evaluate_claim().The cases cover the public behavior in the supported certification regime.
- See:
- test_claim_retains_differentiable_margin() None[source]¶
Differentiate the tolerance margin beneath a Boolean claim.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_evidence.TestEvaluateDomain[source]¶
Bases:
objectVerify
evaluate_domain().The cases cover the public behavior in the supported certification regime.
- See:
- test_domain_reports_signed_margin() None[source]¶
Preserve distance to the validity boundary.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_evidence.TestEvaluateEvidence[source]¶
Bases:
objectVerify
evaluate_evidence().The cases cover the public behavior in the supported certification regime.
- See:
- test_external_evidence_preserves_residual() None[source]¶
Record numerical comparison arrays without reducing them.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_evidence.TestDerivativeEvidence[source]¶
Bases:
objectVerify
derivative_evidence().The cases cover the public behavior in the supported certification regime.
- test_derivative_evidence_matches_quadratic() None[source]¶
Compare retained JVPs and VJPs against central differences.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_derivative_evidence_linearizes_once(monkeypatch: MonkeyPatch) None[source]¶
Reuse one nonlinear linearization for all information probes.
Central differences can rerun the model but cannot linearize it again.
Notes
The wrapper counts calls to the public JAX linearization primitive.
- Return type:
Validate compiled JAX-native certified execution.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_execution.TestVerifyCertificate[source]¶
Bases:
objectVerify
verify_certificate().The cases cover the public behavior in the supported certification regime.
- See:
- test_compiled_quadratic_certificate() None[source]¶
Produce the correct value, JVP, dependency, and spectrum.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_one_sided_domain_claim_is_internally_consistent() None[source]¶
Verify a domain claim that uses a signed positive margin.
Domain claims mirror their predicate result instead of a symmetric test.
Notes
The positive-domain residual exceeds its zero comparison tolerance.
- Return type:
- test_changed_claim_residual_is_detected() None[source]¶
Detect a claim residual that disagrees with measured values.
The policy Boolean remains unchanged in this single-field mutation.
Notes
The test changes only the execution-identity claim residual.
- Return type:
- class tests.test_diffpes.test_certify.test_execution.TestCertifyForward[source]¶
Bases:
objectVerify
certify_forward().The cases cover the public behavior in the supported certification regime.
- See:
- test_gradient_through_result_and_information() None[source]¶
Differentiate both the observable and certificate evidence.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_vmap_certified_execution() None[source]¶
Batch complete certified executions with JAX VMAP.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_execution.TestPrepareCertification[source]¶
Bases:
objectVerify
prepare_certification().The cases cover eager resolution of stable model and policy identities.
- test_context_binds_exact_model_identity() None[source]¶
Bind a registered model specification into a static context.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_execution.TestCertifyForwardChecked[source]¶
Bases:
objectVerify
certify_forward_checked().The case returns a structured JAX error for a failed hard domain check.
Validate stable human-readable certificate inspection.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_inspect.TestSummarizeCertificate[source]¶
Bases:
objectVerify
summarize_certificate().The cases cover the public behavior in the supported certification regime.
- test_summary_identifies_model() None[source]¶
Verify summaries expose the permanent scientific model identity.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test builds the shared certificate fixture and searches its compact text.
- Return type:
- test_summary_answers_identity_provenance_claim_and_derivative_questions() None[source]¶
Verify summary answers identity provenance claim and derivative questions.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_inspect.TestExplainClaim[source]¶
Bases:
objectVerify
explain_claim().The cases cover the public behavior in the supported certification regime.
- See:
- test_explain_claim_reports_bounded_numerical_evidence() None[source]¶
Verify explain claim reports bounded numerical evidence.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_explain_claim_rejects_missing_id() None[source]¶
Verify explain claim rejects missing id.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_inspect.TestDiffCertificates[source]¶
Bases:
objectVerify
diff_certificates().The cases cover the public behavior in the supported certification regime.
- See:
- test_diff_categorizes_environment_audit_and_scientific_changes() None[source]¶
Verify diff categorizes environment audit and scientific changes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_diff_identical_certificate_has_clear_summary() None[source]¶
Verify diff identical certificate has clear summary.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate built-in certified model registration.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_models.TestTbRadialModelSpec[source]¶
Bases:
objectVerify
tb_radial_model_spec().The cases cover the public behavior in the supported certification regime.
- test_radial_model_spec_names_physics_and_gradients() None[source]¶
Declare assumptions, conventions, domains, and traced paths.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_models.TestRegisterBuiltinModels[source]¶
Bases:
objectVerify
register_builtin_models().The cases cover the public behavior in the supported certification regime.
- test_builtin_registration_is_idempotent() None[source]¶
Register each built-in identity exactly once.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_models.TestExecuteTbRadial[source]¶
Bases:
objectVerify
execute_tb_radial().The cases cover the public behavior in the supported certification regime.
- See:
- test_radial_model_certifies_end_to_end() None[source]¶
Run the built-in radial ARPES model through compiled certification.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate cumulative scientific-certification policies.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_policy.TestAchievedLevels[source]¶
Bases:
objectVerify
achieved_levels().The cases cover the public behavior in the supported certification regime.
- See:
- test_exploratory_reaches_identified_and_validated() None[source]¶
Achieve the two exploratory levels from required claims.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_policy.TestEvaluatePolicy[source]¶
Bases:
objectVerify
evaluate_policy().The cases cover the public behavior in the supported certification regime.
- See:
- test_failed_lower_level_blocks_higher_levels() None[source]¶
Make cumulative outcomes false above a failed identity claim.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate provenance DAG validation and information propagation.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_provenance.TestValidateProvenance[source]¶
Bases:
objectVerify
validate_provenance().The cases cover the public behavior in the supported certification regime.
- test_empty_graph_is_valid() None[source]¶
Verify an empty declared graph has no structural errors.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test builds and independently validates the minimal graph.
- Return type:
- test_generated_acyclic_graphs_validate() None[source]¶
Validate generated DAGs independently of their supplied record order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_provenance.TestEffectiveInformation[source]¶
Bases:
objectVerify
effective_information().The cases cover the public behavior in the supported certification regime.
- test_dag_is_topological_and_propagates_losses_and_claims() None[source]¶
Propagate inherited loss and claim invalidation to terminal results.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_source_record_and_multiple_outputs_are_supported() None[source]¶
Allow explicit source nodes and one transformation with several outputs.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_provenance.TestBuildProvenance[source]¶
Bases:
objectVerify
build_provenance().The cases cover the public behavior in the supported certification regime.
- See:
- test_cycle_is_rejected_and_remains_inspectable_in_nonstrict_mode() None[source]¶
Detect a multi-step cycle without hanging topological analysis.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_missing_parent_and_multiple_producer_are_rejected() None[source]¶
Require every non-source parent and every output producer to be unique.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_unused_external_input_is_rejected() None[source]¶
Expose declared required inputs that no transformation consumes.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_provenance.TestLineage[source]¶
Bases:
objectVerify
lineage().The cases cover the public behavior in the supported certification regime.
- See:
- test_unknown_node_inspection_is_rejected() None[source]¶
Avoid silently returning empty state for a misspelled artifact ID.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_provenance.TestInvalidatedClaims[source]¶
Bases:
objectVerify
invalidated_claims().The cases cover sorted claim invalidation at a derived result node.
- See:
- test_node_reports_inherited_invalidated_claims() None[source]¶
Return all claim identities invalidated along the node lineage.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
Validate deterministic immutable certification registries.
The tests cover public behavior, differentiability, validation, and stable scientific identity in the supported certification regime.
- class tests.test_diffpes.test_certify.test_registry.TestValidateRegistry[source]¶
Bases:
objectVerify
validate_registry().The cases cover the public behavior in the supported certification regime.
- See:
- test_snapshot_is_structurally_valid() None[source]¶
Verify a snapshot satisfies ordering and checksum invariants.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
Recomputes validation against the current process-local registry.
- Return type:
- test_registry_report_recomputes_structural_consistency() None[source]¶
Report a stable checksum and successful internal validation.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestRegistrySnapshot[source]¶
Bases:
objectVerify
registry_snapshot().The cases cover the public behavior in the supported certification regime.
- See:
- test_models_are_sorted_and_resolved_independent_of_registration_order() None[source]¶
Expose deterministic immutable snapshots after reverse-order inserts.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestRegisterModel[source]¶
Bases:
objectVerify
register_model().The cases cover the public behavior in the supported certification regime.
- See:
- test_duplicate_model_identity_is_rejected_even_for_same_spec() None[source]¶
Prevent import order from replacing an existing scientific identity.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- test_invalid_model_identity_is_rejected(model_id: Any, model_version: Any) None[source]¶
Enforce permanent reverse-DNS IDs and semantic model versions.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestRegisterTransformation[source]¶
Bases:
objectVerify
register_transformation().The cases cover the public behavior in the supported certification regime.
- test_transformation_registry_is_sorted_and_rejects_duplicates() None[source]¶
Apply the same append-only identity rule to semantic contracts.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestGetModel[source]¶
Bases:
objectVerify
get_model().The cases cover the public behavior in the supported certification regime.
- See:
- test_unknown_registry_entries_raise_key_error() None[source]¶
Require an exact scientific identity and version on lookup.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestGetTransformation[source]¶
Bases:
objectVerify
get_transformation().The cases cover exact lookup of a registered semantic contract.
- See:
- test_registered_contract_is_resolved_exactly() None[source]¶
Resolve one transformation by its permanent identity and version.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestListModels[source]¶
Bases:
objectVerify
list_models().The cases cover stable ordering without exposing executor callables.
- See:
- test_model_specs_are_sorted() None[source]¶
Return model specifications in permanent identity order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestListRegisteredModels[source]¶
Bases:
objectVerify
list_registered_models().The cases cover stable ordering of model specifications and executors.
- test_registered_bindings_are_sorted() None[source]¶
Return complete registered bindings in permanent identity order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestListTransformations[source]¶
Bases:
objectVerify
list_transformations().The cases cover stable ordering of transformation contracts.
- test_contracts_are_sorted() None[source]¶
Return transformation contracts in permanent identity order.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestFreezeRegistry[source]¶
Bases:
objectVerify
freeze_registry().The case isolates the process-global freeze operation in a child process.
- See:
- test_freeze_rejects_later_registration() None[source]¶
Reject registry mutation after an application freezes its snapshot.
The case uses explicit inputs in the supported certification regime. It checks the public result or the documented failure state.
Notes
The test compares the result with explicit numerical or structural assertions.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestRegisterHandshake[source]¶
Bases:
objectVerify
register_handshake().The case registers one owner without importing its scientific modules.
- See:
- class tests.test_diffpes.test_certify.test_registry.TestListHandshakes[source]¶
Bases:
objectVerify
list_handshakes().The case checks deterministic owner ordering after registration.
- See:
- class tests.test_diffpes.test_certify.test_registry.TestValidateHandshake[source]¶
Bases:
objectVerify
validate_handshake().The case validates model, convention, and evidence references explicitly.
- See:
- test_reports_missing_then_complete_references() None[source]¶
Report missing evidence and then complete the same handshake.
The same declaration must become complete when evidence becomes available.
Notes
The test registers one model and supplies its external evidence later.
- Return type:
- class tests.test_diffpes.test_certify.test_registry.TestRegistryManifest[source]¶
Bases:
objectVerify
registry_manifest().The case reads the packaged manifest without process-local mutation.
- See:
- class tests.test_diffpes.test_certify.test_registry.TestRenderModelCard[source]¶
Bases:
objectVerify
render_model_card().The case renders Markdown only from the registered model specification.
- See:
- class tests.test_diffpes.test_certify.test_registry.TestPackagedModelCard[source]¶
Bases:
objectVerify
packaged_model_card().The case reads the generated radial model card from package resources.
- class tests.test_diffpes.test_certify.test_registry.TestValidateRegistryManifest[source]¶
Bases:
objectVerify
validate_registry_manifest().The case checks every packaged entry and generated model card for drift.
Validate resolver-backed reproduction of certified forward results.
The tests run a registered closed-form square model. They compare the rerun with a separately resolved result artifact.
- class tests.test_diffpes.test_certify.test_reproduction.TestReproduceForward[source]¶
Bases:
objectVerify
reproduce_forward().The cases compare a registered square model with resolved output arrays.
- See:
- test_exact_rerun_reports_reproduction() None[source]¶
Report success for an exact rerun of the registered square model.
The maximum absolute error must equal zero.
Notes
The test resolves input 2 and expected output 4 as float64 arrays.
- Return type:
Validate artifact resolution and external evidence checks.
The tests compare normalized and byte content with explicit CRC32 identities. They also check missing artifacts and changed content.
- class tests.test_diffpes.test_certify.test_resolvers.TestMappingArtifactResolver[source]¶
Bases:
objectVerify
mapping_artifact_resolver().The cases cover exact lookup of normalized in-memory artifacts.
- class tests.test_diffpes.test_certify.test_resolvers.TestFilesystemArtifactResolver[source]¶
Bases:
objectVerify
filesystem_artifact_resolver().The case covers exact byte resolution from a local locator.
- class tests.test_diffpes.test_certify.test_resolvers.TestResolveArtifact[source]¶
Bases:
objectVerify
resolve_artifact().The case rejects changed normalized content at the I/O boundary.
- See:
- class tests.test_diffpes.test_certify.test_resolvers.TestVerifyEvidence[source]¶
Bases:
objectVerify
verify_evidence().The cases combine artifact resolution with the recorded tolerance.
- See:
Measure independent certification identity and resource behavior.
The tests isolate process identity, streaming memory, and orchestration time. They are calibration fixtures and do not claim the full-cube release limits.
- class tests.test_diffpes.test_certify.test_scalability.TestCertificateProcessFixture[source]¶
Bases:
objectMeasure canonical certificate identity in an independent process.
The case compares the same scientific certificate across process limits.
- class tests.test_diffpes.test_certify.test_scalability.TestChecksumMemoryFixture[source]¶
Bases:
objectMeasure bounded allocation during streamed CRC32 computation.
The case streams 1 GiB through one reusable 1 MiB memory view.
- class tests.test_diffpes.test_certify.test_scalability.TestCertificationOverheadFixture[source]¶
Bases:
objectMeasure model runtime and certification orchestration separately.
The case records warm CPU timings for a closed-form scalar model.
Validate bounded policy waivers at explicit UTC times.
The tests cover active, expired, malformed, and duplicate waiver records. They confirm that a waiver never changes a failed claim to passed.
- class tests.test_diffpes.test_certify.test_waivers.TestValidateWaiver[source]¶
Bases:
objectVerify
validate_waiver().The cases distinguish valid structure from an active UTC interval.
- See:
- class tests.test_diffpes.test_certify.test_waivers.TestValidateWaivers[source]¶
Bases:
objectVerify
validate_waivers().The case rejects duplicate waiver identities before policy evaluation.
- See:
- class tests.test_diffpes.test_certify.test_waivers.TestRequireActiveWaivers[source]¶
Bases:
objectVerify
require_active_waivers().The cases enforce active UTC scope and preserve failed claim outcomes.
- test_expired_waiver_is_rejected() None[source]¶
Raise an error when a waiver has expired before execution.
The eager boundary must not accept inactive review scope.
Notes
The test selects a time one day after the recorded expiry.
- Return type: