Skip to content

Cached PaperBench reproduction metadata cannot load older optional schemas #142

Description

@sylvesterkaczmarek

Summary

ReproductionMetadata defines several fields with backwards-compatible defaults:

  • retried_results defaults to an empty list;
  • repro_execution_time is optional;
  • git_status_after_reproduce is optional;
  • executed_submission is optional.

ReproductionMetadata.from_dict() nevertheless indexes all four keys directly. Metadata produced before one of these fields existed therefore raises ValueError("Missing required field in reproduction metadata") instead of using the dataclass defaults.

This path is exercised when PaperBench reuses an existing reproduced submission: _run_reproduce() reads the cached *_executed_metadata.json and calls ReproductionMetadata.from_dict().

Impact

Previously generated/cached reproduction outputs can become unusable after metadata schema additions, forcing unnecessary reproduction or causing grading to fail when overwrite_existing_output=False.

Proposed resolution

Keep the core reproduction fields required, but load defaulted/optional fields with dict.get() and default retried_results to [].

Add regressions for a legacy dictionary containing only the core required fields and for preservation of newer optional fields when present.

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