Skip to content

Add deterministic fixture manifest#129

Merged
ProfRandom92 merged 2 commits into
mainfrom
codex/implement-deterministic-fixture-manifest
May 19, 2026
Merged

Add deterministic fixture manifest#129
ProfRandom92 merged 2 commits into
mainfrom
codex/implement-deterministic-fixture-manifest

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Motivation

  • Introduce a deterministic, explicit v1 fixture registry so benchmark artifacts and validation tests reference only committed, hand-reviewed fixture bundles and to make fixture discovery scalable and CI-friendly.

Description

  • Summary: added a hand-authored fixtures/manifest.json that registers all current coding-workflow fixture bundles with stable ordering, lexicographically-sorted contracts and expected_failure_labels, and no timestamps or environment-dependent fields.
  • Manifest path: fixtures/manifest.json.
  • Changed files: fixtures/manifest.json, tests/test_fixture_manifest.py, docs/FIXTURE_TEMPLATE_v1.md, docs/benchmarks/layered_admissibility.md.
  • Validation tests: added tests/test_fixture_manifest.py implementing the 8 required checks (manifest serializability and ordering, path existence, admissibility metadata alignment, contract files matching, failures alignment, benchmark artifact references, degradation-level constraints, and discovery of unregistered fixture directories).
  • Determinism guarantees: manifest entries are explicit JSON with fixed ordering by family and degradation level (baseline, mild, moderate, severe), contracts and expected_failure_labels are lexicographically sorted, and there are no generated timestamps or environment-dependent values.

Testing

  • Ran the new targeted tests: pytest tests/test_fixture_manifest.py -q — 8 passed.
  • Sanity and integration runs: pytest tests/test_degradation_curve_generator.py -q — 12 passed; pytest tests/test_svg_curve_renderer.py -q — 7 passed.
  • Full test-suite: pytest -q — 192 passed.
  • CI-style check: npm run check — completed successfully (includes layout/typecheck/validate/build/test steps).

Summary:

  • Added deterministic fixtures/manifest.json, a comprehensive manifest validation test suite, and brief docs updates to require manifest registration.

Changed files:

  • fixtures/manifest.json
  • tests/test_fixture_manifest.py
  • docs/FIXTURE_TEMPLATE_v1.md
  • docs/benchmarks/layered_admissibility.md

Testing:

  • pytest tests/test_fixture_manifest.py -q (passed)
  • pytest tests/test_degradation_curve_generator.py -q (passed)
  • pytest tests/test_svg_curve_renderer.py -q (passed)
  • pytest -q (all tests passed)
  • npm run check (passed)

Risks:

  • The v1 manifest is manually maintained and may require disciplined updates as fixtures evolve.
  • Current manifest covers only the coding_workflow fixture family; additional families must be added explicitly.

Next:

  • Generate benchmark curves and derived artifacts from the manifest.
  • Add additional fixture families and consider tooling to auto-generate manifest entries from fixture metadata.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comptextv7 Ready Ready Preview, Comment May 19, 2026 1:07pm

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a centralized fixtures/manifest.json to manage fixture metadata and updates documentation to require manifest registration for all fixture bundles. A comprehensive test suite is added to validate manifest integrity, including path existence, metadata consistency, and degradation level uniqueness. Review feedback identifies a redundant json.dumps call that should be removed and suggests using Path.as_posix() for more idiomatic path normalization.


def test_manifest_is_json_serializable_and_sorted() -> None:
manifest = _load_manifest()
json.dumps(manifest, sort_keys=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The call to json.dumps(manifest, sort_keys=True) is redundant. Since the manifest object was just loaded from a JSON file using json.load (via _load_manifest), it is already guaranteed to be serializable. Additionally, the result of the call is not assigned or asserted against, making this a no-op. If the intention was to verify the formatting or key ordering of the manifest file on disk, this line does not achieve that.

registered_paths = {entry["path"] for entry in manifest["fixtures"]}

discovered_fixture_paths = {
str(path.parent.parent.relative_to(ROOT)).replace("\\", "/")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using str(...).replace("\\", "/") for path normalization is less idiomatic in modern Python. The Path.as_posix() method is the standard way to obtain a string representation with forward slashes, ensuring consistent behavior across different operating systems.

Suggested change
str(path.parent.parent.relative_to(ROOT)).replace("\\", "/")
path.parent.parent.relative_to(ROOT).as_posix()

Repository owner deleted a comment from netlify Bot May 19, 2026
@ProfRandom92 ProfRandom92 merged commit 10873ce into main May 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant