Skip to content

test(architecture): pin result files digest consumer - #5925

Merged
huangruiteng merged 1 commit into
loopx-project:mainfrom
mikamikasuki:codex/loopx-content-digest-consumer-manifest
Oct 8, 2026
Merged

huangruiteng merged 1 commit into
loopx-project:mainfrom
mikamikasuki:codex/loopx-content-digest-consumer-manifest

Conversation

@mikamikasuki

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis: A reproducible current-main CI failure in the content-digest consumer ownership test.
  • Goal/source and gap: The test pins every Python module that delegates stored SHA-256 matching to the canonical content-digest owner. Merged commit 20d16ee added loopx.control_plane.collaboration.result_files, which imports the canonical BARE_SHA256_PATTERN, but the pinned consumer tuple did not include it.
  • Observable before → after: At main 159f00f, the exact test fails because the derived consumer set contains loopx.control_plane.collaboration.result_files and the pinned set does not. This change adds that consumer to the pin; the full focused module then passes (211 passed).
  • Issue/task and intended base: No separate issue is required for this self-contained reproduced defect under CONTRIBUTING.md#find-work. Base main at 159f00f.

Author Declaration

  • Written by: model_agent — OpenAI GPT-6 Luna.

Implemented against

  • Specification and revision: The consumer-ownership invariant documented in tests/architecture/test_content_digest_single_owner.py at 159f00f.
  • Criteria:
Criterion Disposition Symbol / path Test or command
Every module importing the canonical digest matcher is present in the reviewed pinned set implemented CONSUMER_MODULES tests/architecture/test_content_digest_single_owner.py
  • Self-check before submission: Read the contribution, governance, issue and PR guidance; inspected the introducing commit and current consumer; searched issues and PRs for a duplicate; reproduced the failure on exact main; confirmed the change adds only the missing pinned consumer.

Scope And Continuation

  • Completed scope and remaining work: The current-main architecture manifest regression is fixed. No production code or digest behavior changes.
  • Slice boundary / successor: Complete within this scope; no successor is needed.

Validation

  • Tested revision: a058001 (base 159f00f).
  • Run state: finished.
  • Input classes: none.
Check kind Result Public-safe evidence
regression_parity passed On exact base, the targeted consumer-manifest test fails with result_files missing from the pinned set. On this head, tests/architecture/test_content_digest_single_owner.py passes: 211 passed.
static passed Ruff check and Python compile passed; git diff --check passed.
integration passed loopx canary premerge --from-git-diff: 2 selected, 2 passed, zero failures and zero manual holds.
  • Coverage and gaps: The change only updates a static ownership manifest; the existing architecture test verifies the manifest against all repository consumers. No runtime behavior changes, so runtime tests are not applicable. GitHub CI remains pending.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: N/A; this is a focused architecture-test manifest repair.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A; the test-only pin does not alter authority schemas or runtime semantics.
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal: N/A

Boundary Checklist

  • No private state, credentials, raw traces, verifier output, internal links or local machine paths are included.
  • This does not duplicate maintainer-owned benchmark work.
  • The change is scoped to the reproduced consumer-manifest failure.
  • UI impact is none.
  • The commit includes a DCO Signed-off-by trailer.

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

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=xhigh

Exact head: a058001

动机

运行摘要所有权测试的贡献者,需要区分真实的校验规则漂移与遗漏登记造成的误报。 主干新增附件文件读写模块后,该模块已经复用统一 SHA-256 校验器,但测试的已审消费者清单缺了一项;补入真实消费者后,误报消失,复制校验器仍会被拒绝。 独立对照确认基线唯一失败是 result_files 未登记;当前 head 的 253 项相关测试通过,且两种复制校验器的反例都被现有所有权测试捕获。 本 PR 只维护既有测试清单,不改变附件协议、运行时摘要规则、权限、默认配置或实际 Lark 回传行为。

改动思路

沿用已有“显式审阅清单 + 独立源码扫描”的架构守卫。保持清单不动会留下已复现的主干误报;删除集合相等断言,或从扫描结果自动生成期望清单,会取消新消费者必须被审阅的边界。补入已经真实使用统一校验器的模块,是最小且完整的维护修复。

规格依据:tests/architecture/test_content_digest_single_owner.py,不可变版本 159f00fc8ababa088e8f6cde3ef06653bc4c0511;先读原有模块说明及断言,再检查本次 diff。原规格的四层互不替代,本次只补齐消费者登记,保留形状扫描、canonical export 引用、对象身份和可读性检查。

  • test_the_consumer_manifest_is_exactly_the_pinned_set:当前 head 已实现并通过。
  • test_consumers_name_the_canonical_exports_and_use_them:当前 head 已实现并通过。
  • test_every_consumer_holds_the_owner_object_not_an_equal_copy:当前 head 已实现并通过。
  • test_no_consumer_holds_a_regex_this_file_cannot_read:当前 head 已实现并通过。

