Skip to content

Seed arb whitelist and planner forwarding; add BBQ mint fallback and node-fetch compatibility fix#155

Open
Mork-Zuckerbarge wants to merge 1 commit into
mainfrom
codex/address-trade-operation-concerns-ttkad8
Open

Seed arb whitelist and planner forwarding; add BBQ mint fallback and node-fetch compatibility fix#155
Mork-Zuckerbarge wants to merge 1 commit into
mainfrom
codex/address-trade-operation-concerns-ttkad8

Conversation

@Mork-Zuckerbarge
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the planner and arb services have a usable default allowlist so execution authority does not start empty.
  • Forward planner ticks from mork-core to the mork-app autonomous planner to enable coordinated planning across services.
  • Fix node-fetch import compatibility for environments where the package exports a default vs callable function.

Description

  • Added a new BBQ_MINT constant and use it as a final fallback for controls.executionAuthority.mintAllowlist in mork-app/src/lib/core/appControl.ts when no allowlist entries are available, and persist the state via persistState().
  • Updated services/arb/build_whitelist.js to handle node-fetch exports reliably by assigning fetch from nodeFetch or nodeFetch.default so the script works in both ESM/CJS packaging scenarios.
  • Added services/arb/whitelist.example.json containing the BBQ mint as a seed example for the arb whitelist.
  • Modified services/mork-core/src/server.ts to introduce MORK_APP_URL, implement forwardToAppPlanner() and call it from plannerTick() to forward ticks (fire-and-forget) to the mork-app planner endpoint.
  • Updated start.sh to seed ARB_DIR/whitelist.json from whitelist.example.json at startup when whitelist.json is missing, and log the seeding action or a warning when neither file exists.

Testing

  • No automated tests were executed for these changes.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f105f10076

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,3 @@
[
"B59tYSWnDNTDbTsDXvhmXghJXsyunPsXfYFr7KfXBqYn"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Seed arb whitelist with entries that include inMint

start.sh now copies services/arb/whitelist.example.json into whitelist.json on first boot, but this example file is an array of plain strings while the arb scanner consumes market objects and immediately skips entries without inMint (services/arb/index.js, batch loop guard if (!m?.inMint ...) continue). In a fresh environment this causes the arb loop to run with markets.length > 0 yet never scan or execute any route until the whitelist is regenerated manually.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant