Skip to content

Harden invariant-suite handoff: retain ancestors and restrict source provenance #211

Closed

Description

@aviggiano

Summary

The invariant-suite handoff has two confirmed contract gaps:

  1. A downstream invariant stage materializes ancestor invariant-suite files into its worktree, but its own artifact publication only captures the current stage's changed/test/provenance paths. The downstream artifact can therefore omit inherited CryticTester, Setup, TargetFunctions, or Properties sources needed by later stages.
  2. implementation_paths are accepted from arbitrary repository-relative locations. A malformed or malicious implementation record can copy internal files such as artifacts/, .envrc, or workspace state into the published invariant suite.

Expected behavior

Each invariant-stage artifact should contain the complete, conflict-checked union of all ancestor suite files plus the current stage's authoritative sources. Provenance paths should be restricted to supported source roots (src/, contracts/, and test/) and reject internal state or secret paths.

Acceptance criteria

  • Regression tests prove inherited suite files survive setup -> handlers -> coverage -> implementation handoffs.
  • Conflicting ancestor files fail closed with an artifact-contract error.
  • Regression tests reject internal/secret paths and accept supported source roots.
  • Existing source integrity, hard-link, symlink, and size protections remain enforced.
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions