Skip to content

Final mask check before publish leaves a narrow window before the manifest replace #222

Closed

Description

@guijacquemet

This FILE item comes from the external review of #202 (ChatGPT batch 28, claim E5). It is not a blocker.

#202 re-checks every mask fingerprint, and SHA-256 in strict runs, in before_commit. That runs immediately before os.replace of run_manifest.json (run/generation.py:_commit). The output lock does not lock the source masks, so a mask can still change after the check returns and before or during the replace. The window is small, but a published manifest can bind bytes that are no longer on disk.

Decide which contract applies:

  • If the contract is "check as late as practicable and detect ordinary concurrent edits", Re-check every mask fingerprint right before the manifest replacement #202 meets it. Document that wording in the contract and close this issue.
  • If the contract is "the visible manifest always binds exactly the bytes present at commit", only snapshotting or locking the source masks can meet it, for example by binding the manifest to an immutable copy. Another check would not help.

Activity

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