Repository navigation
feat(consolidation): 整理默认改为 resolution=auto_v1(C-B2) - #140
Merged
Merged
Conversation
consolidation_hidden_v3 passed on 2026-11-11, so auto_v1 becomes the default. - DEFAULTS, the settings request model and the missing-field fallback all use auto_v1; unknown or retired values still normalize to report_only_v1. - Migration 038 switches the stored value to auto_v1 only when it is still the migration-written report_only_v1 and admin_operations has no consolidation_settings_saved record. Any admin save, whatever it saved, keeps the stored value. Run snapshots are not touched. - Settings page marks auto_v1 as the default; the selection still follows the server value and can return to report_only_v1. Frontend rebuilt. - Report-only suites opt in through a report_only fixture; new tests cover new and upgraded databases, admin choices, fallbacks and the settings API. - README and ARCHITECTURE describe the new default and the migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
C-B2:整理默认改为
resolution=auto_v1(consolidation_hidden_v3 门槛已于 2026-11-11 通过;依据 DECISIONS.md 2026-11-10「全自动阶段计划」C 线)。只改默认值,auto_v1 的行为、提示词、护栏和评测工具都不变。未调用真实模型。改动
默认值:
consolidation.DEFAULTS、settings_api.ConsolidationSettings的请求默认值、读取时缺字段(或缺整行)的回退都是auto_v1。未知或旧值(conservative_v2、rewrite_v2、original_v1等)仍由normalize_resolution归一成report_only_v1,未改。迁移 038(
038_consolidation_default_auto.sql):只在同时满足以下两条时把runtime_settings.consolidation.resolution改为auto_v1:report_only_v1;admin_operations没有任何action='consolidation_settings_saved'记录。判定依据:整理设置只有
PATCH /admin/api/settings/consolidation一条写入路径。它每次保存完整的有效设置,并在同一事务写consolidation_settings_saved(保存运行时间也走这条路径)。admin_operations的行不会删除,清除功能只把details_json改写成{"redacted":true},action保留。迁移 034(max_calls 50→300)用的是同一判定。所以保存过任意整理设置的库,无论保存了什么值(包括 feat(consolidation): resolution=auto_v1(规格 C) #139 之前只改预算或开关的保存),都保持原值。未知值和缺字段的旧库不改写。运行快照(consolidation_runs.settings_json)不动,已接受、未完成的运行按原快照的report_only_v1完成。设置页:选项标注改为“自主处理(默认)”,“只报告”去掉“(默认)”。下拉框的选中值仍取服务端返回值,可以退回
report_only_v1。前端只在服务端缺这个字段时回退report_only_v1,这一行原样保留,服务端总会返回该字段。已执行npm ci、npm test、npm run build,构建产物一起提交。README/ARCHITECTURE:整理默认值描述改成现状,补充迁移 038 的判定;“合并待核对”建议和“矛盾依赖只报告”两段注明只适用于“只报告”模式。
测试
tests/test_consolidation_default_auto.py,覆盖:ConsolidationSettings.test.tsx增加用例:服务端返回 auto_v1 时下拉框显示 auto_v1 并标“(默认)”,可以退回只报告并保存。conftest.report_onlyfixture 固定存储值,以及用例整体替换设置时的缺字段回退;test_consolidation、test_consolidation_annotations、test_merge_details、test_consolidation_details_v3;test_consolidation_budget的 180 秒用例、test_purge_review的依赖复核用例;test_maintenance_cognition的两个开关用例在设置里写明report_only_v1。test_consolidation_auto的默认/归一化、新库、设置接口用例,以及test_consolidation_eval的 DEFAULTS 断言。test_media_retention的旧备份用例先回退 038(只删迁移记录,038 不改表结构)。--locked --isolated):5843 passed、1 failedtests/test_persona_streaming.py::test_future_deadline_closes_stream_worker_and_preserves_shared_client是已有问题,与本 PR 无关:feat(consolidation): resolution=auto_v1(规格 C) #139 已记录它在 origin/main 上同样失败;本分支首次全量运行时它通过过,结果不稳定。npm test(35 个文件、471 个用例)、npm run build、uv build都通过。请规划者确认
action,不限定 actor(迁移 020 的 persona 判定还要求actor=admin)。consolidation_settings_saved只由管理接口写入,actor恒为 admin,两种写法结果相同;不加 actor 条件更保守。run_settings和续跑时也用同一个 DEFAULTS。现存快照都带 resolution 字段(代码写入的快照总有这个字段,迁移 016/019 也补了),所以回退到 auto_v1 不会让旧运行改用 auto_v1。