Skip to content

feat: configure bootstrap and ladder target-rate strategies - #133

Open
prd-carapulse[bot] wants to merge 12 commits into
mainfrom
hermes/bootstrap-target-rate
Open

feat: configure bootstrap and ladder target-rate strategies#133
prd-carapulse[bot] wants to merge 12 commits into
mainfrom
hermes/bootstrap-target-rate

Conversation

@prd-carapulse

@prd-carapulse prd-carapulse Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Operators need to choose how each workflow derives its target rate instead of forcing every bootstrap offer to 4%. Reusing the existing Morpho Blue variable-rate average while allowing an explicit fixed rate keeps the strategy configurable without creating a second reference-rate implementation. Hardcoded-only workflows must remain operational when Blue archive history is unavailable because they do not consume that data.

Why now

The prior PR implemented an unconditional static 400 BPS bootstrap target, and requester feedback clarified that bootstrap and ladder must select their methods independently. A delayed review then found that the shared startup gate still unconditionally checked Blue readiness.

What changed

  • Added per-market targetRate strategy configuration for both bootstrap and ladder.
  • Supported exactly variable_rate_avg and hardcoded; hardcoded targets require a positive hardcodedRateBps.
  • Defaulted omitted targetRate to variable_rate_avg for backward compatibility.
  • Reused the existing Blue variable-rate average adapter and selected strategies independently for bootstrap and ladder.
  • Made Blue configuration and readiness conditional on whether the selected command has an active variable_rate_avg strategy.
  • Preserved fail-closed Blue configuration/readiness for variable-rate workflows while allowing hardcoded-only bootstrap or ladder commands to start without Blue settings, even when the other configured workflow uses Blue.
  • Removed the unconditional production 400 BPS wiring and documented both bootstrap/ladder combinations.
  • Added focused environment/YAML parser coverage for malformed target-rate strategies on both bootstrap and ladder surfaces.
  • Clarified that the legacy ladder preset intentionally uses the backward-compatible variable_rate_avg default.

Verification

  • Non-vacuous test check — the new YAML hardcoded-bootstrap assertion failed with expected 400n vs temporary 401n, then passed after restoration.
  • Focused config suites — 105 passed, 0 failed across 2 files.
  • Non-e2e market-making suite — 591 passed, 0 failed across 46 files.
  • bun run --filter @morpho-org/market-making-bot typecheck — passed.
  • bun run --filter @morpho-org/market-making-bot jsdoc:build — passed (371 declarations).
  • bun lint — 0 warnings, 0 errors across 374 files.
  • bun format:check — all 489 files passed.
  • bun knip — passed.
  • git diff --check — passed.
  • No production code changed in the late-review follow-up.
  • Fork e2e remains unavailable locally because RPC_URL_8453 is unset (AnvilStartupError: RPC_URL_8453 is required to start the pinned Base fork for market-making e2e tests).

Requested by: <@U02N5KRFDB9>

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin 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: d4972ed6f2

ℹ️ 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/bootstrap/production-bootstrap.ts Outdated
@prd-carapulse prd-carapulse Bot changed the title feat: hardcode bootstrap target rate at 4% feat: configure bootstrap and ladder target-rate strategies Aug 5, 2026
@prd-carapulse
prd-carapulse Bot force-pushed the hermes/bootstrap-target-rate branch from a433cfc to 40699ba Compare August 6, 2026 06:44
@prd-carapulse

prd-carapulse Bot commented Aug 6, 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: 40699ba644

ℹ️ 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/config/config.utils.ts Outdated
Comment thread bots/market-making/src/config/config.utils.ts Outdated
@prd-carapulse

prd-carapulse Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: af0c8669a2

ℹ️ 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".

@julien-devatom julien-devatom self-assigned this Aug 6, 2026
@prd-carapulse prd-carapulse Bot closed this Aug 6, 2026
@prd-carapulse
prd-carapulse Bot force-pushed the hermes/bootstrap-target-rate branch from 596b67e to 3dd18ea Compare August 6, 2026 14:10
@prd-carapulse prd-carapulse Bot reopened this Aug 6, 2026
@prd-carapulse

prd-carapulse Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@prd-carapulse

prd-carapulse Bot commented Aug 6, 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: 0f723463e2

ℹ️ 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/README.md
Allow hardcoded-only Compose and Railway deployments to omit inactive Morpho Blue reference settings. Add regression coverage for both deployment wrappers.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: 446941563b

ℹ️ 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/config/market-collections.ts
Comment thread bots/market-making/src/infrastructure/ladder/production-ladder.ts
prd-carapulse Bot added 3 commits August 7, 2026 07:58
Validate hardcoded targets against configured bounds and refresh timestamp-sensitive bootstrap and ladder offers on hourly observation changes.
Integrate current main signer-storage and playground changes while preserving target-rate strategy behavior and tests.
Resolve target-rate strategy conflicts with current signer-storage and playground changes.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: 5943710e33

ℹ️ 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/scripts/railway.utils.ts
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: 8ce5369d54

ℹ️ 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/scripts/deploy-railway.ts
Require Blue reference variables when creating a new Railway service that uses the variable-rate strategy, while preserving omitted values on existing services.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: 2e0af8195f

ℹ️ 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/config/market-collections.ts Outdated
Allow target-rate strategies in shared collection field lists and preserve them across playground import, editing, fragment, and export flows. Add regression coverage for hardcoded strategy round-trips and authoring controls.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: d5446ac265

ℹ️ 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/scripts/deploy-railway.ts Outdated
Comment thread bots/market-making/playground/model.ts
Avoid registering the hardcoded-rate field for variable-rate items so collection reordering cannot introduce an unsupported empty property.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 6ec74033c0

ℹ️ 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".

Preflight required Blue references before creating a fresh Railway service, render hardcoded target rates in playground previews, and keep variable-rate form state strict during collection reordering.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: 6927236d40

ℹ️ 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/playground/model.ts Outdated
Comment thread bots/market-making/playground/app.tsx Outdated
Allow runtime-valid hardcoded ladder previews and isolate playground field visibility utilities.
@prd-carapulse

prd-carapulse Bot commented Aug 7, 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: c3681046fd

ℹ️ 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/playground/model.ts
@prd-carapulse

prd-carapulse Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 88525fde24

ℹ️ 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.

2 participants