Skip to content

Guarantee safety: property test against an oracle, and a fuzz target, across package graphs #223

Open

Description

@Kinflou

Part of #219, for #222. Proposal: ComlineProject/docs#162 (Granular @unverified → Testing the invariant).

The invariant to prove: if a package compiles, every guarantee given up anywhere a protocol reaches, through any chain of types and packages, has been acknowledged in that package and accepted by every consumer of that protocol, pinned to the exact causes.

Today core/tests/package/unverified.rs has unit tests, and core/fuzz covers parsing and compiling robustness. Nothing tests the invariant across package graphs.

  • Property test with an independent oracle. Generate random package graphs:

    • types with and without bounds, and chains across packages;
    • markers (plain and keyed) at random scopes, and acceptances;
    • upstream changes between builds (an added cause, a swapped type).

    Check that the build succeeds exactly when the oracle says every hop acknowledged and every consumer accepted. The oracle is a deliberately naive reachability walk that shares no code with the compiler (the same differential idea as runtime's ffi_vs_core).

  • A fuzz target in core/fuzz for the same check over arbitrary graphs, run in the nightly fuzz CI.

  • Shrunk failures are kept as regression cases.

It can start on today's marker (protocol scope, plain form). The chain and pinning cases are added as #222 lands.

Activity

  1. added
    P1Next
    testingTests, fuzzing, conformance
    securitySecurity and safety
    on Nov 9, 2026
  2. Kinflou commented on Nov 15, 2026

    @Kinflou
    MemberAuthor

    Audit 2026-11-16: ticked the property test with an independent oracle and the fuzz target; both merged in core#244 (core/oracle, tests/package/unverified_oracle.rs, fuzz target unverified_oracle in the nightly matrix), for today's rules (handshake and bounded_size, plain and keyed markers, package reason, acceptance). Still open: the chain and pin cases, which come as #222 lands, and the box about keeping shrunk failures as regression cases (not checked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1NextsecuritySecurity and safetytestingTests, fuzzing, conformance

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions