Skip to content

Protect build artifacts and preserve primary compiler failures #160

Closed

Description

@LunaStev

Reproduced problems

The build pipeline trusts compiler-plan output destinations too broadly and does not validate successful non-run artifacts. Local fake-compiler reproductions against master show:

  • An existing unowned output, or a user-edited previously owned output, is overwritten instead of being refused before compiler execution.
  • A plan output outside target/ is skipped by ownership tracking rather than rejected before compilation.
  • A compiler returning success without producing its declared build output still yields success and an artifact event for a nonexistent file.
  • If compilation fails and ownership-registry persistence also fails, the registry error replaces the primary compiler failure and its structured category/exit code.

Acceptance criteria

  • Preflight all promised outputs before executing compilation; reject outside-target, input/output collisions, duplicate or overlapping destinations, and unsafe links or nonregular paths.
  • Refuse replacing unowned or user-modified outputs, preserving their bytes. Preserve clean/prune's conservative ownership policy and active run-generation leases.
  • Successful builds must verify promised artifacts exist as regular files before reporting them.
  • Preserve compiler/process failure category and exit status when artifact bookkeeping also fails; retain the secondary diagnostic without claiming success.
  • Cover failure and collision cases with portable fake-compiler integration tests, including structured messages, check-only builds and clean behavior.

Implement together with #159 so native inputs and generated outputs follow the same preservation contract.

Activity

  1. self-assigned this
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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