feat(7732): a pass weighs each rule — enforcement, salience and triggers proposed from its text and delivery history, confirmed by the operator
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Failing after 1m41s
CI & Build / integration (push) Successful in 2m9s
CI & Build / Build & push image (push) Skipped
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Failing after 1m41s
CI & Build / integration (push) Successful in 2m9s
CI & Build / Build & push image (push) Skipped
Adds rule_field_judgments (migration 0132), the rules_to_weigh / propose_rule_weights / rule_weight_proposals / judge_rule_weights tools, the routes and the Settings › Moments panel that confirms them. A value equal to the rule's own is recorded as agreed; a different one waits; enforce is refused for a rule no act reaches; a direct edit answers a waiting suggestion. Backup v30 carries the judgments. 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 == 29
|
||||
assert backup.BACKUP_VERSION == 30
|
||||
|
||||
|
||||
def _exportable_note(**over):
|
||||
@@ -142,6 +142,7 @@ def _column_guard_targets():
|
||||
from grimoire.models.code_shape import CodeShape, CodeShapeEvent, CodeShapeUse
|
||||
from grimoire.models.lesson_rule_link import LessonNoRule, LessonRuleLink
|
||||
from grimoire.models.rule_moment_judgment import RuleMomentJudgment
|
||||
from grimoire.models.rule_field_judgment import RuleFieldJudgment
|
||||
from grimoire.models.design_system import DesignSystem, DesignToken
|
||||
from grimoire.models.milestone import Milestone
|
||||
from grimoire.models.note import Note
|
||||
@@ -183,6 +184,7 @@ def _column_guard_targets():
|
||||
"lesson_rule_links": (LessonRuleLink, backup._lesson_rule_link_rows),
|
||||
"lesson_no_rule": (LessonNoRule, backup._lesson_no_rule_rows),
|
||||
"rule_moment_judgments": (RuleMomentJudgment, backup._rule_moment_judgment_rows),
|
||||
"rule_field_judgments": (RuleFieldJudgment, backup._rule_field_judgment_rows),
|
||||
"note_usage_events": (NoteUsageEvent, backup._usage_event_rows),
|
||||
"rule_usage_events": (RuleUsageEvent, backup._rule_usage_event_rows),
|
||||
"system_usage_events": (SystemUsageEvent, backup._system_usage_event_rows),
|
||||
@@ -314,6 +316,7 @@ def _import_guard_targets():
|
||||
"lesson_rule_links": backup._build_lesson_rule_link,
|
||||
"lesson_no_rule": backup._build_lesson_no_rule,
|
||||
"rule_moment_judgments": backup._build_rule_moment_judgment,
|
||||
"rule_field_judgments": backup._build_rule_field_judgment,
|
||||
"note_usage_events": backup._build_usage_event,
|
||||
"rule_usage_events": backup._build_rule_usage_event,
|
||||
"system_usage_events": backup._build_system_usage_event,
|
||||
@@ -590,6 +593,8 @@ async def test_export_full_backup_contains_every_declared_section():
|
||||
"rule_moment_judgments",
|
||||
# v29: the acts that trigger a rule.
|
||||
"rule_triggers",
|
||||
# v30: the weighed enforcement, salience and triggers.
|
||||
"rule_field_judgments",
|
||||
# v25: family canon.
|
||||
"platforms", "project_platforms", "family_ideas",
|
||||
"family_idea_platforms", "family_idea_references",
|
||||
|
||||
Reference in New Issue
Block a user