Release alpha 0.6.8 autochess legacy state fix
check / local-gate (push) Failing after 1m33s

This commit is contained in:
JWeBot Contributors
2026-10-15 18:18:00 +08:00
parent 3dea42b268
commit 5125b827c0
17 changed files with 95 additions and 21 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-config"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Profile-based configuration compiler for JWeBot"
requires-python = ">=3.9"
dependencies = [
@@ -36,4 +36,4 @@ __all__ = [
"write_default_profile",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-extension-host"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Single-release, single-invocation process host for JWeBot extensions"
requires-python = ">=3.9"
dependencies = [
"jwebot-sdk==0.6.7a0+1015",
"jwebot-kernel==0.6.7a0+1015",
"jwebot-sdk==0.6.8a0+1015",
"jwebot-kernel==0.6.8a0+1015",
]
[project.scripts]
@@ -16,4 +16,4 @@ __all__ = [
"process_request",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"
+4 -4
View File
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-kernel"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Stable routing and extension authority for JWeBot"
requires-python = ">=3.9"
dependencies = [
"jwebot-config==0.6.7a0+1015",
"jwebot-sdk==0.6.7a0+1015",
"jwebot-official-extensions==0.6.7a0+1015",
"jwebot-config==0.6.8a0+1015",
"jwebot-sdk==0.6.8a0+1015",
"jwebot-official-extensions==0.6.8a0+1015",
"tomli>=2; python_version < '3.11'",
]
@@ -107,4 +107,4 @@ __all__ = [
"verify_installed_release_signature",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"
@@ -3837,6 +3837,29 @@ class Ledger:
self._validate_autochess_state(new_state)
run_id = str(new_state["run_id"])
season_number = int(new_state["season_number"])
if (
stored is not None
and str(stored["run_id"]) != run_id
and str(stored["state"]) in {"registration", "active"}
):
archived_state = dict(state or {})
archived_state["status"] = "cancelled"
archived_state["phase"] = "cancelled"
self.connection.execute(
"""
UPDATE autochess_runs
SET state = 'cancelled',
state_json = ?,
updated_at = ?
WHERE group_fingerprint = ? AND run_id = ?
""",
(
canonical_json(archived_state),
timestamp,
group,
str(stored["run_id"]),
),
)
existing = self.connection.execute(
"""
SELECT created_at FROM autochess_runs
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-official-extensions"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Reviewed local command adapters and broker implementation for JWeBot"
requires-python = ">=3.9"
dependencies = [
"jwebot-sdk==0.6.7a0+1015",
"jwebot-sdk==0.6.8a0+1015",
]
[tool.setuptools.packages.find]
@@ -90,4 +90,4 @@ __all__ = [
"render_feature_list",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"
@@ -2834,7 +2834,16 @@ class CsMajorAutochess:
if action == "unknown":
return respond(state, self.rules())
if action == "create":
if state is not None and state.get("status") in {"registration", "active"}:
legacy_active = (
state is not None
and state.get("status") in {"registration", "active"}
and int(state.get("schema_version") or 0) < 3
)
if (
state is not None
and state.get("status") in {"registration", "active"}
and not legacy_active
):
return respond(
state,
f"{state['event_title']} 已在进行中;发送 /自走棋状态 查看",
@@ -2878,6 +2887,8 @@ class CsMajorAutochess:
f"{state['event_title']} 开放报名;主持人 {display_name} 已自动加入。"
"支持 2~8 人;发送 /自走棋报名,主持人发送 /自走棋开赛。"
)
if legacy_active:
text = "已保留旧版未完成赛事档案,并开启新版赛季。" + text
story = _story(state, "registration_open", text, {"host_person_key": person_key})
return respond(state, text, stories=[story])
if state is None:
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-sdk"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Typed, capability-limited extension API for JWeBot plugins"
requires-python = ">=3.9"
dependencies = []
@@ -38,4 +38,4 @@ __all__ = [
"SingleGroupContext",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"