OverviewFilesCommitsIssuesDocsReleasesPeers

godot-keet commits / 36d6836

Fix OTA: use exact version equality instead of numeric comparison
The anti-downgrade guard (rn <= ln) blocked updates when commit count went backwards after a history rewrite (166 → 160). Patch #8 (staging validation) already guards against replication race artifacts, so the version check only needs exact equality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36d6836978c1a04b9a3d995a74abe9f6f4499dd9
by plankatron <fleeky@gmail.com> · 2026-02-22T17:55:16.000Z

Changed files (1) +4 -4

.pear-git/ci.yaml +4 -4
……@@ -63,10 +63,10 @@ steps:
6363 # Costs 71MB disk but saves minutes of P2P bandwidth per update.
6464 sed -i '/fs.promises.rm(this.next/d' $RT
6565
66 # 6. Numeric version comparison — prevent downgrades during replication race.
67 # On fresh corestore, append fires at intermediate lengths. checkout(oldLength)
68 # returns an old deploy's package.json with a LOWER version. Skip unless newer.
69 sed -i 's/JSON.parse(manifest).version === this.version/(() => { const rn = parseInt((JSON.parse(manifest).version || "0").split(".")[1] || "0"); const ln = parseInt((String(this.version) || "0").split(".")[1] || "0"); return rn <= ln })()/' $RT
66 # 6. Version comparison — skip update only when versions match exactly.
67 # Patch #8 (staging validation) guards against replication race artifacts.
68 # Using exact equality so commit count resets (history rewrites) don't block updates.
69 sed -i 's/JSON.parse(manifest).version === this.version/JSON.parse(manifest).version === String(this.version)/' $RT
7070
7171 # 7. Update this.version after successful mirror — prevents double-fire.
7272 # Without this, _update() sees version mismatch again (this.version is from