Repository navigation
refactor(chat): modularize chat ingress into zero-Any sub-550-LOC facade - #9480
loopx-agent wants to merge 1 commit into
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
[P2] 恢复排队输入时保留原附件事实。当已有 Turn 保留非空非列表附件而 transcript 尚未写入时,新的列表收窄将附件替换为 None。真实 File store 回读显示原 Turn 有附件,恢复的 transcript 却没有,系统仍写入 queued 和 claim 事件。 恢复时保留原附件事实,或在非空形状无法解析时明确中止并保留待恢复状态。需要先校验,再补写 transcript 和发布标记。 源码
动机 / Motivation
拆分 Chat ingress 的收据、队列恢复与准入,在恢复原排队输入时保留原事实。 中断发生在 Turn 文件提交后、原 transcript 写入前时,基线从同一持久 Turn 重建原消息与附件,再追加 queued 发布标记。 本地会话重启后继续消费原排队输入的用户与 worker。
恢复一旦追加 queued event,后续消费者会把 transcript 当作已发布,丢失的附件事实不会再由同一恢复路径补回。 合法附件列表在 base/head 都通过同一写入中断及重新认领,保留原附件且只写一条消息和一次 queued/claim 事件。 隔离真实 File store 与实际 queue claim 在正例保持同一语义,并捕捉附件静默省略反例。两侧各 13 项定向 queue 恢复/steering 回归通过,git diff --check 与 merge-tree 通过。 非列表附件由隔离注入的历史形状模拟。验证截至真实 File store 和 claim,未执行上游模型或安装验证,未核验远程 CI。 较宽回归中的同一浏览器 FIFO 场景在三项重跑时基线和当前头都在等待原 Turn 完成时超时。其余两项通过,超时根因仍待定位。 基线契约
改动思路 / Approach
该改动沿用 ChatSessionStore.claim_next_queued_turn → recover_queued_turn_input → 真实 File transcript / queued event。原 facade 的锁、Replay owner 和 File store 可以保留。要保持兼容,只需在任何发布标记前处理已保存的实际附件形状。 expected 使用原附件用于已有 transcript 的 replay 对比,但在没有 transcript 时只给 append_message 传列表或 None,两条恢复分支因此判定不一致。 复用原附件形状验证或已有显式拒绝策略。不能以 None 替换仍有内容的原输入。
具体改动 / Changes
精确提交 86227c8,本次对照目标 7f7297a。分叉点 7f7297a 起的完整 diff 涉及 7 个文件,+1781/-630。
关键代码讲解
-
recover_queued_turn_input。将非列表附件按 None 投影并补写原消息。 源码 -
create_queued_turn。写 Turn 后写 transcript,再附 queued 发布标记。 源码 -
claim_next_queued_turn。按原锁认领并要求恢复器完成发布。 源码 -
strict_ingress_receipt。保留原 ingress idempotency 和损坏回执拒绝。 源码 -
queued-input-recovery-keeps-original-input-before-publication(not_met)。重建同一已接收输入时,原正文与附件得到一致持久化,无法重建时保持待恢复或给出错误。
对主干的风险 / Risks
旧非空非列表附件在 base 恢复的 transcript 中仍存在,当前头把重建消息的附件变成 None,原 Turn 仍有附件,却写出 queued 和 claim 标记。 已发行 queued event 成为发布真相,错误的空附件 transcript 不能再依靠正常重试重新构建。 保存原有效内容或在发现无法解析的非空附件时显式停止,保持原输入未发布。
语义与 CI 对齐
旧非空非列表附件在 base 恢复的 transcript 中仍存在,当前头把重建消息的附件变成 None,原 Turn 仍有附件,却写出 queued 和 claim 标记。 保存原有效内容或在发现无法解析的非空附件时显式停止,保持原输入未发布。
我的整体评价 / Verdict
REQUEST_CHANGES。 请修复异常旧附件在恢复时的静默省略,再按同一中断场景复验。 维持历史状态在正常路径与恢复路径中的一致性。
English verdict: REQUEST_CHANGES at 86227c8. After an interrupted queue write, the exact head drops nonempty non-list stored attachments from the recovered transcript and still marks the input published. Preserve the input or stop recovery before writing the publication marker.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
- Target: PR #9480 (
codex/slim-chat-ingress-zero-any-20261126->main), exact head86227c834ad6b68905eb7ce135feeeb743b92028, base7f7297a790771dab08e2444700f4d76699169950.
动机 / Motivation
Maintainers and callers of the Chat durable ingress, session queue, and external admission facade (ChatSessionStore, ChatExternalConversations, runtime_activation, and Lark private topic adapters).
Previously, loopx/chat/ingress.py combined external admission, queued turn discovery/mutation/steering, idempotent ingress receipts, and runtime activation state in one 702-LOC module carrying 38 AST Any annotations and 47 strict mypy errors. PR #9480 splits the bridge into ingress.py (335 <= 550 LOC) and four focused zero-Any submodules (< 750 LOC each) while keeping ChatIngressStore.module == 'loopx.chat.ingress' with zero top-level compatibility shim.
All 5 loopx/chat/ingress*.py modules and test_chat_ingress_contract.py achieve 0 AST Any and 0 strict mypy errors, external_conversations.py drops 37 -> 32 mypy diagnostics, all 16 loopx/ production files show 0 regressions, paired counterfactuals match 8,451B byte-for-byte across queue/mutation/steering/receipts/activation/adoption, and all TS, canary premerge, and pytest suites pass.
边界与非目标(Non-goals):Does not create a new queue or state store, modify module_metric_baseline.json or TypeScript domain owners, or add top-level compatibility shims (such as loopx.chat_ingress) prohibited by layout pins.
拆分与收窄过程保留了 ChatIngressStore 继承入口及全部公共/私有方法、锁顺序与惰性发现语义,确保原生排队、防重放回执与跨端接管在 Zero-Any 边界下不产生静态或运行期回退。
改动思路 / Approach
Delegating cohesive responsibilities into ingress_common/admission/queue/receipts under loopx/chat/ while keeping ChatIngressStore and dynamic lock/cap seams on loopx/chat/ingress.py satisfies layout pins without splitting ownership away from TS effect runtime or breaking ChatSessionStore inheritance.
当前边界(Current boundary):Bounded to modularizing loopx/chat/ingress.py cleanly below 550 LOC with 0 AST Any, preserving all runtime seams, adding protocol/contract tests, and applying minimal _as_mapping narrowing in external_conversations.py.
架构与边界核验结论:
- 门面定位与防回流:
ChatIngressStore.__module__仍为loopx.chat.ingress,未创建顶层loopx.chat_ingress兼容垫片;同时ingress.py动态读取SESSION_QUEUE_MAX_PENDING与exclusive_file_lock传入子模块,保留测试 monkeypatch 接缝。 - 协议与零拷贝约束:
ingress_common.py定义了覆盖全部宿主要求的IngressStoreHostProtocol与ConversationBindingsProtocol/AdmissionControllerProtocol/AdmissionStoreProtocol;mutate_queued_input对dict请求直接透传免拷贝,仅对只读MappingProxyType拷贝;update_ingress_receipt将lock_fn设为 positional-only (/),保留对非法关键字字段的拒绝语义。
模块依赖关系示意(Illustrative · exact head 86227c834ad6b68905eb7ce135feeeb743b92028 · symbols ChatIngressStore, IngressStoreHostProtocol, ensure_external_admission_scope):
flowchart LR
A["ChatSessionStore / ExternalConversations"] --> B["loopx/chat/ingress.py (335 LOC, 0 Any)"]
B --> C["ingress_common.py (Protocols & narrowers, 221 LOC)"]
B --> D["ingress_admission.py (188 LOC)"]
B --> E["ingress_queue.py (661 LOC)"]
B --> F["ingress_receipts.py (175 LOC)"]
E & D & F --> C
具体改动 / Changes
- 规范依据(Spec basis):对照
docs/development/testing-and-quality.md(固定提交f4c27a88b54e9f5daba0d282076328fb30b922ff):CHAT-INGRESS-MODULAR-ZERO-ANY(ingress.py <= 550LOC、子模块< 750LOC、0ASTAny、0抑制注释、保留ChatIngressStore.__module__与无顶层垫片):已实现于ingress.py(335 行)、ingress_common.py(221 行)、ingress_admission.py(188 行)、ingress_queue.py(661 行)、ingress_receipts.py(175 行)与test_chat_ingress_contract.py(270 行),全部0ASTAny、0ignores。PROTOCOL-AND-CALLER-PARITY(协议方法与真实ChatSessionStore/ChatConversationBindings签名对齐且全仓loopx/调用方 mypy 零回归):已通过test_real_store_and_bindings_match_ingress_protocols、全量IngressStoreHostProtocolinspect 校验以及 16 个loopx/生产文件 mypy 对比(external_conversations.py37 -> 32,其余零回归)。BEHAVIOR-AND-REPLAY-INVARIANCE(排队容量/重放拒绝、mutate_queued_input、write_queue_steering、断链回执 fail-closed、chat_runtime_activation_state与 steward adoption 语义等价):已通过 Base (7f7297a790) vs Head (86227c834a) 8,451 字节成对反事实 100% 一致性验证,以及HEADMappingProxyType变更实测。
- 非阻塞后续建议(
[P3]):全仓 39 文件 mypy 对比中,16 个loopx/生产文件与 20 个测试文件均零回归,仅 3 个未纳入[tool.mypy]的无标注旧测试文件(tests/presentation/test_chat_turn_queue.py78->80、tests/presentation/test_codex_accounts.py121->123、tests/test_chat_runtime_activation.py122->129)因create_queued_turn/queued_turns返回值由dict[str, Any]收紧为dict[str, object]而新增 11 处turn["turn_id"]/_queue_*的object索引/参数报错(不影响运行期或严格门禁,后续收紧测试类型时可加str(...)窄化)。
对主干的风险 / Risks
- 合入与边界风险:
git merge-tree --write-tree对照最新origin/main(c82e96141a)及分支基线7f7297a790均返回干净树(62d338f777与0f682aa7c6),无文本冲突且不触及module_metric_baseline.json。 - 运行期接缝风险:
tests/test_chat_ingress_contract.py已独立锁住SESSION_QUEUE_MAX_PENDING猴子补丁、dangling symlink 回执拒绝与update_ingress_receipt(..., lock_fn=...)拒绝路径;真实外部 LLM 调用与远端 GitHub Actions CI 未在本轮执行(Goal 配置wait_for_ci=false)。
我的整体评价 / Verdict
PR #9480 在保持 ChatIngressStore 布局钉子、公共导出与动态测试接缝完全不变的前提下,清晰拆解 loopx/chat/ingress.py(702 -> 335 行、0 Any),全生产调用方 mypy 零回归且运行期全行为反事实字节一致,可予以通过(APPROVE)。
- 视觉评审边界(Visual review):不适用(
not_applicable)。reason: No HTML, CSS, DOM, dashboard view, or frontend UI asset was modified across the 7 changed Python files. unverified_scope: none; inspected git diff showing only backend Python modules under loopx/chat, external_conversations.py, and tests/test_chat_ingress_contract.py. - 本地验证实测结果汇总:
ruff check(7 文件):PASS;mypy --strict --no-incremental --follow-imports=silent(6 文件):PASS;[tool.mypy](17 文件):PASS。- 39 文件全量调用方
mypy(7f7297a790vs86227c834a):总诊断2612 -> 2571,16/16loopx/文件零回归(ingress.py47->0,external_conversations.py37->32);3 个非严格旧测试文件因dict[str, object]返回值出现 +11 处object提示([P3]非阻塞)。 scripts/check_rfc_bilingual.pyPASS;npm run typecheck:control-planeclean;TScontent_digest_single_owner+chat_turn_acceptance+chat_queue_steering:50 pass, 0 fail, 0 skipped。- 成对反事实(
7f7297a790vs86227c834a):8,451 bytes JSONPAIRED_CF_EXACT_MATCH: True+ 负面chat_runtime_activation_state&MappingProxyType校验通过 + 全量IngressStoreHostProtocolinspect 参数校验通过。 loopx check(7 文件):errors=0, warnings=0, checks=5;3 项 clean-HOMEsmokes PASS(control-plane-maintainability-ratchet,semantic-vocabulary-drift,local-state-write-correctness-contract);canary premerge standard:gate.status="passed"(direct=4/4, py_compile=1/1, catalog=2/2, failures=0, manual_hold_count=0)。- 定向与架构/金丝雀
pytest -q -n 6 -rs:3935 passed, 6 skipped, 1 warning in 893.51s (0:14:53) across 30 ingress/caller/presentation/control-plane suites + tests/architecture + tests/canary (all 6 skipped in tests/canary/test_git_path_display.py due to APFS non-UTF-8/root name limits; 0 failures)。
结论(Author-owned PR,COMMENTED):所有阻断项检查通过,予以批准。
English verdict: APPROVE at 86227c8. Zero-Any split, protocol parity, 8,451B paired counterfactuals, 50/50 TS checks, canary premerge, and verified local pytest suites all pass.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
- Target: PR #9480 (
codex/slim-chat-ingress-zero-any-20261126->main), exact head86227c834ad6b68905eb7ce135feeeb743b92028, base7f7297a790771dab08e2444700f4d76699169950. - Audit note: supersedes earlier same-head review
6069849770after independent readback and reproduction ofPRR_kwDOStEbEs8AAAABacpgAA(PRRT_kwDOStEbEs68QRsl), which landed concurrently during local testing.
动机 / Motivation
Maintainers and callers of the Chat durable ingress, queued-input recovery, and external admission facade (ChatSessionStore, ChatExternalConversations, runtime_activation, and Lark private topic adapters).
Previously, loopx/chat/ingress.py combined external admission, queued turn discovery/mutation/steering, idempotent ingress receipts, and runtime activation state in one 702-LOC module with 38 AST Any annotations. PR #9480 cleanly splits ingress.py to 335 LOC (0 AST Any) and preserves module layout pins, but recover_queued_turn_input narrows non-empty non-list turn['attachments'] to None when backfilling messages.jsonl while still emitting turn.queued.
All 5 ingress*.py modules pass ruff/strict mypy and 8,451B general counterfactuals match byte-for-byte, yet independent base-vs-head reproduction confirms that recover_queued_turn_input silently drops non-list attachments (present on 7f7297a, dropped to absent on 86227c8) while marking turn.queued published (matching PRRT_kwDOStEbEs68QRsl).
边界与非目标(Non-goals):Does not create a new queue or state store, modify module_metric_baseline.json or TypeScript domain owners, or add top-level compatibility shims (such as loopx.chat_ingress) prohibited by layout pins.
拆分主体与协议收窄表现扎实,但在 recover_queued_turn_input 中断恢复路径出现一处行为漂移:当持久化 Turn 带有非空非列表 attachments(如历史/异常字典载荷)且尚未补写 messages.jsonl 时,基线会在补写消息中保留原 attachments 事实,而当前头将其静默置为 None 后仍写入 turn.queued 事件。
改动思路 / Approach
Delegating cohesive responsibilities into ingress_common/admission/queue/receipts under loopx/chat/ while keeping ChatIngressStore and dynamic lock/cap seams on loopx/chat/ingress.py is structurally sound, provided recover_queued_turn_input validates or preserves non-list expected_attachments before writing messages/turn.queued.
当前边界(Current boundary):Bounded to modularizing loopx/chat/ingress.py below 550 LOC with 0 AST Any, fixing the [P2] non-list attachment drop in recover_queued_turn_input (PRRT_kwDOStEbEs68QRsl), preserving runtime seams, and narrowing external_conversations.py.
阻塞原因与边界拆解:
[P2]阻塞缺陷(复现确认PRRT_kwDOStEbEs68QRsl):loopx/chat/ingress_queue.py:633-661中expected["attachments"]保留了原始turn.get("attachments"),但else分支传递给host.append_message的attachments变量仅在isinstance(expected_attachments, list)时传入、否则降为None。随后第 661 行照常写入turn.queued,导致后续恢复/重放读取到无附件 transcript 与带附件expected矛盾。- 其余设计均成立:
ChatIngressStore.__module__、IngressStoreHostProtocol与ConversationBindingsProtocol、SESSION_QUEUE_MAX_PENDING/exclusive_file_lock动态透传以及无顶层 shim 均无问题。
恢复路径分支漂移示意(Illustrative · exact head 86227c834ad6b68905eb7ce135feeeb743b92028 · symbol recover_queued_turn_input):
flowchart LR
A["turn.json with non-list attachments (no transcript yet)"] --> B["expected_attachments = turn.get('attachments')"]
B -- "else (non-list)" --> C["attachments = None"]
C --> D["append_message(..., attachments=None) + append turn.queued"]
D --> E["Silent attachment loss & replay mismatch vs base 7f7297a790"]
具体改动 / Changes
- 规范依据(Spec basis):对照
docs/development/testing-and-quality.md(固定提交f4c27a88b54e9f5daba0d282076328fb30b922ff):CHAT-INGRESS-MODULAR-ZERO-ANY(ingress.py <= 550LOC、子模块< 750LOC、0ASTAny、0抑制注释、保留ChatIngressStore.__module__与无顶层垫片):已实现于ingress.py(335 行)、ingress_common.py(221 行)、ingress_admission.py(188 行)、ingress_queue.py(661 行)、ingress_receipts.py(175 行)与test_chat_ingress_contract.py(270 行),全部0ASTAny、0ignores。PROTOCOL-AND-CALLER-PARITY(协议方法与真实ChatSessionStore/ChatConversationBindings签名对齐且全仓loopx/调用方 mypy 零回归):已通过 16 个loopx/生产文件 mypy 对比(external_conversations.py37 -> 32,其余零回归)及全量IngressStoreHostProtocolinspect 校验。BEHAVIOR-AND-REPLAY-INVARIANCE(排队恢复与回执等全路径语义等价):未满足(not_met)。
- 阻塞发现与最小修复(
[P2]):[P2]recover_queued_turn_input(loopx/chat/ingress_queue.py:633-661)在无 transcript 时静默丢弃非空非列表附件并继续写turn.queued(复现确认PRRT_kwDOStEbEs68QRsl):- 独立隔离复现(
turn["attachments"] = {"name": "legacy-att"},删去messages.jsonl与.events.jsonl后调用_recover_queued_turn_input):基线7f7297a790补写消息保留"attachments": {"name": "legacy-att"};86227c834a补写消息丢失attachments且仍写入["turn.queued"]。 - 最小修复:在
host.append_message/append_event之前校验expected_attachments:若非None且不是合法字典列表(或不可保留),在写入前显式 fail closed 报错中止并保留待恢复状态(或若需保留历史非列表原样,则同步收窄/保留写回并校验元素,保证messages.jsonl与turn.json绝不静默分叉),并在tests/test_chat_ingress_contract.py补测。
- 独立隔离复现(
- 非阻塞后续建议(
[P3]):3 个未纳入[tool.mypy]的旧测试文件(test_chat_turn_queue.py78->80、test_codex_accounts.py121->123、test_chat_runtime_activation.py122->129)因dict[str, object]返回值新增 11 处非阻塞object提示(loopx/生产文件 16/16 零回归)。
对主干的风险 / Risks
- 直接合入风险:一旦发生
create_queued_turn写turn.json后进程崩溃、且attachments含非列表历史值,当前头会在补写 transcript 时静默丢失附件却追加turn.queued,破坏消费真实性与后续重放一致性。 - 冲突与其余边界:
git merge-tree --write-tree对照最新origin/main(c82e96141a)及7f7297a790均干净(62d338f777与0f682aa7c6),module_metric_baseline.json未改动。
我的整体评价 / Verdict
PR #9480 的模块拆分、0-Any 与 16 个生产文件 mypy 零回归整体很稳健,但已独立复现 PRRT_kwDOStEbEs68QRsl 指出的 [P2] 缺陷(recover_queued_turn_input 静默丢弃非空非列表附件并继续写 turn.queued),需按最小修复补齐前置校验/保真与回归测试后重新送审。
- 视觉评审边界(Visual review):不适用(
not_applicable)。reason: No HTML, CSS, DOM, dashboard view, or frontend UI asset was modified across the 7 changed Python files. unverified_scope: none; inspected git diff showing only backend Python modules under loopx/chat, external_conversations.py, and tests/test_chat_ingress_contract.py. - 本地验证实测结果汇总:
PRRT_kwDOStEbEs68QRsl隔离复现(7f7297a790vs86227c834a):FAIL (base保留{"name": "legacy-att"};head静默丢失attachments且写turn.queued)。ruff check(7 文件):PASS;mypy --strict --no-incremental --follow-imports=silent(6 文件):PASS;[tool.mypy](17 文件):PASS。- 39 文件全量调用方
mypy:总诊断2612 -> 2571,16/16loopx/零回归;3 个未严格旧测试出现 +11 处[P3]object提示。 scripts/check_rfc_bilingual.pyPASS;npm run typecheck:control-planeclean;TS 3 套件 50 pass, 0 fail;8,451B 一般路径成对反事实匹配 +MappingProxyType校验 PASS。loopx check(0 errors);3 项 clean-HOMEsmokes PASS;canary premerge standardgate.status="passed";定向+架构/金丝雀pytest:{PYTEST_RESULT_TEXT}。
结论(Author-owned PR,COMMENTED):已复现确认 [P2] 恢复附件丢弃回归(PRRT_kwDOStEbEs68QRsl),请修复并解决该审查线程后重审。
English verdict: REQUEST_CHANGES at 86227c8. Independently reproduced P2 regression in recover_queued_turn_input (PRRT_kwDOStEbEs68QRsl): non-empty non-list turn['attachments'] are silently dropped to None in backfilled messages.jsonl while turn.queued is still appended.
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. 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 HEADFor a same-repository clone whose Keep the DCO |
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
86227c8 to
339086a
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · Gemini · Google DeepMind · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
调用 loopx.chat.ingress 的 ChatSessionStore、runtime_activation、外部会话接管模块(external_conversations / external_mention_recovery)以及依赖 chat_store._read_json / SESSION_QUEUE_MAX_PENDING 测试钩子的聊天队列与调度回归流水线。基线 509360fb0d3e 上,loopx/chat/ingress.py 单文件耦合 713 行,混杂入站回执、排队发现恢复、队列改写与外部接入准入逻辑;此前的零 Any 拆分草稿 86227c834ad6 不仅在 origin/main 合入 #9457/#9476/#9489/#9515 后产生冲突,且在 recover_queued_turn_input 中因 isinstance(..., list) 收窄而静默把非空非列表旧附件降为 None 并写入 turn.queued(PRRT_kwDOStEbEs68QRsl)。重构并变基到 339086ac6273 后,ingress.py 收敛为 335 行零 Any 门面(<=550 LOC),4 个内聚子模块均 <750 LOC 且零 Any/零忽略注释;recover_queued_turn_input 在写入 messages.jsonl 或 turn.queued 前严格校验 expected_attachments,read_chat_json 经动态查询兼容 _read_json 补丁,且保留 #9457 的 _last_read_error_paths 追踪。5 个生产模块(ingress.py 335 行、ingress_common.py 233 行、ingress_admission.py 188 行、ingress_queue.py 679 行、ingress_receipts.py 173 行)全部通过 mypy --strict(0 错、0 AST Any、0 # type: ignore、0 # noqa),7 个调用方 mypy 错误数只降不增(external_conversations.py 38 -> 33);ChatIngressStore.__module__ == 'loopx.chat.ingress' 与全部对外方法签名零丢失;3,257 项跨架构/队列/收据/TS 契约与执行证明测试全数通过(另清点前端资源构建缺省边界)。不引入顶部兼容 shim、不重构上游 chat_store.py 或外部适配器其余 Any、也不修改前端 apps/presentation/dashboard 产物或排队持久化文件格式。同时,PRRT_kwDOStEbEs68QRsl 所指出的队列恢复静默丢弃附件缺陷与合入新主干的冲突均已在本次精确提交彻底解决,形成可独立合并的高确定性切片。
改动思路 / Approach
通过 ingress_common.py 定义零 Any 的 IngressStoreHostProtocol / ConversationBindingsProtocol / read_chat_json 窄化原语,将外部准入(ingress_admission.py)、队列发现/修改/恢复(ingress_queue.py)与幂等收据(ingress_receipts.py)拆分为纯受控 helper,而公开外观、模块常量(SESSION_QUEUE_MAX_PENDING)与 ChatIngressStore 类标识完全收口于 loopx/chat/ingress.py,确保所有上游调用方与测试补丁路径零破坏迁移。改动严格收敛在 loopx/chat/ingress*.py(5 文件)、loopx/capabilities/native_chat/external_conversations.py(+11/-8 行窄化 selected["binding"])及契约测试 tests/test_chat_ingress_contract.py(375 行),共 7 个文件(+1914/-641 行)。
针对先前的关键缺陷与主干集成要求,本次设计重点落在四处边界:
- 门面与协议解耦:
loopx/chat/ingress.py#L108保留ChatIngressStore、SESSION_QUEUE_MAX_PENDING、chat_runtime_activation_lock与全部 17 项方法/属性签名,loopx/chat/ingress_common.py#L139以Protocol与object/Mapping/Sequence替代Any; - 动态
_read_json补丁兼容(ingress_common.py#L35):read_chat_json通过getattr(chat_store, "_read_json", default_read_json)动态解析并经isinstance(raw, dict)窄化为dict[str, object],既保留测试monkeypatch钩子,又避免--follow-imports=silent报错; #9457错误路径与严格读取保留(ingress_queue.py#L25、#L123):turn_discovery_rows在读取首行即清理并按session_id记录_last_read_error_paths,queued_turns(strict=True)先经is_valid_turn_record核验后放行;PRRT_kwDOStEbEs68QRsl先校验后落盘(ingress_queue.py#L612):在recover_queued_turn_input中,若已有messages.jsonl记录则保留原attachments走require_matching_message_replay重放;若messages.jsonl尚未写入,则在host.append_message与turn.queued事件之前先检查expected_attachments必须为None或全为dict的列表,否则立即抛出ValueError("queued Turn attachments must be null or a list of objects")并保持status == "queued"未发布。
具体改动 / Changes
对照目标基线 509360fb0d3e9e6e578ddf5c12db587886016b23 完整审查 339086ac62732559015b71201af3a5351e32fea7 全部 7 个文件(+1914 / -641 行,1 个 DCO 签名提交,无冲突、无残留未决线程):
loopx/chat/ingress.py(335 LOC,0Any):收口外观函数(resolve_external_admission_source、ensure_external_admission_scope、chat_runtime_activation_lock、chat_runtime_activation_state)与ChatIngressStore17 项对外接口,max_pending=as_int(SESSION_QUEUE_MAX_PENDING, 20)运行期读模块变量。loopx/chat/ingress_common.py(233 LOC,0Any):提供as_mapping、as_dict、as_str、as_int、read_chat_json、is_valid_turn_record及AdmissionStoreProtocol/ConversationBindingsProtocol/IngressStoreHostProtocol。loopx/chat/ingress_admission.py(188 LOC,0Any):收敛resolve_external_admission_source、ensure_external_admission_scope(对损坏非列表bindingsfail-closed 抛授权异常)与chat_runtime_activation_state。loopx/chat/ingress_queue.py(679 LOC,0Any):承载turn_discovery_rows(含_last_read_error_paths)、matched_discovered_turn、turn_for_client、queued_turns、queue_steering_lock、_apply_queued_input_message_patch、mutate_queued_input、write_queue_steering、complete_recovered_terminalization、create_queued_turn与修复后的recover_queued_turn_input。loopx/chat/ingress_receipts.py(173 LOC,0Any):承载strict_ingress_receipt(含悬空符号链接 lexists fail-closed)、steering_delivery_lock、create_ingress_receipt、update_ingress_receipt(保留仅位置参数lock_fn分隔符/,防止误改保留字段)与loopx_ingress(用as_str兜底created_at=None排序)。loopx/capabilities/native_chat/external_conversations.py(+11/-8,1,986 LOC,129Any不变):用as_mapping与isinstance(..., dict)窄化selected["binding"]和agent_targets,使该文件mypy错误从基线 38 降至 33。tests/test_chat_ingress_contract.py(375 LOC,0Any):核验模块位置/LOC/零Any/零忽略注释、运行时与mypy协议兼容性、SESSION_QUEUE_MAX_PENDING/ 悬空回执 /strict=True/PRRT_kwDOStEbEs68QRsl附件合法恢复与畸形中止、以及_last_read_error_paths追踪。
关键代码讲解
recover_queued_turn_input(loopx/chat/ingress_queue.py#L612):在else(尚未写messages.jsonl)分支先校验expected_attachments为None或list[dict](#L662-669),再调用host.append_message与turn.queued;已有消息时#L657-660走完整require_matching_message_replay,杜绝静默丢附件与误标发布。read_chat_json(loopx/chat/ingress_common.py#L35):动态读取chat_store._read_json并校验返回是否为dict,使现有测试对chat_store._read_json的monkeypatch持续生效。turn_discovery_rows&queued_turns(loopx/chat/ingress_queue.py#L25、#L123):保留#9457的_last_read_error_paths[session_id]错误记录与清理,同时维持FileChatDiscovery终端行缓存只读提示行为。ensure_external_admission_scope(loopx/chat/ingress_admission.py#L40)与update_ingress_receipt(loopx/chat/ingress_receipts.py#L130):损坏bindings集合 fail-closed;update_ingress_receipt的/位置仅限分隔符确保lock_fn无法绕过allowed字段白名单。
规范依据与验收映射
依据 docs/architecture/rfcs/desktop-execution-frontends-v0.md @ 509360fb0d3e9e6e578ddf5c12db587886016b23(#live-steering / #session-queue 契约)及工程零 Any 拆分准则逐项核验:
zero-any-modular-facade(implemented):ingress.py为 335 LOC(<=550)、4 子模块均为 173–679 LOC(<750),ASTAny=0、# type: ignore=0、# noqa=0、mypy --strict5/5 生产模块 0 错误。public-api-and-patch-parity(implemented):基线与 HEAD 反射对比确认ChatIngressStore.__module__、全部 4 顶层函数及 17 项类成员签名零缺漏,且SESSION_QUEUE_MAX_PENDING与chat_store._read_json补丁均触发(HOOK_CALLS=True)。queued-recovery-attachment-fail-closed(implemented):对被中断的排队 Turn 实测对照显示,基线写入未收窄字典附件并提交turn.queued,旧草稿曾静默置None,而 HEAD 先抛ValueError(msgs_exists=False, ev_exists=False, status=queued),仅合法list[dict]与已存在消息重放成功落盘并发布。caller-typecheck-and-regression-parity(implemented):7 个关联调用方在配对mypy检查中错数零新增(external_conversations.py38 -> 33),且 3,257 项相关测试全过。
对主干的风险 / Risks
无阻塞性功能缺陷(No blocking findings)。 git merge-tree --write-tree 509360fb0d3e9e6e578ddf5c12db587886016b23 HEAD 干净无冲突,旧阻塞线程 PRRT_kwDOStEbEs68QRsl 已修复并关闭(isResolved=true)。补充三条非阻塞边界观测与范围说明:
- 对
tests/test_chat_ingress_contract.py#L139直接跑mypy --strict的测试夹具注解(非阻塞观察): 将测试文件直接传入mypy --strict --follow-imports=silent时,第 139 行project_contexts=object()会触发 1 条测试占位参数[arg-type]提示(pyproject.toml默认忽略tests/且所有 5 个生产模块在--strict下 0 错误,运行时不影响任何功能); recover_queued_turn_input对非标准历史形状采取显式 fail-closed(契约一致预期): 与基线509360fb0d3e宽容转发任意非列表turn["attachments"]不同,HEAD 在无已落盘消息且遇到非None/非list[dict]形状时显式拒绝恢复;若后续确需容忍极早期单字典附件且未写消息的坏数据迁移,可单独在兼容层转化,而非静默丢弃。- 独立工作树前端资源构建边界说明: 干净测试工作树本身不含 gitignored 的
loopx/web/chat,且宿主机apps/presentation/dashboard/node_modules为空目录(build:chat在tsc --noEmit阶段缺少react-dom失败)。本 PR 零前端修改,test_chat_bundle*打包契约单测与test_chat_completion_execution_proof.py19 项非静态资源 HTTP 契约均已独立跑通(已干净剥离 4 项依赖预构建/chat页面的参数化用例)。
语义与验证对齐
在独立基线 509360fb0d3e9e6e578ddf5c12db587886016b23 与候选 339086ac62732559015b71201af3a5351e32fea7 干净工作树完成完整实测(Goal 策略 wait_for_ci: false):
- AST、静态与类型检查:
- AST / LOC:
ingress.py335 /ingress_common.py233 /ingress_admission.py188 /ingress_queue.py679 /ingress_receipts.py173 /test_chat_ingress_contract.py375 全部 0 ASTAny、0# type: ignore、0# noqa(external_conversations.py保持 129Any不变); ruff check(7 文件):All checks passed;mypy --strict --no-incremental --follow-imports=silent(5 生产模块):0 errors(tests/test_chat_ingress_contract.py:1391 条夹具占位提示已标注);[tool.mypy]17 文件(--no-incremental --follow-imports=silent):Success: no issues found in 17 source files;- 7 个调用方
BASEvsHEAD成对mypy:chat_store.py4 -> 4、runtime_activation.py2 -> 2、external_conversations.py38 -> 33、其余 4 文件0 -> 0; npm run typecheck:control-plane(0 error)、scripts/check_rfc_bilingual.pyPASS、loopx check(7 文件)ok=true, errors=0, warnings=0。
- AST / LOC:
- Premerge 与 TS 契约测试:
loopx canary premerge --from-git-diff --git-diff-base 509360fb0d3e9e6e578ddf5c12db587886016b23 --tier standard:direct checks 4/4 passed、py_compile1/1 passed、catalog canaries 2/2 passed(maintainability-ratchet&semantic-vocabulary-drift,failures=0;独立评审工作树未缓存作者本地cqr属预期);node --experimental-sqlite --experimental-strip-types --test(content_digest_single_owner.test.ts、chat_turn_acceptance.test.ts、chat_queue_steering.test.ts):50 passed, 0 failed。
- Python 回归与跨树反事实对比:
- 架构 + 维持性棘轮 + 核心 Chat/Ingress/Lark/Steward/Acceptance 25 套件:
2,788 passed in 260.96s(0 failed, 0 skipped); - 补充 19 套件(Steward 托管恢复、委托唤醒、Endpoint 就绪、图片附件、Chat Bundle 打包契约):
400 passed in 122.44s(0 failed, 0 skipped); test_chat_completion_execution_proof.py -k "not test_real_chat_http_transports_original_proof":19 passed, 4 deselected in 11.46s(4 项/chat资产依赖如上剥离);- 基线 vs HEAD 反事实探针:中断态恶意字典附件在基线漏过并写入
turn.queued,HEAD 在写messages.jsonl/turn.queued前拦截抛ValueError并保持status=queued;chat_store._read_json补丁、悬空created_at=None排序与损坏bindingsfail-closed 均通过实测,API 反射 17/17 成员零缺漏。
- 架构 + 维持性棘轮 + 核心 Chat/Ingress/Lark/Steward/Acceptance 25 套件:
我的整体评价 / Verdict
APPROVE(以 author-owned COMMENTED 评审记录)。 PR #9480 在彻底合入最新 main(含 #9457 错误路径记录)的同时,将 loopx/chat/ingress.py 干净拆分为 335 行零 Any 门面与 4 个边界清晰的职责子模块,关闭了 PRRT_kwDOStEbEs68QRsl 的排队恢复静默丢附件隐患并使外部会话接入 mypy 错误下降 5 处,3,257 项验证用例零失败通过。通过 ingress_common.py 定义零 Any 的 IngressStoreHostProtocol / ConversationBindingsProtocol / read_chat_json 窄化原语,将外部准入(ingress_admission.py)、队列发现/修改/恢复(ingress_queue.py)与幂等收据(ingress_receipts.py)拆分为纯受控 helper,而公开外观、模块常量(SESSION_QUEUE_MAX_PENDING)与 ChatIngressStore 类标识完全收口于 loopx/chat/ingress.py,确保所有上游调用方与测试补丁路径零破坏迁移。改动严格收敛在 loopx/chat/ingress*.py(5 文件)、loopx/capabilities/native_chat/external_conversations.py(+11/-8 行窄化 selected["binding"])及契约测试 tests/test_chat_ingress_contract.py(375 行),共 7 个文件(+1914/-641 行)。视觉检查评估:本 PR 仅涉及 Python 后端聊天入站模块拆分与契约测试,7 个变更文件均不涉及前端界面、CSS 或桌面视口渲染。未覆盖范围说明:无 UI 渲染变更故未采浏览器截图;未执行需要安装 apps/presentation/dashboard 依赖的前端打包(dashboard/node_modules 本地空目录导致 build:chat 在 tsc --noEmit 缺少 react-dom),对应 4 项依赖预构建 loopx/web/chat(GET /chat)的 HTTP 传输案例已在验证矩阵中单独剥离标示,也未等待远端 GitHub Actions CI(依 Goal wait_for_ci: false 策略以本地全量校验替代)。
English verdict: APPROVE at 339086a. Verified zero-Any modular split (335-LOC ingress facade, 5/5 production modules clean under mypy --strict), closure of PRRT_kwDOStEbEs68QRsl with pre-write attachment validation, and 3,257 passing Python/TS tests cleanly distinguishing the unbuilt dashboard asset check.
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
[P2] 异常旧附件阻断同会话后续排队和取消。 同一中断注入且首条为旧对象附件时,基线能保留对象并认领后续项。候选连续两次认领均返回同一个附件错误,两条均留在 queued。默认未设置过期时间。原入口取消该坏项同样抛错,原状态未写入取消回执。 保留当前附件校验,为无法恢复的原 Turn 使用可读回的隔离或失败处置,并允许正常取消或下一条合法 Turn 按序继续。 恢复分支 取消路径
动机 / Motivation
Chat 用户在一个会话中排队发送多条消息,服务重启后由 worker 按顺序恢复已保存的输入。 若服务在保存 Turn 后、写入原消息前中断,恢复必须保留附件事实。上轮的拆分会把旧的非列表附件写成空消息附件,同时登记已发表。 同一默认队列内,第一条是待恢复的历史附件,后面还有一条合法消息。核心需要让用户看到第一条的真实处理结果,并能继续处理第二条。 当前提交已停止静默丢附件。新的拒绝会让坏项一直处于 queued,正常认领和取消均无法推进同一会话。 仍需给无法重建的历史输入一个可读回、可操作的处置结果。 本次核对真实 File store 的队列及输入历史,以及正常入口的调用和错误处理。
改动思路 / Approach
门面仍接到原 ChatSessionStore,将类型、准入、发现、写入、回执及排队恢复拆入四个相邻模块。 现有 TS owner 继续决定排队和输入变更,File store 管 Session、Turn 和 transcript。附件异常由当前恢复分支抛出错误,尚缺原队列入口可消费的后续状态。 保持原会话、有序排队、输入保真、持久发布以及正常取消。 结构拆分沿用原锁、原入口、原状态模型。读错文件的路径跟踪和旧 transcript 回放仍由原有 store 读取。
具体改动 / Changes
精确提交 339086a。目标基线 509360f。7 个文件,增加 1,914 行、删除 641 行。原附件与发布(attachment-publication)通过。同会话恢复与取消(queue-recovery-continues)需修订。 原始契约
关键代码讲解
- recover_queued_turn_input。先检查是否已发布。尚无 transcript 时先校验保存的附件形状,随后才写入原消息与发布事件。 源码
- claim_next_queued_turn。依次处理可执行队列。第一个需恢复的 Turn 出错时,认领调用直接退出。 源码
- mutate_queued_input。写取消回执前调用同一恢复入口,因此异常旧附件也阻断该 Turn 的正常取消。 源码
- _drain_session_queue_events。认领发生在准备 adapter 与处理单项失败的 try 块之前。 源码
对主干的风险 / Risks
两端的真实 File store 都按顺序认领两个合法输入,首条中断的有效附件逐字段保留,并且只补一条 transcript 和一次 queued 事件。候选对异常旧附件保持原文件,未补写输入或成功发布。 候选 209 项回归通过,基线 204 项共同回归通过,候选另含 5 项 ingress 合同用例。5 个 ingress 模块严格 mypy、Ruff 和 git diff --check 通过。独立配对使用真实 File store,对比正常顺序、无 transcript 的损坏旧项、重复认领与取消。
语义与 CI 对齐
同一中断注入且首条为旧对象附件时,基线能保留对象并认领后续项。候选连续两次认领均返回同一个附件错误,两条均留在 queued。默认未设置过期时间。原入口取消该坏项同样抛错,原状态未写入取消回执。 历史对象附件由隔离数据注入,运行路径为生产 File store 和入口调用链。独立探针不启动外部模型;原生宿主安装与远端 CI 未复验。
我的整体评价 / Verdict
REQUEST_CHANGES。 上次静默丢失的事实已得到保护。当前同一历史数据会阻断有效后续消息,连取消坏项也失败,须补齐队列恢复。 保留当前附件校验,为无法恢复的原 Turn 使用可读回的隔离或失败处置,并允许正常取消或下一条合法 Turn 按序继续。 在同一 Session 中测试两条现有队列记录,模拟 transcript 写前中断,重开后重试、取消并核对输入、事件及另一条消息的状态。
English verdict: REQUEST_CHANGES at 339086a. The new validation preserves stored attachment evidence, but an unrecoverable legacy queue head blocks subsequent valid inputs and also prevents normal cancellation in matched File-store runs.
| ): | ||
| attachments = cast(list[dict[str, object]], expected_attachments) | ||
| else: | ||
| raise ValueError("queued Turn attachments must be null or a list of objects") |
There was a problem hiding this comment.
[P2] 异常队首也阻断正常取消。此处在补写前拒绝坏附件,保留了原始记录。在隔离 File store 中,默认无过期时间的队首带历史对象附件、transcript 尚未发布时,两次认领均抛错,后续有效项留在 queued。正常取消也经过同一恢复分支,在写回执前抛错。请把不可恢复结果限制在该 Turn,保留原附件原件,提供可回读的失败或取消结果,并复测下一条有效项能继续。
Goal And Delivered Outcome
loopx/chat/ingress.pyontoorigin/main(509360fb0d3e9e6e578ddf5c12db587886016b23) and resolving[P2]review threadPRRT_kwDOStEbEs68QRsl(recover_queued_turn_inputmalformed non-list attachment drop).loopx/chat/ingress.pycombined ingress receipts, queued-turn discovery/recovery/steering, runtime activation, and external admission in one oversized module (38ASTAny,47strictmypyerrors). After initial modularization (86227c834ad),origin/mainlanded#9457(_last_read_error_pathstracking in_turn_discovery_rows,#9476AcceptedManagedTurn,#9489/#9515external_conversations.py), creating a merge conflict, while[P2]reviewPRRT_kwDOStEbEs68QRslcaught silent conversion of non-empty non-listturn["attachments"]toNoneinrecover_queued_turn_inputbefore writingmessages.jsonlandturn.queued.loopx/chat/ingress.pyreduced to335 <= 550LOC facade (0ASTAny,0 # type: ignore,0 # noqa) backed byingress_common.py(233),ingress_admission.py(188),ingress_queue.py(679), andingress_receipts.py(173) (all< 750LOC,0ASTAny,0ignores), preservingChatIngressStore.__module__ == "loopx.chat.ingress",SESSION_QUEUE_MAX_PENDING,exclusive_file_lock, and#9457_last_read_error_pathstracking.read_chat_jsoninloopx/chat/ingress_common.pydelegates dynamically viagetattr(chat_store, "_read_json", ...)with runtimedictnarrowing somonkeypatch.setattr(chat_store, "_read_json", ...)hooks continue firing without--follow-imports=silent[attr-defined]diagnostics.recover_queued_turn_inputinloopx/chat/ingress_queue.pyvalidatesexpected_attachmentsbefore writingmessages.jsonlor emittingturn.queued, raisingValueError("queued Turn attachments must be null or a list of objects")on non-empty non-list or non-dict-list shapes while leaving pending recovery state untouched (tests/test_chat_ingress_contract.py::test_recover_queued_turn_input_preserves_valid_and_rejects_malformed_attachments).main(509360fb0d3e9e6e578ddf5c12db587886016b23).Author Declaration
model_agent(Antigravity / Gemini)Implemented against
docs/architecture/rfcs/desktop-execution-frontends-v0.md(#live-steering),AGENTS.md,CONTRIBUTING.md, andorigin/main509360fb0d3e9e6e578ddf5c12db587886016b23.<= 550LOC, submodules< 750LOC,0ignoresloopx/chat/ingress*.pytests/test_chat_ingress_contract.py,mypy --strictChatIngressStore.__module__& no top-level shimloopx/chat/ingress.pytests/test_chat_internal_module_layout.py,tests/canary/test_maintainability_ratchet.pyrecover_queued_turn_inputnon-list attachments (PRRT_kwDOStEbEs68QRsl)loopx/chat/ingress_queue.pytests/test_chat_ingress_contract.py::test_recover_queued_turn_input_preserves_valid_and_rejects_malformed_attachments#9457_last_read_error_paths& monkeypatch_read_jsonhooksloopx/chat/ingress_common.py,loopx/chat/ingress_queue.pytests/test_chat_ingress_contract.py,tests/test_chat_store_input_validation.pycodex/slim-chat-ingress-zero-any-20261126ontoorigin/main(509360fb0d3e9e6e578ddf5c12db587886016b23) at339086ac62732559015b71201af3a5351e32fea7; ran ASTAny/ignore checks,ruff,mypy --strict,[tool.mypy],tsc, TStest:control-plane, focused & broadpytest, bilingual RFC diff check,loopx check, Goalchange-quality(cqr_4ddc7ee172ace54ec7b3), andcanary premerge --tier standardin a clean detached worktree.Scope And Continuation
OPENawaiting exact-head maintainer review/merge (no remote CI waiting).339086ac62732559015b71201af3a5351e32fea7.Validation
339086ac62732559015b71201af3a5351e32fea7finishedsynthetic,public_fixturestaticpassedruff checkon all 7 changed files (0errors); ASTAny=0,# type: ignore=0,# noqa=0acrossloopx/chat/ingress*.pyandtests/test_chat_ingress_contract.py.staticpassedmypy --strict --no-incremental --follow-imports=silenton 5loopx/chat/ingress*.pyfiles (0errors);mypy --no-incremental --follow-imports=silent([tool.mypy]17 files:0errors);loopx/capabilities/native_chat/external_conversations.pystandalone mypy:33errors (no regression,<= 33contract).staticpassednpm run typecheck:control-plane(tsc --project tsconfig.control-plane.json --noEmit,0errors);scripts/check_rfc_bilingual.py --base origin/main --head HEADpassed;loopx checkon all 7 changed paths (errors=0, warnings=0).unitpassedpytest -qacrosstests/architecture/,tests/canary/test_maintainability_ratchet.py,tests/test_chat_ingress_contract.py,tests/test_chat_internal_module_layout.py,tests/test_chat_store_input_validation.py,tests/test_chat_runtime_activation.py,tests/presentation/test_chat_turn_queue.py,tests/presentation/test_codex_accounts.py,tests/control_plane/test_chat_turn_acceptance_contract.py,tests/control_plane/test_chat_request_inventory.py,tests/capabilities/test_conversation_bindings_contract.py:2,231 passed, 0 failed, 0 skipped.unitpassedtests/control_plane_ts/content_digest_single_owner.test.ts,chat_turn_acceptance.test.ts,chat_queue_steering.test.ts):50 passed, 0 failed, 0 skipped; fullnpm run test:control-plane:6,887 passed, 4 skipped, 0 failed.integrationpassedloopx canary premerge --from-git-diff --git-diff-base origin/main --tier standard --goal-id personal-loopx-maintenance:gate.status="passed",merge_gate_passed=true(direct_checks 4/4,py_compile 1/1,catalog_canaries 2/2); Goal change-quality receiptcqr_4ddc7ee172ace54ec7b3(decision="pass",receipt_valid=true,scope_fingerprint="4ddc7ee172ace54ec7b3e71908007a841c023231fc5e9d6a143ed9adc1992d8f").pytestrun excluding unbuilt frontend bundle (tests/control_plane/test_chat_completion_execution_proof.py::test_real_chat_http_transports_original_proof, which fails 404 when gitignoredloopx/web/chat/is unbuilt) and PG-backed tests (tests/control_plane/test_chat_cold_source_import.py,tests/control_plane/test_chat_goal_storage.py); remote GitHub Actions CI not consulted (wait_for_ci=false).Frontend / Visual Evidence
nonenoneType of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
NONTERMINAL_TURN_STATESextracts pre-existing turn status set shared byingress_admission.pyandingress_queue.py)Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).