Skip to content

Require migration artifact paths to be files - #3001

Open
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/sandboxed-migration-require-files
Open

Require migration artifact paths to be files#3001
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/sandboxed-migration-require-files

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

  • Require generated migration artifact paths to be regular files before reading them.
  • Preserve the existing empty-file check and all content validation.

Motivation

require_output() currently checks only Path.exists(). A directory named like an expected artifact, such as migration.patch or migration_result.json, therefore passes the initial validation and fails later with an unrelated filesystem error when the evaluator tries to read it.

The artifact validator should reject that condition at its own boundary with the same missing-artifact path used for non-files.

Validation

This is a one-line check change:

  • missing path -> rejected as before
  • directory at an artifact path -> now rejected immediately
  • regular non-empty file -> existing behavior unchanged
  • empty regular file -> existing empty-file ValueError unchanged

Self-review

  • One-line correctness fix in one file.
  • No artifact schema, API, dependency, notebook, registry, or documentation changes.
  • Searched open PRs for an existing file-vs-directory artifact validation fix and found none.

Maintainers may modify the branch if needed.

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team as a code owner August 21, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant