Skip to content

test(#397): enumerate the exact-sizing seam - #404

Open
avrabe wants to merge 1 commit into
mainfrom
test/397-sizing-seam
Open

test(#397): enumerate the exact-sizing seam#404
avrabe wants to merge 1 commit into
mainfrom
test/397-sizing-seam

Conversation

@avrabe

@avrabe avrabe commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Second seam, after call_lowering in #403.

Why this one

can_size_exactly decides whether a type's size may reach a memory.copy length — the gate #393 turned on. Its structure is quietly fragile:

_ => true

A container variant that forgets to recurse falls into that arm and reports its contents as exactly sizeable. The resolver records a size built from the 4-byte fallback, and the copy runs short. That is #393 exactly, one level down, with nothing failing.

It is also the shape auto-Mythos flagged in my own #393 fix — a type escaping the check that was supposed to catch it.

Four tests plus a tripwire

  • an unresolvable type must poison every container that can hold one, checked per variant so a failure names which;
  • the mirror — a resolvable type must stay sizeable in every container. Without this, a can_size_exactly that simply returned false would satisfy the first test while disabling sizing entirely;
  • nesting must not launder it (three deep, not one);
  • leaves stay sizeable by construction.

The tripwire: variant_name matches every ComponentValType variant with no wildcard, so adding a variant breaks this test and forces a decision about whether the sizing seam must recurse into it. Given _ => true, silence is otherwise the default.

Control

Checked for reachability before running it this time. Removing the Option arm so it falls through to _ => true:

an_unresolvable_type_poisons_every_container          FAILED
  #397/#393: Option does not propagate un-sizeability
nesting_does_not_launder_an_unresolvable_type         FAILED
a_resolvable_type_stays_sizeable_in_every_container   ok      <- not a blanket-false
leaves_are_sizeable_by_construction                   ok

Naming the variant matters: the failure tells you which arm to fix, not just that something is wrong.

fmt clean, clippy -D warnings clean, 887 tests, exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WrmMqf1iuTS1UBEes5TmdC

Second seam, after call_lowering. `can_size_exactly` is the guard that
decides whether a type's size may reach a `memory.copy` length — the gate
#393 turned on. Its structure makes it quietly fragile:

    _ => true

A container variant that forgets to recurse falls into that arm and
reports its contents as exactly sizeable. The resolver then records a
size built from the 4-byte fallback, and the copy runs short. That is
#393 exactly, one level down, with nothing failing.

Four tests:

- an unresolvable type must poison EVERY container that can hold one,
  checked per variant so a failure names which one;
- the mirror — a resolvable type must stay sizeable in every container,
  without which a `can_size_exactly` that simply returned false would
  satisfy the first test while disabling sizing entirely;
- nesting must not launder it (three levels deep, not one);
- leaves stay sizeable by construction.

Plus a compile-time tripwire: `variant_name` matches every
`ComponentValType` variant with NO wildcard, so adding one breaks this
test and forces a decision about whether the sizing seam must recurse
into it. The `_ => true` arm means silence is the default otherwise.

Control, checked for reachability BEFORE running it this time: removing
the `Option` arm so it falls through to `_ => true` fails two of the four
tests and names the variant —

  #397/#393: Option does not propagate un-sizeability

while the mirror test stays green, showing it is not a blanket-false.

887 tests (--workspace), exit 0.

Refs: #397, #393

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WrmMqf1iuTS1UBEes5TmdC
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Mythos delta-pass required

This PR modifies one or more Tier-5 source files (per
scripts/mythos/rank.md):

meld-core/src/parser.rs

Before merge, run the Mythos discover protocol on the
modified Tier-5 files:

  1. Follow scripts/mythos/discover.md
    — one fresh agent session per touched Tier-5 file.
  2. For each finding, the agent must produce both a Kani
    harness and a failing PoC test (per the protocol's
    "if you cannot produce both, do not report" rule).
  3. Attach a comment on this PR with either the findings
    (formatted per discover.md's output schema) or
    NO FINDINGS.
  4. Add the mythos-pass-done label to this PR.

Why this gate exists: LS-A-10
(CABI alignment padding in async-lift retptr writeback) was
found by the v0.8.0 pre-release Mythos pass — but it had
lived in the callback emitter since #128, across six
releases. A PR-time gate would have caught it at review
time instead of at the release boundary.

The gate check on this PR will pass once the label is
applied.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

LS-N verification gate

59/59 approved LS entries verified

count
Passed (≥1 test, all green) 59
Failed (≥1 test failure) 0
Missing (no ls_*_NN_* test found) 0

Approved loss-scenarios.yaml entries are expected to have a
regression test named ls_<letter>_<num>_* (e.g. LS-A-11
ls_a_11_*). The gate runs each prefix via cargo test --lib --no-fail-fast and aggregates pass/fail/missing.

Failed LS entries

(none)

Missing regression tests

(none)

Updated automatically by tools/post_verification_comment.py.
Source of truth: safety/stpa/loss-scenarios.yaml.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Mythos delta-pass (auto)

NO FINDINGS across 1 Tier-5 file(s)

File Verdict Hypothesis
`` ✅ NO FINDINGS

Auto-run via anthropics/claude-code-action@v1
(SHA-pinned) on the touched Tier-5 files, using the
maintainer's Max-plan OAuth token. See
.github/workflows/mythos-auto.yml and
scripts/mythos/discover.md.

@github-actions github-actions Bot added the mythos-pass-done Mythos delta-pass completed on Tier-5 file changes; findings (or NO FINDINGS) attached to PR label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mythos-pass-done Mythos delta-pass completed on Tier-5 file changes; findings (or NO FINDINGS) attached to PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant