Skip to content

Send and verify native images in private Lark replies - #8741

Merged
loopx-agent merged 34 commits into
mainfrom
codex/lark-source-image-return-20261114
Nov 15, 2026
Merged

loopx-agent merged 34 commits into
mainfrom
codex/lark-source-image-return-20261114

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

A completed private Lark answer that uses Markdown to show a source image can leave a gray placeholder even though the Bot records the reply as delivered. Convert eligible source image references into native Lark images and require readback of their bytes before marking the original answer delivered. The explanation is sent first. If images fail, the Bot reports them as unverified and releases the same delivery workers for new replies.

  • Outcome basis: Some private research answers referenced external images, but the raw rich post contained a Markdown string and no native image nodes.
  • Before → after: The same completed answer now sends the explanation once, then attaches images from the exact source message. A mismatch leaves image delivery pending. The existing workers handle due image retries after new replies. Readback can recover a sent image without sending the text, image, or model turn again.
  • Intended base: main.

Author Declaration

  • Written by: Model agent (OpenAI Codex, GPT-6).
  • Specification and revision: No public written specification; the reproduced private answer failure and acceptance above are the basis.
Criterion Disposition Symbol / path Test or command
Keep the original text and turn; send native images on the original private reply implemented LarkPrivateConversations._deliver_completed_answer Private Lark integration regression
Fetch only an exact owner source URL or a same-host image actually listed in its static article implemented allowed_answer_image_urls, public_source_reader.fetch Per-hop DNS and GET boundaries, listed redirect, and changed-request cases
Withhold completion until ordered image readback matches; do not duplicate a send or replay the turn implemented Existing uploaded_chat_images and verify_chat_images Corrupt readback, recovery, and upload-denied cases
Let new replies through while image delivery waits implemented Private delivery discovery and retry scheduling A second request in the same conversation completes while the first image upload is refused
Repair one verified historical answer by queueing only its original source images implemented Existing private delivery journal and scanner Four distinct images, provider/source checks, restart and unknown-send cases
Show unfinished original image recovery in Feishu connection settings implemented LarkPrivateConversations.health Pending count through repeated reads and verified delivery
Adopt and verify private image delivery against an authorized Lark tenant verified on a scoped build Existing managed services, App scopes and private chats Historical supplement and one new private request, with ordered native image and exact byte readback
  • Self-check: Reviewed the existing resource and post journals. The feature covers common inline Markdown images from owner private text requests. Group delivery, private file paths, authenticated sources and other Markdown forms are outside this change.

Scope And Continuation

New completed private replies use the same transport for text and native media. A previous text-only reply can now be repaired by a private runtime descriptor that pins the existing request, binding, completed turn, original reply ID, answer digest and ordered image URL/digest pairs. The existing delivery worker verifies the original request and Bot response before every media write through the same inbox. It preserves the original reply, turn and Core receipt. A send with an unknown outcome remains pending. A known message is read back from the same App and chat, and the bytes of each image are checked.

The historical descriptor is an operator input in the existing private delivery directory. It cannot set the destination, reuse an edited reply, read local source paths, or route work to another consumer. Stops, unreadable receipts, and changed inputs hold the original image work.

Review Follow-up

The branch now includes main at b46a76d2d64b. Feishu connection settings count a delivered answer while its original images remain pending. The settings reader uses the cached metadata view for completed delivery records. The pending image record stays on the fresh read path until the images are verified.

The private outbox passes its exact URL set to the existing anonymous reader. The reader verifies each destination before DNS, including HTTP redirects and the GitHub diff transport fallback. An image can follow a same-host redirect if the original message or its verified article lists the destination. The private outbox discovers that article only at the exact owner URL. Older pending media is revalidated against the same frozen bytes before further delivery, including after a restart.

  • An ordinary post-preview check catches an original Stop or Close before dispatch is journaled. For a historical repair, the raw Feishu mget reads both the user message and the original Bot reply in one request and verifies the authors, chat, and bodies. The historical verifier reads raw content_v2 as the authored Markdown.
  • After writing the upload intent, the dispatcher acquires the original local source route, binding, and Session locks. It uses a bounded provider source read there, followed by a fresh local control check. The locks cover CLI start. The image upload response is awaited outside the locks.
  • A source edit visible at the last provider read prevents the CLI from starting and restores the previous upload journal. Feishu image creation accepts image bytes and image type, with no source message revision precondition. A later edit can leave an unattached image resource, and the original messages are checked again before posting. Unknown upload outcomes stay fenced.
  • Group Stop keeps its existing read entry point and uses the same raw paired-read implementation.
  • A structured App-scope rejection without an upload acknowledgement now allows the same resource to be tried again after the App gains permission. The existing resource journal preserves successful image keys and keeps timeouts, missing acknowledgements, and contradictory responses fenced.
  • When native CLI startup fails with EMFILE, no provider upload ran. The worker restores the previous resource record after releasing the source authority handles, while it still holds the resource lock. The original worker retries that image after resources recover and checks the original messages again. A timeout or missing acknowledgement after launch still leaves the upload fenced.
  • The guarded CLI runner now lets a pending image recover when the executable fails to start. The worker restores the previous record for that resource, including any recorded App-scope rejection. The next scheduled pass validates the original request again and retries after the executable returns. An upload that started and then timed out or returned no acknowledgement remains fenced.
  • A previous hosted browser run timed out in the Goal workspace creation scenario. The branch includes the main-branch test fix for that scenario.

Validation

  • Integrated head b9e3060caee69ed3459f7ea9da3cee03fcc89087 against main@b46a76d2d64b. The regression reports zero pending images on the mechanical merge. The correction reports one through repeated settings reads and zero after the image receipt becomes delivered.

  • 54 private transport and settings cases plus 130 CLI, source and discovery cases passed. Six cases passed from the installed wheel, including the two pre-spawn failures, a later scope grant, an uncertain upload acknowledgement, Stop, and the settings count. The standard premerge passed six direct and 13 selected checks.

  • Previous head 764c7097720f7167f64e07cb370cd9dc8efbbcd1: a real Popen reached its file descriptor limit after the upload intent was recorded. Before the fix, the original worker could not resume. With the fix, it posted the original four images once and read back identical bytes; an upload with a missing acknowledgement stayed pending. The 25 historical media scenarios passed in the source checkout, and five focused cases passed against an isolated wheel built from this head. The standard premerge gate passed all six direct and 13 selected checks.

  • npm run typecheck:control-plane reports the same TS2345 in coordination_runtime_shadow.test.ts:380 on both 764c7097720f and its prior verified target main. The preceding head's Windows job failed while starting the CLI from the base checkout. The independent review approved 764c7097720f after reproducing both CLI launch failures. The current integrated revision awaits its own review and live adoption.

  • Commit 3c420317438f20fecc2dd26bff9a120f7217f486 includes the CLI launch recovery and was checked against main at 6dfd1c90c4c1a186c43de0a2c05243fa14b5a76e. The prior code failed the historical worker regression after a missing executable was restored. The updated worker posts the original four images once and reads back the ordered bytes. The real subprocess probes also cover a prior scope rejection, a lost acknowledgement, a timeout, and an untyped error after resource creation. 77 private worker and Stop checks and 132 CLI, image, and source checks passed. The standard premerge run passed 6 direct and 13 selected checks. This validation used synthetic sources and a local provider fixture.

  • Exact head 35cb1b225da3ef34c636f18c03b16971d872fa1e passed 38 focused original-source and Stop or Close cases, and 12 group read and Stop cases. The independent regression that edits the source before the local dispatch lock now observes zero image uploads, zero supplemental posts and no new upload receipt. The standard premerge gate passed all six direct and 13 selected checks against 48dbebbd14c5535b9631f4c7a1152d86aa64c5b2.

  • Before this change, a single new provider resource was created in each of two tests where Stop or Close committed immediately before the upload-start journal write. Both cases now perform zero uploads and produce zero supplemental posts or image notices. The completed body and model Turn are preserved.

  • The real subprocess boundary test observes the lock held when starting the CLI and released while waiting for the response. The narrow Lark transport owns the guard and shares Core's existing source route path. The existing bounded Lark readback and upload-timeout conservatism remain in place.

  • Live delivery passed on an adopted build carrying these image-delivery changes. The original Bot worker supplemented one existing text-only reply with four native images. A new request in a second private chat also received four native images from its own Bot. Each post preserved source order, and an independent download matched every original image byte for byte. This verification covers the scoped live build. The current upstream commit has isolated validation. It remains subject to exact-head review and merge readiness.

Frontend / Visual Evidence

  • Feishu connection settings show the existing pending count for a text reply with image recovery in progress. Lark uses its native image nodes on the original reply. The private screenshot is omitted.
  • Before / after: Wire evidence is covered by the native post and image-byte readback cases above.
  • First viewport and preview: N/A; no first-screen or UI layout change.
  • Source data: synthetic for regressions. Live validation used publicly available source images. Private chat content and identifiers are omitted.

Type of Change

  • Bug fix
  • Test update

LoopX Area

  • Capability or extension (providers, adapters, skills)

Technical Direction

  • Operator surface and IM integration.

Shared-authority RFC fixture impact

N/A. No shared authority schema or routing change.

Boundary Checklist

  • No private state, credentials, raw traces, internal links or local paths.
  • No duplicate benchmark work.
  • Scoped to private image delivery and its integration with the existing worker.
  • No paired RFC changed; bilingual diff check passed.
  • No LoopX first-screen change.
  • DCO sign-off included.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 28923790ae02d3158e5610cc4de6ef5a5dc82df1;对照目标基线 0c5652b62f41f3effe690f3ae8fdfbae4d27f26f。

[P2] 同域重定向可以把未列出的图标为原图。 私聊原消息只给文章链接。文章仅列出 chart.png,该地址返回 302 到同域的 unlisted.png。 候选上传 unlisted.png 的字节,并把 Lark 原请求标记为已验证送达。页面未列出这张图,图片字节回读只能确认 Bot 发出了它。 触发分支

动机 / Motivation

在私聊里检查研究答复和原图的用户。 用户从答复看到图名后,需要收到原来源列出的图片,并能区分正文已送达和图片待核验。 目标基线保留原始 Markdown 图标记,合成原答复只发正文,未创建 native img。 错图会进入后续解读,送达状态也会误导重试判断。 允许的图片直链经过真实读取器解析、native post 和字节回读。模拟回读错误后,从原请求恢复,原正文和模型轮次各一次。 验证覆盖源码和隔离 wheel。HTTP 与 Lark 端使用合成响应,控制面和消息编排使用实际入口。真实 App 的图片上传权限及线上采用仍待确认。

改动思路 / Approach

Core 持有会话和原请求。Lark outbox 负责送达和回读,匿名读取器负责按已核验来源取字节。 把原消息或文章确认过的 URL 传给现有 public source reader,在跟随重定向之前核对新目标。遇到未列出的目标,保留正文并让图片走已有的未核验提示。 先发送原文本,再按原请求权限上传图并回读。出错时由原 outbox 的待核验状态继续恢复。

具体改动 / Changes

关键代码讲解

候选把原答复和媒体分两次交付,正文有图名链接,媒体另用 native img。直链正例中,原会话只运行一次,二进制回读也和上传一致。问题出在首次地址经过验证后,现有读取器仍可以重定向到另一条路径。候选只比较最终域名和空 query,因此未列路径可以继续提交。最终地址检查 HTTP 重定向解析

按 docs/integrations/public-source-reader.md 的当前基线约束,原答复送达 已验证;回读失败后继续 已验证;实际图片来源 未满足。基线验收依据

对主干的风险 / Risks

这个反例在源码和重新构建的 Standard wheel 上一致。相同输入在目标 main 只发正文。候选直链发两条消息并验证。302 到同域另一张图时也发两条并完成验证,且中间没有新模型轮次。仅检查上传与回读相等会错过这个问题。provider 拒绝上传或回读失败仍能保留正文。

语义与 CI 对齐

本地 Standard premerge 的 13 项选择检查通过。六类现有图片送达用例通过。额外四种 HTTP 路径在源码与隔离 wheel 复测,正例保持一轮模型调用,反例按完整请求和送达状态判定。托管 CI 未查询。 验证覆盖源码和隔离 wheel。HTTP 与 Lark 端使用合成响应,控制面和消息编排使用实际入口。真实 App 的图片上传权限及线上采用仍待确认。

我的整体评价 / Verdict

请求修改。把原消息或文章确认过的 URL 传给现有 public source reader,在跟随重定向之前核对新目标。遇到未列出的目标,保留正文并让图片走已有的未核验提示。 让原私聊夹具经过真实 HTTP 重定向解析,覆盖直链、同域未列目标和跨域跳转。核对来源请求、原文、native img 节点、精确字节和送达状态。

English verdict: REQUEST_CHANGES at 2892379. The verified private reply can upload an unlisted same-host redirect target. Bind actual image URLs to the original source before fetching redirected bytes.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 215968bbab322626ddff809230b21c33e7e2302f;对照目标基线 0dfaf72549687b3d4b26f6cfdbaa3d134fa78c3d。

[P2] 同域重定向可以把未列出的图标为原图。 私聊原消息只给文章链接。文章仅列出 chart.png,该地址返回 302 到同域的 unlisted.png。 候选上传 unlisted.png 的字节,并把 Lark 原请求标记为已验证送达。页面未列出这张图,图片字节回读只能确认 Bot 发出了它。 触发分支

动机 / Motivation

在私聊里检查研究答复和原图的用户。 用户从答复看到图名后,需要收到原来源列出的图片,并能区分正文已送达和图片待核验。 目标基线保留原始 Markdown 图标记,合成原答复只发正文,未创建 native img。 错图会进入后续解读,送达状态也会误导重试判断。 新提交先核验正文,再由相同队列补发图片。直链经过真实读取器、native post 和字节回读。模拟拒绝上传时,同会话下一条正文仍可送达;回读恢复不会重复发原正文或重跑模型。 验证覆盖源码和隔离 wheel。HTTP 与 Lark 端使用合成响应,控制面和消息编排使用实际入口。真实 App 的图片上传权限及线上采用仍待确认。

改动思路 / Approach

Core 持有会话和原请求。Lark outbox 负责送达和回读,匿名读取器负责按已核验来源取字节。 把原消息或文章确认过的 URL 传给现有 public source reader,在跟随重定向之前核对新目标。遇到未列出的目标,保留正文并让图片走已有的未核验提示。 新提交先发正文,再把补图交给原队列靠后的工作。回读失败时仍沿原 outbox 恢复,正文不重发。

具体改动 / Changes

关键代码讲解

相对上轮,补图现在从正文发送流程移出,独立发现并在待重试时让新正文先走;整个 PR 仍使用原正文和 native img。直链正例中,原会话只运行一次,二进制回读也和上传一致。问题出在首次地址经过验证后,现有读取器仍可以重定向到另一条路径。候选只比较最终域名和空 query,因此未列路径可以继续提交。最终地址检查 HTTP 重定向解析 同一发现沿用上轮行内讨论。

按 docs/integrations/public-source-reader.md 的当前基线约束,原答复送达 已验证;回读失败后继续 已验证;实际图片来源 未满足。基线验收依据

对主干的风险 / Risks

这个反例在源码和重新构建的 Standard wheel 上一致。相同输入在目标 main 只发正文。候选直链发两条消息并验证。302 到同域另一张图时也发两条并完成验证,且中间没有新模型轮次。跨域后跳回原域的链也成功发了这张未列图片;直接停在外域的链虽然不发图,却已经访问外域。当前正文与图片分开调度的收益已核验,来源问题仍待修。

语义与 CI 对齐

标准 premerge 的 13 项选中检查和 720 项相关源码测试通过。四条独立 HTTP 路径在源码和当前隔离 wheel 上各复验一次;每个用例只跑原模型轮次。托管 CI 未查询。 验证覆盖源码和隔离 wheel。HTTP 与 Lark 端使用合成响应,控制面和消息编排使用实际入口。真实 App 的图片上传权限及线上采用仍待确认。

我的整体评价 / Verdict

请求修改。把原消息或文章确认过的 URL 传给现有 public source reader,在跟随重定向之前核对新目标。遇到未列出的目标,保留正文并让图片走已有的未核验提示。 让原私聊夹具经过真实 HTTP 重定向解析,覆盖直链、同域未列目标和跨域跳转。核对来源请求、原文、native img 节点、精确字节和送达状态。

English verdict: REQUEST_CHANGES at 215968b. The verified private reply can upload an unlisted same-host redirect target. Bind actual image URLs to the original source before fetching redirected bytes.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 c66527ef5feaaa3d39fec1cf9e432755849d0b0e,对照目标基线 6266c3ea409a926d6567294c02008d5ed4e7779f。

[P2] 同域重定向可以把未列出的图标为原图。 私聊原消息给出文章链接。正文引用文章中唯一列出的 chart.png,该地址返回 302,指向同域未列出的 unlisted.png。 Bot 上传了 unlisted.png 并将原请求标记为已验证送达。先跳到外域再跳回同域未列图片也会成功。 实际地址检查 原讨论

[P2] 历史补图会继续为刚被编辑的原回复发图。 登记同 App 同私聊的一条已核验历史回复。补图 worker 读回原回复后,在首次图片 GET 期间编辑该回复正文。 候选仍上传四张图,发出一条独立的「原图(按原文顺序)」消息,并将历史补图记为 delivered。相同编辑若发生在 worker 验证之前,上传和发送次数均为零。 补图前的授权复查

动机 / Motivation

在飞书私聊里查看答复与来源原图的用户。 当前答复先交付正文,图片送达由同一个收件箱继续处理。旧的正文回执只有在操作者登记指定的补图后才进入恢复。 精确目标基线在相同输入下发送原有 Markdown 正文一次,无 native img,也不会消费历史补图描述符。 直链在正文后发送一张 native img 并按字节读回。未编辑的历史回复能补发一条含四张图的消息,保留原回复回执和唯一模型 Turn。 验证使用实际源码 Core、私聊队列及 HTTP 解析,注入合成 HTTPS 与飞书响应。本轮未核验真实飞书客户端渲染、App 上传权限及补图采用。 错图会影响后续解读,旧图发到已编辑的回复语境也会失去原来的对应关系。

改动思路 / Approach

Core 持有原会话、原输入和授权。飞书 outbox 校验原回复、编排重试并把媒体回执交回原请求。匿名读取器按核定的公开来源取图。 沿用现有 URL 读取和授权回调,在下一跳获取与外部媒体写入之前校验两处已有来源。 正文先送,补图重试沿用现有队列和字节回读。直链及未编辑历史回复的行为均已复验。

具体改动 / Changes

关键代码讲解

图片候选取自原私聊或文章里的链接。当前 HTTPS 读取器会跟随重定向,补图只在取到字节后比较最终域名和 query。相同输入直接停在外域时没有上传,但外域已被访问。URL 来源检查 重定向分支

历史描述符将现有会话、原回复和图片摘要固定在原投递记录。恢复先读远端原回复,然后获取图片。后续写入回调复查本地来源和授权,远端原回复在这期间可以变动。补图使用独立的队列发现和原 App 投递。模块基线只增加当前实现的体量记录。原回复回读 补图授权 队列发现 诊断基线

按基线公开读取约束与原私聊媒体回读要求,原私聊正文与 native img 已验证,新正文与图片重试已验证。实际图片来源、历史原回复在外部写入时仍有效两项未满足。公开来源契约 私聊图片与写入前核验

对主干的风险 / Risks

同域 302 和跨域后跳回的组合都能让未列图片进入已验证回执。历史对照中,先编辑会阻止媒体写入;把同一编辑移到图片 GET 期间即可触发四次上传和一条补图,原 Core 请求、Turn 和首次送达回执都保持原值。

语义与 CI 对齐

本地 42 项定向测试和 standard premerge 的 13 项选中检查通过。独立基线与候选合计覆盖四条 HTTP 路径和三种历史回复时序。托管 CI 未查询。 验证使用实际源码 Core、私聊队列及 HTTP 解析,注入合成 HTTPS 与飞书响应。本轮未核验真实飞书客户端渲染、App 上传权限及补图采用。

我的整体评价 / Verdict

请求修改。在现有匿名读取器跟随重定向前,核对下一跳仍在原消息或文章确认的 URL 范围内。未授权时保留已送达正文和未核验提示。 让现有上传和发送授权回调重新验证原 Bot 回复的消息 ID、App、私聊和精确正文。在图片读取及发送预览后仍有改动或无法读回时,暂停该描述符的媒体写入。 通过原私聊入口重放直链、同域未列目标、外域终点和跳回同域四种 HTTP 路径。核对访问地址、图片节点、字节回读和 Core 送达状态。 分别在首次原回复回读前、图片获取期间和提供商预览期间改正文。核对上传和发送受阻,原消息回执保持一致,同时保留未编辑原回复的恢复路径。

English verdict: REQUEST_CHANGES at c66527e. Private image delivery accepts an unlisted redirect target, and historical recovery can send images after the original provider reply changes. Both are reproduced through the private delivery path and its readback.

@mergify

mergify Bot commented Nov 14, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 14, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 14, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 cf08b21866d7065824a3b4d0878bd1614a7ef6b1,目标基线 6fef4ea6b2d4a17438f51e5dee1b2fc02c1cba28。对照上一评审提交 c66527ef5feaaa3d39fec1cf9e432755849d0b0e,旧回复编辑的竞态已修;以下两项仍需修改。

[P2] 同域重定向可以把未列出的图标为原图。 私聊原消息给出文章链接。正文引用文章中唯一列出的 chart.png,该地址返回 302,指向同域未列出的 unlisted.png。 Bot 上传了目标图并在字节读回后标记原请求已验证送达;先跳到外域再跳回同域,结果相同。直接停在外域时不上传,但仍发出了外域 GET。 既有行内讨论。

[P2] 明确拒绝上传后,恢复权限也不能重试原图片。 正文已核验。图片的真实上传返回结构化 App scope 拒绝,没有创建资源。恢复权限后,将原请求交给已到期的同一媒体重试。 候选依然只保留上传已开始的标记,第二次没有向提供商发起上传,图片仍未核验。与已经创建资源、但应答丢失的对照表现相同。 私聊进入现有上传器。

动机 / Motivation

在飞书私聊里阅读图表及来源说明的用户,以及需要恢复原图片投递的维护者。 飞书私聊收到带来源的图表时,正文先到,原图随后以可读的 Lark 图片出现。对已送达的旧回复,经过核验的补图只能对应仍有效的原回复。 候选对直链完成正文和图片字节核验;历史回复在读取图片期间被编辑时不上传,在发送预览期间被编辑时不发送补图。普通新正文仍可送达。 图可以显示正常却来自未授权地址;明确没有发送的图也可能长期卡住,用户收到的原请求始终缺图。 本轮使用隔离的源码 Core、Lark outbox、真实 HTTP 响应解析和合成飞书提供商;真实租户权限、已安装 App 和客户端渲染未核验。

改动思路 / Approach

Core 保留原请求、会话和 Turn;Lark outbox 负责正文、补图及回执,匿名读取器只执行限定的公开 HTTP GET,现有资源上传器持有上传结果。 保留现有正文优先和有界媒体恢复。把两处边界补在现有读取和资源上传 owner 内:逐跳核对来源,区分已知拒绝和未知效果。沿用原 outbox、授权和回执,不加新队列或第二份业务状态。

具体改动 / Changes

关键代码讲解

  • 实际图片请求:原请求和文章只确认出发 URL。共享读取器的重定向分支 发出下一跳后,私聊调用方才按最终域名及 query 校验。因此同域未列图和先外跳再返回未列图都会被接受。
  • 绑定原媒体 phase:新媒体先以原绑定、请求和 phase 调用同一个上传器。上传护栏 在 provider 调用前写“已开始”;确定拒绝与未知应答都没有写入 key。重启读缓存 把两者都挡在任何第二次 IO 前。
  • 历史补图授权再验证 和 历史队列投影:原答复在图片 GET 中改变时零上传、零补图;预览之后才改变时已有资源可留,但未发送补图。原 Turn 和首次送达回执保留。
  • 作为对照,按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 在 6fef4ea6b2d4a17438f51e5dee1b2fc02c1cba28 的已接受边界,原正文与字节回读、历史原回复写入边界、独立正文继续 已覆盖;实际来源约束 和 明确拒绝可恢复 未满足。外部效果和原来源回读;实际 URL 与重定向范围。

对主干的风险 / Risks

目标基线在相同四个输入下只发送原 Markdown 正文一次,无匿名图片 GET 或 native img。 目标分支对照没有新增错误请求。当前头的直链保留有价值;从私聊看到的图片已经按字节匹配,仍不能证明它来自原文章。恢复权限的试验中,明确拒绝和已创建资源但丢回包都曾尝试一次;重启后各零次新上传。在另一个隔离对照里去掉明确拒绝留下的护栏,原请求即可上传并核验,正文不重发。未知效果的护栏仍应保留。

语义与 CI 对齐

精确头上,18 项工作区媒体、历史时序和 Steward 队列测试通过;同入口 App 图片/队列对照目标基线 18 项、候选 35 项通过。独立重定向在 base/head 各 4 个场景,权限恢复另有 2 个真实 outbox 场景。标准 premerge 13 项选中检查无失败;托管 CI 未查询。

我的整体评价 / Verdict

请求修改。历史授权复查已正确落在现有路径;保留这个修复和两个独立的媒体阶段。复用匿名 HTTPS 读取器,在发出每次跳转请求前检查 URL 仍在原请求或文章核定范围内;保留普通读取器的默认重定向行为。 由现有资源上传 owner 识别结构化且明确未发生效果的拒绝,允许仅该原资源重试;超时、未知结果、无结构诊断继续持有原上传护栏。 用原私聊入口覆盖直链、同域未列目标、外域终点和跳回同域四路;同时断言访问地址、图片节点与 Core 送达状态。 在现有拒绝用例加入权限恢复与进程重启:原 phase 恢复上传一次并核验,正文及 Turn 保持原值;未知应答不得重复上传。 这两个修补应复用现有匿名读取和资源 owner,分别验证访问范围与恢复结果。

English verdict: REQUEST_CHANGES at cf08b21. Historical edit handling now passes; unlisted redirect destinations can still be requested and verified, and a definitive upload rejection is unrecoverable after permission is restored.

…rk-source-image-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…rk-source-image-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 028bff2af57a72de3b68136dba40af48bee11c48,目标基线 859a23ee9534539536343206e23452253528dd07。

[P2] 原回复在最后一次用户消息校验时被编辑,图片仍会上传。 历史补图通过上传预览,读回旧回复后开始校验原用户消息。在后一次读操作期间编辑原 Bot 回复。 隔离的原私聊 worker 随后上传了一个图片资源。下一次校验才看到编辑并阻止补图消息。 上传前读取顺序

[P2] 明确拒绝上传后,恢复权限也不能重试原图片。 正文已核验。图片的真实上传返回结构化 App scope 拒绝,没有创建资源。恢复权限后,将原请求交给已到期的同一媒体重试。 候选依然只保留上传已开始的标记,第二次没有向提供商发起上传,图片仍未核验。与已经创建资源、但应答丢失的对照表现相同。 既有行内讨论

动机 / Motivation

在飞书私聊收取带图说明的用户,以及需要给同一条历史回复补图的维护者。 用户在私聊提供图表来源,Bot 先回正文,随后按原请求补发可读图片。历史回复的补图还须对应当前原文。 目标基线按原方式发送一次正文。五个对照都没有发起图片 GET 或上传。 候选能先送正文,再上传并核验获准的直链和原文列出的同站跳转。未列出的同站跳转与外站跳转在发起下一跳前停止。 确认旧回复已经编辑后仍可能创建外部资源。明确权限拒绝继续被当作效果未知时,原答复长期缺图。 复核覆盖隔离源码、真实 Chat/Core 流程、HTTP 响应解析及合成飞书。真实已部署 Bot、上传 scope 和客户端显示待验收。

改动思路 / Approach

私聊 outbox 持有原请求、图片阶段与回复定位符。匿名读取器限制访问目标,资源上传器持久化上传记录,Core 提供原会话与送达状态。 沿用当前 outbox 和资源上传入口,把原回复的最后一次读回落实到每次媒体写入前,并让资源记录表达明确拒绝。

具体改动 / Changes

关键代码讲解

  • 新提交把原消息和同站文章列出的 URL 交给匿名读取器,逐跳检查后才查询 DNS。独立 HTTP 对照中,外站、经外站跳回、同站未列地址都在下一跳前停止,列出的目标继续完成图片回读。历史缓存中的旧字节也经同一范围复核。来源边界 逐跳 GET 和 DNS
  • 历史补图绑定原回复和原 Turn。原 Bot 回复先被读回,随后才读原用户消息并重验绑定。两次读取之间的编辑会让后续上传使用之前的原回复结果。补图发送前的检查会看到编辑并停止发消息。历史补图授权 上传入口
  • 现有资源缓存先登记上传开始,随后保存成功返回的资源 key。明确 scope 拒绝和未知效果都只留下开始记录。重启时两类记录都会挡住原图片重试。读取和写入原资源记录
  • 历史补图由既有 worker 按到期时间拾取。普通正文和已失效的 Steward 卡片分别走已有入口。到期补图发现 原回复保护对照

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 的目标基线,正文与字节回读、实际来源约束 与 独立正文继续 通过。历史原回复写入边界 与 明确拒绝可恢复 仍失败。原会话与可回读外部效果契约 匿名访问边界

对主干的风险 / Risks

早期编辑和取图期间编辑均没有图片上传。飞书预览补图时编辑会阻止发消息。本轮把编辑移到最后一次用户消息读取期间,观察到一次资源上传、零条新消息,原会话和送达记录保留。

明确拒绝与丢应答对照都只尝试一次上传,重启后即使权限恢复也没有第二次尝试。隔离对照中,移除明确拒绝留下的记录后,原图片可继续上传并完成回读。未知效果继续依赖其原始记录防重。

语义与 CI 对齐

基线与候选各通过 116 项普通 App 图片和匿名读取对照,候选另通过 31 项补图、来源和队列用例。独立试验覆盖五种来源、两种上传结果和一种更晚的历史编辑时序。标准 premerge 的 13 项选中检查通过。

我的整体评价 / Verdict

请求修改。在最终用户消息和绑定核验后重读原 Bot 回复,再进入各资源的上传调用。发送补图前继续核验原回复。 在历史补图回归中,在上传预览之后的最后一次原用户消息读取期间编辑 Bot 回复,核对不上传图片、不发送补图,并保留原 Turn 和原送达记录。 在现有资源记录中保留可确证的无效果拒绝,允许该原资源重试。超时及应答丢失继续保留防重复记录。 对明确拒绝和已上传但丢应答分别恢复权限、重启,断言前者补同一张图一次并完成字节回读,后者不重复上传。

English verdict: REQUEST_CHANGES at 028bff2af57a72de3b68136dba40af48bee11c48. Redirect scope is fixed. The local private outbox still uploads after a late original-reply edit and cannot recover a definitively refused upload when permissions return.

…rk-source-image-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 766791a;精确基线 45cfd0c。

[P2] 明确拒绝上传后,恢复权限也无法补回原图。 Bot 已送达正文;图片上传返回结构化的权限拒绝,提供商确认未创建资源。权限恢复后,重启隔离 worker 并让原图片任务再次进入到期重试。 原任务没有再发出上传请求,图片持续未核验。首次已创建图片但应答丢失的对照留下同样的记录;那种情况下禁止重复上传是正确的。 原 P2 讨论

动机 / Motivation

在飞书私聊收到带图答复的用户,以及要为原回复补图的维护者。 用户给 Bot 一篇含图文章,解释已送达,但引用图可能只显示占位符。正文可以先读到;图片只有在对照原来源和读回真实字节后,才能计为送达。 精确基线只发一次正文,未对这组来源发起图片读取或图片上传。 候选会先送正文,再把原文明确允许的图作为飞书原生图片送回;来源无法确定时保留未核验状态。原回复在最后一次核验期间被编辑,现在也会在写入媒体前阻止上传。 已核验隔离 Chat/Core 与合成飞书接口。真实已部署 App 的上传权限、真实图片字节回读和客户端显示仍待验收;未查询托管 CI。

改动思路 / Approach

私聊 outbox 保留原请求和回复定位符,匿名来源读取器逐跳限制目标,既有资源上传器持久化资源记录,Core 保留原回复和送达状态。 先送原正文;每次图片写入前复核当前原消息及权限;读回字节后才给图片记送达。 保留现有 outbox 和上传入口。两种上传结果需要不同的重试规则,应由资源记录表达确定拒绝,无需复制队列或重放原答复。 直接图片和原文列出的同站跳转通过;同站未列、外站终点和外站跳回均在 DNS 或 GET 之前阻断。

具体改动 / Changes

关键代码讲解

匿名读取器逐跳验证目标。历史图片的授权回读把原 Bot 回复放到原用户消息之后检查;同一个竞态在旧 head 上传一张图,在此 head 上传和发帖均为零。图片阶段调用现有资源上传器,它先写入 upload_started;无论提供商明确拒绝还是应答丢失,后续读取都因缺少 image_key 停在同一处分支。上传记录和错误分支

6 个文件,+856/−33;其中生产代码 +431/−32、测试 +424。私聊模块增加净 388 行,度量基线从 2191 调至 2578,后续修复宜局限于现有上传 owner。docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 的验收映射:exact-image-source-and-bytes 与 historical-write-rechecks-original 已验证;recover-confirmed-refusal 仍未满足。验收依据 匿名来源边界

对主干的风险 / Risks

问题影响确认拒绝后恢复权限的原始图片;隔离测试重启后,候选仍不发出第二次资源请求。只在独立对照中移除已知无效果的记录后,同一原请求才完成一次上传和字节读回,证明剩余链路可恢复。真实结果未知的对照继续持有防重复护栏。

语义与 CI 对齐

Standard premerge 的 13 项选中检查、精确基线 561 项与候选 592 项私聊和匿名读取测试均通过;普通 App 图片及共享读取另对照 116/118 项。独立权限恢复反例仍失败,属于候选新增的媒体路径。 已核验隔离 Chat/Core 与合成飞书接口。真实已部署 App 的上传权限、真实图片字节回读和客户端显示仍待验收;未查询托管 CI。

我的整体评价 / Verdict

请求修改。上一版的迟到编辑问题已解决,P2 权限恢复仍阻断。由既有资源上传器记录可确证的无效果拒绝,恢复权限后只重试同一份原图;保留所有结果未知的上传护栏。 用明确权限拒绝与已创建资源但丢失应答两组用例,分别恢复权限并重启:前者补图一次并字节回读,后者仍零次重复上传;两组都保留原正文和原 Turn。 保留现有 outbox 和上传入口。两种上传结果需要不同的重试规则,应由资源记录表达确定拒绝,无需复制队列或重放原答复。 已核验隔离 Chat/Core 与合成飞书接口。真实已部署 App 的上传权限、真实图片字节回读和客户端显示仍待验收;未查询托管 CI。

English verdict: REQUEST_CHANGES at 766791a. Late original-reply edits are now blocked before upload, but a definitive no-effect refusal still permanently fences the original image after permissions recover. Preserve the fence for unknown outcomes.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ge-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ge-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 50b49e06000c0af4f359870bc3670991b2f90331,对照目标 80c6949727c1f239fd0b105dd01cf556091c8b02。完整 diff 涉及 7 个文件,+960/−40。

[P2] 原会话已在最终 Core 读取期间关闭,仍会上传图片。 私聊正文已核验,图片上传预览和末次飞书原消息读取都已返回。最终授权读到原 Session 仍可继续,在随后读取原 Turn 的事件期间,通过现有 App/Core 入口关闭该会话。 独立复现中,Core 已读回 closed,候选仍创建了一份飞书图片资源。发帖前的复核拦住补图和提示,原请求仍未标为完整送达。 最终 Core 授权读取顺序

动机 / Motivation

在飞书私聊接收图片,或从 App 停止、关闭同一个原会话的用户。 正文已在原私聊送达,原请求进入延迟图片交付。用户此时仍能关闭会话。 目标基线只有正文交付,七组均未创建后续图片资源。 本提交已挡住上一轮的两个反例:在最后一次飞书原消息读取期间提交 Stop 或 Close 时,都是零上传、零发帖。无控制的同一 Turn 仍先交付正文,再发送一份原图并核验字节。 隔离环境使用真实本地 Chat/Core、HTTP 解析以及合成飞书。已部署飞书 App 的有效上传权限、真实原图字节和手机端显示仍待验收。

改动思路 / Approach

Chat/Core 拥有原 Session、Turn 和 Stop;私聊 outbox 复用原用户消息、已验证回复和提供商资源记录。 新提交把普通补图的提供商来源复查移到 Core 授权之前。候选保留原回复绑定与补图发送前复查。

具体改动 / Changes

关键代码讲解

  • 普通补图的最终授权回调 先确认飞书原消息,再检查 Core。把 Stop 和 Close 分别放在末次飞书读取内,两组均阻止资源上传、媒体发帖和提示,原模型只运行一次。
  • 原 Session 状态先于 Turn 事件读取 取得 Session 状态,随后读 Turn 及事件。复现中,在这次事件读取开始时通过现有 Core 入口关闭已完成 Turn 的会话。关闭已落盘,此时该 Turn 没有新增 Stop 事件。回调沿用先前的可继续状态,随后执行资源上传。只挪动 Session 状态读取的隔离对照消除了这次上传,正常路径仍只送一次原图。
  • 匿名原图来源检查 在连接前约束来源。私聊回归覆盖历史原回复被编辑、明确上传权限拒绝后只补缺图,以及未知效果保留防重护栏。

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,original-text-and-images(原正文和获准原图)与 recovery-no-effect-denial(明确无效果拒绝的恢复)通过本地核验;effect-time-stop-close(原控制关闭后拦住新上传)仍失败。原会话控制和交付验收依据

对主干的风险 / Risks

已复现的外部效果是一份多余图片资源。发帖和失败提示仍被拦住。真实飞书环境与手机端验收有待具备对应证据。

语义与 CI 对齐

七组对照,目标基线 7/7,候选 6/7。隔离对照仅将 Session 状态读放到 Turn、事件与 Stop 之后,7/7,保持正常送图。当前精确头的 499 项私聊回归、152 项相邻回归与 13 项本地预合并选中检查通过。 托管 CI 未查询。

我的整体评价 / Verdict

请求修改。在读完原 Turn、事件及 Stop 后,最后重新读取原 Session 的可继续状态,再调用资源上传。用同一 Core 授权入口保留现有原来源复核和发帖前检查。 将 Close 提交放在末次飞书来源读取后的 Core events_after 内,断言关闭状态落盘后上传、发帖及提示均为零;无控制路径仍交付并读回同一原图。

English verdict: REQUEST_CHANGES at 50b49e0. Stop and Close during the provider read now block uploads. A Close persisted during the later Core event read still allows one resource upload before the supplemental post is blocked.

@mergify

mergify Bot commented Nov 14, 2026

Copy link
Copy Markdown

Hi @loopx-agent, the DCO Sign-off check did not pass. Please inspect
its details first: checkout, fetch, timeout or infrastructure errors
need their own recovery, not a rewrite of otherwise signed commits.

If the log confirms a missing Signed-off-by trailer, amend the
affected commit with git commit --amend -s; for multiple commits,
use an interactive rebase against the current base from the correct
base-repository remote and sign off each affected commit. Push the
rewritten PR branch with git push --force-with-lease origin HEAD.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ge-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent force-pushed the codex/lark-source-image-return-20261114 branch from 3a4f896 to 22acd4c Compare November 14, 2026 17:44

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 22acd4cbe795529afd33608e52cf560e321b0468,对照目标 74ca883d5bd3e4bc64671bac54210eac9e97ed05。完整 diff 涉及 7 个文件,+983/−39。

[P2] Stop 或关闭已先提交,补图仍能开始上传。 正文已核验,终次飞书来源复查已返回。在 Core 完成 Stop 检查后、读取 Session 时提交原会话 /stop。另一次在实际写入上传开始凭据前,从 App/Core 关闭原 Session。 两个时序中,控制均已落盘,图片上传均尚未开始。候选随后各创建一份飞书图片资源。发帖前复核挡住了补图和提示,原请求未标记完整送达。 最后两次 Core 状态读取

动机 / Motivation

在飞书私聊接收图片,或从 App 停止、关闭同一个原会话的用户。 正文已在原私聊送达,图片仍在延迟补发,用户已有可以停止或关闭原会话的入口。 目标基线只交付正文,九组都没有补图上传。 候选修复上一轮在 Core 读取事件中关闭会话的反例;更早的飞书来源读取、上传预览和开始取图前提交的控制也都拦住上传。正常路径先交付正文,再发送一份原图并核验字节。 隔离环境使用真实本地 Chat/Core 和 HTTP 解析、合成飞书提供商。已部署飞书 App 的有效权限、真实原图字节和真机显示仍待验收。

改动思路 / Approach

Chat/Core 拥有原 Session、Turn 和 Stop;私聊 outbox 复用原消息和提供商资源凭据。 新提交让正常补图与恢复共用一处原授权检查,先核对原 Turn 和 Stop,再读取 Session。这个顺序解决了上一轮的 Close 反例。让原来源的 Stop、Session Close 与这次图片上传开始共用一个可验证的准入顺序。复用现有 Core 控制与资源凭据,使先落盘的控制阻止上传;已经准入的尝试保留原有未知效果护栏和消息发送前的复查。

具体改动 / Changes

关键代码讲解

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,original-text-and-images 与 recovery-no-effect-denial 在本地验证通过;effect-time-stop-close 仍失败。原会话上传、发送及字节读回约束

对主干的风险 / Risks

可能在用户停止处理后留下额外的图片资源。已复现实例只影响资源创建,原回复保持未完整送达。

语义与 CI 对齐

九组独立对照,基线 9/9,候选 7/9。临时对照在资源调用前再次读取原授权并撤回本次未启动的尝试标记,9/9;它只定位本次失败原因。候选 150 项相邻回归和 13 项本地预合并选中检查通过。 托管 CI 未查询。

我的整体评价 / Verdict

请求修改。在同一私聊入口分别把 Stop 放进末次 Session 读取,把 Close 放进上传开始凭据写入前。读回先前控制,断言两组均为零上传、零发帖、零提示,正常路径仍按原顺序且只送图一次。 隔离环境使用真实本地 Chat/Core 和 HTTP 解析、合成飞书提供商。已部署飞书 App 的有效权限、真实原图字节和真机显示仍待验收。

English verdict: REQUEST_CHANGES at 22acd4c. The previous late Close is fixed. A Stop during the final Session read or a Close before recording upload start still permits one resource upload. Both supplemental posts are blocked.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 db69577de0ab1afadc38b5690ce5c577642181fe,对照目标基线 74ca883d5bd3e4bc64671bac54210eac9e97ed05。

[P2] 历史补图在上传意图落盘后仍沿用已失效的原消息授权。 对一条已送达的原答复执行历史补图。让原飞书用户消息或原 Bot 回复在本地 upload_started 落盘之后、首次 provider 图片上传之前发生编辑。 两次复现中 worker 各创建一份新图片资源并写入成功资源回执。后续复核挡住了补图消息,历史补图仍待处理,原正文回执和 Core 消息保持原值。 图片 dispatch 接入处

动机 / Motivation

在原飞书私聊里读到解释,随后等待同一原消息图片的用户。 运维为一条已经送达的历史答复补图。补图开始前,原用户消息或 Bot 回复仍可能被编辑。 目标主干的历史答复没有自动补图入口。该补图分支及上传行为由此 PR 引入。 正常私聊先发正文,后发原图并下载核验字节。旧评审两处 Stop 和 Close 时序均不再启动上传,正文和原 Turn 保留。 本次运行实际本地 Core、私聊 worker 和 CLI 启动边界测试,飞书 provider 和外部图片使用隔离夹具。部署的飞书 App 权限、真实原图字节和手机展示仍待验收。 上一轮 Stop 与 Close 评审

改动思路 / Approach

私聊 outbox 从飞书读取原消息与 Bot 回复,资源 journal 持有上传回执。Core 控制原会话是否仍可继续,CLI runner 在进程启动时持有本地锁。 终次源校验先读飞书,随后写 upload_started,最后执行本地 dispatch guard。这个 guard 重新核验 Core 状态和绑定。两份飞书原消息的核验结果在图片资源调用前没有更新。Core 锁与原会话核验

具体改动 / Changes

关键代码讲解

  • image_authorized 串起原用户消息的内容核验及历史 Bot 回复匹配。资源上传助手随后持久化 intent 再调用 runner。隔离复现确认每项编辑发生时已有 intent,图片上传计数仍为零。真实本地 worker 接着发起一次 provider 写入,资源回执落盘。 历史回复的内容匹配 上传意图和后续派发
  • 上一轮 Stop 在最后读取 Session 时提交、Close 在写入上传开始标记前提交。当前版本两组都变为零资源上传、零补图、零提示。现有测试用实际 subprocess.Popen 边界检验锁在启动时持有、等待响应之前释放。 本地派发实现 进程启动和释放测试
  • 历史补图无描述文件时不执行。字节读回错误恢复后,保持同一补图发送和原回复。完整差异为 11 文件、+1,156/−61。 原图消息读回

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 的现有要求,original-body-and-image-byte-readback 和 committed-local-controls-before-spawn 已复验。same-provider-source-at-media-dispatch 未满足。 来源更新与效果的验收

