Skip to content

fix: timestamp model metadata when created - #2

Open
cr-shah wants to merge 1 commit into
mainfrom
codex/fix-artifact-created-at
Open

cr-shah wants to merge 1 commit into
mainfrom
codex/fix-artifact-created-at

Conversation

@cr-shah

@cr-shah cr-shah commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Finding

ModelMetadata.created_at was evaluated when artifacts.py was imported. A later training run could therefore save a stale timestamp, weakening artifact auditability.

Fix

Use a dataclass default factory so each metadata instance records its own creation time. Add a regression test with two controlled creation times.

Verification

  • Ruff on tracked Python files: passed
  • Focused artifact test: 1 passed
  • Full pytest suite: 58 passed
  • uv lock --check --offline: passed

The existing validation PR #1 remains separate and untouched.

@cr-shah cr-shah added the bug Something isn't working label Sep 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant