[verified] Allow rework from a single valid review request
This commit is contained in:
@@ -210,11 +210,17 @@ def derive_decision(raw, inp, impl_actor_id):
|
||||
latest=same[-1]; selected[role]=latest['id']
|
||||
if latest['_verdict']=='request_changes': reasons.append('request_changes')
|
||||
elif latest['_verdict']=='blocked_spec': reasons.append('blocked_spec')
|
||||
if not reasons:
|
||||
status='no_op'
|
||||
elif reasons and set(reasons) == {'request_changes'}:
|
||||
status='rework'
|
||||
else: status='blocked'
|
||||
reason_set = set(reasons)
|
||||
# Missing peer review prevents no-op, not acting on a valid selected request.
|
||||
blocking_reasons = reason_set - {'request_changes', 'missing_current_review'}
|
||||
if blocking_reasons:
|
||||
status = 'blocked'
|
||||
elif 'request_changes' in reason_set:
|
||||
status = 'rework'
|
||||
elif 'missing_current_review' in reason_set:
|
||||
status = 'blocked'
|
||||
else:
|
||||
status = 'no_op'
|
||||
for row in timeline:
|
||||
for key in ('_time','_verdict','_role','_marker_error'): row.pop(key,None)
|
||||
decision={'status':status,'reason_codes':sorted(set(reasons)),'target':copy.deepcopy(inp['target']),'head':inp['head'],
|
||||
|
||||
Reference in New Issue
Block a user