Skip to content

refactor(issue_fix): fold reviewer source trust/freshness vocabularies into one owner - #8826

Merged
loopx-agent merged 1 commit into
loopx-project:mainfrom
psychologister:codex/issue-fix-source-vocab-owner
Nov 15, 2026
Merged

loopx-agent merged 1 commit into
loopx-project:mainfrom
psychologister:codex/issue-fix-source-vocab-owner

Conversation

@psychologister

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

  • Outcome basis / optional anchor: Self-contained ordinary maintenance contribution (single-owner convergence); no issue or roadmap id invented.
  • Goal/source and gap: loopx/capabilities/issue_fix/repository_context.py owns the closed trust/freshness sets every issue_fix source payload is validated against. reviewer_recommendation.py restated both under its own names (REVIEWER_SOURCE_TRUST_LEVELS, REVIEWER_SOURCE_FRESHNESS_STATES), so one vocabulary decision had two owners and a drift would let the two validators disagree about the same fields.
  • Observable before → after, with the validation row that proves it: Before — two modules each define the same two sets, so a renamed or value-drifted copy is undetected. After — reviewer_recommendation.py imports both as aliases of the owner objects, and a new census guard fails if any second definition reappears (see the unit and regression_parity rows).
  • Issue/task and intended base: Related to the single-owner convergence direction; base main.

Author Declaration

  • Written by: model_agent

Implemented against

  • Specification and revision: no written specification; the request in this PR is the basis.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
The two source vocabularies are stated only by the owner and read by identity elsewhere implemented loopx/capabilities/issue_fix/repository_context.py (TRUST_LEVELS, FRESHNESS_STATES); reviewer_recommendation.py aliases tests/architecture/test_issue_fix_source_vocabulary_owner.py
  • Self-check before submission: ran the new guard, the issue_fix capability subset, and the full tests/architecture suite on both a pristine base worktree and the head worktree and compared failure sets; ran three mutations against the guard; ran ruff, the public-boundary scan, and the semantic-vocabulary drift smoke. Deliberately left REVIEWER_SOURCE_KINDS local (narrower than the owner) and did not touch the same freshness triple in reward_memory/candidate_review.py (a different capability).

Scope And Continuation

  • Completed scope and remaining work: complete within this scope. The fold removes the duplicate definitions and adds a guard that pins single ownership by value, by identity, and by wiring through both public builders.
  • Slice boundary / successor: N/A — the maintenance outcome is complete. The reward_memory/candidate_review.py freshness triple is a separate capability and a possible future convergence, not part of this slice.

Validation

  • Tested revision: 682af24
  • Run state: finished
  • Input classes: synthetic, public_fixture
Check kind Result Public-safe evidence / limitation
unit passed python -m pytest tests/architecture/test_issue_fix_source_vocabulary_owner.py — 8/8 passed; census-by-value, identity, and wiring through both public entry functions, with positive and negative controls.
regression_parity passed Pristine base vs head on identical selections: tests/architecture base 2 failed / 1842 passed, head 2 failed / 1850 passed; issue_fix subset base 2 failed / 359 passed, head 2 failed / 367 passed. Failure sets byte-identical (pre-existing test_content_digest_single_owner, test_posix_flag_portability, and test_issue_fix_maintainer_correction_admission::test_t06_stopped_goal_refuses_at_effect_time[file/sqlite]); the +8 are the new guard. Three mutations each caught: restored literal copy → census + identity; renamed copy → census only; divergent reviewer set (drops advisory) → identity + wiring while census stays green.
static passed python -m ruff check clean on both changed files; the new guard is ruff format --check clean. The production file was already format-dirty on base; this change is format-neutral and does not reformat it.
real_entrypoint passed loopx check --scan-path <changed files> reports public boundary scan clean: 2 files; the unrelated registry-goal error reproduces identically on the pristine base.
integration passed python examples/semantic-vocabulary-drift-smoke.py reports ok with byte-identical output between base and head; the two sets are not registered kernel vocabularies, so no ratcheted budget moves.
static not_run mypy is not installed in the local environment; neither changed file is in the pinned mypy scope, so the CI mypy gate is unaffected.
  • Coverage and gaps: the changed paths are the two vocabulary definitions and their single consumer (_normalise_reviewer_sources); the guard exercises both public builders across the full owner cross-product and rejects out-of-set values. The full tests/ tree was not run locally — scope was tests/architecture (complete) plus the issue_fix capability subset; the two pre-existing failures are unrelated and reproduce on the pristine base. No UI impact.

Frontend / Visual Evidence

  • UI impact: none
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: none
  • Attention review: N/A
  • Craft 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 (single-owner maintainability convergence).

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A — no TypeScript control-plane or shared Goal Authority claim.
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal: N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths.
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • Existing English/Chinese RFC pairs both have a diff and the local premerge check passes, or no paired RFC changed. (no paired RFC changed)
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

…s into one owner

reviewer_recommendation.py restated the trust and freshness sets that
repository_context.py already owns. Import both as aliases of the owner
objects so the decision has a single source, and add an architecture guard
that pins single ownership by value, by identity, and by wiring through both
public builders. REVIEWER_SOURCE_KINDS stays local (deliberately narrower).

Signed-off-by: psychologister <[email protected]>

@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 max

动机 / Motivation

复审提交 682af24,目标主干 8ade78c。这次改动涉及调整 issue_fix 来源信任级别或时效性取值的维护者,以及走两个入口的调用方。此前改一个允许值要同步两份集合,漏改会让工作规划与评审人推荐对同一来源给出不同判定。现在两个入口读同一对象,基线中第二份声明可由新增测试检出。同一隔离 Git 夹具对照 24 个 CLI 输入。九组合法组合、无来源回退及四项非法取值检查的 JSON 与退出码逐项一致。验证仅涉及本地公开入口与合成仓库。真实外发评审请求及仓库全量测试未重跑。

改动思路 / Approach

工作规划既有 repository_context 定义取值,推荐入口只导入同一对象。两个入口继续验证各自的来源结构。本 PR 只收敛 issue_fix 的 trust 和 freshness 两个词表。工作规划通过既有入口验证 source,推荐侧沿同一集合校验后仍按本地证据生成候选。推荐入口自身只接收 maintainer_map,这个条件继续由原校验器负责。该维护改动以 PR 说明和现有 caller 为验收依据。工作规划的校验归属 · 评审推荐入口

具体改动 / Changes

关键代码讲解

  • repository_context 持有 TRUST_LEVELS 与 FRESHNESS_STATES。reviewer_recommendation 将原模块名作为 import alias,原 _normalise_reviewer_sources 继续验证字段和值。CLI 传入原格式,成功响应、失败诊断及候选的外发权限字段都保持一致。允许值 · 导入 · 推荐来源验证
  • 新测试从三个角度验证变更。扫描覆盖本包的普通 set 字面量,核对实际 import 对象,再用两个公开 builder 覆盖所有合法值和非法字段。把同一守卫放到基线,可检出原重复和对象分离。只在隔离进程内移除 advisory,真实推荐 builder 的全值用例随即失败。定向测试

对主干的风险 / Risks

本地实际运行 reviewer-plan --execute 和 workflow-plan,共比对 24 行成功、缺省及拒绝结果。核对完整 JSON、退出码和诊断。原计划与推荐的字段、排序和权限投影逐项相同。基线 42 项和提交 50 项定向回归全通过。词汇漂移检查输出相同,ruff、编译、diff 与两文件公开边界检查通过。REST 状态显示分支落后于 main,所触及的生产 owner 和消费者在分叉点与当前 main 对应文件相同。

语义与 CI 对齐

本 PR 复用 issue_fix 包内现有闭集。未定义新内核词汇。有效性证据来自上述本地检查。原词表

我的整体评价 / Verdict

通过当前提交的代码审查。两个入口复用同一校验词表,减少再改取值时需要同步的地方。真实入口的成功、失败与默认回退保持原行为。定向验证覆盖本次变更的输入和值域。验证仅涉及本地公开入口与合成仓库。真实外发评审请求及仓库全量测试未重跑。

English verdict: APPROVE. Both issue_fix callers now use the existing vocabulary owner. All 24 matched CLI outcomes preserve the current behavior.

@loopx-agent
loopx-agent merged commit 0f84069 into loopx-project:main Nov 15, 2026
33 of 49 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.

2 participants