fix(8140): family triggers open only records that can carry an idea, and enter_project names a project's unevaluated candidates
CI & Build / Python lint (push) Successful in 7s
CI & Build / TypeScript typecheck (push) Successful in 43s
CI & Build / Plugin hooks (push) Successful in 49s
CI & Build / Python tests (push) Failing after 2m12s
CI & Build / integration (push) Successful in 2m41s
CI & Build / Build & push image (push) Skipped
CI & Build / Python lint (push) Successful in 7s
CI & Build / TypeScript typecheck (push) Successful in 43s
CI & Build / Plugin hooks (push) Successful in 49s
CI & Build / Python tests (push) Failing after 2m12s
CI & Build / integration (push) Successful in 2m41s
CI & Build / Build & push image (push) Skipped
Tasks, non-knowledge kinds and records titled for their own project are never opened as candidates by the citation or repeat trigger; a lineage word inside a quoted title no longer reads as lineage. The family line counts and names this project's own candidates that only the system has decided on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -161,3 +161,39 @@ async def test_re_saving_a_closed_milestone_asks_nothing():
|
||||
out = await update_milestone(project_id=3, milestone_id=5, status="done")
|
||||
assert "family_hint" not in out
|
||||
trigger.assert_not_awaited()
|
||||
|
||||
|
||||
def test_a_lineage_word_inside_a_quoted_title_is_not_lineage():
|
||||
"""Records are cited with their titles beside them; a title's words
|
||||
describe THAT record, so they cannot claim the next citation's lineage."""
|
||||
text = ('- Tasks: #3510 "Release parsing and matching, verified", #7407 "Downloads", '
|
||||
'#20 “mirrors the old flow”, #30')
|
||||
assert lineage_citations(text) == []
|
||||
# The convention itself still reads: a lineage word outside the quotes.
|
||||
assert lineage_citations('Ported from #12 "Signed APK lane".') == [12]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("title", "project", "about"), [
|
||||
("Storehouse: start here", "Storehouse", True),
|
||||
("Torn Stars — Economy System", "Torn Stars", True),
|
||||
("storehouse", "Storehouse", True),
|
||||
("Syncthing relay", "Sync", False),
|
||||
("Signed APK lane", "Storehouse", False),
|
||||
("Storehouse: start here", "", False),
|
||||
])
|
||||
def test_a_record_named_for_its_own_project_is_about_that_project(title, project, about):
|
||||
from grimoire.services.family import about_its_own_project
|
||||
|
||||
assert about_its_own_project(title, project) is about
|
||||
|
||||
|
||||
def test_only_knowledge_and_shapes_not_about_one_project_can_carry_an_idea():
|
||||
from grimoire.services.family import can_carry_idea
|
||||
|
||||
kw = dict(title="Signed APK lane", project_title="android one")
|
||||
assert can_carry_idea(is_task=False, note_type="note", **kw)
|
||||
assert can_carry_idea(is_task=False, note_type="snippet", **kw)
|
||||
assert not can_carry_idea(is_task=True, note_type="note", **kw)
|
||||
assert not can_carry_idea(is_task=False, note_type="lesson", **kw)
|
||||
assert not can_carry_idea(is_task=False, note_type="note",
|
||||
title="android one: start here", project_title="android one")
|
||||
|
||||
Reference in New Issue
Block a user