implements PLN-0126
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 61.95% (17766/28676)
* Branch Coverage: 52.69% (6860/13019)
* Lines of Code: 28676
* Cyclomatic Complexity: 11490
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 645
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 61.95% (17766/28676)
* Branch Coverage: 52.69% (6860/13019)
* Lines of Code: 28676
* Cyclomatic Complexity: 11490
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 645
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Publish the language-versus-platform validation matrix in compiler-general specs, retitle spec 19, and recut PBS diagnostics so common structural failures are not PBS coverage. Housekeep DSC-0060 with LSN-0063.
This commit is contained in:
+7
@@ -36,6 +36,13 @@ class BackendConformanceMatrixSpecTest {
|
||||
"G19-5.2.6",
|
||||
"G19-5.2.7",
|
||||
"G19-5.2.8",
|
||||
"G19-11.1",
|
||||
"G19-11.2",
|
||||
"G19-11.3",
|
||||
"G19-11.4",
|
||||
"G19-11.5",
|
||||
"G19-11.6",
|
||||
"PBS12-11",
|
||||
"G20-4.1.1",
|
||||
"G20-4.1.2",
|
||||
"G20-4.1.3",
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class CommonBackendArchitectureTest {
|
||||
private static final List<String> GUARDED_RELATIVE_ROOTS = List.of(
|
||||
"backend",
|
||||
"lifecycle",
|
||||
"workspaces/stages/AssembleLifecyclePipelineStage.java");
|
||||
"workspaces/stages");
|
||||
private static final String FORBIDDEN_PBS_PACKAGE = "p.studio.compiler.pbs";
|
||||
private static final String FORBIDDEN_PBS_PREFIX = "__pbs.";
|
||||
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package p.studio.compiler.specs;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
class ValidationOwnershipSpecTest {
|
||||
private static final String SPEC_19 =
|
||||
"docs/specs/compiler/19. Verification and Safety Checks Specification.md";
|
||||
private static final String PBS_SPEC_12 =
|
||||
"docs/specs/compiler-languages/pbs/12. Diagnostics Specification.md";
|
||||
private static final List<String> PBS_FORBIDDEN_COMMON_COVERAGE = List.of(
|
||||
"synthetic wrapper entrypoint missing",
|
||||
"published entrypoint is not function index 0",
|
||||
"hidden boot guard is missing",
|
||||
"synthetic callable origin missing");
|
||||
|
||||
@Test
|
||||
void spec19MustBeCompilerGeneralAndPublishValidationOwnership() throws IOException {
|
||||
final var content = Files.readString(locateRepoRoot().resolve(SPEC_19));
|
||||
|
||||
assertFalse(
|
||||
content.startsWith("# PBS Verification"),
|
||||
"spec 19 must not be titled as PBS Verification");
|
||||
assertTrue(
|
||||
content.contains("# Compiler Verification and Safety Checks Specification"),
|
||||
"spec 19 must use the compiler-general title");
|
||||
assertTrue(content.contains("## 11. Validation Ownership"), "spec 19 must contain Validation Ownership");
|
||||
assertTrue(
|
||||
content.contains("lowest layer that understands the failure without knowing the source language"),
|
||||
"spec 19 must state the classification MUST");
|
||||
assertTrue(content.contains("Parse / syntax"), "spec 19 matrix must include parse/syntax");
|
||||
assertTrue(content.contains("PBS linking"), "spec 19 matrix must include PBS linking");
|
||||
assertTrue(content.contains("Lifecycle assembler"), "spec 19 matrix must include lifecycle assembler");
|
||||
assertTrue(
|
||||
content.contains("Canonical host-binding identity"),
|
||||
"spec 19 matrix must include the host-admission split");
|
||||
assertTrue(
|
||||
content.contains("MUST NOT import `p.studio.compiler.pbs`"),
|
||||
"spec 19 must forbid PBS imports in platform validators");
|
||||
}
|
||||
|
||||
@Test
|
||||
void pbsDiagnosticsMustNotClaimCommonStructuralFailures() throws IOException {
|
||||
final var content = Files.readString(locateRepoRoot().resolve(PBS_SPEC_12));
|
||||
|
||||
for (final var forbidden : PBS_FORBIDDEN_COMMON_COVERAGE) {
|
||||
assertFalse(
|
||||
content.contains(forbidden),
|
||||
"PBS spec 12 must not list common structural coverage: " + forbidden);
|
||||
}
|
||||
assertTrue(
|
||||
content.contains("docs/specs/compiler/19. Verification and Safety Checks Specification.md"),
|
||||
"PBS spec 12 must point common structural failures at spec 19");
|
||||
assertTrue(
|
||||
content.contains("init function must have signature fn name() -> void"),
|
||||
"PBS spec 12 must retain lifecycle-marker coverage");
|
||||
}
|
||||
|
||||
private static Path locateRepoRoot() {
|
||||
var cursor = Path.of(System.getProperty("user.dir")).toAbsolutePath().normalize();
|
||||
while (cursor != null) {
|
||||
final var hasDocs = Files.isDirectory(cursor.resolve("docs/specs/compiler"));
|
||||
final var hasCompiler = Files.isDirectory(cursor.resolve("prometeu-compiler"));
|
||||
if (hasDocs && hasCompiler) {
|
||||
return cursor;
|
||||
}
|
||||
cursor = cursor.getParent();
|
||||
}
|
||||
fail("could not locate repository root from working directory");
|
||||
throw new IllegalStateException("unreachable");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user