Skip to content

Commit b8f6d31

Browse files
committed
chore: bump to v1.1.1, auto-startup migration & cleanup
- Auto-run `scripts/migrate_bot_keys.ts` on every bot startup so users who update the bot code automatically get their state files renamed (dexbot.ts, bot.ts, unlock.ts) - `runMigration()` now returns a typed result and tracks JSON-key rewrites; no longer prints "No migrations needed" when only JSON keys changed - Migration call wraps `require()` in try/catch; import-time failures are logged to stderr instead of crashing silently - Remove unused `scripts/query_credit_borrowers.ts` ## Testing Notes - npx tsc --noEmit passes
1 parent ff1731e commit b8f6d31

16 files changed

Lines changed: 141 additions & 55 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.1] - 2026-07-12 - Auto-startup Migration, Error Handling & Cleanup
6+
7+
### 2026-07-12
8+
9+
- **Feat**: auto-run `scripts/migrate_bot_keys.ts` on every bot startup — migration now runs from `dexbot.ts`, `bot.ts`, and `unlock.ts` so users who update the bot code automatically get their state files renamed without a manual step. Logs errors to stderr on failure (`scripts/migrate_bot_keys.ts`, `dexbot.ts:140`, `bot.ts:70`, `unlock.ts:89`).
10+
- **Fix**: `runMigration()` now tracks JSON-key rewrites (whitelist, market adapter state/centers) in its return value — the CLI path no longer prints "No migrations needed" when only JSON keys were updated (`scripts/migrate_bot_keys.ts:291-297`).
11+
- **Fix**: migration call in entry points wraps `require()` inside try/catch — import-time failures no longer crash silently; all errors are logged (`dexbot.ts:141`, `bot.ts:71`, `unlock.ts:90`).
12+
- **Chore**: remove unused `scripts/query_credit_borrowers.ts` — no internal references.
13+
- **Chore**: version bumped to 1.1.1 across all manifests.
14+
515
## [1.1.0] - 2026-07-12 - Unique Bot Names, Dust Timer Fix & Credit Collateral Switching
616

717
### 2026-07-12

analysis/ama_fitting/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ama_fitting",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Tools for fitting AMA parameters to market data",
55
"main": "../../dist/analysis/ama_fitting/optimizer_high_resolution.js",
66
"scripts": {

bot.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ const credentialPolicy = require('./modules/credential_policy');
6767
const { PATHS } = require('./modules/paths');
6868
const { Config } = require('./modules/config');
6969

70+
// Auto-migrate bot state files from old stable-ID key format to sanitized-name format
71+
try {
72+
const { runMigration } = require('./scripts/migrate_bot_keys');
73+
runMigration();
74+
} catch (err: any) {
75+
console.error(`Migration error: ${err?.message || err}`);
76+
}
77+
7078
// Setup graceful shutdown handlers
7179
setupGracefulShutdown();
7280

claw/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dexbot2-claw",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"private": true,
55
"description": "Claw bridge and runtime integration layer for BitShares and DEXBot2.",
66
"type": "commonjs",

claw/runtimes/openclaw-plugin/openclaw.plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "bitshares-claw",
33
"name": "BitShares Claw",
44
"description": "Native BitShares and DEXBot2 tools from the DEXBot2 claw integration",
5-
"version": "1.1.0",
5+
"version": "1.1.1",
66
"skills": [
77
"skills"
88
],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bitshares-claw-openclaw-plugin",
33
"private": true,
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"type": "commonjs",
66
"main": "index.js"
77
}

claw/tests/test_claw_mcp_transport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function testParserAcceptsJsonlAcrossChunksAndSingleBuffer() {
3030
capabilities: {},
3131
clientInfo: {
3232
name: 'claw-mcp-transport-test',
33-
version: '1.1.0'
33+
version: '1.1.1'
3434
},
3535
protocolVersion: '2024-11-05'
3636
}
@@ -181,7 +181,7 @@ async function testMainEntrypointHandlesRealProcessInitialize() {
181181
capabilities: {},
182182
clientInfo: {
183183
name: 'claw-mcp-transport-test',
184-
version: '1.1.0'
184+
version: '1.1.1'
185185
},
186186
protocolVersion: '2024-11-05'
187187
}

