Skip to content

feat: parse oracle-url from YAML order config (Phase 6)#2462

Merged
hardyjosh merged 5 commits intofeat/signed-context-oracle-uifrom
feat/oracle-url-yaml-parsing
Mar 6, 2026
Merged

feat: parse oracle-url from YAML order config (Phase 6)#2462
hardyjosh merged 5 commits intofeat/signed-context-oracle-uifrom
feat/oracle-url-yaml-parsing

Conversation

@hardyjosh
Copy link
Contributor

@hardyjosh hardyjosh commented Feb 16, 2026

Caution

Merge order: Merge #2459 first, then this PR.

Motivation

Orders that use signed context oracles need a way to specify the oracle endpoint URL in the dotrain YAML config. This is the missing link between the YAML front matter and the on-chain metadata that takers use to discover oracles.

Solution

  • OrderCfg: new oracle_url: Option<String> field
  • YAML parsing: oracle-url parsed via optional_string (same pattern as deployer/orderbook)
  • ALLOWED_ORDER_KEYS: added oracle-url
  • When an order with oracle-url is deployed via addOrder, a SignedContextOracleV1 item is included in the order's RainMetaDocumentV1
orders:
  my-order:
    oracle-url: https://rain-oracle-server.fly.dev/context
    inputs:
      - token: base-weth
    outputs:
      - token: base-usdc

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/oracle-url-yaml-parsing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hardyjosh hardyjosh force-pushed the feat/signed-context-oracle-ui branch from b349274 to e375cee Compare February 17, 2026 16:36
@hardyjosh hardyjosh force-pushed the feat/oracle-url-yaml-parsing branch from 7658403 to 48ead0a Compare February 17, 2026 16:36
@hardyjosh hardyjosh force-pushed the feat/signed-context-oracle-ui branch from e375cee to 10a7183 Compare February 22, 2026 22:55
@hardyjosh hardyjosh force-pushed the feat/oracle-url-yaml-parsing branch from 48ead0a to 0102b3d Compare February 22, 2026 22:55
@hardyjosh hardyjosh self-assigned this Feb 23, 2026
@hardyjosh hardyjosh force-pushed the feat/signed-context-oracle-ui branch from 57bb022 to 5963780 Compare February 23, 2026 20:34
@hardyjosh hardyjosh force-pushed the feat/oracle-url-yaml-parsing branch from 8f45a90 to 4d23ec9 Compare February 23, 2026 20:34
@hardyjosh hardyjosh force-pushed the feat/signed-context-oracle-ui branch from 5963780 to 7fb4b52 Compare February 24, 2026 21:15
Josh Hardy added 4 commits February 24, 2026 21:15
Adds optional oracle-url field to OrderCfg, parsed from the YAML front
matter orders section. When present, this URL identifies a signed context
oracle server for the order.

Changes:
- Add oracle_url: Option<String> to OrderCfg struct
- Parse oracle-url via optional_string in YAML parsing
- Add oracle-url to ALLOWED_ORDER_KEYS
- Update Default and PartialEq impls
- Add test for oracle-url parsing (present + absent)

Spec: rainlanguage/specs#45
Chained on: #2459 (Phase 4)
When an order has oracle_url set in its config, new_from_deployment now
creates a SignedContextOracleV1 meta item and includes it in the order's
additional_meta. This means orders deployed with oracle-url in their YAML
will have the oracle endpoint encoded in their onchain RainMetaDocumentV1,
making it discoverable by takers and indexers (Phase 2 reads it back).

Changes:
- Import SignedContextOracleV1 in add_order.rs
- In new_from_deployment: parse oracle_url, create meta item, append to
  additional_meta
@hardyjosh hardyjosh force-pushed the feat/oracle-url-yaml-parsing branch from 4d23ec9 to b48a03d Compare February 24, 2026 21:15
@hardyjosh hardyjosh force-pushed the feat/signed-context-oracle-ui branch from 456b907 to 3e4ac64 Compare March 6, 2026 00:50
@hardyjosh hardyjosh merged commit e527253 into feat/signed-context-oracle-ui Mar 6, 2026
19 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

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.

3 participants