Skip to content

Add manifest-driven fixture selection for degradation curves#135

Merged
ProfRandom92 merged 1 commit into
mainfrom
codex/add-multi-family-degradation-curve-generation
May 19, 2026
Merged

Add manifest-driven fixture selection for degradation curves#135
ProfRandom92 merged 1 commit into
mainfrom
codex/add-multi-family-degradation-curve-generation

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Motivation

  • Allow DegradationCurveGenerator to select fixtures by manifest-registered family so multiple fixture families with the standard degradation levels can be used without changing scoring or visualization.
  • Preserve existing layered admissibility behavior while providing a reusable, deterministic selector for other families.

Description

  • Add fixtures_for_manifest_family(self, family, levels=LAYERED_CURVE_LEVELS, manifest_path=MANIFEST_PATH) to src/validation/degradation_curve_generator.py that loads the manifest, filters by family, selects only requested degradation_levels in explicit order, and returns Path tuples.
  • The selector raises ValueError for missing requested levels, duplicate family+level entries, or missing path values to fail fast on manifest issues.
  • Keep fixtures_for_layered_admissibility_curve(...) as a backward-compatible wrapper that calls the new generic selector with LAYERED_CURVE_FAMILY and LAYERED_CURVE_LEVELS.
  • Add focused tests in tests/test_degradation_curve_generator.py to verify selection for both coding_workflow_pr_review and incident_response_page_triage, wrapper compatibility, and error cases for missing family/level and duplicate entries.

Testing

  • Ran pytest tests/test_degradation_curve_generator.py -q and observed 18 passed for the updated file-level tests.
  • Ran pytest tests/test_manifest_fixture_families.py -q and pytest tests/test_fixture_manifest.py -q and observed 3 passed and 8 passed, respectively.
  • Ran npm run check (which runs layout, typecheck, validate, build, and the full pytest suite) and observed the full test run succeed with 207 passed and npm run check completed successfully.

Codex Task

@ProfRandom92 ProfRandom92 merged commit 6d5750b into main May 19, 2026
4 checks passed
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 more flexible fixtures_for_manifest_family method in DegradationCurveGenerator to support multiple fixture families beyond the default layered admissibility curve, along with comprehensive unit tests for these new capabilities. The reviewer correctly identified a performance concern regarding redundant disk I/O and JSON parsing, suggesting that caching the manifest content would better align with the project's high-efficiency and industrial-grade performance requirements.

) -> tuple[Path, ...]:
level_to_path: dict[str, Path] = {}

for entry in self._load_fixture_manifest(manifest_path):
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 manifest is re-loaded and parsed from disk on every call to fixtures_for_manifest_family. In a high-efficiency context (as emphasized in the Repository Style Guide), especially when generating multiple curves or running a large test suite, this redundant I/O and JSON parsing can become a performance bottleneck. Consider caching the manifest content to improve efficiency.

References
  1. The project mission emphasizes high-efficiency technical-log compression and industrial-grade performance. (link)

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