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
16 changes: 8 additions & 8 deletions .trinity/seals/claw_ClawSocialVisuals.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:5b6eef8669d969c87adf78dbeb3714c79aff86a0b632ec4c2ce651242764a956",
"gen_hash_rust": "sha256:f2641a89d573d6e171b2de6ada48c92d3637d31e2faa4f732cbe782a1223d91e",
"gen_hash_verilog": "sha256:1e9383041fd8e9e0de34703745e40b7f8407e7e7de8994a80033f64c2baa9eb8",
"gen_hash_zig": "sha256:77c5dd0532b72be706c5c86049d9d14c4b0264f01fac84f659b54d50ca5b5782",
"gen_hash_c": "sha256:4c4c87533751d293d276ea0f4ec1445c87e16e7ede64e83686fba9fc87a60666",
"gen_hash_rust": "sha256:825bfd8fcb5c964823812e0429d65ca64b6807633a4e69f7f36f8b0d8a2128fc",
"gen_hash_verilog": "sha256:1bcc1c90656e069959efe422508680045a334a87f481c448f1d328e12123357d",
"gen_hash_zig": "sha256:7606cea17dfbceddbdda93977856c2befeb0e92b55e7d53a823ac722d987c8da",
"module": "ClawSocialVisuals",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T17:41:17Z",
"sealed_at": "2026-10-19T02:11:15Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:0ec92c5f242f768409c76df5cd30143e7e140bf293f87744e98564207734546a",
"spec_hash": "sha256:06aace4ba6d3a6f183c8af13f3ee6ecd4374e8ba6d91d43efa5ac64b2c10a84d",
"spec_path": "specs/claw/social_visuals.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 14,
"total": 14,
"passed": 16,
"total": 16,
"vacuous": 0
},
"toolchain": {
Expand Down
68 changes: 68 additions & 0 deletions specs/claw/social_visuals.t27
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,71 @@ test "no combination of the other inputs lets a failed gate through" {
g = g + 1;
}
}

// ---- tests: written against the mutation sweep of this file ----

// `ch == CH_LINKEDIN` to `!=` in the link row gave a link card to Instagram, TikTok, Shorts and
// YouTube and took it from LinkedIn, and no test read the link row past CH_X and CH_SITE. This
// test pins every one of the forty pairs, so a change to any row is a change a test sees.
test "every channel and kind gets exactly the format of the table" {
assert(pick_format(CH_INSTAGRAM, KIND_MOVING) == FMT_REEL_TALL);
assert(pick_format(CH_INSTAGRAM, KIND_STILL) == FMT_PORTRAIT);
assert(pick_format(CH_INSTAGRAM, KIND_CAROUSEL) == FMT_CAROUSEL);
assert(pick_format(CH_INSTAGRAM, KIND_COVER) == FMT_COVER);
assert(pick_format(CH_INSTAGRAM, KIND_LINK) == FMTS);
assert(pick_format(CH_TIKTOK, KIND_MOVING) == FMT_REEL_TALL);
assert(pick_format(CH_TIKTOK, KIND_STILL) == FMTS);
assert(pick_format(CH_TIKTOK, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_TIKTOK, KIND_COVER) == FMT_COVER);
assert(pick_format(CH_TIKTOK, KIND_LINK) == FMTS);
assert(pick_format(CH_YT_SHORTS, KIND_MOVING) == FMT_REEL_TALL);
assert(pick_format(CH_YT_SHORTS, KIND_STILL) == FMTS);
assert(pick_format(CH_YT_SHORTS, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_YT_SHORTS, KIND_COVER) == FMT_COVER);
assert(pick_format(CH_YT_SHORTS, KIND_LINK) == FMTS);
assert(pick_format(CH_YOUTUBE, KIND_MOVING) == FMT_REEL_WIDE);
assert(pick_format(CH_YOUTUBE, KIND_STILL) == FMTS);
assert(pick_format(CH_YOUTUBE, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_YOUTUBE, KIND_COVER) == FMTS);
assert(pick_format(CH_YOUTUBE, KIND_LINK) == FMTS);
assert(pick_format(CH_X, KIND_MOVING) == FMT_REEL_WIDE);
assert(pick_format(CH_X, KIND_STILL) == FMT_X_CARD);
assert(pick_format(CH_X, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_X, KIND_COVER) == FMTS);
assert(pick_format(CH_X, KIND_LINK) == FMT_X_CARD);
assert(pick_format(CH_LINKEDIN, KIND_MOVING) == FMT_REEL_WIDE);
assert(pick_format(CH_LINKEDIN, KIND_STILL) == FMT_SQUARE);
assert(pick_format(CH_LINKEDIN, KIND_CAROUSEL) == FMT_CAROUSEL);
assert(pick_format(CH_LINKEDIN, KIND_COVER) == FMTS);
assert(pick_format(CH_LINKEDIN, KIND_LINK) == FMT_OG);
assert(pick_format(CH_TELEGRAM, KIND_MOVING) == FMT_REEL_TALL);
assert(pick_format(CH_TELEGRAM, KIND_STILL) == FMT_SQUARE);
assert(pick_format(CH_TELEGRAM, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_TELEGRAM, KIND_COVER) == FMTS);
assert(pick_format(CH_TELEGRAM, KIND_LINK) == FMT_OG);
assert(pick_format(CH_SITE, KIND_MOVING) == FMTS);
assert(pick_format(CH_SITE, KIND_STILL) == FMTS);
assert(pick_format(CH_SITE, KIND_CAROUSEL) == FMTS);
assert(pick_format(CH_SITE, KIND_COVER) == FMTS);
assert(pick_format(CH_SITE, KIND_LINK) == FMT_OG);
}

// Negative control for the table above: it holds twenty supported pairs and twenty gaps, so a
// mutant that opens a gap or closes a pair changes the count even where no single assert looks.
test "negative control the table supports exactly twenty of the forty pairs" {
var known : usize = 0;
var ch : usize = 0;
while (ch < CHANNELS) {
var k : usize = 0;
while (k < KINDS) {
if (pick_format(ch, k) < FMTS) {
known = known + 1;
}
k = k + 1;
}
ch = ch + 1;
}
assert(known == 20);
assert(images_for(CH_LINKEDIN, KIND_LINK, 0) == 1);
assert(images_for(CH_INSTAGRAM, KIND_LINK, 0) == 0);
}
Loading