dexbot.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ const { buildMarketAdapterWhitelistNpmArgs } = require('./modules/cli_whitelist_
137137
const credentialPolicy = require('./modules/credential_policy');
138138
const { Config } = require('./modules/config');
139139

140+
// Auto-migrate bot state files from old stable-ID key format to sanitized-name format
141+
try {
142+
const { runMigration } = require('./scripts/migrate_bot_keys');
143+
runMigration();
144+
} catch (err: any) {
145+
console.error(`\x1b[1;31mMigration error:\x1b[0m ${err?.message || err}`);
146+
}
147+
140148
// Setup graceful shutdown handlers
141149
setupGracefulShutdown();
142150

docs/DEXBOT_COMPARISON.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DEXBot vs DEXBot2 — Detailed Comparison Report
22

33
> **Date:** 2026-07-11 *(metrics refreshed against local source trees)*
4-
> **Scope:** Full architectural, functional, and operational comparison between the original [DEXBot](https://github.com/Codaone/DEXBot) (Python, v1.0.0) and DEXBot2 (TypeScript, v1.1.0).
4+
> **Scope:** Full architectural, functional, and operational comparison between the original [DEXBot](https://github.com/Codaone/DEXBot) (Python, v1.0.0) and DEXBot2 (TypeScript, v1.1.1).
55
> **Audience:** Developers, contributors, and operators evaluating or migrating between the two projects.
66
77
---
@@ -36,7 +36,7 @@
3636

3737
| Attribute | DEXBot (original) | DEXBot2 |
3838
|---|---|---|
39-
| **Release Track** | 1.0.0 | v1.1.0 |
39+
| **Release Track** | 1.0.0 | v1.1.1 |
4040
| **Language** | Python 3.6+ | TypeScript 5.x |
4141
| **Status** | Released 1.0.0, unmaintained | Active development |
4242
| **Last Repo Activity** | May 23, 2020 | 2026-07-10 |
@@ -782,7 +782,7 @@ Where:
782782

783783
| Metric | DEXBot | DEXBot2 |
784784
|---|---|---|
785-
| **Release Track** | 1.0.0 | v1.1.0 |
785+
| **Release Track** | 1.0.0 | v1.1.1 |
786786
| **Active Since** | ~2018 | December 2025 |
787787
| **Last Commit** | May 23, 2020 | 2026-07-10 |
788788
| **Total Commits** | 2281 | 1713 at current HEAD |

docs/EVOLUTION.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Executive Summary
44

5-
DEXBot2 is a sophisticated decentralized exchange trading bot for the BitShares blockchain. This report documents the complete evolution of the project from its inception in December 2025 through the current 1.1.0 stable release.
5+
DEXBot2 is a sophisticated decentralized exchange trading bot for the BitShares blockchain. This report documents the complete evolution of the project from its inception in December 2025 through the current 1.1.1 stable release.
66

77
### Key Milestones
88
- **Project Inception**: December 2, 2025
9-
- **Growth Phase**: 1,715+ commits over ~7 active months
9+
- **Growth Phase**: 1,724+ commits over ~7 active months
1010
- **Code Maturity**: Evolution from basic utilities to a ~58,000+ LoC intelligent TypeScript system
1111
- **Stability**: Progression from manual testing to a suite of 200+ automated test files
12-
- **Releases**: 48 release entries (v0.1.0 to v1.1.0)
12+
- **Releases**: 49 release entries (v0.1.0 to v1.1.1)
1313

1414
---
1515

@@ -80,6 +80,8 @@ Consolidated the market adapter with split data sources (Kibana, native API), AM
8080

8181
**Jul 5**: v1.0.8 — secondary pending-broadcasts deadlock fix (missed call site), market adapter log dedup in shared runtime, bot key resolution utilities, candle cache always-resolve. Comprehensive system invariants doc expansion with categorized prefixes (`INV-COW`, `INV-SYNC`, `INV-MAINT`, `INV-GRID`, `INV-RECON`, `INV-BATCH`, `INV-REG`, `INV-SUB`). 5 commits from v1.0.7.
8282

83+
**Jul 12**: v1.1.1 — auto-startup bot-key migration, error handling fixes, JSON-key tracking, cleanup. 1 commit from v1.1.0.
84+
8385
---
8486

8587
## Architecture Evolution
@@ -121,12 +123,13 @@ Compact view; per-commit detail lives in [CHANGELOG.md](../CHANGELOG.md).
121123
| v1.0.11 → v1.0.13 | 17 | Whitelist normalization, grid persistence safety net, dust pipeline fix, net inventory lots |
122124
| v1.0.13 → v1.0.14 | 4 | Per-bot runtime settings override pipeline, doc alignment & chart fix |
123125
| v1.0.14 → v1.1.0 | 7 | Unique bot names, stable ID removal, migration script, duplicate name enforcement |
126+
| v1.1.0 → v1.1.1 | 1 | Auto-startup migration, error handling, JSON-key tracking, cleanup |
124127

125128
---
126129

127130
## Development Statistics
128131

129-
200+ automated test files (all TypeScript), 46 release entries. See **Version History** for commit breakdown by release.
132+
200+ automated test files (all TypeScript), 47 release entries. See **Version History** for commit breakdown by release.
130133

131134
---
132135

@@ -172,7 +175,7 @@ DEXBot2 has matured from a basic grid bot into a signal-intelligent, production-
172175
---
173176

174177
**Report Originally Generated**: February 19, 2026
175-
**Last Updated**: July 12, 2026 (v1.1.0)
176-
**Total Commits**: 1,722
178+
**Last Updated**: July 12, 2026 (v1.1.1)
179+
**Total Commits**: 1,724
177180
**Date Range**: December 2, 2025 - July 12, 2026 (ongoing)
178181
**Repository**: DEXBot2 (BitShares DEX Trading Bot)

0 commit comments

Comments
 (0)