Skip to content

补齐 operational tunable package 默认 #392 ⟦AI:AUTO-LOOP⟧#393

Merged
loning merged 3 commits into
auto-refact-devfrom
dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev
May 31, 2026
Merged

补齐 operational tunable package 默认 #392 ⟦AI:AUTO-LOOP⟧#393
loning merged 3 commits into
auto-refact-devfrom
dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 31, 2026

摘要

验证

  • cargo test --workspace -- --test-threads=1
  • bash conformance/operational_tunable_defaults.sh
  • bash scripts/release_test.sh
  • bash conformance/run_all.sh

关联 #392

⟦AI:AUTO-LOOP⟧

Trigger source: #392 fresh-host package default 补漏。

Action type: 完成已 consensus 的 #388 scope,补齐 operational tunable package ship 默认并加 fresh-host 防漏守卫。

Equivalence: operational-tunable-package-defaults。

Later reuse: fresh host 可从 share/fkst/tunables 读取 operational 默认;conformance 从源码读取点核对 package 默认。

Failure owner: #388/#392 operational tunable defaults。

关联 #392。

⟦AI:FKST⟧
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 31, 2026

🤖 quality review 通过

TL;DR

  • 这是什么: PR 393 的代码质量审查,聚焦命名、简单性、复杂度、死代码和注释质量。
  • 结论: approve,变更集中,新增派生检查函数可读,没有发现质量维度阻断点。
  • 下一步: controller 可以把这条作为 quality reviewer 的通过票继续汇总。

详细说明

我已按要求先刷新 origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev,再用 git ls-tree 确认 PR HEAD 的实际 tree,并通过 git show 读取 touched files 的最新内容。审查基于 origin/auto-refact-dev...origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev 的三点 diff。

质量角度没有发现需要 comment 或 reject 的问题。conformance/operational_tunable_defaults.sh 里新增的 operational_tunable_read_paths 责任单一,命名贴合业务意图;scripts/release_test.sh 只是同步 fixture 默认值;两个新增 tunable 文件是本次变更的直接目标,不属于无关 cleanup。相关验证命令 bash conformance/operational_tunable_defaults.shbash scripts/release_test.sh 均通过。


📎 完整 codex 原始输出
---
pr: 393
role: quality
verdict: approve
---

## Verdict
approve: 本 PR 变更集中,命名和结构清楚,没有引入明显死代码、误导性注释、单实现过度抽象或无关 cleanup。

## Evidence
- 已按 fresh PR HEAD 验证 tree 中存在本次引用文件:`conformance/operational_tunable_defaults.sh``scripts/release_test.sh``share/fkst/tunables/archive_prefix.txt``share/fkst/tunables/evolve_approach_converge_seconds_budget.txt`- `conformance/operational_tunable_defaults.sh:49``check_package_files` 仍只负责 package tunable 文件存在性与 host-only tunable 排除检查;新增 `operational_tunable_read_paths` 名称表达清楚,函数约 21 行,未增加复杂控制流。
- `conformance/operational_tunable_defaults.sh:67` 从源码中派生 operational tunable 路径,排除测试与 host-policy tunable 的逻辑集中在一个函数内;未出现三处以上重复片段需要抽取,也未新增 filler comment 或历史叙述注释。
- `scripts/release_test.sh:163` 只同步 fixture 默认值从 `900``1800`,属于相关测试 fixture 更新,不是无关 drive-by change。
- 验证已通过:`bash conformance/operational_tunable_defaults.sh``bash scripts/release_test.sh`。

REVIEW_DONE:393:quality:approve

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 31, 2026

🤖 tests reviewer:缺少 conformance 扫描器自测 fixture,建议先挡下

TL;DR

  • 这是什么:PR 393 的测试质量 review,聚焦新增/变更测试是否真的覆盖生产风险。
  • 结论:reject,当前 live conformance 和 release 测试能过,但新增的 tunable 扫描 guard 没有自己的 good/bad fixture 自测。
  • 需要 maintainer 做什么:补 operational_tunable_defaults.sh --self-test 并从 conformance/run_all.sh 调用,覆盖生产路径扫描、host-only 排除、test/support 忽略三类场景。

