Skip to content

ci: define high-risk pre-merge review - #455

Merged
leehack merged 7 commits into
mainfrom
ci/high-risk-regression-checklist
Aug 24, 2026
Merged

ci: define high-risk pre-merge review#455
leehack merged 7 commits into
mainfrom
ci/high-risk-regression-checklist

Conversation

@leehack

@leehack leehack commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify regression-sensitive production, generated-input, evidence, and governance paths with a small read-only tool
  • add exact-head independent QA and structured-output adversarial rows to the contributor test matrix
  • record the zero-known-regression and affected-family evidence contract in AGENTS.md and the PR template

Part of #419.

This is the clean policy/bootstrap replacement for the mixed implementation in #420. Keep #419 open: protected GitHub App status publication and repository settings remain a separate security-sensitive phase.

Scope

  • 9 files, 629 insertions, 3 deletions
  • no runtime, parser, grammar, generated binding, asset, pin, release, or workflow change
  • no privileged publisher, credential, protected environment, or repository-settings assumption
  • CODEOWNERS protects the durable policy, classifier, LiteRT template generator inputs, compiled-grammar tests, and upstream parity entrypoints

Removed duplication

  • omits the compiled grammar and parity implementation already merged through test: execute the compiled tool-grammar path and bound chat-test builds #445 while classifying those production-evidence paths as protected high-risk inputs
  • omits the 1,169-line trusted publisher workflow and its settings-dependent App authority
  • omits PR-local evidence manifests and thousands of lines of publisher/contract machinery

Validation

  • workspace preparation: PASS with no tracked churn
  • repository-wide Dart format: PASS, 576 files checked
  • repository-wide Dart analyze: PASS
  • focused classifier, policy, and matrix tests: 23/23 PASS
  • full serial VM on exact head: 1,677 PASS / 77 expected platform or fixture skips, including real tiny-model native inference
  • Docusaurus production build and link validation: PASS
  • classifier CLI malformed UTF-8, whitespace-only, rename visibility, LiteRT generator/template input, and specialized compiled-grammar evidence regressions: PASS
  • prior Windows-native run exposed recursive child-Dart test timeouts; the tests now exercise the production CLI input function in-process, and replacement exact-head Windows CI passes
  • git diff check: PASS
  • exact-head hosted CI: 11/11 PASS, including Linux coverage/aggregate, Chrome, Web Chat real worker/GGUF, macOS, and replacement Windows
  • exact-head Copilot review: approval recommended, 0 new comments
  • independent Sol audit: PASS on the exact head, with all prior classifier, rename, evidence-path, UTF-8, whitespace, and Windows-portability blockers replayed closed

Compatibility

Policy and contributor-tooling only. Runtime behavior and existing required checks are unchanged.

High-risk regression review

  • Classification: high-risk
  • Implementation task: codex://tasks/root/pr420_cleanup
  • Independent blocking QA task: codex://tasks/root/refresh_pr431 — PASS on the exact head below; all prior bypass/error-contract gaps replayed closed
  • Exact head / current base: 2eed3dd / d938850
  • Production-branch deletion, bypass, or miswire proof: classifier and CODEOWNERS contracts cover the landed compiled-grammar/parity evidence and LiteRT template generator inputs; the documented diff command uses --no-renames so both sides of replacements remain visible
  • Affected-family real-model/artifact evidence: N/A, policy/tooling-only; no runtime or family claim
  • Explicit unavailable-family or other N/A evidence: real-model and device rows are N/A because runtime behavior is unchanged; the full VM suite still completed a representative real tiny-model native inference smoke
  • Known PR-caused P1 regressions: 0 known after exact-head CI, current-head review, and independent QA
  • Unresolved review threads: 0 (3/3 resolved with fix evidence)

Copilot AI lite review requested due to automatic review settings August 24, 2026 12:42

Copilot AI 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.

🟢 Approval recommended

The changes are internally consistent across tooling/tests/docs/templates and introduce no runtime or workflow behavior changes.

Pull request overview

Adds a durable “high-risk pre-merge review” contract to contributor tooling and documentation, introducing a lightweight classifier plus explicit high-risk rows in the test matrix so regression-sensitive PRs have a consistent pre-mark-ready evidence checklist.

