mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
check-layering-ratchet.sh picks bootstrap or incremental mode by whether the base revision carries layering-edges.txt. Once the registry is on the target branch, every PR whose merge base predates that point still lands in bootstrap mode, so a branch that legitimately registers one exception was told its bootstrap differs from the approved 0-edge snapshot. The obvious response to that message — edit the approved baseline — is the opposite of what the gate wants. A gate-version marker cannot separate the two cases: the script and the registry land in the same commit, so "the base has neither" describes both the commit that introduces the gate and any branch that forked before it. The failure now names both situations, says what each one does, and lists the keys it found, so a developer on a stale base sees the row to fix and the rebase that will report it as a new key instead. added_at also becomes immutable on a key the base already carries. That date is the ratchet's clock: it records when the debt was accepted, and moving it makes an old exception look fresh, or a fresh one grandfathered, without touching a single import. owner and reason stay editable — their change is legible in the diff, and locking them would leave no way to hand an exception over, since the gate has no override short of deleting a row the dependency still needs.