具体改动

唯一改动是上述测试文件第184行:向 CONSUMER_MODULES 增加 loopx.control_plane.collaboration.result_files,一行新增、零删除。实际模块第12行已从既有 content_digest 导入 BARE_SHA256_PATTERN,第21行的 result_file_path 使用该对象的 fullmatch;本 PR 没有新增摘要规则或生产调用方。

正向:普通 pytest 入口 → _repo_scan 推导真实 import → 显式清单相等 → 原有 export/use、对象身份和可读性检查均纳入这个消费者。独立重跑两份架构模块,基线252通过/1失败,head253通过;唯一原失败准确指向未登记的 result_files。

反向:在独立进程中的真实模块上注入同形状、不同身份的 regex,再运行原有对象身份测试;literal 与运行时拼接两种复制在基线均漏检,在当前 head 均被拒绝。恢复后通过,额外虚构 pin 仍被拒绝。同一冻结脚本还进入真实摘要路径及文件读回,验证大写、短/长串、非十六进制、带 envelope、换行、空/null 值,尺寸不符和同尺寸错误字节仍拒绝。共18组 head全部满足预期,基线15/18;3项差异正是本次修复的清单与覆盖缺口。两版实际生产模块字节一致,没有 mock 提供所测结论,没有改写仓库或活动数据。

对主干的风险

没有阻塞发现。风险是把补清单误当成放宽断言;完整 diff 证实只新增真实消费者,原断言没有弱化。源码及既有覆盖搜索确认仍复用同一测试 owner,另一生产所有权测试覆盖的是构造边界,无法替代这个显式清单。已检查同作者30项近期 PR 元数据,未发现本项重复清单修复或同形状临时示例批次;不同边界的维护修复不因同作者而被否定。

标准 premerge 的4项直接检查、2项 catalog canary(maintainability/full semantic vocabulary)通过,无失败、跳过或 manual hold;advisory 没有支持的新增 vocabulary carrier,但测试路径/动态语义不在其保证内。遵守 wait_for_ci=false,未查询、轮询或等待 CI。首次覆盖搜索使用不存在的测试路径,已改为真实 architecture/extensions/control_plane 路径并成功重跑;这是检查命令错误,不是 PR 缺陷。

未验证 live Lark、跨宿主服务恢复或完整用户业务流程;一行测试登记不改变这些行为,也不宣称它们完成。静态扫描原有动态构造/数据输入等覆盖限制保留。回滚是撤回单一登记;未来消费者移除或增加仍需显式审阅,不能自动推导期望集合来隐藏 fan-out 变化。

我的整体评价

APPROVE 当前精确 head。它关闭的是可复现的既有测试清单遗漏,并证明新增消费者会受原有身份守卫约束,具有实际维护价值。没有新 smoke、fixture 或并行决策 owner。未来改进复核认为当前 tuple 是合适的既有归属;拆分大测试文件与本项缺口无关,不在本 PR 扩大重构。运行时、持久化状态、权限和默认入口均未改变;此结论不授予合并或发布权限。

English verdict: APPROVE - a058001. Adds the genuine existing result_files consumer to the reviewed digest-ownership pin without weakening assertions. Independent immutable-base/head validation:253 head tests passed versus one reproduced base omission;18 paired head cases include two copied-pattern mutations that the base misses. Standard premerge passed; CI not consulted. No production behavior or delivery-completion claim.

@mikamikasuki

Copy link
Copy Markdown
Contributor Author

CI attribution update: Run 37712780676's Python JUnit artifact includes a failure for tests/control_plane/test_remote_location_shape_owner.py in the decision_context file-URL case. I reproduced it on exact current main 44931b6 with uv run --extra test python -m pytest -q tests/control_plane/test_remote_location_shape_owner.py -k decision_context: the file URL is rejected with the existing local-path message, while the s3 URL case passes. This is an existing test-expectation mismatch outside this PR's one-line consumer-manifest change. PR #5930 updates the test to assert each entry point's file-URL message separately from its remote-URL message; it changes tests only and leaves runtime behavior untouched.

Signed-off-by: mika <211269698+mikamikasuki@users.noreply.github.com>
@mikamikasuki
mikamikasuki force-pushed the codex/loopx-content-digest-consumer-manifest branch from a058001 to bc0c18e Compare October 8, 2026 02:46
@huangruiteng
huangruiteng merged commit 34bc46c into loopx-project:main Oct 8, 2026
3 checks passed
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.

3 participants