对主干的风险 / Risks

编辑已提交的两种输入都会在飞书侧留下额外资源,即使后续拦住补图消息。保留原私聊内容核验和本地控制锁,并把已知未启动的失败与不确定的上传分别交给现有资源 journal 恢复。

语义与 CI 对齐

本轮相邻用例独立通过 633 项。 两个独立的迟到编辑用例均重现,字节读回对照通过。在隔离副本中只把现有来源检查移到上传意图落盘后再次执行,3 个对照均通过。6 项直接和 13 项选中的标准预合并检查无失败。本轮没有查询托管 CI。 本次运行实际本地 Core、私聊 worker 和 CLI 启动边界测试,飞书 provider 和外部图片使用隔离夹具。部署的飞书 App 权限、真实原图字节和手机展示仍待验收。

我的整体评价 / Verdict

请求修改。在持久化上传意图后、调用图片资源 API 前重核原用户内容和原 Bot 回复,保留现有 Core 的 Stop、Close 与绑定锁。明确未启动且源已变化时恢复该尝试原先的资源记录。已经发起但结果未知时沿用现有恢复规则。 对两个原消息分别在 upload_started 落盘后注入编辑,核验零图片资源创建、零补图消息和原回复回执相同。稳定来源仍按原顺序读回全部图片字节。

English verdict: REQUEST_CHANGES at db69577. The previously reported local Stop and Close cases pass. A historical repair still uploads one provider resource when the original user message or Bot reply changes after the upload intent has been recorded but before dispatch.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 b4921014ad67588441d7c5cf58f20a486f37c229,对照 GitHub 目标基线 74ca883d5bd3e4bc64671bac54210eac9e97ed05。

[P2] 最后一次读取 Bot 回复期间,刚核验的原用户消息仍可失效。 历史补图写入 upload_started,worker 完成对原用户文本的终次读取,再向飞书读取原 Bot 回复。让原用户消息在这次读取期间被编辑,首次图片上传还未发起。 候选仍发起一次图片资源创建并落盘一条成功回执。后续复核挡住补图消息。原回复、Core 消息和原 Turn 保持,历史补图仍待处理。 终次来源核验

动机 / Motivation

在原飞书私聊阅读历史答复及其补图的用户。 历史原消息可能在 worker 分两次读回原用户输入与 Bot 回复期间被编辑。 目标主干没有历史补图。上一候选在上传意图落盘后、读取开始前编辑任一原消息都创建了资源。 本次使用上一轮独立夹具,上传意图落盘后编辑原用户消息或原回复,两种情况均为零资源、零补图和零新回执。稳定原消息的四张图片仍可先挂起、后以原字节读回。 真实本地私聊 worker、Core 和资源 journal,飞书 API 与图片端点使用隔离夹具。真实飞书 App 授权、原图字节、手机展示和当前托管 CI 尚待验收。 上轮精确评审

改动思路 / Approach

历史 outbox 通过飞书先读原用户消息,再验原 Bot 回复。资源 owner 写 intent 后重新跑这两步,再将本地 Core 的绑定和会话锁带到 CLI 启动。 新时序发生在终次检查内部。第一条消息的最新结果已经返回,第二条仍在读取。Core 锁守住本地的 Stop 和 Close,飞书的编辑仍可在两次读之间发生。 本地派发锁

具体改动 / Changes

关键代码讲解

  • 把既有 before_upload 放到 intent 后执行,已挡住立刻编辑两条原消息的反例。原历史状态仍在到期后恢复,测试以原始四图字节检查读回。历史读回
  • image_authorized 先取原用户内容,再读取旧 Bot 回复。在第二次读取时改第一条的内容,实际私聊 worker 仍向模拟飞书发出一次创建并缓存资源。因果对照在后续读完成后复读第一条,零创建、零回执,稳定读回通过。当前增量两文件、+52/−5,完整 PR 11 文件、+1,204/−62。 终次来源的读取次序

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 核验,post-intent-source-edits 和 ordered-image-readback 通过。coherent-provider-proof-before-upload 尚未满足。 来源变化后的效果约束

对主干的风险 / Risks

原始来源变化后,外部资源已建立,后续消息复核只能拦住发帖。因果对照只定位两次读取之间的具体竞态。实际修复仍需界定 provider 证据的有效边界。

语义与 CI 对齐

当前聚焦测试 69 项通过。 标准预合并选中的 13 项全通过。新增独立复现一个失败、一个稳定字节对照通过。隔离因果对照在 Bot 回复读取之后复读原用户消息,两项通过。该对照只证明被读到的原用户内容失效。 真实本地私聊 worker、Core 和资源 journal,飞书 API 与图片端点使用隔离夹具。真实飞书 App 授权、原图字节、手机展示和当前托管 CI 尚待验收。

我的整体评价 / Verdict

请求修改。让实际资源准入使用同一时点的两个原消息证据。至少覆盖读取第二条原消息期间第一条被编辑的交错,并继续保留 Core 的 Stop、Close 和绑定锁。若 provider 能提供可绑定的消息版本或条件请求,沿现有 provider 边界使用;对确定未开始的调用恢复原资源记录。 在终次 Bot 回复读取期间编辑已读取的原用户消息,验证零图片资源、零新回执与零补图,原结果可读回。稳定原消息仍只送一份补图并核验四张图的原始字节。

English verdict: REQUEST_CHANGES at b492101. Both previous post-intent edits are now blocked. The historical worker still creates one resource when the inbound message changes during the final Bot reply lookup, after its own final lookup and before upload.

Comment thread loopx/extensions/lark/return_files.py Resolved
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 9e0a6eda730c58b71a249ae37614e6019a37e695,对照目标基线 74ca883d5bd3e4bc64671bac54210eac9e97ed05。

[P2] 共享读取方法改名遗漏 8 项群聊 Stop 回归。 运行三个群聊 Stop 回归测试族,注入点仍读取旧方法名。 目标基线与前一提交均通过 8 项。当前提交 8 项均报 AttributeError,实际并发读、撤权和发送断言未运行。隔离副本只更换测试注入名称,8 项恢复通过。 已改名的群聊调用 旧测试注入

[P2] 配对读取返回后,本地派发锁前的编辑仍产生资源。 上传意图已经落盘且配对 mget 已返回。在进入本地 Core 锁前编辑原用户消息。此时首次图片调用尚未发起。 实际隔离私聊 worker 仍创建一份图片资源并写入成功回执。后续校验拦住补图,原正文、Core 和历史状态保留。 终次读取后的派发锁

动机 / Motivation

在原飞书私聊读回图片的用户,以及在原群聊话题停止已完成任务的用户。 历史补图要验证原用户消息和原 Bot 回复。群聊 Stop 也复用双消息读取,依靠既有回归覆盖同时读源与身份后拒绝撤权。 目标主干的群聊 Stop 用例通过。前一候选分开读取用户消息和 Bot 回复,在第二次读取期间发生编辑会留下一个图片资源。 现在用同一个 mget 读取两个消息。独立用例在此请求返回前编辑时,上传、发帖和资源回执均为零。稳定来源恢复了同一份四图补充消息,并按顺序核验字节。 本轮使用真实本地 Core 与私聊 worker,模拟飞书 API。作者报告另有在两个实际私聊的四图字节读回,范围是部署切片。本次独立评审未接触生产租户、设备或托管 CI。

改动思路 / Approach

现有私聊 worker 以一次 raw mget 读取两条原消息,资源 journal 保留原上传身份,Core 在 CLI 启动前核对本地 Stop、Close 与绑定。群聊 Stop 复用同一读取器定位命令及话题根。 改为一次 mget 修掉了上轮两个原消息分开读取的竞态。仍需确认配对结果返回以后、资源发起以前的来源变化。 历史消息配对

具体改动 / Changes

关键代码讲解

  • 一次 mget 核对两个原消息的 ID、发送者、原会话及正文。原 Bot 的 raw post 用 content_v2 验原文。群聊读取共用该方法,三个既有测试族还在旧名称注入。 原消息正文和发送者校验
  • 上传意图后从原资源 journal 继续,已知未启动时恢复此前回执。配对返回前编辑时上传为零。返回后、进本地锁前编辑时创建了一份资源。隔离对照调整终次读和本地锁次序,挡住该注入。 资源派发次序
  • scope 拒绝、来源 URL 逐跳校验和字节恢复继续复用现有 owner。确认完整差异为 11 文件、+1,279/−75,本次增量为 3 文件、+113/−51。 来源约束

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 核验。paired-original-feishu-source 与 ordered-native-byte-readback 通过,completed-stop-group-coverage 与 fresh-provider-proof-before-image-effect 未满足。 来源变化与效果的验收

对主干的风险 / Risks

群聊 Stop 的测试因改名中断,缺少仍可运行的并发与撤权断言。资源创建已发生时,后续检查只拦住补图消息。隔离因果对照定位了具体时序,真实飞书上的派发与编辑边界仍待证。

语义与 CI 对齐

