feat(7832): records reach an edit and a message by structure first; resemblance offers notes
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Failing after 12s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Failing after 1m39s
CI & Build / integration (push) Successful in 2m17s
CI & Build / Build & push image (push) Skipped
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Failing after 12s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Failing after 1m39s
CI & Build / integration (push) Successful in 2m17s
CI & Build / Build & push image (push) Skipped
The kind×moment table's first measured defaults (baseline note #7892): - The edit door splits in two rows. work.change is what is recorded where the edit is (snippets beside the file, issues naming it or open in its area); work.change.similar is what the code resembles, notes by default. Issues and snippets no longer reach an edit by resemblance. - Snippets recorded beside the file are named by id in an "Also recorded beside this file" pointer line instead of taking menu lines. - The message door leaves lessons and issues out by default: a lesson arrives at its confirmed situation, an issue through its area or its id. Its lesson slot runs only for a user who turns lessons back on. - The static context teaches the new pointer line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,10 +29,11 @@ async def _user(name: str = "record_kinds_owner") -> int:
|
||||
async def test_a_door_follows_its_default_until_the_user_changes_it():
|
||||
uid = await _user()
|
||||
assert await record_kinds.kinds_for(uid, "work.change") == record_kinds.DOORS["work.change"].default
|
||||
await record_kinds.set_kinds(uid, "work.change", ["snippet", "task:issue"])
|
||||
assert await record_kinds.kinds_for(uid, "work.change") == {"snippet", "task:issue"}
|
||||
await record_kinds.set_kinds(uid, "work.change", ["snippet"])
|
||||
assert await record_kinds.kinds_for(uid, "work.change") == {"snippet"}
|
||||
# Another door is untouched.
|
||||
assert await record_kinds.kinds_for(uid, "message") == frozenset(record_kinds.KINDS)
|
||||
assert (await record_kinds.kinds_for(uid, "message")
|
||||
== record_kinds.DOORS["message"].default)
|
||||
table = await record_kinds.set_kinds(uid, "work.change", None)
|
||||
row = next(d for d in table["doors"] if d["door"] == "work.change")
|
||||
assert row["changed"] is False and row["kinds"] == row["default"]
|
||||
@@ -51,7 +52,7 @@ async def test_an_unknown_door_or_kind_is_refused_and_nothing_is_stored():
|
||||
await record_kinds.set_kinds(uid, "work.nowhere", ["snippet"])
|
||||
with pytest.raises(ValueError, match="unknown kind"):
|
||||
await record_kinds.set_kinds(uid, "message", ["snippet", "rule"])
|
||||
assert await record_kinds.kinds_for(uid, "message") == frozenset(record_kinds.KINDS)
|
||||
assert await record_kinds.kinds_for(uid, "message") == record_kinds.DOORS["message"].default
|
||||
|
||||
|
||||
async def test_the_clause_matches_exactly_the_kinds_named():
|
||||
@@ -88,6 +89,8 @@ async def test_each_cell_carries_the_lines_its_door_pushed_and_the_opens():
|
||||
await s.commit()
|
||||
table = await record_kinds.table(uid, days=7)
|
||||
cells = {d["door"]: d["evidence"] for d in table["doors"]}
|
||||
assert cells["work.change"] == {"snippet": {"delivered": 2, "opened": 1}}
|
||||
# The search by resemblance on an edit has its own row.
|
||||
assert cells["work.change.similar"] == {"snippet": {"delivered": 2, "opened": 1}}
|
||||
assert cells["work.change"] == {}
|
||||
assert cells["message"] == {"task:issue": {"delivered": 1, "opened": 0}}
|
||||
assert table["evidence_failed"] is False
|
||||
|
||||
Reference in New Issue
Block a user