Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions crates/labcolors-core/contracts/clean-set-srgb8-v1/receipt-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,39 +83,39 @@
"sha256": "0c8a7bb59464e1ddcace07b01ba24a64f8c9d3aeff547651dc38c276a0fc3322"
},
{
"bytes": 69967,
"bytes": 70121,
"license": "MIT",
"path": "crates/labcolors-core/src/program/attachment/tests.rs",
"role": "point_attachment_tests",
"sha256": "f1cbd583163a287ac9ea806d748cc789e4fb6f29880432cc97cf77705ad41075"
"sha256": "2c0876c61196f6492d0f250789ded9644bad1de9ff92c9dea2a14fc55e87f18e"
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
{
"bytes": 164718,
"bytes": 165362,
"license": "MIT",
"path": "crates/labcolors-core/src/program.rs",
"role": "program_facade_source",
"sha256": "0ebca95215dc6c7fe462cd87b933cf7b67a67ae0b69863601ab5579bcda481d6"
"sha256": "7067a2108a7fe224302ca7e2b6effdff97966d63328ce5e0b93ca0bcd3a9fda3"
},
{
"bytes": 71739,
"bytes": 71867,
"license": "MIT",
"path": "crates/labcolors-core/src/program_identity.rs",
"role": "program_identity_source",
"sha256": "300b6a313232a625f98ac14d6ceb66cc866f3605354b5566d02d86ea3ecadcab"
"sha256": "b59f1f5fe0c71637471498635240de6a381c6b8f11308424e81c0f3e0c6b12d0"
},
{
"bytes": 168664,
"bytes": 170258,
"license": "MIT",
"path": "crates/labcolors-core/src/program_session.rs",
"role": "program_source",
"sha256": "c5f30b92165d4836f29fa9195885143aadc9a75ee4ca7540674377b4f5ad9a19"
"sha256": "86a035d09bfee36cac9d5761254b21803a41f6f75b2072c1a5df11967ea006de"
},
{
"bytes": 21705,
"bytes": 21872,
"license": "MIT",
"path": "crates/labcolors-core/src/program_clean_set_tests.rs",
"role": "program_tests",
"sha256": "bbb4265f0d19f01c5aba71d70c57fbe1846b649bcbd6e944a818c46695dc6373"
"sha256": "16fb30ac575eb3ae1caba9b482673c3ad83e87211a7b50401bc2e8f27880e519"
},
{
"bytes": 11370,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
be3f324c6931d7aa967c5941c3b7c841711e36cef75468dea636662a9e7b0a9b receipt-v1.json
3b51f8ecf38181d68b619b30ebb1fdd28a17606f5ac2699bf8070497a0515b80 receipt-v1.json
55 changes: 50 additions & 5 deletions crates/labcolors-core/src/generic_boundary_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,44 @@ fn staged_program_draft_wraps_the_single_canonical_core_graph() {
}
}

#[test]
fn finite_target_intent_has_no_dead_source_axis() {
assert_eq!(
normalized_source_scope(
PROGRAM_SESSION_SOURCE,
"pub enum TargetIntentV1 {",
"/// A Paint-addressable target",
),
"pub enum TargetIntentV1 { FixedSource(SourceId), Finite(FinitePaintDomainV1), }",
"Target intent must remain a closed sum instead of a source × domain product",
);
assert_eq!(
normalized_source_scope(
PROGRAM_SESSION_SOURCE,
"pub struct Target {",
"impl Target {",
),
"pub struct Target { id: TargetId, intent: TargetIntentV1, }",
"a finite Target must have no physically dead Source field",
);
let target_impl = source_scope(
PROGRAM_SESSION_SOURCE,
"impl Target {",
"/// One typed target/candidate assignment",
);
assert!(
target_impl
.contains("pub const fn finite(id: TargetId, domain: FinitePaintDomainV1) -> Self",),
"finite construction must consume an already admitted domain without SourceId",
);
for retired in ["TargetDomainV1", "EmptyTargetDomain", "MissingTargetSource"] {
assert!(
!contains_rust_identifier(PROGRAM_SESSION_SOURCE, retired),
"retired product-state symbol `{retired}` must not return",
);
}
}

#[test]
fn staged_session_is_evidence_only_and_retired_operation_authority_cannot_return() {
assert_eq!(
Expand Down Expand Up @@ -1414,24 +1452,30 @@ fn program_identity_binds_lcs_releases_only_through_lcs_constraint_content() {
"DOMAIN_V3",
"PROGRAM_SCHEMA_V3",
"compile_program_content_identity_v3",
"ProgramContentIdentityV4",
"ContentIdentityV4",
"DOMAIN_V4",
"PROGRAM_SCHEMA_V4",
"compile_program_content_identity_v4",
] {
for (path, source) in identity_sources {
assert!(
!contains_rust_identifier(source, retired),
"the V4 content-address cut must not retain legacy identity symbol `{retired}` in {path}",
"the V5 content-address cut must not retain legacy identity symbol `{retired}` in {path}",
);
}
}
assert!(!PROGRAM_IDENTITY_SOURCE.contains("labcolors.program-content-identity.v1"));
assert!(!PROGRAM_IDENTITY_SOURCE.contains("labcolors.program-content-identity.v2"));
assert!(!PROGRAM_IDENTITY_SOURCE.contains("labcolors.program-content-identity.v3"));
assert!(!PROGRAM_IDENTITY_SOURCE.contains("labcolors.program-content-identity.v4"));
for required in [
"const DOMAIN_V4: &[u8] = b\"labcolors.program-content-identity.v4\\0\";",
"pub(super) const PROGRAM_SCHEMA_V4: u8 = 4;",
"const DOMAIN_V5: &[u8] = b\"labcolors.program-content-identity.v5\\0\";",
"pub(super) const PROGRAM_SCHEMA_V5: u8 = 5;",
] {
assert!(
PROGRAM_IDENTITY_SOURCE.contains(required),
"the V4 content-address type must bind its exact domain and schema tag; missing `{required}`",
"the V5 content-address type must bind its exact domain and schema tag; missing `{required}`",
);
}

Expand Down Expand Up @@ -1558,7 +1602,8 @@ fn cold_program_normalization_reuses_owned_unordered_buffers() {
for required in [
"authored_targets: &mut [Target]",
"authored_selection: Option<&mut DeclaredJointSelectionV1>",
"let TargetDomainV1::Finite(candidates) = &mut target.domain",
"let TargetIntentV1::Finite(domain) = &mut target.intent",
"let candidates = domain.candidates_mut()",
"authored_state .choices .sort_unstable_by_key",
"authored: &mut [OutputBinding]",
] {
Expand Down
Loading
Loading