Skip to content

refactor+docs+schema: OAV context injection and address patterns - #37

Open
ajag408 wants to merge 2 commits into
eng-3209-oav-injected-input-tokenfrom
eng-3209-oav-context-docs
Open

ajag408 wants to merge 2 commits into
eng-3209-oav-injected-input-tokenfrom
eng-3209-oav-context-docs

Conversation

@ajag408

@ajag408 ajag408 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document that callers should always pass project OAVs in context (additive; baked vault-registry.json is not the freshness gate) and that context is trusted control-plane data, never from the user or the tx.
  • Document that allocatorVaultInputTokenAddress is required for injected-OAV APPROVAL.
  • Tighten Ajv pattern: '^0x[0-9a-fA-F]{40}$' on allocatorVaultAddress and allocatorVaultInputTokenAddress; handler tests accept valid hex and reject not-an-address with SCHEMA_VALIDATION_ERROR.

QA Proof

Screen Shot 2026-09-11 at 5 21 32 PM

What Needs to Be QA'd in Staging

  • CLI/JSON validate with valid context.feeConfiguration[].allocatorVaultAddress + allocatorVaultInputTokenAddress still succeeds (schema layer)
  • allocatorVaultAddress: "not-an-address" returns SCHEMA_VALIDATION_ERROR (does not run the yield validator)
  • Injected-OAV APPROVAL / SUPPLY / WITHDRAW behavior unchanged from base PR (token required only for approval)
  • README: no instruction to use GitHub main vault-registry.json as the OAV allowlist

QA Team Notification

  • QA team has been notified to test in staging

Note

Medium Risk
Tightening context address patterns can reject previously schema-valid garbage strings; incorrect caller handling of trusted context still expands the OAV whitelist and bypasses Shield.

Overview
Documents runtime OAV injection via context.feeConfiguration: callers should pass project OAVs on every validate call (additive to the embedded vault-registry.json snapshot), with allocatorVaultInputTokenAddress required for injected-OAV APPROVAL only. The README clarifies that the baked registry is not the freshness gate for allowed OAVs and that context must be trusted server-side control-plane data, never user- or tx-supplied.

JSON schema now requires 0x + 40 hex digits for allocatorVaultAddress and allocatorVaultInputTokenAddress; invalid strings fail at the schema layer with SCHEMA_VALIDATION_ERROR before yield validation runs.

Handler tests hoist shared Lido fixtures and add coverage for valid/mixed-case hex, optional input token, and rejected non-address values.

Reviewed by Cursor Bugbot for commit d343a44. Configure here.

@ajag408
ajag408 added this pull request to stack #36 September 12, 2026 00:29
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

raiseerco
raiseerco previously approved these changes Sep 14, 2026

@raiseerco raiseerco 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.

lgtm

Ishita-02
Ishita-02 previously approved these changes Sep 17, 2026
@ajag408
ajag408 dismissed stale reviews from Ishita-02 and raiseerco via d343a44 September 17, 2026 19:39
@ajag408
ajag408 force-pushed the eng-3209-oav-context-docs branch from 6c6d7cf to d343a44 Compare September 17, 2026 19:39

@cursor cursor 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.

Risk: medium. Left a non-blocking comment; Bugbot and Security Agent completed without findings that need human review, but the schema change on allocator vault address validation is above the low-risk approval threshold. Reviewers were not assigned because two or more are already requested.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

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.

5 participants