Skip to content

feat: add offline maintainer corpus validation - #11

Merged
VrtxOmega merged 1 commit into
mainfrom
feat/validate-corpus
Jul 13, 2026
Merged

feat: add offline maintainer corpus validation#11
VrtxOmega merged 1 commit into
mainfrom
feat/validate-corpus

Conversation

@VrtxOmega

Copy link
Copy Markdown
Owner

Summary

  • add an offline pcf validate-corpus command for consented JSONL or CSV adjudications
  • fail closed on schema, consent, privacy, timing, and duplicate-rater violations
  • emit deterministic aggregate metrics and privacy-reduced receipts without changing evaluator behavior

Why this is narrow

The change is one validation core, one focused test file, and the minimum CLI, package, and operator-documentation wiring. It adds no dependency, network call, GitHub write capability, evaluator threshold change, or benchmark expectation change.

Validation

  • node --test test/corpus-validation.test.mjs — 6/6 passed
  • npm run ci:gates — 263/263 tests, 77/77 benchmark cases, 29/29 adversarial cases, maintainer demo PASS
  • npm run mcp:smoke — PASS; no public-write tools
  • git verify-commit 502672cb2ca0ddeeb67088dcd2102a617370d186 — good signature
  • git diff --check — PASS

Boundaries

No real participant corpus is included, and product validity remains INCONCLUSIVE until a genuinely consented independent-maintainer corpus exists. The prospective-study runner is deliberately reserved for a separate follow-up PR so this review remains five files and one commit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 502672cb2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
return lane;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject blank PCF scores instead of treating them as zero

When a JSON case uses pcf.score: null or a CSV row leaves pcfScore blank, this coercion turns the missing value into 0, so the corpus is accepted and the case is included in the 0-19 calibration bin instead of failing closed. Since pcf.score is required by the new contract, missing or blank scores should be rejected before calling Number.

Useful? React with 👍 / 👎.

Comment on lines +361 to +365
const pcfPresent = timing.pcfSeconds !== "" && timing.pcfSeconds !== undefined && timing.pcfSeconds !== null;
if (!baselinePresent && !pcfPresent) return null;
const baselineSeconds = Number(timing.baselineSeconds);
const pcfSeconds = Number(timing.pcfSeconds);
if (!(baselineSeconds > 0) || !(pcfSeconds >= 0)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require both timing values before scoring savings

When a CSV row has baselineSeconds set but leaves pcfSeconds blank, or JSON uses pcfSeconds: null, the both-absent check is skipped and Number("")/Number(null) becomes 0, so the receipt reports a full time saving for a case with incomplete timing instead of rejecting it. This corrupts timing aggregates whenever only one side of the timing pair is present.

Useful? React with 👍 / 👎.

@VrtxOmega
VrtxOmega merged commit 15e8ddb into main Jul 13, 2026
1 check passed
@VrtxOmega
VrtxOmega deleted the feat/validate-corpus branch July 14, 2026 00:11
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