Skip to content

fix(validate): say which engine produced the coverage, and whose skips they are - #660

Merged
beyondnetPeru merged 2 commits into
mainfrom
fix/gt-628-engine-disclosure
Aug 23, 2026
Merged

fix(validate): say which engine produced the coverage, and whose skips they are#660
beyondnetPeru merged 2 commits into
mainfrom
fix/gt-628-engine-disclosure

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

evolith validate with no flag runs the native evaluator. On a freshly initialised satellite it decides 41 of 159 rules where --engine opa decides 133, and nothing in the output said so.

Every skip was published and both totals were honest — the project's thesis held — and the reader still concluded their repository was the problem, because the denominator that moved was the engine's, not theirs.

What this adds

ValidationResult.engine Which evaluator ran. Optional for the same additive reason as the GT-569 counters; RulesetValidatorService.validate always sets it
Human report The engine rides on the counts line: Rules: 41 checked / 118 skipped / 0 errored / 159 total — engine: native
Markdown report **Engine:** native — this is the surface people paste into a PR, so it is where an unattributed coverage figure does the most damage
JSON envelope + table payload Carry the field, so a captured coverage figure can be compared to another capture
GOV-ENGINE-COVERAGE advisory + CLI hint Non-blocking, and both say the attribution out loud: the skips belong to the evaluator, not to the repository

Where it stays quiet

The advisory and the hint fire only on the native engine and only when skips outnumber checks — the shape a reader misreads. A native run that decided most of its scope needs no explanation, an --engine opa run has nowhere to be redirected to, and a row on every run is noise that teaches people to skim past it. Both directions are pinned by tests, including the tie (80/80 stays quiet, 79/81 fires).

What this deliberately does not do

It does not make the engines agree, and it does not switch the default. .harness/scripts/ci/68-validate-engine-verdict-parity.mjs holds the two engines to agreement on the verdicts they both reach and explicitly not to equal reach. That position is unchanged; this reports which reach you got.

Verified

In a clean worktree off main, with a real core-domain build: 81 CLI validate tests pass and 5 new core-domain tests pass. The full core-domain suite is 1989 passed / 11 failed, and all 11 are the three OPA suites failing on policy.wasm not being compiled in a fresh checkout — CI compiles it.

Closes #628

🤖 Generated with Claude Code

…s they are

`evolith validate` with no flag runs the native evaluator. On a freshly
initialised satellite it decides 41 of 159 rules where `--engine opa`
decides 133, and nothing in the output said so. Every skip was published
and the totals were honest — the reader still concluded their repository
was the problem, because the denominator that moved was the engine's.

Three additions, smallest first:

  - `ValidationResult.engine` carries which evaluator ran. Optional for the
    same additive reason as the GT-569 counters; the service always sets it.
  - The human report prints it ON the counts line ("… / 159 total — engine:
    native"), the markdown report as a `**Engine:**` field, and the JSON
    envelope and table payload carry the field. A captured coverage figure
    with no engine beside it cannot be compared to another capture.
  - A non-blocking `GOV-ENGINE-COVERAGE` advisory, plus a CLI hint, that fire
    ONLY on the native engine and ONLY when skips outnumber checks — the
    shape a reader misreads. Both say the attribution out loud: the skips
    belong to the evaluator, not to the repository.

Deliberately not making the engines agree, and deliberately not switching
the default. 68-validate-engine-verdict-parity.mjs holds the two engines to
agreement on the verdicts they both reach and explicitly not to equal reach;
this reports which reach you got.

Closes #628

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: aarroyo <beyondnet.peru@gmail.com>
@beyondnetPeru
beyondnetPeru requested a review from a team as a code owner August 23, 2026 02:15
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

📊 Bilingual Coverage Impact

PR Changes

  • Paired EN/ES files modified: 0
  • New EN files needing ES translation: 2

Repository Coverage

Metric Value
Total EN files 527
Total ES files 497
Paired files 0
Coverage 0%

⚠️ Action required: 2 new EN file(s) added without ES counterparts.

To create skeletons:

node .harness/scripts/generate-es-skeleton.mjs <file.md>

Generated by GitHub Actions

…travel

Three checks caught what the first commit missed, each in a different sense:

  - `Test contract (SDK wire fidelity)` — the field must be DECLARED in
    WIRE_VALIDATION_RESULT, not merely emitted. That guard exists because a
    producer can add a field the SDK type does not describe and no consumer
    finds out until it deserializes. Declared optional, like the GT-569
    coverage fields: an envelope from a producer that predates it is valid.
  - `Validate documentation` — the interface how-to pages are DERIVED from a
    live capture, so a new field in the response shape drifts them. Regenerated
    with gen-howto: `"engine": "<string>"` in construction and qa.
  - `build-and-test` — max-lines. The #628 cases pushed
    validate.coverage-report.spec.ts to 334 lines, so they move to their own
    validate.engine-disclosure.spec.ts. Better home anyway: GT-569's file pins
    that a denominator is reported, this one pins that it is attributed.

Verified in a clean worktree with the full workspace built: contract 47/47,
CLI validate 81/81, exploration 9/9, CLI lint 0 errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@beyondnetPeru
beyondnetPeru merged commit e1554f9 into main Aug 23, 2026
52 checks passed
@beyondnetPeru
beyondnetPeru deleted the fix/gt-628-engine-disclosure branch August 23, 2026 02:42
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.

The default engine checks 41 of 159 rules and the output never says which engine you got

1 participant