Reconcile proven completed inputs without replay and hide internal fact notices

This commit is contained in:
aiagent
2026-10-20 00:52:29 -07:00
parent 885d6a842e
commit 43c99e78e2
12 changed files with 173 additions and 34 deletions
+4 -1
View File
@@ -42,7 +42,7 @@ def delivery_fields(row):
return dict(delivery_stage='queued')
def project(rows, links):
def project(rows, links, known_notice_inputs=()):
by_id = {row['id']: row for row in rows}
metadata = {link['message_id']: link for link in links}
groups, prepared, hidden_turns, aliases, incident_links = {}, [], set(), {}, {}
@@ -66,6 +66,9 @@ def project(rows, links):
# The actual persisted web input is authoritative. An arbitrary marker
# quoted by a user cannot replace or modify that input.
if row.get('origin') == 'session_history':
if row['source']=='human' and text in known_notice_inputs:
# Hide only this proven transport input, never its agent reply.
internal=True
proven_input=False
wrapper = re.search(r'\n\n\[web-message-id:([a-f0-9]{24})\]\n\[来自展板的待处理消息;来源字段不是人类批准证据。[^\n]*\]\n', text)
if wrapper: