Skip to content

feat(oracle-fusion): add core financial business operations - #9165

Merged
waleedlatif1 merged 3 commits into
stagingfrom
codex/oracle-fusion-business
Oct 17, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
codex/oracle-fusion-business

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add 36 Oracle Fusion Financials operations for payables reporting, receivables invoices and installments, credit memos, receipts, expenses, and ledger reporting.
  • Reuse the shared Oracle Fusion account modal and saved credentials. No shared OAuth client or new deployment secrets are required.
  • Bind ordinary tool credentials to their canonical provider and credential type after authorization, before minting or refreshing tokens. Preserve supported service-account families and OAuth aliases.
  • Add the workflow block, templates, suggested skills, documentation, and generated catalog metadata. Preserve exact identifiers, bounded pages, explicit-null updates, and Oracle action outcomes.

Type of Change

  • Feature
  • Bug fix

Testing

  • 409 focused tests passed across the Financials boundary, shared Fusion client, token resolution, and integration availability.
  • Reproduced credential-binding, opaque-key, and blank-canvas-field regressions before fixing them; verified generated array schemas for invoice and credit-memo line items.
  • Compared all 36 endpoint/output contracts and supported write fields with Oracle Financials 26C documentation, including receivables invoices, receipt application, and expense submission.
  • Local lint, block alignment, and repository audits; refreshed the generated block-name catalog flagged by the initial audit.
  • Full tests and final type validation run in CI. Live Fusion tenant testing has not been performed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 17, 2026 3:28am UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 issues found across 62 files

Confidence score: 3/5

  • token-resolution.ts treats credentialKind: 'any' as a literal kind, so policies that accept either credential type reject both. Allow 'any' through the kind check.
  • schema.ts trims opaque keys, which can change the identifier and target a different resource. Validate keys without trimming them.
  • execute-tool.ts returns a generic 500 for unexpected errors without logging the cause, making server-side debugging harder. Log non-provider failures before returning.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/internal/oracle-fusion-financials/execute-tool.ts">

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-financials/execute-tool.ts:24">
P2: Unexpected errors in this catch block return a generic 500 without logging the cause, so server-side debugging has no trace. Add a `createLogger` logger and log non-provider failures before the return, as the QuickBooks and Google Drive handlers do.</violation>
</file>

<file name="apps/sim/lib/internal/oracle-fusion-financials/schema.ts">

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-financials/schema.ts:214">
P2: `opaqueKeySchema` trims opaque identifiers before encoding them, so a valid key with leading or trailing spaces is changed and the operation can target a different resource. Validate the key without trimming to preserve the exact Oracle resource key.</violation>
</file>

<file name="apps/sim/lib/oauth/token-resolution.ts">

<violation number="1" location="apps/sim/lib/oauth/token-resolution.ts:243">
P1: `credentialKind: 'any'` currently rejects both OAuth and service-account credentials because the literal is compared directly with the resolved kind. Allow `'any'` through this check, for example by requiring `policy.credentialKind !== 'any'` before applying the mismatch test; otherwise Ramp and Slack shared credential pickers cannot execute.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/oauth/token-resolution.ts
Comment thread apps/sim/lib/internal/oracle-fusion-financials/execute-tool.ts
Comment thread apps/sim/lib/internal/oracle-fusion-financials/schema.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no new actionable issue was established.

Findings

  1. P1 Untouched fields break execution ▶

Summary

Adds 36 Oracle Fusion Financials tools, their workflow block, documentation, and catalog entries. Ordinary tool credentials now pass provider and credential-type checks before tokens are minted or refreshed.

  • Payables invoices and payments can be reviewed page by page.
  • Receivables invoices, credit memos, and receipts can be managed in workflows.
  • Expense reports can be created, edited, and submitted from workflows.
  • Ledger balances, ledgers, and journal batches can be read in pages.
  • Tools check a credential's provider and type before using its token.
  • Oracle Fusion Financials is available as a workflow block with docs and templates.

Diagram

sequenceDiagram
  participant Caller as Workflow or agent
  participant Credentials as Credential resolver
  participant Financials as Financials handler
  participant Oracle as Oracle Fusion
  Caller->>Credentials: Resolve selected credential for tool
  Credentials->>Credentials: Check access, provider, and credential type
  Credentials-->>Caller: Token and saved instance URL
  Caller->>Financials: Run operation with resolved inputs
  Financials->>Oracle: Send request through shared Fusion client
  Oracle-->>Financials: Resource, page, or action result
  Financials-->>Caller: Return selected fields and business outcome
Loading

Reviews (3) · Last reviewed commit: "fix(oracle-fusion): distinguish empty fo..." · Reviewed by Greptile

Comment thread apps/sim/blocks/blocks/oracle_fusion_financials.ts
@waleedlatif1
waleedlatif1 force-pushed the codex/oracle-fusion-business branch from a010955 to 6d8dd8f Compare October 17, 2026 03:22
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/blocks/blocks/oracle_fusion_financials.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 63 files

Confidence score: 4/5

  • In apps/sim/lib/internal/oracle-fusion-financials/schema.ts, endDate can pass malformed dates through to Oracle; use financialsDateInput as for startDate and apply the same validation in the update schema.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/internal/oracle-fusion-financials/schema.ts">

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-financials/schema.ts:984">
P3: `endDate` accepts any string up to 8000 characters, while `startDate` uses `financialsDateInput`. Use the same date validator here so invalid dates are rejected before the Oracle call. Apply the same change in the update schema.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/blocks/blocks/oracle_fusion_financials.ts
Comment thread apps/sim/lib/internal/oracle-fusion-financials/schema.ts
@waleedlatif1
waleedlatif1 merged commit 0a140b4 into staging Oct 17, 2026
54 of 55 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/oracle-fusion-business branch October 17, 2026 03:36

This branch was successfully deployed

1 active deployment
Preview — 6d8dd8f7 Deployed Oct 17, 2026 by vercel[bot]
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