implements PLN-0137 (1/7) diagnostic-source

Lock DSC-0066 on Q1-A and Q2-A. Retire AGD-0048 through AGD-0056
into AGD-0069, DEC-0058, and PLN-0137.

Published editor diagnostics use the bound frontend language id as
source. For PBS that is pbs. The stable compiler code stays in code
and is not copied into source. Related locations, phase, and repair
payload stay unpublished.
This commit is contained in:
2026-09-22 08:11:06 +01:00
parent 20adc196d9
commit 099857b636
17 changed files with 379 additions and 34 deletions
@@ -100,6 +100,9 @@ class CompilerLanguageServiceBridgeTest {
assertTrue(analysis.issues().stream().anyMatch(issue -> issue.severity() == BaselineIssueSeverity.ERROR));
assertTrue(analysis.issues().stream().anyMatch(issue -> issue.startLine() == 1));
assertTrue(analysis.issues().stream().noneMatch(issue -> issue.message().contains("Compiler-backed baseline")));
assertTrue(analysis.issues().stream().allMatch(issue -> issue.source().equals("pbs")));
assertTrue(analysis.issues().stream().noneMatch(issue -> issue.source().equals(issue.code())));
assertTrue(analysis.issues().stream().anyMatch(issue -> !issue.code().isBlank()));
}
@Test
@@ -269,12 +269,14 @@ final class Lsp4jProtocolMessageMapperTest {
1,
18,
BaselineIssueSeverity.ERROR,
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE",
"pbs",
"Duplicate Doc attribute on the same declaration surface",
"E_SEM_DUPLICATE_RESERVED_ATTRIBUTE"))));
final var diagnostic = published.getDiagnostics().getFirst();
assertEquals("pbs", diagnostic.getSource());
assertEquals("E_SEM_DUPLICATE_RESERVED_ATTRIBUTE", diagnostic.getCode().getLeft());
assertNull(diagnostic.getData());
assertTrue(diagnostic.getRelatedInformation() == null || diagnostic.getRelatedInformation().isEmpty());
final var mapped = mapper.mapCodeActions(new BaselineCodeActions(List.of(new BaselineCodeAction(
"Remove duplicate reserved attribute",