P04-01: 同時発生の更新規約

This commit is contained in:
Agent Control Runner
2026-10-18 15:41:18 +09:00
parent acab529c8d
commit eb94e1d7db
24 changed files with 4092 additions and 28 deletions
+18 -4
View File
@@ -511,7 +511,18 @@ def boundary_conditions(path, function):
return set(REQUIRED) | {'EV'}
def mandatory_conditions(index):
conditions = index.get('conditions')
require(isinstance(conditions, dict), 'mandatory conditions must be a dictionary')
missing = sorted(set(REQUIRED) - set(conditions))
unknown = sorted(set(conditions) - set(REQUIRED))
require(not missing and not unknown,
'mandatory conditions missing: ' + ', '.join(missing) + '; unknown: ' + ', '.join(unknown))
return conditions
def applicability(index, spec, source, head):
mandatory_conditions(index)
tested = index.get('versions', {}).get('tested')
require(isinstance(tested, str) and tree_entries(tested) and
product_manifest(tree_entries(tested)) == product_manifest(tree_entries(head)),
@@ -575,8 +586,7 @@ def coverage(index, raw, source, product_tree):
'docs/DESIGN_DECISIONS.md' if ref == 'D-034' else
'docs/plans/original-completion-2026-10-02/execution/p04-01-input-r01/ORDER_CONTRACT_DRAFT.md')
require(sha(raw[aid]) == sha(safe(ROOT, path)), 'authority document mismatch: ' + ref)
conditions = index.get('conditions')
require(isinstance(conditions, dict) and set(conditions) == set(REQUIRED), 'mandatory conditions missing/unknown')
conditions = mandatory_conditions(index)
for cid, (domain_name, refs, expected) in REQUIRED.items():
condition = conditions[cid]
require(condition.get('authority_refs') == list(refs), 'condition authority: ' + cid)
@@ -1145,14 +1155,18 @@ def combine_native_series(directory, native):
order = results['s5']['facts']['order']['cases']
gates = {
'D05-P04-DESTRUCTION': [('S5C_DESTRUCTION_COMMAND', 'command_destruction_before_completion'),
('S5D_DESTRUCTION_RAID', 'raid_sale_before_destruction'),
('S5D_DESTRUCTION_RAID', 'raid_unfinished_release')],
('S5D_DESTRUCTION_RAID', 'G1'), ('S5D_IN_FLIGHT', 'G2'),
('S5D_DESTRUCTION_RAID', 'idle_objective_breach'),
('S5D_IN_FLIGHT', 'in_flight_destruction')],
'D05-P04-MIDNIGHT-DAY': [('S5E_MIDNIGHT', 'midnight_close_upkeep_before_sale'),
('S5E_MIDNIGHT', 'midnight_new_day_sale')],
'D05-P04-EXIT': [('S5F_EXIT', 'command_exit_before_start'), ('S5F_EXIT', 'planned_exit_after_completion')],
}
for ref, pairs in gates.items():
require(all(order[case][key] is True for case, key in pairs), 'S5 order gate: ' + ref)
for case, key in [('S5G_SHIFT_1080', 'shift_completion'), ('S5H_PAUSED_MIDNIGHT', 'paused_midnight'),
('S5E_MIDNIGHT', 'same_minute_replay')]:
require(order[case][key] == REQUIRED[key][2], 'fresh S5 threshold: ' + key)
power = results['s5']['facts']['power']['cases']
require(power['S5A_PURE']['measurements']['power_stop'] == REQUIRED['power_stop'][2]
and power['S5B_DEPENDENCY']['measurements']['dependency_stop'] == REQUIRED['dependency_stop'][2],