Skip to content

Conversation

@themuffinator
Copy link
Owner

Motivation

  • Mirror the HLIL handshake ordering so the bootstrapped import table is created before the bridge sees the raw bot_import_t and cached update state is reset.
  • Allow parity tests to intercept and assert arguments for the shimmed logging and libvar callbacks.
  • Ensure the bootstrapped import table includes the same DPrint/BotLibVarSet slots used by the HLIL traces.
  • Update comments to document the HLIL-defined sequence so future work preserves parity.

Description

  • Added a botlib_import_capture_t capture structure and new APIs BotInterface_SetImportCapture / BotInterface_GetImportCapture in src/botlib/interface/botlib_interface.h and implemented them in botlib_interface.c.
  • Instrumented shim/wrapper functions so the following now call capture hooks when present: BotInterface_PrintWrapper, BotInterface_DPrintWrapper, BotInterface_BotLibVarGetWrapper, BotInterface_BotLibVarSetWrapper, and the handshake shims BotInterface_PrintShim, BotInterface_DPrintShim, BotInterface_BotLibVarGetShim, BotInterface_BotLibVarSetShim.
  • Reordered the GetBotAPI handshake to: translate bot_import_t into the botlib_import_table_t, call BotInterface_SetImportTable, then Q2Bridge_SetImportTable, then Bridge_ResetCachedUpdates, and set debug-lines afterwards, with an inline comment documenting the HLIL ordering.
  • Extended the bootstrapped import table in BotInterface_InitialiseImportTable / BotInterface_BuildImportTable to populate DPrint and BotLibVarSet slots and added comments/headers above new helper functions per repository conventions.

Testing

  • No automated tests were executed as part of this change.

Codex Task

@themuffinator themuffinator merged commit e308911 into main Dec 30, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants