chore: migrate GRACE-Poly anchors to hierarchical dotted naming
Systematic rename of all semantic anchors (#region, [DEF], @RELATION) across 1400+ files — backend Python, frontend Svelte/TS, specs, docs: - Flat anchors become Namespace.Module.Entity - @RELATION references updated to match new anchor paths - Zero business logic changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# #region Test.ReportNormalizer [C:3] [TYPE Module] [SEMANTICS test,report,normalizer,task]
|
||||
# @BRIEF Tests for services/reports/normalizer.py — status_to_report_status, build_summary, extract_error_context, normalize_task_report.
|
||||
# @RELATION BINDS_TO -> [normalizer]
|
||||
# @RELATION BINDS_TO -> [Services.Normalizer]
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
@@ -31,7 +31,7 @@ def _make_task(**overrides):
|
||||
# #endregion helper factories
|
||||
|
||||
|
||||
# #region test_status_to_report_status [C:2] [TYPE Function]
|
||||
# #region Test.ReportNormalizer.TestStatusToReportStatus [C:2] [TYPE Function]
|
||||
# @BRIEF Test status_to_report_status mapping.
|
||||
class TestStatusToReportStatus:
|
||||
def test_success_maps_to_success(self):
|
||||
@@ -57,10 +57,10 @@ class TestStatusToReportStatus:
|
||||
from src.services.reports.normalizer import status_to_report_status
|
||||
from src.models.report import ReportStatus
|
||||
assert status_to_report_status("UNKNOWN_STATUS") == ReportStatus.PARTIAL
|
||||
# #endregion test_status_to_report_status
|
||||
# #endregion Test.ReportNormalizer.TestStatusToReportStatus
|
||||
|
||||
|
||||
# #region test_build_summary [C:2] [TYPE Function]
|
||||
# #region Test.ReportNormalizer.TestBuildSummary [C:2] [TYPE Function]
|
||||
# @BRIEF Test build_summary extracts summary from task result.
|
||||
class TestBuildSummary:
|
||||
def test_uses_result_summary(self):
|
||||
@@ -98,10 +98,10 @@ class TestBuildSummary:
|
||||
from src.models.report import ReportStatus
|
||||
task = _make_task(result={"summary": "", "message": "Actual message"})
|
||||
assert build_summary(task, ReportStatus.SUCCESS) == "Actual message"
|
||||
# #endregion test_build_summary
|
||||
# #endregion Test.ReportNormalizer.TestBuildSummary
|
||||
|
||||
|
||||
# #region test_extract_error_context [C:2] [TYPE Function]
|
||||
# #region Test.ReportNormalizer.TestExtractErrorContext [C:2] [TYPE Function]
|
||||
# @BRIEF Test extract_error_context for failed/partial reports.
|
||||
class TestExtractErrorContext:
|
||||
def test_returns_none_for_success(self):
|
||||
@@ -169,10 +169,10 @@ class TestExtractErrorContext:
|
||||
ctx = extract_error_context(task, ReportStatus.PARTIAL)
|
||||
assert ctx is not None
|
||||
assert ctx.message == "Partial failure"
|
||||
# #endregion test_extract_error_context
|
||||
# #endregion Test.ReportNormalizer.TestExtractErrorContext
|
||||
|
||||
|
||||
# #region test_normalize_task_report [C:2] [TYPE Function]
|
||||
# #region Test.ReportNormalizer.TestNormalizeTaskReport [C:2] [TYPE Function]
|
||||
# @BRIEF Test normalize_task_report produces correct TaskReport.
|
||||
class TestNormalizeTaskReport:
|
||||
def test_returns_task_report(self):
|
||||
@@ -252,5 +252,5 @@ class TestNormalizeTaskReport:
|
||||
report = normalize_task_report(task)
|
||||
assert report.details is not None
|
||||
assert report.details["result"] == {"migrated": 5, "errors": 0}
|
||||
# #endregion test_normalize_task_report
|
||||
# #endregion Test.ReportNormalizer.TestNormalizeTaskReport
|
||||
# #endregion Test.ReportNormalizer
|
||||
|
||||
Reference in New Issue
Block a user