Skip to content

fix: align Runtime Host compatible-change epoch - #4204

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:fix/runtime-host-compatible-change-epoch
Aug 29, 2026
Merged

fix: align Runtime Host compatible-change epoch#4204
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:fix/runtime-host-compatible-change-epoch

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Align the Runtime Host compatible-change declaration introduced by #4176 with the current protocol compatibility epoch, 68. This restores the merge-result protocol guard without changing the wire protocol or advancing the epoch.

Root cause

The branch for #4176 created the declaration while its base was at epoch 65. Independent protocol changes advanced main to epoch 68 before #4176 merged.

Git reported no conflict because #4176 did not edit packages/runtime-host/src/protocol/index.ts: the merge result kept main's epoch 68 and added the declaration containing epoch 65. The merge-result guard compares the result with its first parent and requires a newly added compatible-change declaration to match the result's epoch, so it deterministically rejected the mismatched declaration.

This PR changes only the declaration's epoch. It does not modify a wire codec, bump the protocol epoch, change historical result decoding, or add another compatibility path.

Verification

  • Before the fix, node scripts/protocol-epoch-check.mjs --base d7efbb478518525c24d8b6dddcde396683ba36a2 --head 8aed381eab3aa429d786a1aafc137fa7163d4e34 exited 2 with Invalid compatible protocol change declaration.
  • After the fix, node scripts/protocol-epoch-check.mjs --base d7efbb478518525c24d8b6dddcde396683ba36a2 --head HEAD passed with Protocol added a declared compatible extension at epoch 68.
  • node scripts/protocol-epoch-check.mjs --base origin/main --head HEAD passed.
  • node --test scripts/protocol-epoch-check.test.mjs passed: 12 tests.
  • npx biome format --write packages/runtime-host/protocol-compatible-changes/session-catalog-deep-research-import.json passed with no fixes needed.
  • npx biome check packages/runtime-host/protocol-compatible-changes/session-catalog-deep-research-import.json passed.
  • git diff --check origin/main...HEAD passed.
  • Full-repository tests and typechecks were not run because the change is limited to one guard declaration value.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex traced the merge-result guard and historical persistence boundary, authored the one-line declaration fix, ran focused validation, and drafted this pull request. The commit includes a Generated-by: Codex trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

The protocol guard tests and scoped Biome checks pass; typecheck was not run because no typed source changed.

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Update the compatible-change declaration added by apache#4176 to epoch 68, matching the current Runtime Host protocol epoch. This restores the merge-result protocol guard without changing the wire protocol or advancing the epoch.
Generated-by: Codex
@github-actionsgithub-actionsBot added the effort/XS Under 10 readable lines label Aug 29, 2026
@Astro-Han
Astro-Han marked this pull request as ready for review August 29, 2026 17:07

@ARE404ARE404 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving fix: align Runtime Host compatible-change epoch at head 5b6b3347.

I verified the one-line fix against the epoch-guard contract:

  • packages/runtime-host/protocol-compatible-changes/session-catalog-deep-research-import.json changes epoch from 65 to 68. The guard (protocol-epoch-check.mjs) requires a compatible-change declaration's epoch to exactly equal the current RUNTIME_HOST_COMPATIBILITY_EPOCH (value.epoch !== headEpoch → invalid declaration → files not exempted). On this head the epoch is 68, so 65 was a stale declaration that would have made the guard treat session-catalog.ts / session-continuity.ts as incompatible changes and fail; 68 aligns it and restores the exemption.
  • The fix is minimal and numerically correct for this head; the files and reason fields are unchanged.
  • test was still settling on the exact head at review time (run 33264696081, in progress); 0 unresolved threads.

No P0–P2.

简体中文

批准 fix: align Runtime Host compatible-change epoch,head 5b6b3347
对照 epoch-guard 契约核实这一行修复:session-catalog-deep-research-import.jsonepoch 从 65 改为 68。guard(protocol-epoch-check.mjs)要求 compatible-change 声明的 epoch 必须精确等于当前 RUNTIME_HOST_COMPATIBILITY_EPOCHvalue.epoch !== headEpoch → 声明无效 → 文件不被豁免)。本 head 的 epoch 是 68,所以原来的 65 是过期声明,会让 guard 把 session-catalog.ts/session-continuity.ts 当不兼容变更而失败;改成 68 对齐并恢复豁免。修复极简且对本 head 数值正确;files/reason 未动。test 在 exact head 上仍在跑(run 33264696081),approve 时尚未终态;0 未解决线程。无 P0–P2。

@Astro-Han
Astro-Han merged commit bb12562 into apache:mainAug 29, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the fix/runtime-host-compatible-change-epoch branch August 29, 2026 17:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XSUnder 10 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Astro-Han@liuxiaocs7@ARE404