Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions doc/high_risk_pre_merge_readiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ Python files are rejected regardless of name or extension. Everything under
`tool/native/fixtures/` must list each of them in `production_refs`; otherwise
it fails with "Some changed production paths lack reviewed test reachability".

The evaluator verifies named cases/snippets against exact Git blobs and rejects
missing or disconnected references. A literal match does **not** establish a
The evaluator verifies named cases/snippets against exact Git blobs and requires
each ordinary test record to cite at least one changed production path.
Metadata-only releases can supply evidence through the
[bounded core-patch route](#core-patch-release-metadata-evidence) when eligible.
A literal match does **not** establish a
callgraph, execute tests, authenticate logs, or prove independence. The existing
independent audit must inspect those semantics and results; do not invent a
record for tests that were not run. Unknown or unproven reachability blocks the
Expand Down Expand Up @@ -234,9 +237,8 @@ matrix rows, the exact-pair independent audit and the zero-P1 and
zero-thread gates are unchanged. A comment-only structured-output path keeps
its minimum impacts, coverage axes and family evidence, and impact review must
still cite it. Other changed production paths in the same PR still need
coverage. A cited test may still reference only comment-only paths and must
pass every existing check. A PR with no changed production path at all still
cites a relevant test.
coverage. A cited test may still reference only changed comment-only paths and
must pass every existing check.

### Schema migration

Expand Down
44 changes: 44 additions & 0 deletions test/unit/tooling/high_risk_readiness_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3032,6 +3032,50 @@ final segment = '${Object()}ImageEditingRequest${Object()}';
);

group('bounded metadata-only release evidence', () {
test('ordinary evidence rejects an unchanged verifier reference', () async {
final files = metadataFiles();
for (final tree in files.values) {
tree[releaseMetadataVerifier] = (
mode: '100644',
contents: 'void verifyRelease() {}',
);
tree[releaseMetadataTest] = (
mode: '100644',
contents: "test('regression case', () { verifyRelease(); });",
);
}
final evidence = backendEvidence()
..['surfaces'] = ['artifactConsumer']
..['affected_test_paths'] = [releaseMetadataTest]
..['test_evidence'] = {
releaseMetadataTest: testProof(releaseMetadataVerifier)
..['test_snippet'] = 'verifyRelease();'
..['production_refs'] = [
{
'path': releaseMetadataVerifier,
'snippet': 'void verifyRelease()',
},
],
};

final result = await HighRiskReadinessEvaluator(
repositoryState: FakeRepositoryState(
changes: [
for (final path in releaseMetadataPaths)
RepositoryChange(path: path, kind: RepositoryChangeKind.modified),
],
existingPaths: files[headSha]!.keys.toSet(),
files: files,
),
).evaluate(evidence: evidence, context: context);

expectFailure(
result,
ReadinessFailureClassification.missingStructuredOutputEvidence,
);
expect(result.message, contains('disconnected'));
});

test(
'the next patch must preserve the previous runtime baseline',
() async {
Expand Down
3 changes: 1 addition & 2 deletions tool/testing/high_risk_readiness.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1522,8 +1522,7 @@ class HighRiskReadinessEvaluator {
}
}
if (!await refsExist(refs) ||
(changedProduction.isNotEmpty &&
referenced.intersection(changedProduction).isEmpty)) {
referenced.intersection(changedProduction).isEmpty) {
return 'Test evidence is disconnected from the changed production path: ${entry.key}.';
}
coveredProduction.addAll(referenced);
Expand Down
Loading