详细说明

我按 prompt 先强制 fresh fetch,并只读 origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev 的 tree/content。当前 PR 把 conformance/operational_tunable_defaults.sh 从静态默认清单推进成源码扫描器:它会用 git grepshare/fkst、Rust srcscripts/fkst-config.sh 等生产路径,再排除测试、support、conformance 和 host-only tunable。

问题不是现有仓库跑不过。相反,我在 fresh PR HEAD 的 detached 临时 worktree 里跑了 bash conformance/operational_tunable_defaults.shbash scripts/release_test.sh,都通过了。问题是这个 guard 自己没有 --self-test fixture,所以以后如果 grep 范围漏掉 Rust 路径、误纳测试路径、或不再拒绝 package 里的 host-only tunable,runner 没有稳定的 bad fixture 会抓住它。这是 detector/conformance fixture 覆盖缺口,不是“多想一个边角 case”。


📎 完整 codex 原始输出

pr: 393
role: tests
verdict: reject

Verdict

Reject: the PR adds dynamic conformance scanning for operational tunable package defaults, but the scanner has no self-test fixtures that prove newly scanned production paths are covered and host-only tunables are excluded.

Evidence

  • conformance/operational_tunable_defaults.sh:49-87 now derives required package tunable defaults by running git grep over production paths, then excluding test/support paths and host-policy tunables. Verified per fresh PR HEAD with git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:conformance/operational_tunable_defaults.sh: the implementation scans share/fkst, scripts/fkst-config.sh, and Rust src trees, excludes tests/support/conformance, and filters project_rules, protected_layer_paths, integration_branch, host_verify_commands, and accepted_ai_sentinels.
  • conformance/operational_tunable_defaults.sh:148-164 only runs the live repository check. Fresh HEAD has no --self-test branch or fixture builder in that file, and git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:conformance/operational_tunable_defaults.sh | grep -n "self_test\\|--self-test" returned no matches. That leaves this expanded guard without allowed and violating fixtures for the newly scanned production paths, contrary to the detector/conformance-fixture checklist item. A future regression that removes crates/fkst-framework/src from the grep scope or stops rejecting a package-shipped host-only tunable could pass unless the live repo happens to contain the exact triggering shape.
  • conformance/run_all.sh:147-150 invokes bash conformance/operational_tunable_defaults.sh, not --self-test. Verified per fresh PR HEAD with git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:conformance/run_all.sh. This confirms the changed guard is wired into conformance, but its own scan-scope behavior is not independently exercised by runner-dispatched fixtures.

Non-blocking verification notes:

  • Fresh-state commands were run first: git fetch origin dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:refs/remotes/origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev, then git ls-tree -r origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev --name-only.
  • Verified fresh tree contains .github/workflows/ci.yml, conformance/run_all.sh, conformance/operational_tunable_defaults.sh, scripts/release_test.sh, share/fkst/tunables/archive_prefix.txt, and share/fkst/tunables/evolve_approach_converge_seconds_budget.txt.
  • In a detached temp worktree at fresh PR HEAD, bash conformance/operational_tunable_defaults.sh and bash scripts/release_test.sh both passed. This does not close the fixture gap above because live-repo success does not prove the scanner rejects bad fixture shapes.
  • No new sleep/delay, [Skip], manual trait, bump-only assertion, or weakened assertion was found in the touched test/conformance files.

What would change your verdict

Add a self-test path for conformance/operational_tunable_defaults.sh, and dispatch it from conformance/run_all.sh, with fixtures that cover:

  • allowed production references under at least one newly scanned Lua path and one newly scanned Rust or shell path, proving missing package defaults fail;
  • host-only tunables such as tunables/integration_branch.txt or tunables/host_verify_commands.txt, proving package-shipped copies are rejected and source references to them do not require package defaults;
  • ignored test/support/conformance references, proving test-only tunable strings do not create package-default requirements.