Changes:

  • Added a read-only path classifier (classify_high_risk_changes.dart) that identifies high-risk surfaces from changed file paths.
  • Extended the contributor test matrix with a new high-risk tier and two new review/evidence rows, with matching unit tests.
  • Updated contributor docs, PR template, AGENTS policy, and CODEOWNERS to document and protect the new governance/policy entrypoints.
File summaries
File Description
tool/testing/test_matrix.dart Introduces high-risk tier plus two high-risk matrix rows; updates tier filtering/help text accordingly.
tool/testing/classify_high_risk_changes.dart New read-only classifier for changed paths that reports whether a PR should follow high-risk pre-merge review.
test/unit/tooling/test_matrix_test.dart Adds coverage asserting the high-risk matrix tier renders expected rows/content.
test/unit/tooling/classify_high_risk_changes_test.dart Adds unit tests validating classifier surface detection and deterministic formatting.
doc/testing_matrix.md Documents the new high-risk tier and the required pre-mark-ready independent QA expectations.
AGENTS.md Records the durable high-risk review policy and evidence expectations for structured-output and other sensitive surfaces.
.github/pull_request_template.md Adds a structured “High-risk regression review” block for consistent PR evidence capture.
.github/CODEOWNERS Protects AGENTS/test-matrix/classifier policy entrypoints via CODEOWNERS.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings August 24, 2026 12:45

Copilot AI 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.

🔵 Needs a closer look

The new classifier script can mis-handle input decoding and whitespace-only stdin, leading to incorrect or misleading classification output.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

tool/testing/classify_high_risk_changes.dart:170

  • Reading stdin with SystemEncoding can mis-decode git diff --name-only output on systems where the console code page isn’t UTF-8, which can lead to incorrect path classification for non-ASCII filenames. Using utf8.decoder is deterministic and matches Git’s typical UTF-8 output.
Future<List<String>> _readPaths() async {
  return stdin
      .transform(const SystemEncoding().decoder)
      .transform(const LineSplitter())
      .toList();

tool/testing/classify_high_risk_changes.dart:189

  • If stdin contains only blank/whitespace lines, paths.isEmpty is false but assessHighRiskFiles() will classify an empty changedFiles set as standard risk, which is misleading (no usable input was provided). Consider failing with usage when no non-empty paths remain after normalization.
  final paths = await _readPaths();
  if (paths.isEmpty) {
    stderr.write('No changed paths were provided.\n${_usage()}');
    exitCode = 64;
    return;
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 24, 2026 12:50

Copilot AI 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.

🟡 Changes recommended

The new policy contract tests/docs have small but meaningful gaps (missing enforced PR-template field and missing CODEOWNERS assertions, plus a potentially misleading origin/main example) that should be tightened to make the intended governance durable.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread test/unit/tooling/high_risk_review_policy_test.dart
Comment thread doc/testing_matrix.md Outdated
Comment thread test/unit/tooling/high_risk_review_policy_test.dart
Copilot AI review requested due to automatic review settings August 24, 2026 12:54

Copilot AI 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.

🟢 Approval recommended

Changes are limited to policy/tooling/docs with unit-test enforcement, and the only noted issue is a small doc-comment accuracy nit.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

tool/testing/classify_high_risk_changes.dart:22

  • The changedFiles doc comment says the paths are “Normalized”, but the implementation only trims whitespace and filters empty lines; it does not normalize prefixes like ./ (or other common variants). Either implement normalization or adjust the comment so it matches actual behavior.
  /// Normalized, non-empty paths inspected by the classifier.
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 24, 2026 12:58

Copilot AI 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.

🔵 Needs a closer look

It updates repository governance and merge-readiness contracts (docs/template/CODEOWNERS + new policy tooling), which warrants final human maintainer review even though no runtime behavior changes are present.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings August 24, 2026 13:09

Copilot AI 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.

🟢 Approval recommended

The changes are policy/tooling-only and include concrete, automated contract tests (plus CODEOWNERS protections) that make the new high-risk review requirements durable and hard to regress inadvertently.

Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@leehack
leehack marked this pull request as ready for review August 24, 2026 13:18
@leehack
leehack merged commit 9a34f9e into main Aug 24, 2026
12 checks passed
@leehack
leehack deleted the ci/high-risk-regression-checklist branch August 24, 2026 13:19
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