110 项聚焦检查通过,8 项失败。两份基线及只更新测试名的隔离对照各 8 项通过。独立补图矩阵 4 项通过、1 项失败;因果副本 5 项通过。标准预合并 13 项自动检查通过。 本轮使用真实本地 Core 与私聊 worker,模拟飞书 API。作者报告另有在两个实际私聊的四图字节读回,范围是部署切片。本次独立评审未接触生产租户、设备或托管 CI。

我的整体评价 / Verdict

请求修改。保留群聊读取的原接口,或把既有测试注入迁到统一读取方法。完整运行 8 项并发与撤权用例。 定义提供商证据有效到哪一步。若飞书提供可绑定的消息版本或条件写入,沿现有派发边界使用。否则明确实际保证,并缩短终次配对读取到派发的窗口和补齐交错测试。明确未启动时恢复原资源记录。 在最终配对结果返回后、资源派发前编辑原消息,观察零资源、零补图和原回执,再核对稳定四图及 Stop/Close。

English verdict: REQUEST_CHANGES at 9e0a6ed. The paired Feishu read fixes the earlier two-read race. Eight existing group Stop cases fail on the renamed method, and a source edit after the pair returns still creates a resource before the supplemental post is refused.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 35cb1b225da3ef34c636f18c03b16971d872fa1e;对照目标基线 74ca883d5bd3e4bc64671bac54210eac9e97ed05。

[P2] CLI 确定未启动时,原补图仍被永久锁住。 私聊补图通过预览和最终配对读取,资源意图已落盘。此时 lark-cli 启动文件短暂不可用,Popen 抛 FileNotFoundError;随后恢复文件并重启 worker。 没有上传、发帖或新模型 Turn,但资源仍标为 upload_started。恢复 CLI 后,下轮把这条记录当作未知上传,原四图始终无法交付。 触发分支

动机 / Motivation

在原飞书私聊等待补图的用户,及处理既有 outbox 的操作者。 已有一条正文已验证、没有原生图的私聊答案。原 outbox 在同一工作链补四张图,短暂 CLI 启动失败发生在上传意图之后。 目标基线没有历史补图;既有资源 journal 用 upload_started 区分未完成回执,Lark goal transport 已单独表示明确的启动失败。 没有上传、发帖或新模型 Turn,但资源仍标为 upload_started。恢复 CLI 后,下轮把这条记录当作未知上传,原四图始终无法交付。 恢复了既有群聊 Stop 入口;终次读取移入本地 dispatch locks 后,进入锁前编辑会留下零上传、零补帖。最终来源读取超时可恢复四张图;真实子进程已启动但不给 ACK 时则只保留一次上传。 使用实际本地 Core、worker、文件锁和 subprocess,飞书与来源 HTTPS 使用隔离夹具。作者报告的两个真实私聊逐字节结果只覆盖已采用的部署切片。此轮未核对生产、设备或托管 CI。当前飞书上传请求未携带来源版本条件,最后读回后发生编辑仍可能留下无关联资源;补帖会再检查。

改动思路 / Approach

既有私聊 outbox 拥有原回复与补图重试。Core 持有绑定、Stop 及 Session;Lark 进程 runner 知道子进程有没有启动,资源 journal 决定能否恢复同一资源。 Reuse the exact point where the native CLI is started to distinguish safe recovery from ambiguous external effects. Verify the original provider source and local controls, then attempt the exact authorized resource once; re-read the byte result.

具体改动 / Changes

关键代码讲解

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 的当前基线约束,paired-original-feishu-source 已验证;completed-stop-group-coverage 已验证;ordered-native-byte-readback 已验证;recover-confirmed-no-effect 未满足。基线验收依据

对主干的风险 / Risks

CLI 更新或执行路径的短暂失败会把合法补图卡在 pending;重启或恢复 CLI 都无效。对照确认修复可以局限在可证明未启动的分支,同时保留已启动结果未知时的防重。

语义与 CI 对齐

286 项原消息、来源 URL、已知权限拒绝及字节读回相关检查通过;相邻群聊 Stop 集合 98 项通过。独立故障矩阵 3 通过、1 失败;隔离因果对照四项通过。Standard premerge 六项直接、13 项选中均通过。 使用实际本地 Core、worker、文件锁和 subprocess,飞书与来源 HTTPS 使用隔离夹具。作者报告的两个真实私聊逐字节结果只覆盖已采用的部署切片。此轮未核对生产、设备或托管 CI。当前飞书上传请求未携带来源版本条件,最后读回后发生编辑仍可能留下无关联资源;补帖会再检查。

我的整体评价 / Verdict

请求修改。在现有 Lark 进程/资源边界保留明确的未启动结果,对该结果恢复上一个资源记录。已启动后超时、无 ACK 或通信出错继续按未知效果保留锁。 Run historical private worker against simulated provider and a real CLI subprocess. Fail Popen after the final successful source read; restore executable and restart exact worker.

English verdict: REQUEST_CHANGES at 35cb1b2. The prior source-lock and group Stop checks pass. A definite pre-exec CLI launch failure leaves upload_started fenced; restoring the executable and restarting still cannot deliver the original supplement. Preserve the fence for actual unknown effects.

Comment thread loopx/extensions/lark/return_files.py Resolved
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
…ge-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

评审提交 3c420317438f20fecc2dd26bff9a120f7217f486,目标基线 6dfd1c90c4c1a186c43de0a2c05243fa14b5a76e。

[P2] 文件描述符恢复后,确定未启动的上传仍锁住原补图。 原私聊正文已核验,上传预览和最后配对读取完成,upload_started 已持久化。在本次真实 Popen 建管道时使调用进程暂时用尽文件描述符。 真实 Popen 返回 EMFILE,子进程未启动。资源恢复并重启同一 worker 后仍为零上传、零补帖,原记录被锁住;稳定保留原正文、Core 证据及 Turn。 在现有 CLI 进程边界保留明确的未启动结果,并让资源 journal 恢复原记录。最小可验证修复是覆盖创建管道时的 EMFILE;保留已启动后超时、无 ACK 和未知通信结果的锁。 触发分支

动机 / Motivation

受影响的是在原飞书私聊里等原图的用户,以及处理失败补图的维护者。 正文已经核验。补图写下上传意图后,CLI 尚未启动就遇到文件描述符耗尽;即使资源恢复,重启 worker 也无法补图。 本次修复已让可执行文件暂时消失的情况恢复。文件描述符耗尽仍留下上传已开始的记录;首轮和恢复后均为零上传、零补帖,原正文与 Turn 保留。 验证使用真实本地 Core、worker、文件锁和子进程,飞书及来源 HTTPS 为隔离夹具。作者报告的真机结果属于已部署切片,本次精确提交没有独立真机验收。

改动思路 / Approach

沿用私聊的正文和补图 outbox;原正文先核验,同一 worker 再检查原 App、两条原消息、会话和 Stop,再启动派发。Core 保有授权;Lark runner 知道子进程是否启动,资源 journal 才在这个事实基础上决定能否恢复。原请求不需要用户重发,不应在未知效果下重复上传。既有 worker 与 journal;进程边界区分启动,Core 锁佐证同一授权;共享 reader 无新任务权限。

具体改动 / Changes

关键代码讲解

  • 正常答复 与 历史补图 都沿原私聊。历史描述符绑定原回复、原 Turn 和有序原图,不会启动新模型。回复扫描器先处理未送的正文,再做媒体重试。
  • 来源核验和派发锁 使用 同一 Core 路径,复用群聊原读取入口。匿名 HTTPS 在每跳 DNS 前检查许可目标;普通不带 URL 集合的调用保留。原消息或同域文章未列出的图不会获准取回。
  • CLI 派发 在锁内 Popen,锁外等待响应;资源 journal 用 ACK、scope 拒绝和明确未启动区分恢复。已知 ENOENT 修复通过,EMFILE 仍会保持原锁。测试覆盖两个进程状态,模块行数基线从 2191 改到 2578,完整 diff 为 11 个文件 +1390/-73。

按 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 在 6dfd1c90c4c1a186c43de0a2c05243fa14b5a76e 的版本,paired-original-feishu-source、completed-stop-group-coverage 和 ordered-native-byte-readback 在隔离路径通过;recover-confirmed-no-effect 未满足。

对主干的风险 / Risks

已知 CLI 路径消失和最后配对读取超时均恢复,一次交付四张原图且逐字节读回;已启动后结果未知仍保持一次上传、零重发;锁前原来源编辑仍为零资源写入。 在现有真实子进程夹具中,只有受控 Python 进程的文件描述符上限在 Popen 期间变化,首次产生 EMFILE 后恢复原上限。旧候选 35cb1b2 和此次候选都留住错误护栏。目标主干没有历史补图入口;本缺口随该能力进入。仅补这一个 errno 的隔离对照,恢复后创建四个资源、只发一份补帖、逐字节读回,无新 Turn。

语义与 CI 对齐

精确源运行:私聊重点 86 项通过,另四项在并发批次的初始组聊等待 running 超过既有 5s,未触发待测 Stop;随后相同四项单独在 head/base 各 4/4,首次超时原因未定。共享 CLI/HTTPS/App 图片 127 项通过,基线共享集合 124 项通过;标准 premerge 6 项直接、13 项选中均通过。 现有 guard 覆盖 Popen,响应等待在 guard 外;它只为一组路径和权限 errno 撤回标记。EMFILE 在 Popen 建立 stdout/stderr 管道前后、创建任何子进程之前即可返回,但不在撤回分支中。 独立反例仍失败。没有查询托管 CI。线上 scope 安装、真实客户端显示和最后一次 provider 源读以后发生的外部编辑另有边界:原消息在发帖前仍会复核。

我的整体评价 / Verdict

请求修改。现在的版本能恢复「可执行文件短暂消失」,还不能恢复真正未启动的资源耗尽情形。在现有 CLI 进程边界保留明确的未启动结果,并让资源 journal 恢复原记录。最小可验证修复是覆盖创建管道时的 EMFILE;保留已启动后超时、无 ACK 和未知通信结果的锁。 观察到私聊 wire 中的原生 img 节点和有序字节,未独立观察此精确提交的真实飞书客户端渲染。真机客户端与正式上游版本的采用验收。

English verdict: REQUEST_CHANGES at 3c42031. Real Popen EMFILE leaves the original image upload fenced although no child started. Recover that known no-effect case and preserve the fence when a started upload has an unknown outcome.

Comment thread loopx/extensions/lark/return_files.py Resolved
…rk-source-image-return-20261114

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

评审提交 764c7097720f7167f64e07cb370cd9dc8efbbcd1,目标基线 af92301ab4cc67d209e64c115eb6694e3c74ceb7。没有发现阻塞本次恢复修订的问题。上一头的 EMFILE 发现已用同一独立用例复验。上一轮评审

动机 / Motivation

等图片的私聊用户已经收到正文。维护者需要用原消息与原 Bot 补齐这份答复。 旧提交在上传意图持久化后遇到真实 Popen 的 EMFILE,CLI 尚未启动,重启同一 worker 也没有补帖。候选在确认未启动后恢复原资源记录,下一次由原 worker 重新验源。 我在源码和这一精确提交构建的独立 wheel 中观察到,首轮没有上传,重启后只补一条含四张原图的帖,逐张按顺序读回字节。重提不增加上传或新 Turn。 验证使用真实本地 Core、文件锁和子进程,飞书和匿名 HTTPS 用隔离夹具。作者的线上证据属于其已部署版本。 本次精确提交的飞书客户端显示、实际安装和发布采用仍未独立核验。

改动思路 / Approach

基线已有答复 worker、Core 权威和资源记录。本次延用这些 owner,补齐一次原私聊的已完成正文与有序原图。 只有现有 native guard 知道 Popen 是否真正启动。它在确认未启动时先释放来源锁,再持资源锁还原记录。可能已创建的资源继续等待原回执。 用户收到正文后无需重发任务。补图重新核对原 owner、原 App、原回复及 Core 会话和停止状态。

具体改动 / Changes

  • 已完成答复先送正文。历史补图只接受指向原回执的本地描述符,验证原消息、原回复和每张图的摘要。匿名 HTTPS 在接触每跳前核对许可 URL。原私聊恢复 · 来源检查
  • 文件描述符在管道创建时耗尽,资源未生成。释放原来源、绑定和会话的 guard 后,资源锁内恢复旧记录。正向已证的恢复与未知 ACK 仍按各自回执处理。资源恢复 · 进程边界

以基线的 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 为准,核对了 paired-original-feishu-source、completed-stop-group-coverage、ordered-native-byte-readback、recover-confirmed-no-effect。全分支 11 个文件(+1420/−73)。本次复审增量为两个路径(+49/−19)。

对主干的风险 / Risks

同一独立夹具在上一头两种已证未启动场景均卡住,当前头两个场景均恢复。其余五个正负对照在两个 revision 一致。 已保留原 App-scope 拒绝的旧资源记录,随后正常恢复。已启动后无 ACK,或同步 runner 在创建资源后也抛 EMFILE,均保持一个未知上传,重试零补帖。锁前原消息改写为零上传、零补帖。 当前私聊 48 项、相邻群聊与投递 75 项和共享 CLI、HTTPS 与 App 图片 127 项通过。主干共享套件 124 项通过。主干群聊有一项在 fixture 等待 running 时超时,同一用例随后在两端单独通过。 标准 premerge 的 6 项直接检查和 13 项自动检查中,语义词汇扫描达到 120 秒上限。从同一精确头与同一目标基线单独重跑该命令均通过。综合运行仍记为一次超时,原因未确定。 未查询托管 CI。飞书没有与源消息版本绑定的条件上传,最后一次核验后的外部编辑仍需在发帖前发现。运行范围覆核同一消息和原始资源效果。

我的整体评价 / Verdict

批准这次原私聊恢复修订。本轮修订检验同一个原生帖的资源派发和回读。客户端渲染器与界面没有代码改动,测试观察了实际 provider wire、原回复和四份图片的字节。 本次精确提交的飞书客户端显示、实际安装和发布采用仍未独立核验。

English verdict: APPROVE at 764c709. A real pre-spawn descriptor failure now recovers four original images exactly once. Post-start uncertainty and changed-source refusal remain enforced.

@mergify

mergify Bot commented Nov 15, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 15, 2026
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify mergify Bot removed the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 15, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

评审提交 b9e3060caee69ed3459f7ea9da3cee03fcc89087,目标主干 b46a76d2d64b3c14877bdf288953c56ae1c7793b。

动机 / Motivation

收到私聊正文却还等原图的用户,以及从设置确认补图是否已完成的操作者。 正文已送达,补图因 App 权限或图片字节核验暂未完成;设置页面应继续显示待办,最终由原 Bot 在原会话交付。 实际设置 HTTP 在权限缺失时持续显示一项待送达,在字节不符时持续显示一项待核验。恢复后仍是同一原答复,四图有序回读,只有一张补图帖,没有新 Turn,另一 App 计数始终为零。 当前证据来自隔离的真实本机 HTTP、Core、子进程与 wheel;飞书和源站用测试夹具。 作者的真机与线上采用证据属于其部署切片;本轮没有独立验证该精确提交的线上采用或飞书真机显示。

改动思路 / Approach

复用原私聊 worker、Core 来源护栏和资源回执。设置只读当前关联与待处理计数,只有已完成且没有待补图的记录可以复用元数据。 把待补图判定留在现有投递状态 owner。已完成历史只缓存关联和布尔标志,更新后重新读取;设置不能启动上传或扩大授权。

具体改动 / Changes

准确差异 11 个文件(+1430/-75)。与上次评审相比,相关内容变化集中在私聊设置计数、对应回归和模块度量记录。

关键代码讲解

  • Feishu 设置的读回投影:上一候选没有精简缓存;当前同条件两次设置请求对已完成记录只读一次正文,待补图仍读两次。单独移除待补图缓存保护时,两次响应都错误显示零,原记录仍是 pending。保留每个 App 的状态和只读边界。
  • 原来源与派发护栏 和 接触 DNS 前约束每跳:配对核验原用户输入和原 Bot 回复,保留原本地控制锁直到 CLI 开始。已观察到的晚编辑、Stop/Close 或不在原来源内的目标拒绝。飞书端最后读取与上传之间的更新仍可能留下未附到回复的资源;发帖前继续复核。
  • 原资源恢复 和 逐图字节读回:确认 CLI 未启动或结构化的 App 权限拒绝可以沿原记录恢复。已经创建资源却无 ACK 的负例保持一个上传、零补帖,不盲目重发。

依据 主干会话与异步交付协议:

  • paired-original-lark-source:每次原生发送与恢复复核原 App、私聊及消息来源。
  • bounded-media-effect:原授权失效时拒绝,区分实际未启动和提交情况未知。
  • ordered-byte-readback:补图保持资源顺序与原字节;重复处理不重发正文和图片。
  • settings-pending-readback:只有局部补图真正验完才清除同一 App 的待补图。

对主干的风险 / Risks

当前两组私聊专项分别通过 31 和 36 项,有重叠;共享源站、CLI、图片与读回套件为候选 184、基线 181 项通过。独立 7 项 spawn/权限检查和 2 项实际设置 HTTP 检查通过,同一 9 项也从精确 wheel 运行通过。标准 premerge 的 6 项直接检查和 13 项选中检查均通过。 全量控制面类型检查在两边同一 shadow 测试行报 TS2345,错误正文逐字相同;本差异不改这条路径。#8796 单独提供该测试修复。 未查询托管 CI。此次没有改动页面布局;已复验设置实际 HTTP 响应、原生帖与字节序列。

我的整体评价 / Verdict

批准此精确提交的私聊媒体修订。四张原图按顺序补齐;直到原字节核验,设置保留该 App 的待办。作者的真机与线上采用证据属于其部署切片;本轮没有独立验证该精确提交的线上采用或飞书真机显示。

English verdict: APPROVE at b9e3060caee69ed3459f7ea9da3cee03fcc89087. The exact source and isolated wheel retain pending images through scope denial or mismatched bytes, then verify one ordered supplement without a new Turn. Unlisted sources and uncertain uploads stay fenced. Live adoption of this exact head remains unverified.

@loopx-agent
loopx-agent merged commit 1965965 into main Nov 15, 2026
21 of 44 checks passed
@loopx-agent
loopx-agent deleted the codex/lark-source-image-return-20261114 branch November 15, 2026 03:09
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