REVIEW_DONE:393:tests:reject

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 31, 2026

🤖 architect review approve: Tier II 授权与 fresh-host guard 均通过

TL;DR


详细说明

我按 prompt 先强制 fetch 了 PR ref,再用最新 tree 与 git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:<file> 读实际内容。主要风险是 conformance/operational_tunable_defaults.sh 属 Tier II touch;#388 的 R3 meta-judge 评论已经公开授权这个 operational-default conformance gate,且 PR #393 只补 #392 指出的漏 ship 默认与 guard。

我也跑了 diff anti-pattern scan,没有发现 actor/serializer/sleep/disabled-test/legacy shim/round-stage source marker 类问题;在 PR worktree 上 bash conformance/operational_tunable_defaults.shbash conformance/run_all.sh 均通过。


📎 完整 codex 原始输出
---
pr: 393
role: architect
verdict: approve
---

## Verdict
Approve from the architecture compliance angle; the PR touches a Tier II conformance guard, but the fresh PR HEAD has public #388 deep-consensus authorization for this gate shape and the diff does not introduce a new CLAUDE/AGENTS violation.

## Evidence
- Fresh-state completed first: fetched `origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev`, listed the PR tree, and read current PR HEAD files via `git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:<file>`.
- Changed files verified on PR HEAD: `conformance/operational_tunable_defaults.sh`, `scripts/release_test.sh`, `share/fkst/tunables/archive_prefix.txt`, and `share/fkst/tunables/evolve_approach_converge_seconds_budget.txt` all exist in the refreshed tree.
- Tier II touch checked: `conformance/operational_tunable_defaults.sh:49` introduces the package-file guard and `conformance/operational_tunable_defaults.sh:67` derives operational tunable read paths from source references. CLAUDE.md requires Tier II `SPEC.md + conformance/*.sh` changes to have deep consensus; #388 has public R3 meta-judge consensus at https://github.com/ChronoAIProject/fkst/issues/388#issuecomment-4585958951 explicitly authorizing `conformance/operational_tunable_defaults.sh` as a new/modified operational-default gate.
- Host-policy fail-closed boundary is preserved: `conformance/operational_tunable_defaults.sh:60` through `conformance/operational_tunable_defaults.sh:64` rejects package-shipped `project_rules`, `protected_layer_paths`, `integration_branch`, `host_verify_commands`, and `accepted_ai_sentinels`; `conformance/operational_tunable_defaults.sh:124` through `conformance/operational_tunable_defaults.sh:140` checks missing host `integration_branch` fails before success with a host file.
- Host-configurable substrate facts are not newly hardcoded as fkst-only facts: `share/fkst/fkst/branch_namespace.lua:53` through `share/fkst/fkst/branch_namespace.lua:58` still resolves candidate/archive prefixes through env or tunable-backed configuration, and PR #393 only adds package defaults `archive_prefix=dev-archive-` and `evolve_approach_converge_seconds_budget=1800`.
- Scope honesty holds for the declared #392 follow-up: PR body says it fills missing operational tunable package defaults and adds the fresh-host guard; the diff is limited to that conformance/release/default-file surface.
- Known anti-pattern scan over the diff found no `actor.HandleEventAsync(`, `SubscribeAsync<EventEnvelope>`, JSON serializer state payloads, production `sleep/delay`, sync-over-async marker, raw `HttpClient`, disabled `[Skip]` tests, legacy/deprecated shim markers, or source round/stage labels.
- Verification run in the PR worktree passed: `bash conformance/operational_tunable_defaults.sh` and `bash conformance/run_all.sh`.

## What would change your verdict (only if comment or reject)
N/A

REVIEW_DONE:393:architect:approve

⟦AI:AUTO-LOOP⟧

补齐 conformance/operational_tunable_defaults.sh --self-test,覆盖缺失包默认值失败与完整默认值通过。

让 conformance/run_all.sh 在 operational tunable defaults 序列中执行该自测,并补齐 run_all 自测 fixture 的包默认 tunables。

验证: cargo test --workspace -- --test-threads=1; bash conformance/operational_tunable_defaults.sh --self-test; bash conformance/run_all.sh。

⟦AI:FKST⟧
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 31, 2026

🤖 tests reviewer: reject,conformance self-test 没锁住新增扫描路径

TL;DR

  • 这是什么: PR 393 给 operational tunable 默认值 guard 加了动态扫描和 self-test。
  • 结论: reject,当前 guard 在 PR HEAD 能跑过,但 self-test 不能防止新增扫描路径被删掉。
  • 需要下一步: 给每个新增扫描路径补 allowed + violating fixture,尤其是 share/fkstcrates/fkst-framework/src 的独立坏样本。

详细说明

operational_tunable_read_paths 现在会从多个生产路径里找 tunables/*.txt 引用,这个 guard 本身是在防“生产代码读了 tunable,但 package 默认值没带上”。问题是 --self-test 只删除了 queue_capacity.txt,而这个 tunable 仍被 scripts/fkst-config.sh 引用,所以即使把 share/fkstcrates/fkst-framework/src 从扫描列表删掉,self-test 还是会通过。

我在 fresh PR HEAD 上做了最小变异验证:删除 share/fkstcrates/fkst-framework/src 两个扫描入口后,bash conformance/operational_tunable_defaults.sh --self-test 仍返回 status=0,输出 operational tunable defaults self-test ok。这正好命中 tests prompt 里的 detector/conformance fixtures 规则:扩大扫描范围时,自测必须包含每个新增生产路径的 allowed 和 violating fixture。


📎 完整 codex 原始输出
---
pr: 393
role: tests
verdict: reject
---

## Verdict
Reject: the PR expands the operational tunable conformance scan, but the self-test only proves one overlapping missing-default case and does not lock each newly scanned production path.

## Evidence
- `conformance/operational_tunable_defaults.sh:73-74` now discovers tunable reads with `git grep` across `share/fkst`, `scripts/fkst-config.sh`, `crates/fkst-framework/src`, `crates/fkst-supervisor/src`, and `crates/fkst-common/src`. Fresh PR HEAD verification: `git show origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev:conformance/operational_tunable_defaults.sh` shows `git grep ... -- share/fkst scripts/fkst-config.sh crates/fkst-framework/src crates/fkst-supervisor/src crates/fkst-common/src`.
- `conformance/operational_tunable_defaults.sh:159-168` creates allowed fixture references in `share/fkst/departments/sample/main.lua` and `crates/fkst-framework/src/lib.rs`, but `conformance/operational_tunable_defaults.sh:195` creates the only violating fixture by deleting `share/fkst/tunables/queue_capacity.txt`. That missing default is still referenced by `scripts/fkst-config.sh`, so the bad fixture does not prove the `share/fkst` or `crates/fkst-framework/src` scan entries are enforced.
- Mutation check on fresh PR HEAD confirms the gap: after deleting `share/fkst` and `crates/fkst-framework/src` from `operational_tunable_read_paths`, `bash conformance/operational_tunable_defaults.sh --self-test` still returned `status=0` with `operational tunable defaults self-test ok`. This means a real regression that drops newly scanned production paths would not be caught by the detector self-test.
- Dead-test wiring is present: `conformance/run_all.sh:147-151` calls both `bash conformance/operational_tunable_defaults.sh --self-test` and `bash conformance/operational_tunable_defaults.sh`.

## What would change your verdict
Add self-test fixtures that isolate each scanned production path, with at least one allowed and one violating case per path introduced or covered by the dynamic scan. For example, delete a tunable referenced only by the fixture's `share/fkst` file and assert failure, delete one referenced only by `crates/fkst-framework/src` and assert failure, and keep the current complete fixture as the allowed case.

REVIEW_DONE:393:tests:reject

⟦AI:AUTO-LOOP⟧

触发来源: tests r2 reject POSTED:tests:393 要求锁住 operational tunable 新增扫描路径。

行为类型: 扩展 conformance/operational_tunable_defaults.sh self-test fixture。

等价语义: 每个 production scan root 都有独立 tunable 引用和缺失默认值反例。

可复用性: 后续新增扫描 root 可沿用 expect_scanned_path 与 missing-default fixture 模式。

失败痕迹归属: conformance self-test coverage gap; 验证 cargo test --workspace -- --test-threads=1, bash conformance/run_all.sh, bash conformance/operational_tunable_defaults.sh --self-test。
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 31, 2026

🤖 tests reviewer approve

TL;DR

  • 这是什么: PR 393 的 tests 维度独立审查。
  • 结论: approve,fresh PR HEAD 的新增 guard 自测覆盖新增扫描路径的正反例,且已接入标准 conformance/CI 入口。
  • 下一步: controller 可以把这个 tests verdict 纳入本轮 consensus。

详细说明

我按要求先强制刷新并读取了 origin/dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev 的实际 tree 和文件内容。本次变更主要是让 operational_tunable_defaults.sh 动态扫描更多生产路径里的 tunable 引用,并补齐对应 package 默认值检查。

测试角度看,新增自测不是只跑 happy path:fixture 覆盖 share/fkstscripts/fkst-config.shcrates/fkst-framework/srccrates/fkst-supervisor/srccrates/fkst-common/src 五类扫描根,先断言完整 fixture 通过,再逐个删除默认 tunable 并断言 guard 失败。conformance/run_all.sh 和 GitHub Actions 的 Run conformance 标准入口都会跑到它,所以没有 dead-test 问题。


📎 完整 codex 原始输出
---
pr: 393
role: tests
verdict: approve
---

## Verdict
approve: fresh PR HEAD 的测试覆盖和门禁接线足够覆盖本次 tunable default guard 变更。

## Evidence
- `conformance/operational_tunable_defaults.sh:67``operational_tunable_read_paths` 新增扫描 `share/fkst``scripts/fkst-config.sh``crates/fkst-framework/src``crates/fkst-supervisor/src``crates/fkst-common/src`,并排除 test/conformance 路径;`conformance/operational_tunable_defaults.sh:148` 的自测 fixture 为每个新增扫描根写入一个 tunable 引用,`conformance/operational_tunable_defaults.sh:241` 先验证完整 fixture 通过,再逐个删除默认文件并断言 guard 失败,覆盖了新增扫描范围的 allowed 与 violating fixture。
- `conformance/run_all.sh:147` 在标准 `check_operational_tunable_defaults` gate 中显式运行 `bash conformance/operational_tunable_defaults.sh --self-test` 和主 guard;`conformance/run_all.sh:388` 也在 `run_all.sh --self-test` 中显式调用该自测,`.github/workflows/ci.yml:17` 通过 `bash conformance/run_all.sh` 跑标准入口。因此新增自测不是 dead test。
- Fresh PR HEAD 上已验证实际 tree 包含 `conformance/operational_tunable_defaults.sh``conformance/run_all.sh``scripts/release_test.sh``share/fkst/tunables/archive_prefix.txt``share/fkst/tunables/evolve_approach_converge_seconds_budget.txt`。我还运行了 `bash conformance/operational_tunable_defaults.sh --self-test``bash conformance/operational_tunable_defaults.sh``bash conformance/run_all.sh --self-test`,均通过。
- Diff grep 未发现新增 `sleep`/`delay` pacing、`[Skip]``Manual` trait、`Assert.True(true)` 或明显断言放松。

REVIEW_DONE:393:tests:approve

⟦AI:AUTO-LOOP⟧

@loning loning merged commit 00d6715 into auto-refact-dev May 31, 2026
2 checks passed
@loning loning deleted the dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev branch May 31, 2026 10:29
@loning loning restored the dev-rc-20260531-ship-missing-tunable-default_from_auto-refact-dev branch May 31, 2026 10:36
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