Skip to content

feat: add Oracle Fusion Cloud Financials integration - #7412

Open
BillLeoutsakosvl346 wants to merge 15 commits into
stagingfrom
investigate/oracle-fusion-erp-integration
Open

feat: add Oracle Fusion Cloud Financials integration#7412
BillLeoutsakosvl346 wants to merge 15 commits into
stagingfrom
investigate/oracle-fusion-erp-integration

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expand the read-only Oracle Fusion Cloud Financials Payables integration from 6 to 24 operations
  • cover invoice headers, lines, installments, distributions, holds, applied and available prepayments; payments and related invoices; payment process requests; and payment terms with term lines
  • retain the credential-bound recent-invoices selector and expand the generated catalog to 12 workflow templates and 8 grounded skills
  • preserve Oracle field names, fixed projections, one-page pagination, semantic outputs, and exact parent/child path validation for opaque keys

Authentication and security

  • reuse the existing oracle-fusion-service-account provider and encrypted service-account storage
  • restrict application and token URLs to exact Oracle-owned HTTPS host/path shapes, validate public DNS, pin resolved IPs, reject redirects, and bound response bytes and timeouts
  • inject only a short-lived bearer token and authoritative application origin
  • use one server-only internal handler with abort-aware bounded retries for idempotent GETs; no direct execution, API route, provider-specific cache, arbitrary expansion, writes, or auto-pagination
  • derive Oracle opaque child keys only from exactly one validated same-origin self link matching the complete requested parent/child path

Tool scope

  • invoices: list/get invoice; list/get lines and installments; list/get distributions; list/get applied and available prepayments; list/get holds
  • payments: list/get payments; list/get payment-related invoices
  • payment runs: list/get payment process requests
  • terms: list/get payment terms and list/get term lines

All identifiers documented as decimal values remain validated decimal strings without numeric coercion. Lists default to 50 records, cap at 100, and never auto-paginate.

Generated artifacts

  • tool IDs, metadata, and output projections
  • integration docs and catalog metadata
  • deployment integration catalog
  • 12 templates and 8 grounded skills

Validation

  • independent integration review: no Critical, Warning, or Suggestion findings on the final diff
  • focused validation: 13 suites / 341 tests passed, including 98 Oracle provider tests
  • bun run type-check: 26/26 tasks passed
  • bun run lint:check: 26/26 tasks passed
  • bun run check:audits: all 45 audits passed
  • tool metadata, docs, deployment, catalog, canvas-sentence, tool request/registry/client/fork boundaries, bare icons, memory bounds, secret scan, and generated-diff checks passed
  • negative controls demonstrated failures when a new dispatcher case was removed, nested-link validation was weakened, lossless parsing of InvoiceId, transient reset classification, recursive structured-diagnostic redaction, normalized/encoded credential-key rejection, typed response-size mapping, and retry-body cleanup and request-origin confinement were disabled, then passed after restoration; the int64 regression preserves raw 9007199254740993 exactly

Oracle references

Live-tenant limitation

No live Oracle tenant credentials were available. Authentication, tenant-specific least-privilege Payables roles and data access, opaque keys, and payload behavior were validated against official Oracle contracts and documented-schema fixtures, but a live tenant smoke test was not performed.

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 3, 2026 12:56am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands Oracle Fusion Cloud Financials into a 24-operation, read-only Payables integration with service-account credential support and guarded server-side requests.

  • Adds invoice, payment, payment-run, hold, prepayment, installment, distribution, and payment-term operations.
  • Adds credential validation, token minting, request confinement, response schemas, and a credential-bound invoice selector.
  • Registers the workflow block and tools across executable and generated catalogs.
  • Adds integration documentation, catalog metadata, templates, skills, and focused tests.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains in the available follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/internal/oracle-fusion-financials/client.ts Implements bounded, pinned, same-origin Oracle HTTP requests with redirect rejection and abort-aware retries.
apps/sim/lib/internal/oracle-fusion-financials/operations.ts Maps the 24 read-only operations to fixed Oracle resource paths, projections, and semantic outputs.
apps/sim/lib/internal/oracle-fusion-financials/schema.ts Defines request and response validation, lossless identifier handling, and strict Oracle self-link key extraction.
apps/sim/lib/credentials/client-credential-accounts/minters/oracle-fusion.ts Validates Oracle credential endpoints and mints short-lived client-credentials tokens through the guarded network path.
apps/sim/blocks/blocks/oracle_fusion_financials.ts Adds the workflow-facing configuration for all 24 Oracle operations and their canonical parameters.
apps/sim/lib/internal/tool-operations/registry.server.ts Registers the complete Oracle operation set at the server-only execution boundary.
apps/sim/lib/selectors/server/providers/oracle-fusion-financials.ts Adds credential-bound recent-invoice discovery for workflow configuration.
apps/sim/lib/internal/oracle-fusion-financials/oracle-fusion-financials.test.ts Exercises operation routing, validation, response handling, request confinement, retries, and opaque-key behavior.

Sequence Diagram

sequenceDiagram
  participant Workflow as Workflow
  participant Tool as Oracle Tool
  participant Handler as Internal Handler
  participant Credential as Credential Service
  participant OracleAuth as Oracle OAuth
  participant OracleAPI as Oracle Financials API
  Workflow->>Tool: Execute selected read operation
  Tool->>Handler: Structured operation and parameters
  Handler->>Credential: Resolve encrypted service account
  Credential->>OracleAuth: Mint short-lived bearer token
  OracleAuth-->>Credential: Access token and application origin
  Credential-->>Handler: Constrained authentication context
  Handler->>OracleAPI: Pinned, bounded, no-redirect GET
  OracleAPI-->>Handler: One-page Oracle response
  Handler-->>Tool: Validated semantic output
  Tool-->>Workflow: Operation-specific result
Loading

Reviews (7): Last reviewed commit: "fix(oracle-fusion): confine request orig..." | Re-trigger Greptile

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

All reported issues were addressed

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts Outdated
Comment thread apps/sim/lib/selectors/server/providers/oracle-fusion-financials.test.ts Outdated
Comment thread apps/sim/lib/internal/oracle-fusion-financials/schema.ts
Bill Leoutsakos added 3 commits September 2, 2026 13:55
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai re-review this PR. All three findings from the prior review have been addressed: provider diagnostics now use the shared exact-plus-generic redactor with URI/form-encoded regression coverage; Oracle list envelopes require items; and the selector regression asserts the generic message, HTTP 401 status, and absence of the provider canary. Please review the complete current diff against staging.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai re-review this PR. All three findings from the prior review have been addressed: provider diagnostics now use the shared exact-plus-generic redactor with URI/form-encoded regression coverage; Oracle list envelopes require items; and the selector regression asserts the generic message, HTTP 401 status, and absence of the provider canary. Please review the complete current diff against staging.

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

No issues found across 60 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai re-review the exact final head after the latest staging-only merge. The merge adds only the upstream Muse Spark model and generated agent documentation; all four Oracle/Cubic-fix files are byte-identical to the clean reviewed head, and post-merge Oracle tests, type-check, lint, and docs checks pass.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai re-review the exact final head after the latest staging-only merge. The merge adds only the upstream Muse Spark model and generated agent documentation; all four Oracle/Cubic-fix files are byte-identical to the clean reviewed head, and post-merge Oracle tests, type-check, lint, and docs checks pass.

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

No issues found across 60 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the complete 24-tool Oracle Fusion Cloud Financials diff at d9cf784 against current staging, including the expanded nested-path validation, documented projections, block metadata, and generated artifacts.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please re-review the complete 24-tool Oracle Fusion Cloud Financials diff at d9cf784 against current staging, including all source, generated artifacts, tests, and the documented OAuth compatibility caveat.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please re-review the complete 24-tool Oracle Fusion Cloud Financials diff at d9cf784 against current staging, including all source, generated artifacts, tests, and the documented OAuth compatibility caveat.

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

All reported issues were addressed across 78 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/tools/oracle_fusion_financials/shared.ts Outdated
Comment thread packages/deployment-config/src/integrations.json
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the complete PR against staging at head 7864589. The latest change preserves documented Oracle int64 identity/reference values as exact decimal strings and adds regression plus negative-control coverage. Please account for the evidence-backed OAuth and generated catalog dispositions in their resolved threads.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please re-review the complete PR against staging at head 7864589. The valid int64 precision finding is fixed with source-token preservation, schema/output updates, 87/87 provider tests, 327/327 focused tests, and a failing negative control. Please reconsider the resolved OAuth and generated catalog findings using the product-decision and codebase-precedent evidence in the replies.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please re-review the complete PR against staging at head 7864589. The valid int64 precision finding is fixed with source-token preservation, schema/output updates, 87/87 provider tests, 327/327 focused tests, and a failing negative control. Please reconsider the resolved OAuth and generated catalog findings using the product-decision and codebase-precedent evidence in the replies.

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

All reported issues were addressed across 78 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the complete PR against staging at head 795c7fe. The latest fix adds narrowly classified, bounded, abort-aware retries for transient Oracle transport and response-body failures, with 91/91 provider tests, 331/331 focused tests, and a failing negative control.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please re-review the complete PR against staging at head 795c7fe. Your transport-retry finding is fixed with an explicit error allowlist, the existing two-retry budget, abort-aware bounded backoff, sanitized exhaustion, body-read coverage, and fail-fast behavior for unclassified errors. Independent validation reports no Critical, Warning, or Suggestion findings.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please re-review the complete PR against staging at head 795c7fe. Your transport-retry finding is fixed with an explicit error allowlist, the existing two-retry budget, abort-aware bounded backoff, sanitized exhaustion, body-read coverage, and fail-fast behavior for unclassified errors. Independent validation reports no Critical, Warning, or Suggestion findings.

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

All reported issues were addressed across 78 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

All reported issues were addressed across 78 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts Outdated
Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

All reported issues were addressed across 78 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-financials/client.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

No issues found across 78 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

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