Refactor: Bot SDK cleanup (shared config, macro-driven handlers) #90
Labels
No labels
area:api
area:core
area:docs
area:infra
area:ux
dependencies
documentation
duplicate
good first issue
help wanted
invalid
question
rust
status:complete
status:partial
status:planned
type:bug
type:design
type:feature
type:infra
type:refactor
type:refactor
type:research
type:ux
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/decentcom#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Category: Refactor / simplification (bot SDK) — found in code review 2026-07-07.
bot-sdk::Configalready provides (welcomebot/modbot/auditbot config.rs+main.rs); modbot already drifted by hard-codingseed_hex: None. Have bots embeddecentcom_bot::Config(#[serde(flatten)]) or add aBot::from_config_with(...)path.on_*handler fields are declared in 3 places (bot.rsstruct Bot:64,with_config:102,struct Handlers:343) plus 21 builder methods + a 21-armdispatch. Extend the existinghandler_type!macro to generate fields, methods, and dispatch from one op↔event table (~250 lines saved).Bot's handler fields into theHandlersstruct it owns (Bot { config, handlers }), removing the field-by-field copy inrun().futures-utildep (tools/bot-sdk/Cargo.toml:20).All four checklist items landed on main via
b87535a(merged in #107 'refactor: cleanup stories #87-92'): bots embeddecentcom_bot::Configvia#[serde(flatten)]+apply_env_overrides()(modbot seed_hex drift fixed),define_handlers!generates the Handlers struct / 21 builder methods / dispatch from one table,Bot { config, handlers }folded, andfutures-utilremoved from bot-sdk. Verified against current main — closing.