Skip to content

test(market-making): add MKT-1491 workflow e2e coverage - #112

Open
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/mkt-1491-e2e-tests
Open

test(market-making): add MKT-1491 workflow e2e coverage#112
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/mkt-1491-e2e-tests

Conversation

@prd-carapulse

@prd-carapulse prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Why

The quoter bot needs a deterministic regression boundary before V0 is operated unattended. The prior workflow tests injected in-memory application ports, so they could not detect regressions in production composition, Router HTTP DTOs, SDK encoding/signing, Midnight transactions, or forked on-chain state.

Why now

MKT-1491 requires genuine E2E coverage before the V0 quoter workflow is relied on operationally.

What changed

  • replace the in-memory E2E implementation with Anvil tests pinned to Base block 48,900,000
  • add production ladder composition for live position/rate reads, offer construction, SDK signing, mempool publication, on-chain invalidation, and cleanup-aware shutdown
  • add a stateful Router HTTP fixture that indexes actual mempool transactions and reads real forked Midnight consumption state, including snapshot/reorg handling
  • exercise setup success plus isolated fork/provider failure for chain, maker, native balance, allowance, ratifier, books, reference, and offers
  • exercise bootstrap with no, partial, and full credit; production ladder publish/rest/recenter/abandon; cleanup disabled/enabled; and fail-closed credit-sale suppression when cost basis is unavailable
  • cap fresh lend room after current and cross-market credit, preserve intended rung rates across tick round-trips, and surface extra owned rungs for cleanup
  • verify the production-supported spread direction: prospective bootstrap buy against a real external sell, with strict crossing and equality rejected and the adjacent aligned safe tick accepted
  • harden the ladder adapter with explicit durable group ownership, bounded pagination, whole-book reads, replacement-aware multi-market capacity, shared-rung grouping, sparse-index recovery, exhaustive hard-halt cleanup, and uint32 fee validation
  • wire the production ladder into the default CLI, allowlist its durable groups in setup readiness, and derive aggregate room from the configured total exposure cap
  • retire the former in-memory Router and workflow-test implementations
  • rebase the net MKT-1491 change onto current main, preserving current quoter-bot ownership and Corepack/pnpm conventions

Verification

  • corepack pnpm install --frozen-lockfile — passed with pnpm 11.1.1
  • corepack pnpm --filter @morpho-org/quoter-bot exec vitest run --exclude 'test/e2e/**'64 files passed, 817 tests passed
  • corepack pnpm --filter @morpho-org/quoter-bot exec vitest run test/infrastructure/bootstrap/production-bootstrap.test.ts test/infrastructure/bootstrap/bootstrap-make.service.test.ts2 files passed, 101 tests passed
  • corepack pnpm --filter @morpho-org/quoter-bot exec node --test scripts/playground-smoke.test.mjs54 passed, 0 failed
  • corepack pnpm --filter @morpho-org/quoter-bot run typecheck — passed
  • corepack pnpm --filter @morpho-org/quoter-bot run jsdoc:build — passed; 416 public declarations inventoried and HTML generated
  • corepack pnpm lint — 0 warnings, 0 errors
  • corepack pnpm knip — passed
  • corepack pnpm format — passed
  • git diff --check — passed
  • fork E2E was not run locally because RPC_URL_8453 is unavailable in this gateway; current-head CI is the remaining fork-capable verification source

Linear: https://linear.app/morpho-labs/issue/MKT-1491/add-e2e-testing-for-each-step
TIB: https://github.com/morpho-org/morpho-bots/blob/main/docs/decisions/TIB-2026-07-27-midnight-market-making-bot.md

Requested by: @julien (Slack)

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread bots/market-making/test/e2e/mock-router.ts Outdated
Comment thread bots/market-making/test/e2e/mock-router.ts Outdated

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

Copy link
Copy Markdown

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: 53ed32453c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/test/e2e/mock-router.ts Outdated
Comment thread bots/market-making/test/e2e/mock-router.ts Outdated
Comment thread bots/market-making/test/e2e/market-making.e2e.test.ts Outdated
Comment thread bots/market-making/test/e2e/mock-router.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Current-head follow-up: hardened mock ladder fills against non-positive, over-published, and over-credit amounts; added partial/full rung-consumption coverage; counted individual rungs; and added strict-cross plus adjacent-safe spread cases.

Scope blocker: cleanup-enabled lifecycle coverage and existing-buy/prospective-sell coverage have no production path on the current branch. The composition root exposes setup-check and one-shot bootstrap only, with no startup/shutdown cleanup boundary and no composed production ladder make adapter. The prior direct mock hard-halt test was removed rather than presenting a test-only method as production E2E coverage.

Head: 63b9fa840864dc33edbda3fd4dd6ca1b383f6d28.

@julien-devatom

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 63b9fa8408

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse

prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

<@U09LHAWUK3M> review

3 similar comments
@prd-carapulse

prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

<@U09LHAWUK3M> review

@prd-carapulse

prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

<@U09LHAWUK3M> review

@prd-carapulse

prd-carapulse Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

<@U09LHAWUK3M> review

Comment thread bots/market-making/src/infrastructure/ladder/ladder-transaction.utils.ts Outdated
@julien-devatom

Copy link
Copy Markdown
Collaborator

@codex review

1 similar comment
@prd-carapulse

prd-carapulse Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 757f768ae0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/test/e2e/market-making.fork.e2e.test.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-groups.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-make.service.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
@prd-carapulse
prd-carapulse Bot force-pushed the hermes/mkt-1491-e2e-tests branch from e825326 to 45856c1 Compare July 30, 2026 09:04
@prd-carapulse

prd-carapulse Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 45856c12f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/infrastructure/ladder/ladder-capacity.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: d2eb9dfba8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/infrastructure/ladder/ladder-capacity.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-capacity.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 32c48ac602

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/infrastructure/ladder/ladder-group-ownership.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-offer.utils.ts Outdated
Comment thread bots/market-making/src/infrastructure/ladder/ladder-group-ownership.utils.ts Outdated
@linear-code

linear-code Bot commented Aug 3, 2026

Copy link
Copy Markdown

MKT-1491

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

7 similar comments
@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse

prd-carapulse Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: b061438e3a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/bootstrap.ts Outdated
Comment thread bots/quoter-bot/src/infrastructure/bootstrap/production-bootstrap.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 0042b109a6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/bootstrap.ts Outdated
Comment thread .github/workflows/deploy-quoter-bot-playground.yml
@prd-carapulse

prd-carapulse Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: a960f14b5a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/test/infrastructure/ladder/ladder-groups.utils.test.ts Outdated
Comment thread bots/quoter-bot/src/infrastructure/ladder/ladder-capacity.utils.ts
Comment thread bots/quoter-bot/src/bootstrap.ts
Comment thread bots/market-making/src/infrastructure/ladder/ladder-book.utils.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 9575a90ac5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse

prd-carapulse Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@prd-carapulse
prd-carapulse Bot force-pushed the hermes/mkt-1491-e2e-tests branch from ac920c8 to c955c13 Compare August 11, 2026 19:17
@prd-carapulse

prd-carapulse Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: c955c1369a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse

prd-carapulse Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@prd-carapulse

prd-carapulse Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 8db0aac98b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/market-making/src/infrastructure/ladder/ladder-group-ownership.utils.ts Outdated
Comment thread bots/quoter-bot/src/infrastructure/ladder/production-ladder.ts
Comment thread bots/quoter-bot/src/infrastructure/ladder/production-ladder.ts
@prd-carapulse

prd-carapulse Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 2f1be19e9d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse
prd-carapulse Bot force-pushed the hermes/mkt-1491-e2e-tests branch from 2f1be19 to 7963314 Compare August 12, 2026 08:33
@prd-carapulse

prd-carapulse Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 79633147aa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bots/quoter-bot/src/infrastructure/ladder/ladder-group-ownership.utils.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 7834611cc1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse
prd-carapulse Bot force-pushed the hermes/mkt-1491-e2e-tests branch from 7834611 to 75bde4d Compare August 12, 2026 12:47
@prd-carapulse

prd-carapulse Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 75bde4d3fb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prd-carapulse

prd-carapulse Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Resolve main conflicts while preserving market-scoped whole-book E2E coverage and integrating current intentional-overlap behavior.
@prd-carapulse
prd-carapulse Bot force-pushed the hermes/mkt-1491-e2e-tests branch from 48844fe to 0c7d786 Compare August 12, 2026 13:49
@prd-carapulse

prd-carapulse Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 0c7d7869ea

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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