Skip to content

Commit 7aac5f3

Browse files
committed
fix: bound validate v52 precompact smoke
1 parent 53ad230 commit 7aac5f3

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

‎changelogs/unreleased.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- **本地候选修复 — 验证入口、产物状态投影与 Profile 当前真相刷新**:收紧 active-root 产物 stale CP 状态检测,避免把“待用户确认是否提交”等非 CP 文案误判为 CP1/CP2 阻断;默认 `test:fast/full/delivery/boundary/profile-deploy/package-release` 改为 `human-cli --plan` 入口并补充 `:ai` 严格变体,避免 Codex/AI 环境缺 `contextEpoch` 时本地 plan 命令误红;新增 `profile-current:refresh` 标准命令,用于更新 active Profile `ProfileCurrentTruthV1` 的当前源码 HEAD 与 source candidate 身份。本项仅为本地源码候选,未 tag、未 publish、未刷新 MCP。
1616
- **本地候选修复 — 验证入口派生资产与 Profile 边界**:将默认 `test` / `test:changed` / scoped route 入口恢复为执行型验证,新增显式 `test:plan` / `test:*:plan` 作为零执行预览入口,避免 plan-only 被误读为测试已执行;把 `scripts/refresh-profile-current-truth.js` 纳入 profile boundary 与 `profile-governance` 输入闭包,确保修改 Profile current truth refresh 脚本时触发 profile 验证;刷新 `content/skills/portfolio.json`。本项仅为本地源码候选,未 tag、未 publish、未刷新 MCP。
1717
- **本地候选修复 — 运行态可观测性与历史债务收敛**:`validate.js` 现在对每个 V 探针输出 start/done heartbeat,V7 改为有界 fast-path smoke,避免聚合校验无界卡死;visible reply evidence 绑定当前 promptCount,无 payload 时不再继承旧 precheck;`memory_status` 增加 `summaryCurrentProjection`,显式区分 append-only SUMMARY 历史与当前折叠状态;artifact checker 新增 digest-bound `HistoricalArtifactIssueDispositionV1`,用于精确处置历史 unknown/stale/conflict 产物噪声。本项仅为本地源码候选,未 tag、未 publish、未刷新 MCP。
18+
- **本地候选修复 — validate V52 有界 PreCompact smoke**:为 `scripts/test-cli-behavior.js` 增加零写入 `--codex-precompact-smoke` 子入口,V52 改为调用该 scoped smoke 并设置 timeout,完整 CLI 行为套件继续由 validation DAG 的 `cli-behavior` 节点承担;全量 `validate.js` 已证明 V52 可在约 1.55s 内完成并继续推进。本项仅为本地源码候选,未 tag、未 publish、未刷新 MCP。
1819

1920
- **v1.20.0 发布候选 — 任务连续性与工程控制面升级**:汇总 Stage A/B 的任务写入代际、合法 CP 演进续代、taskless 恢复、项目优先 Profile、多语言连续性、分层 SkillRoute、宿主原生多 Agent 编排合同、验证执行提速与修复批次收敛。完整说明见 [`changelogs/releases/v1.20.0.md`](./releases/v1.20.0.md)。正式发布事实仍只由 tag、registry、GitHub Release 与发布后安装回读共同成立。
2021
- **两阶段精确制品发布防护**:tag 资格阶段只生成一个正式精确 tarball,对同一制品完成隔离 consumer/HOME/prefix/cache/workspace 安装并保存;本机复用该制品完成真实 Codex G1→G2 后,才通过 `publish-qualified` 续发 npm 与 GitHub Release,避免 tag 触发后未经真实宿主验收即发生不可逆发布。

‎scripts/lib/validate-governance-intake.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,13 @@ function buildGovernanceIntakeChecks(ctx) {
666666
console.log('[V52] cli-behavior executable suite delegated to validation DAG; static Codex adapter probes retained')
667667
} else {
668668
try {
669-
execSync('node scripts/test-cli-behavior.js', { cwd: ROOT, stdio: 'pipe', encoding: 'utf8' })
669+
execSync('node scripts/test-cli-behavior.js --codex-precompact-smoke', {
670+
cwd: ROOT,
671+
stdio: 'pipe',
672+
encoding: 'utf8',
673+
timeout: 45000
674+
})
675+
console.log('[V52] bounded Codex PreCompact adapter smoke passed')
670676
} catch (e) {
671677
const detail = String((e.stderr || e.stdout || e.message || '')).trim().split('\n').slice(0, 8).join(' | ')
672678
err(`[V52] test-cli-behavior failed${detail ? `: ${detail}` : ''}`)

‎scripts/test-cli-behavior.js‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,20 @@ function assertCodexAdapterState(root) {
305305
)
306306
}
307307

308+
function assertCodexPreCompactHookConfig(hooks) {
309+
const preCompactEntries = hooks.hooks?.PreCompact || []
310+
assert.ok(Array.isArray(preCompactEntries) && preCompactEntries.length > 0, 'missing Codex hook event: PreCompact')
311+
const commands = JSON.stringify(preCompactEntries)
312+
assert.ok(
313+
commands.includes('lifecycle.cjs') && (commands.includes('.codex') || commands.includes('codex')),
314+
'unexpected hook command for PreCompact'
315+
)
316+
assert.ok(
317+
commands.includes('manual|auto'),
318+
'Codex PreCompact hook must match manual and auto compaction triggers'
319+
)
320+
}
321+
308322
function assertClaudeMergeState(root, { claudeMdManaged }) {
309323
const settings = readJson(root, '.claude/settings.json')
310324
const mcp = readJson(root, '.mcp.json')
@@ -1036,6 +1050,10 @@ function testCodexInitBootstrapsWorkspaceNamespaceData() {
10361050
fs.rmSync(root, { recursive: true, force: true })
10371051
}
10381052

1053+
function testCodexPreCompactAdapterSmoke() {
1054+
assertCodexPreCompactHookConfig(JSON.parse(fs.readFileSync(path.join(ROOT, 'codex', 'hooks.json'), 'utf8')))
1055+
}
1056+
10391057
function testCodexInitBacksUpManagedFiles() {
10401058
const root = createTempRoot('devcodex-cli-codex-init-')
10411059
writeFile(root, 'package.json', '{ "name": "tmp-codex-init" }\n')
@@ -1633,4 +1651,9 @@ function main() {
16331651
process.stdout.write('cli behavior test passed\n')
16341652
}
16351653

1636-
main()
1654+
if (process.argv.includes('--codex-precompact-smoke')) {
1655+
testCodexPreCompactAdapterSmoke()
1656+
process.stdout.write('cli Codex PreCompact adapter smoke passed\n')
1657+
} else {
1658+
main()
1659+
}

0 commit comments

Comments
 (0)