chore(ci): pin 后端契约 ref,停止追 develop HEAD(修 develop 反复打红) - #74
Merged
Merged
Conversation
根因:codegen-diff / cell-manifest-diff 两个 Hard 门每次 CI 对后端 develop HEAD(未 pin)重生成校验 → 后端任意推进,前端零改动也红(cells→corecells、 contracts 漂移、#70/#72 两产物错位对应不同后端 SHA)。 - 新增 tools/.gocell-ref(pin = 0a3e1c548);两个 workflow 改为 checkout 该 SHA 而非 develop HEAD → 后端推进不再无故打红前端 CI。 - 把 develop 上错位的产物对齐重生成到 0a3e1c548:contracts 落地 http.auth.decide.v1 类型(BR-004,仅类型不接 UI);manifest 记录 accesscore 新 serve 的 decide 契约。 - 吸收后端变更改为显式 bump-ref PR(流程见 .gocell-ref 头注 + ADR)。 - ADR docs/adr/20260618-01-pin-backend-contract-ref.md 记录决策 + 备选(vendor / submodule / Buf BSR 长期方向)。 Closes #73 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
修复 develop 反复被后端推进打红的根因。
codegen-diff/cell-manifest-diff两个 Hard 守门每次 CI 对后端 develop HEAD(未 pin) 重生成校验,后端任意推进 → 前端零改动也红(cells→corecells、contracts 漂移、#70/#72 两产物错位对应不同后端 SHA → develop 当前双门红)。改为 pin 后端 ref:
tools/.gocell-ref记录后端 SHA,两个 workflow checkout 该 SHA 而非 develop HEAD。后端推进不再无故打红前端 CI;吸收后端变更 = 显式 bump-ref PR。改动
tools/.gocell-ref=0a3e1c548(带头注说明 bump 流程)。codegen-diff.yml/cell-manifest-diff.yml):加 "Read pinned backend ref" step + 后端 checkoutref: <pin>。http.auth.decide.v1(BR-004 PDP decide,仅类型,不接 UI)+ index.ts。http.auth.decide.v1。docs/adr/20260618-01-pin-backend-contract-ref.md:决策 + 后果 + 备选(vendor / submodule / Buf BSR 长期方向)。为什么这样修
绑后端契约是对的(类型安全单源);错在绑后端的活动分支 HEAD。pin 到一个前端控制的 SHA → 后端解耦,前端自主决定何时吸收。两个守门仍是 Hard(codegen +
git diff --exit-code),只是输入从"移动的 HEAD"换成"确定的 SHA"。涉及包
tools/codegen+tools/cell-manifest(经 CI)、@gocell/contracts(生成,+auth/decide)、@gocell/devboard(生成 manifest)、.github/workflows、docs/adr。Test plan
GOCELL_CONTRACTS_DIR=<gocell@0a3e1c548>/contracts pnpm codegen+GOCELL_CELLS_DIR=.../corecells pnpm cell-manifest→ 产物与本 PR 一致(CI pin 同 SHA 必复现)pnpm -w typecheck/pnpm -w lint— pass / 0pnpm -w test --run— 1760 passed (118 files)0a3e1c548触及
packages/contracts/✅ 因 pin 对齐 + 落地
http.auth.decide.v1(后端 #2300 / BR-004)。由 codegen 派生未手改。CI 用 pin 的 SHA 复现。关联
Closes #73 · 续 #66/#70(契约漂移)、#71/#72(cells→corecells);为后续 device-identity/policy/decide 的 UI 接线预留(经 bump-ref 显式吸收)。
🤖 Generated with Claude Code