Skip to content

fix(group-tasks): deliverable ledger — local files upload on-chain as metafiles, reject/rework status backfill - #17

Open
newfish wants to merge 1 commit into
mainfrom
fix/group-task-ledger-fix
Open

fix(group-tasks): deliverable ledger — local files upload on-chain as metafiles, reject/rework status backfill#17
newfish wants to merge 1 commit into
mainfrom
fix/group-task-ledger-fix

Conversation

@newfish

@newfish newfish commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

缺陷(三次复现,群任务 #14#15#16)

真实台账实证(本机 IDBots 用户库 group_task_deliverables #14/#15/#16):

修复

  1. daemon 采集:text [DELIVERABLE] 段含真实存在的本地文件时,经 uploadDeliverableFile(作者 bot 钱包,与 OpenTeam guest 同一 metaFileUploadService seam)上传为 metafile,行就地升级为 metafile://pinid + kind=metafile + 链上 verification/confirmation;上传失败降级保持 text 并留可见说明,绝不丢行、绝不产生假 uri
  2. parser:新增 parseDeliverableSegments(与 candidates 索引对齐的原文段)与 extractLocalFilePaths(绝对/~/ 路径;排除 scheme://、URL 路径段、相对路径、协议路由)
  3. 验收回填:reworkGroupTask(Chair 拒签)把 pending 交付物批量标 rejected;daemon 更正路径把 rejected 行就地重开为 pending(同对象新版本,同 ledger 行,不重复造行);acceptGroupTask 原有 pending→accepted 保持不变
  4. store:新增 updateDeliverablesStatusByTask 批量回填(幂等,getRowsModified 计数)

验证

  • 新增 9 个测试(本地文件上链+confirmation、上传失败降级、缺失文件不触发上传、rejected 更正重开、拒签批量回填、show/dump 排序一致性、parser 段对齐/路径提取)
  • 回归:304 个相关测试全绿(daemon/store/service/bridge/parser/acceptance/checkpoints/openTeam 等),0 失败
  • 真实数据反向验证:extractLocalFilePathsfeat(memory+dream): scoped memory gateway routes and dream capability_learnings channel #15 真实消息(485/505/532)提取正确,纯文本(390)保持 text

(b) 核查结论

action:show(RPC show / UI transcript)与 worker 会话 dump(queryRecentMessages)数据源同源(均读 group_chat_messages、按 id 升序);本机 893 条群消息 id 顺序与 chain_timestamp 完全一致(0 乱序)。新增排序一致性测试固化该不变量。若修复后 (b) 仍复现,按委派可证伪条件判定为与 (a) 不同源,需拆单——当前证据显示 (b) 所述现象在 main 上不复现。

… metafiles, reject/rework backfills status

Three consecutive group tasks (#14#16) reproduced the same ledger defect:
deliverable rows recorded with uri=NULL/kind=text (local file paths and
prose instead of on-chain evidence), status stuck at pending with no
acceptance backfill, and the chair forced to reject on unverifiable output.

Fix (verified against real #15/#16 ledger rows):
- daemon ingestion: a text [DELIVERABLE] segment naming a LOCAL file is now
  uploaded on-chain as a metafile (author bot's wallet, same
  metaFileUploadService seam as the OpenTeam guest path) and the row is
  rewritten in place with metafile:// uri, kind=metafile, verification and
  chain confirmation. Upload failure degrades to the plain text record.
- parser: parseDeliverableSegments (index-aligned raw segments) +
  extractLocalFilePaths (absolute/~/ paths, scheme/URL/relative excluded).
- acceptance backfill: rework (chair reject) marks pending deliverables
  rejected; a correction re-opens a rejected row to pending (same object,
  new version, same ledger row); acceptGroupTask already moved pending→
  accepted.
- store: updateDeliverablesStatusByTask bulk backfill.

Tests: +9 (local-file upload, upload-failure degradation, missing-file
safety, rejected-correction reopen, reject backfill, show/dump ordering
consistency, parser segment alignment + path extraction). 304 related
tests green, 0 regressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant