Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions now-notes/2026-11-26-checkin-ruled-lineage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Status: The standards check-in gives a new evolution in the no-prediction lineage (bold_predictions, predictions_committed) the ruled statement from config/floor-rulings.json, not his database amendment, which quotes his words after it; on 26 Nov bold_predictions_e261126 copied the amendment and tests/floor_rulings_test.py refused the check-in pull request #994.
Next: Let #994 carry the ruled words for bold_predictions_e261126 and merge itself.
North Star check (2026-11-26): holds.
14 changes: 13 additions & 1 deletion scripts/standards_checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ def decided_words(group, db_group):
return group.get('never_beneath')


def ruled_words(key, rulings=None):
"""The ruled statement for a group in a ruled lineage (config/floor-rulings.json "retired" groups: bold_predictions,
predictions_committed and their weekly evolutions), else None. His 24 Nov amendment in the database quotes his words
after the statement; the ruling keeps the statement alone, and tests/floor_rulings_test.py holds every group in the
lineage to it (26 Nov: the check-in's bold_predictions_e261126 copied the amendment and that test went red)."""
import floor_rulings
group = ((floor_rulings.load_rulings() if rulings is None else rulings).get('retired') or {}).get('groups') or {}
if group.get('statement') and floor_rulings.in_lineage(key, group.get('lineage') or []):
return group['statement']
return None


def prune(floor, groups):
"""Take out of the grouping every standard the floor no longer holds, in place, and return them as
{id: where}. The Rejections engine retires a standard when a newer one supersedes it: on 18 Nov the floor dropped
Expand Down Expand Up @@ -162,7 +174,7 @@ def propose(floor, groups, db_groups, week_of):
parent = by_key[b['parent']]
evolves[key] = b['parent']
entry = {'key': key, 'title': plain(f'{parent["title"]} (evolution, week of {week_of})')[:120],
'never_beneath': plain(decided_words(parent, db_groups.get(b['parent']))),
'never_beneath': plain(ruled_words(key) or decided_words(parent, db_groups.get(b['parent']))),
'check': plain(parent['check']), 'members': members, 'evolves': b['parent']}
else:
theme = str(first.get('theme') or 'other').replace('_', ' ')
Expand Down
18 changes: 18 additions & 0 deletions tests/standards_checkin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ def test_a_proposed_group_never_carries_a_long_dash(self):
merged = dict(groups, groups=groups['groups'] + new)
self.assertEqual(standards_checkin.floor_group.check(floor, merged), [])

def test_an_evolution_in_a_ruled_lineage_carries_the_ruled_words(self):
# 26 Nov: bold_predictions_e261126 copied his database amendment, which quotes his words after the statement,
# and tests/floor_rulings_test.py refused it; the ruling's statement is what every group in the lineage carries.
import floor_rulings
statement = floor_rulings.load_rulings()['retired']['groups']['statement']
floor = {'standards': {
's0000000001': {'theme': 'close', 'never_beneath': 'An insight.', 'check_before_delivery': 'Read.'},
's0000000002': {'theme': 'close', 'never_beneath': 'A question.', 'check_before_delivery': 'Read.'},
's0000000003': {'theme': 'close', 'never_beneath': 'An open end.', 'check_before_delivery': 'Read.'}}}
groups = {'groups': [{'key': 'bold_predictions', 'title': 'No predictions', 'never_beneath': statement,
'check': 'Read the close.', 'members': ['s0000000001', 's0000000002']}],
'operating': {'title': 'Ops', 'members': []}}
db = {'bold_predictions': {'status': 'approved', 'amendment': statement + ' (Krish, 2026-11-24: "his words").'}}
new, _ = standards_checkin.propose(floor, groups, db, '2026-11-26')
self.assertEqual([g['key'] for g in new], ['bold_predictions_e261126'])
self.assertEqual(new[0]['never_beneath'], statement)
self.assertIsNone(standards_checkin.ruled_words('covers_e261126'))


if __name__ == '__main__':
unittest.main()
Loading