Skip to content

fix(validation): migrate P-006/P-007/P-008 severity ramp to target_api_status#381

Merged
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:fix/p006-p008-target-api-status
Jul 21, 2026
Merged

fix(validation): migrate P-006/P-007/P-008 severity ramp to target_api_status#381
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:fix/p006-p008-target-api-status

Conversation

@hdamker

@hdamker hdamker commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

correction

What this PR does / why we need it:

Problem: P-006, P-007, and P-008 keyed their severity ramp on target_release_type — the field that governs release-plan rules — instead of target_api_status (draftalpharcpublic), which is the canonical field for the per-status content ramp. They also expressed severity backwards compared to every other status-ramped rule in this file: starting at hint and escalating upward, instead of anchoring on the final (public/stable) severity and only demoting for earlier statuses.

Fix: Migrates the three rules onto target_api_status:

  • P-006 (check-test-files-exist)
  • P-007 (check-test-file-version)
  • P-008 (check-test-directory-exists)

Each rule's conditional_level is rewritten using the anchor convention already used elsewhere in this file (e.g. P-026/P-027): default is the rule's public/stable severity, and overrides only ever lower it for an earlier status or an initial (0.x) API — never raise it.

No behavior change. For every existing API, the severity a rule reports today is exactly the severity it reported before this PR. A new test (TestTestFileRulesStatusRamp) pins the full severity matrix per rule against the real rules file to confirm this.

Which issue(s) this PR fixes:

No tooling issue — internal severity-model correction identified during the r3.4→r4.3 severity review.

Special notes for reviewers:

Added TestTestFileRulesStatusRamp to test_postfilter_levels.py, pinning the full severity matrix per rule against the real python-rules.yaml, mirroring the existing TestCompletenessRuleMaturityGrading (S-016/S-307) pattern.

Test evidence:

  • python3 -m pytest validation/tests -q — 1180 passed; 3 pre-existing, unrelated test_yaml_parser_conformance.py failures (reproduce identically on an unmodified checkout).

Changelog input

release-note
Migrated P-006/P-007/P-008 severity ramp from target_release_type to target_api_status; no behavior change.

Additional documentation

This section can be blank.

…i_status

target_release_type governs release-plan rules, not the content severity ramp;
target_api_status is the canonical field. Re-expressed on the anchor/demote
convention, preserving each rule's existing behavior.
@hdamker
hdamker requested review from Kevsy and rartych as code owners July 17, 2026 05:37

@rartych rartych left a comment

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.

LGTM

@hdamker
hdamker merged commit ad881a6 into camaraproject:main Jul 21, 2026
8 checks passed
@hdamker
hdamker deleted the fix/p006-p008-target-api-status branch July 21, 2026 08:21
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.

2 participants