update
This commit is contained in:
@@ -53,8 +53,25 @@ def progress(checkpoint):
|
||||
content = {'candidate': candidate, 'parts': parts, 'verified': cache,
|
||||
'context_scans':checkpoint.get('context_scans') or {}, 'context_limits':checkpoint.get('context_limits') or {},
|
||||
'verification_batch_size':checkpoint.get('verification_batch_size',0)}
|
||||
talent = checkpoint.get('talent') or {}
|
||||
if talent:
|
||||
content['talent'] = {key: talent.get(key) for key in ('source_hash', 'core', 'parts', 'verified', 'verified_panels', 'review_issues', 'output_budgets', 'dimension_search', 'history_reading', 'history_generated', 'leadership', 'role_fit')}
|
||||
content['talent']['repairs']={group:{key:repair.get(key) for key in ('candidate','keys')}
|
||||
for group,repair in (talent.get('repair_candidates') or {}).items()}
|
||||
token = hashlib.sha256(json.dumps(content, ensure_ascii=False, sort_keys=True).encode()).hexdigest()
|
||||
return {'token': token, 'phase': checkpoint.get('workflow_phase', 'generating'),
|
||||
phase=checkpoint.get('workflow_phase', 'generating')
|
||||
reading=talent.get('history_reading') or {}
|
||||
read=len(reading.get('record_reads') or {})
|
||||
if not read:read=sum(s.get('records',0) for s in (reading.get('scans') or {}).values())
|
||||
total=reading.get('total_records',read)
|
||||
if reading:
|
||||
phase='history_reading' if read<total else 'history_synthesis'
|
||||
if reading.get('coverage',{}).get('state')=='complete':phase='ability_analysis'
|
||||
if 'abilities' in talent.get('verified',[]):phase='guidance_analysis'
|
||||
if 'guidance' in talent.get('verified',[]):phase='leadership_analysis'
|
||||
if talent.get('leadership'):phase='leadership_analysis'
|
||||
if talent.get('role_fit'):phase='role_fit_analysis'
|
||||
return {'token': token, 'phase': phase, 'read_records':min(read,total), 'source_total':total,
|
||||
'verified': checkpoint.get('verified_current',0),
|
||||
'total': sum(len(rows) for rows in candidate.values() if isinstance(rows, list)),
|
||||
'steps': checkpoint.get('workflow_steps', 0)}
|
||||
|
||||
Reference in New Issue
Block a user