Skip to content

fix(create-spec): check every verification value's severity, and accept PartialFail (MAG-3950) - #201

Open
AnnaR-prog wants to merge 1 commit into
mainfrom
fix/MAG-3950-verification-severity-guard
Open

AnnaR-prog wants to merge 1 commit into
mainfrom
fix/MAG-3950-verification-severity-guard

Conversation

@AnnaR-prog

Copy link
Copy Markdown
Contributor

Part of MAG-3950 (the spec-side guard). The router side is smart-router #580 (severities) and #582 (retries).

Problem

MAG-3950 gave each verification a severity that says what its failure costs: Fail takes the url out, PartialFail switches off only the add-on or extension the check covers, Warning costs nothing. A value that sets none takes the default for where its check sits: Fail for a basic check, PartialFail for an add-on or extension check.

The verifications gate (check_verifications.sh) still knew the older set, and read only values[0]:

  • a spec that sets PartialFail failed the gate;
  • Stop passed, though no router knows it (it reads as Fail today, and as the default with #580);
  • a value after the first was never checked.

Change

The gate checks the severity of every value:

Severity Verdict
Warning, Fail, PartialFail PASS
absent PASS, naming the default: Fail for a basic check (no add_on, no extension), PartialFail for an add-on or extension check
PartialFail on a basic check FAIL: there is no smaller part to switch off, and the router reads it as Fail. MAG-4505 comment 30715 says it is rejected
any other name, Stop included FAIL
explicit Fail on an add-on or extension check PASS plus an INFO row: on a router with #580 it makes the add-on mandatory, so its failure takes the url out

Safe before a router release carries #580. A router without it reads PartialFail as an unknown name, which is Fail. On an add-on check that already refuses only the add-on (MAG-3326), and on a basic check it refuses the url. So a spec that uses PartialFail behaves the same on old routers and new ones.

TESTING.md describes the gate's new rules.

Checked

  • Every spec on main, old gate against new: the 11 of 156 that fail the gate today fail it on identical rows, and no spec newly fails. No spec sets Fail on an add-on or extension check, so the INFO row appears nowhere.
  • Self-test: test_check_verifications.sh gets two fixtures, one passing and one failing, and asserts each row: the defaults, an explicit PartialFail, the INFO row, a basic PartialFail, Stop, and a bad value at values[1].
  • Mutation checks: each of these five breaks makes the self-test fail:
    • a basic PartialFail passing;
    • Stop accepted;
    • checking only values[0];
    • every default reported as Fail;
    • the INFO row dropped.

🤖 Generated with Claude Code

…pt PartialFail (MAG-3950)

MAG-3950 gave verifications three severities: Fail takes the url out,
PartialFail switches off only the add-on or extension the check covers,
Warning nothing (smart-router #580). The verifications gate still knew the
older set, and read only values[0]:
- a spec that sets PartialFail failed the gate;
- Stop passed, though no router knows it (it reads as Fail on main, as the
  default with #580);
- a value after the first was never checked.

check_verifications.sh now checks the severity of every value:
- Warning, Fail and PartialFail pass, and an absent one reports the default
  for where its check sits: Fail for a basic check (no add_on, no
  extension), PartialFail for an add-on or extension check;
- PartialFail on a basic check fails: there is no smaller part to switch
  off, and the router reads it as Fail (MAG-4505 comment 30715 says it is
  rejected);
- any other name fails, Stop included;
- an explicit Fail on an add-on or extension check is an INFO row: on a
  router with #580 it makes the add-on mandatory.

No spec on main changes verdict: the 11 of 156 that fail the gate fail it
on the same rows, and none sets Fail on an add-on check. TESTING.md
describes the gate's new rules; the self-test covers them with two new
fixtures.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant