Record 203 production deployment of switchbot and pickup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-15 21:58:53 +09:00
co-authored by Claude Opus 5.5
parent 3b7e158ba6
commit a5293945b7
4 changed files with 21 additions and 0 deletions
+2
View File
@@ -23,3 +23,5 @@ python3 tests/features/test_calendar.py
On FreeBSD compile `tests/features/dungeon_lua_probe.cpp` with `-std=c++17`, game/src and liblua/include include paths, linking project's liblualib.a then liblua.a and -lm. Run with the installed compiled quest files `quest/object/state/dragon_lair_access` and `dragon_lair_weekly`. This independent process does not connect to the game/DB and does not modify quest files. It verifies actual task functions rather than hardcoded fixture timing alone.
The full game target was rebuilt only under `/root/metin2-features-dev`, with forced rebuild of item_manager.cpp/cmd_general.cpp. No production binary replacement, restart, DB migration or event activation occurred. Live deployment acceptance, real Android interaction, other dungeons and other activity types remain outside this batch.
Update 2026-10-15: this code went live on 203 together with switchbot and pickup (main `3b7e158`); see the production deployment section of FEATURE-SWITCHBOT.md. No `port_events.tsv` is installed, so the calendar gates are still inert.
+7
View File
@@ -57,4 +57,11 @@ Capability: the MTF1 cap mask advertises bit 128 (127 -> 255). The client also f
- nothing left → `done 0 0 0`, and an immediate second command → `error rate`.
- `log.log` has one `GET` row per item, matching the `DROP` rows. The original path logs no GET for yang.
- The core's syserr shows no new errors. The LOCALE_ERROR there comes from the original yang-drop message.
- Live acceptance on CH1 (13000) after the deploy, with the same scenario as the channel-5 test: mask 2 → `done 1 1 0`, mask 48 → `done 2 2 0`, mask 255 → `done 3 3 0` (yang restored), then `done 0 0 0` and `error rate`.
- Not done yet: a live full-inventory run and Android device validation.
## Production deployment
- 2026-10-15 14:51, approved by the user. The 203 live cores now run main `3b7e158` (`game` sha256 `0d798ec0…`, the binary the channel-5 core was tested with). The db binary is unchanged. Live `/usr/metin2/src` was at `4577d86`, so the deploy also shipped `1a36719` (query protocol and calendar drop gates; the gates stay inert without `port_events.tsv`).
- Package `/root/deploy-features/20261015-features` (`deploy.sh check|go|rollback`, `SHA256SUMS`). The previous `game`/`db` are in `/root/backup-bin/20261015-145122` (recorded in `LAST_BACKUP`), and the replaced `/usr/metin2/src` files are in `src-before/`. `sh deploy.sh rollback` restores both.
- The first `go` stopped at `rebuild.sh stop_server` ("server still running" after about 38 s, cores still exiting) before any backup or copy; the second `go` succeeded. `start.sh` was answered with `1`, which starts only CH1 and game99, so CH2–CH4 were started afterwards with each `run.sh` in the `start.sh` order. The channel-5 test core was restarted too, giving the pre-deploy layout of 14 cores plus db and auth. The new syserr entries contain only the existing `new_quest_lv52` LUA_ERROR (present since 2026-09-21).
+2
View File
@@ -70,3 +70,5 @@ No live 203 binary was replaced, no service was restarted and no DB schema was c
`dungeons` uses subject/offset 0 and a complete stat-style snapshot, capped at 128 fields. Mandatory lair keys: end, join_end, phase (0 new run possible, 1 join window, 2 room busy), ticket, tickets, boss, owned, alive, npc, map, each prefixed `lair_`. The original strict negative cooldown test is preserved: a new run is available only after end, not at end. `lair_phase` is not authorization to enter. Optional weekly group must be complete: weekly_end, weekly_hunt_end, weekly_active, weekly_npc, weekly_map. These are personal collection-task times, independent of shared room admission. A running/unloaded own quest returns busy; missing/invalid settings return unsupported.
`calendar` uses subject 1, offset 0..4096, page size 8, total at most 256. Event rows contain only bounded IDs/numeric data. Kind 1 moonlight-box, 2 Christmas-sock; time/scope semantics in FEATURE-DUNGEON-CALENDAR.md. ACTIVE reflects the interval and requesting character's current channel/empire. UI renders UTC dates, resynchronizes after sleep, and only fires opt-in reminders from freshly confirmed snapshots. No client-authored schedule or progress update command exists.
Update 2026-10-15: this code went live on 203 together with switchbot and pickup (main `3b7e158`); see the production deployment section of FEATURE-SWITCHBOT.md. No `port_events.tsv` is installed, so the calendar gates are still inert.
+10
View File
@@ -73,8 +73,18 @@ Capability: the MTF1 cap mask advertises bit 64 (63 -> 127). Clients that don't
- 76014 with 6 scrolls and limit 10 → `no_scroll` after 6 rolls.
- 71151 on the level-90 sword (the original path allows limit level <= 40) → `rejected` with 0 rolls and the scroll kept.
- Every roll wrote one `CHANGE_ATTRIBUTE` row. The core's syserr shows no new errors; the `new_quest_lv52` LUA_ERROR also appears on the live cores.
- Live acceptance on CH1 (13000) after the deploy, sword 279 and scroll 71084:
- two alternatives with minimum 1 → `matched` after 2 rolls;
- three attributes at the maximum with limit 10 → `limit` after 10 rolls, scrolls 157 → 147;
- `stop` after 1 s → `stopped` after 4 rolls.
- Not done yet: Android device validation.
## Production deployment
- 2026-10-15 14:51, approved by the user. The 203 live cores now run main `3b7e158` (`game` sha256 `0d798ec0…`, the binary the channel-5 core was tested with). The db binary is unchanged. Live `/usr/metin2/src` was at `4577d86`, so the deploy also shipped `1a36719` (query protocol and calendar drop gates; the gates stay inert without `port_events.tsv`).
- Package `/root/deploy-features/20261015-features` (`deploy.sh check|go|rollback`, `SHA256SUMS`). The previous `game`/`db` are in `/root/backup-bin/20261015-145122` (recorded in `LAST_BACKUP`), and the replaced `/usr/metin2/src` files are in `src-before/`. `sh deploy.sh rollback` restores both.
- The first `go` stopped at `rebuild.sh stop_server` ("server still running" after about 38 s, cores still exiting) before any backup or copy; the second `go` succeeded. `start.sh` was answered with `1`, which starts only CH1 and game99, so CH2–CH4 were started afterwards with each `run.sh` in the `start.sh` order. The channel-5 test core was restarted too, giving the pre-deploy layout of 14 cores plus db and auth. The new syserr entries contain only the existing `new_quest_lv52` LUA_ERROR (present since 2026-09-21).
## Open items
- Attribute lock: AVA2 stores it at attribute index 7, which the current 7-slot layout cannot hold. It needs its own storage design (see the client migration plan, phase 6).