Persist cumulative investigation briefs and trim live bookkeeping

This commit is contained in:
Nico committed 2026-10-16 22:59:28 +02:00
1 parent b3753b1d6d
commit 816f525ef4
21 files changed
+1338 -22

No files matched your search

+15 -1
View File
@@ -45,9 +45,23 @@ class LoopAdapter:
result["next"]={"kind":"test","executor":"human","question":"What occurs after interaction?","steps":["Interact once"],
"prerequisites":["Use the specified build"],"requested_observations":["Record the observed state"],"environment":"build-A"}
if self.change:self.change(result,context)
if request['prompt_version']=='investigation_project_v12':
if request['prompt_version'] in {'investigation_project_v12','investigation_project_v13'}:
result['update'].setdefault('causal_review',{'effect':'neutral','support':[],'against':[],
'reason':'This fixture gathers context without establishing a causal defect.'})
if request['prompt_version']=='investigation_project_v13':
existing=context.get('working_brief')
review=result['update']['causal_review']
findings=[]
for direction in ('support','against'):
refs=review[direction]
if refs:findings.append({'id':'B0001' if direction=='support' else 'B0002',
'direction':direction,'text':'Fixture scoped finding','scope':'Fixture snapshot', 'evidence_refs':refs})
old={f['id']:f for f in existing['findings']} if existing else {}
new={f['id']:f for f in findings}
result['update'].setdefault('working_brief',{'format_version':1,'findings':findings,
'uncertainties':['Causal defect not established.'],'next_question':'Check the selected mechanism.',
'changes':[{'id':fid,'reason':'Fixture revises the finding.',
'evidence_refs':result['update']['evidence_refs']} for fid,f in old.items() if new.get(fid)!=f]})
return ProviderResponse(result,"fixture-investigation",100,50)