feat(8246): the code index links each test to what it guards, and can say redundant or unused
CI & Build / Plugin hooks (push) Successful in 20s
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 41s
CI & Build / Python tests (push) Failing after 2m8s
CI & Build / integration (push) Successful in 2m24s
CI & Build / Build & push image (push) Skipped
CI & Build / Plugin hooks (push) Successful in 20s
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 41s
CI & Build / Python tests (push) Failing after 2m8s
CI & Build / integration (push) Successful in 2m24s
CI & Build / Build & push image (push) Skipped
Every coverage refresh now reads, for each test in a bound repo, which product shapes its body exercises: through module aliases and imports, following test helpers, with mocked names left out and shapes most test files reach dropped as hubs. Tests in different files that guard exactly the same set form a group. The project page lists the groups and a person can mark one test redundant, naming the test that covers it, or keep them all with a reason. Agents get test_guard_groups and review_test_group, and classify_shapes takes the two new removal verdicts, redundant (with covered_by) and unused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ def test_backup_version_is_current():
|
||||
"""The bump is the point of the test — a payload section added without
|
||||
moving the version produces backups that are structurally different and
|
||||
indistinguishable by inspection."""
|
||||
assert backup.BACKUP_VERSION == 31
|
||||
assert backup.BACKUP_VERSION == 32
|
||||
|
||||
|
||||
def _exportable_note(**over):
|
||||
@@ -139,7 +139,9 @@ def _column_guard_targets():
|
||||
FamilyAdoption, FamilyDecision, FamilyIdea, FamilyIdeaPlatform,
|
||||
FamilyIdeaReference, Platform, ProjectPlatform,
|
||||
)
|
||||
from grimoire.models.code_shape import CodeShape, CodeShapeEvent, CodeShapeUse
|
||||
from grimoire.models.code_shape import (
|
||||
CodeShape, CodeShapeEvent, CodeShapeGuardReview, CodeShapeUse,
|
||||
)
|
||||
from grimoire.models.lesson_rule_link import LessonNoRule, LessonRuleLink
|
||||
from grimoire.models.lesson_situation import LessonSituation
|
||||
from grimoire.models.rule_moment_judgment import RuleMomentJudgment
|
||||
@@ -200,6 +202,9 @@ def _column_guard_targets():
|
||||
"code_shapes": (CodeShape, backup._code_shape_rows),
|
||||
"code_shape_events": (CodeShapeEvent, backup._code_shape_event_rows),
|
||||
"code_shape_uses": (CodeShapeUse, backup._code_shape_use_rows),
|
||||
"code_shape_guard_reviews": (
|
||||
CodeShapeGuardReview, backup._code_shape_guard_review_rows,
|
||||
),
|
||||
"platforms": (Platform, backup._platform_rows),
|
||||
"project_platforms": (
|
||||
ProjectPlatform, lambda rows: backup._project_platform_rows(rows, _AnySlug()),
|
||||
@@ -331,6 +336,7 @@ def _import_guard_targets():
|
||||
"code_shapes": backup._build_code_shape,
|
||||
"code_shape_events": backup._build_code_shape_event,
|
||||
"code_shape_uses": backup._build_code_shape_use,
|
||||
"code_shape_guard_reviews": backup._build_code_shape_guard_review,
|
||||
"platforms": backup._build_platform,
|
||||
"project_platforms": backup._build_project_platform,
|
||||
"family_ideas": backup._build_family_idea,
|
||||
@@ -600,6 +606,8 @@ async def test_export_full_backup_contains_every_declared_section():
|
||||
"rule_field_judgments",
|
||||
# v31: the moments and triggers each lesson arrives at.
|
||||
"lesson_situations",
|
||||
# v32: reviewed groups of same-guard tests.
|
||||
"code_shape_guard_reviews",
|
||||
# v25: family canon.
|
||||
"platforms", "project_platforms", "family_ideas",
|
||||
"family_idea_platforms", "family_idea_references",
|
||||
|
||||
Reference in New Issue
Block a user