Skip to content

feat(oracle-fusion): add SCM integration - #7439

Open
BillLeoutsakosvl346 wants to merge 3 commits into
feat/oracle-fusion-foundationfrom
investigate/oracle-fusion-scm-integration
Open

feat(oracle-fusion): add SCM integration#7439
BillLeoutsakosvl346 wants to merge 3 commits into
feat/oracle-fusion-foundationfrom
investigate/oracle-fusion-scm-integration

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Adds a read-only Oracle Fusion Cloud SCM integration with 20 list/detail GET tools across ten operational resource families.
  • Adds the Oracle Fusion SCM block, six credential-bound selectors, nine workflow templates, typed projections, opaque-key validation, and generated docs/catalog/deployment surfaces.
  • Reuses the Oracle Fusion foundation for service-account authentication, transport, security, pagination parsing, keys, and safe provider errors.

Depends on #7427

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • Focused SCM, block, selector, manifest, and docs-generator tests
  • Full workspace lint and typecheck
  • All 45 repository audits and generated-artifact checks
  • Generator fixed-point verification
  • Base-sensitive block-registry audit against feat/oracle-fusion-foundation
  • Bounded-page memory/load review
  • Independent full-diff review: 0 critical, 0 warning findings

No live Oracle tenant was available; required permissions, feature opt-ins, and the MaintenanceFlag quarterly-release compatibility check are documented for tenant validation.

Checklist

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

Screenshots/Videos

Not applicable; this adds integration/tool surfaces without a custom visual UI.

@vercel

vercel Bot commented Sep 3, 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 7:42pm UTC

Request Review

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

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a read-only Oracle Fusion Cloud SCM integration spanning workflow tools, selectors, service-account configuration, generated catalog surfaces, and documentation.

  • Registers 20 bounded list/detail operations across ten SCM resource families.
  • Adds fixed response projections, opaque-key validation, provider error handling, and credential-bound selectors.
  • Updates block discovery, integration availability, deployment metadata, generated tool metadata, tests, and documentation.

Confidence Score: 5/5

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

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/internal/oracle-fusion-scm/operations.ts Defines the bounded list/detail execution model, resource routing, opaque-key handling, and response projection for all SCM resources.
apps/sim/lib/internal/oracle-fusion-scm/schema.ts Adds normalized input and provider-response schemas with nullable projected fields and validation for authentication, pagination, and opaque keys.
apps/sim/tools/oracle_fusion_scm/shared.ts Provides shared tool factories, protected authentication parameters, input filtering, and common list/detail contracts.
apps/sim/blocks/blocks/oracle_fusion_scm.ts Adds the workflow-facing block with 20 operations, service-account configuration, selectors, outputs, templates, and skills.
apps/sim/lib/selectors/server/providers/oracle-fusion-scm.ts Implements six bounded service-account-backed selectors whose opaque values align with the corresponding detail tools.
apps/sim/lib/internal/oracle-fusion-scm/oracle-fusion-scm.test.ts Exercises all resource families, nested paths, page bounds, parsing, opaque-key validation, and list/detail behavior.
apps/docs/content/docs/integrations/oracle_fusion_scm.mdx Documents prerequisites, tenant-validation constraints, tool inputs, and projected outputs for the new integration.

Sequence Diagram

sequenceDiagram
  participant User as Workflow user
  participant Block as Oracle SCM block
  participant Exec as Tool executor
  participant Auth as Service-account resolver
  participant Oracle as Oracle Fusion SCM
  User->>Block: Configure operation and credential
  Block->>Exec: Invoke registered SCM tool
  Exec->>Auth: Resolve access token and instance URL
  Auth-->>Exec: Inject protected authentication fields
  Exec->>Oracle: Send bounded list or detail request
  Oracle-->>Exec: Return projected resource payload
  Exec-->>Block: Return stable tool result
  Block-->>User: Expose workflow outputs
Loading

Reviews (3): Last reviewed commit: "fix(oracle-fusion): harden SCM integrati..." | 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 across 50 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/tools/oracle_fusion_scm/shared.ts
Comment thread apps/sim/tools/oracle_fusion_scm/types.ts Outdated
Comment thread apps/sim/lib/internal/oracle-fusion-scm/schema.ts Outdated

@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 50 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/internal/oracle-fusion-scm/schema.ts Outdated
Comment thread packages/deployment-config/src/integrations.json Outdated
Comment thread apps/sim/lib/internal/oracle-fusion-scm/operations.ts
Comment thread apps/sim/tools/oracle_fusion_scm/types.ts Outdated
@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.

4 issues found across 72 files

Confidence score: 3/5

  • integration-search-items.ts can emit connect=oauth before availability hydrates for service-account-only integrations such as Oracle Fusion, causing the detail page to reject the search result — align the fallback with the eventual supported authentication type.
  • get-blocks-metadata-tool.ts returns Oracle SCM metadata outside the declared type, while transformBlockMetadata lacks a service-account branch; consumers can receive misleading authType metadata — add the service-account case and update the metadata type.
  • schema.ts trims opaque Oracle keys before encoding requests, so keys with surrounding spaces resolve to a different resource and can break detail or child calls — preserve the original key while validating or rejecting whitespace.
  • page.tsx tells users that direct-configured authType: 'none' integrations require no authentication, which misdescribes how those integrations are set up — explain that configuration happens directly in the block and clarify the remaining connection requirements.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/integration-search-items.ts">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/integration-search-items.ts:18">
P2: When availability has not hydrated yet, this fallback emits `connect=oauth` for service-account-only entries such as Oracle Fusion. The detail page later rejects OAuth when availability arrives, so the search click does not open the service-account picker; derive the fallback from the entry’s auth type or defer adding the query parameter until availability is known.</violation>
</file>

<file name="apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-tool.ts">

<violation number="1" location="apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-tool.ts:632">
P2: When `get_blocks_metadata` processes Oracle SCM, this branch returns a value outside the declared metadata type, and `transformBlockMetadata` has no service-account branch. The result reports `authType: "Service Account"` without `requiredCredentials`, so Copilot receives no service-account credential descriptor; add the union member and corresponding transformation.</violation>
</file>

<file name="apps/sim/app/(landing)/integrations/(shell)/page.tsx">

<violation number="1" location="apps/sim/app/(landing)/integrations/(shell)/page.tsx:35">
P2: When the catalog includes direct-configured `authType: 'none'` integrations, this FAQ still tells users they need no authentication. Describe the remaining integrations as configured directly in the block, with connection details or no credentials as applicable.</violation>
</file>

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

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-scm/schema.ts:680">
P2: When an Oracle-derived opaque key has leading or trailing spaces, this schema trims it before the request is encoded, so detail and child calls address a different resource. Preserve the key exactly while rejecting only blank values.</violation>
</file>

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/app/(landing)/integrations/(shell)/page.tsx Outdated
Comment thread apps/sim/lib/internal/oracle-fusion-scm/schema.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.

4 issues found across 78 files

Confidence score: 3/5

  • apps/sim/blocks/blocks/oracle_fusion_scm.ts can forward a key from a previous SCM operation into the newly selected tool, where strict parsing may reject it and fail workflow switching; filter inactive operation-specific keys before forwarding.
  • apps/sim/lib/internal/oracle-fusion-scm/operations.ts may emit a whitespace-only self-link segment as a synthetic key that the detail schema rejects, making affected list results unusable; suppress or normalize blank synthetic keys.
  • apps/sim/lib/internal/oracle-fusion-scm/schema.ts can alter unsafe integral Oracle IDs written in exponent or zero-fraction notation, diverging from the exact token preserved by the shared client; retain the raw token through SCM projection while validating it.
  • apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-projection.test.ts has an inaccurate module comment after registering and reading the Oracle SCM block; update the comment to match the test setup.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/blocks/blocks/oracle_fusion_scm.ts">

<violation number="1" location="apps/sim/blocks/blocks/oracle_fusion_scm.ts:487">
P2: When a workflow retains a key from a previous SCM operation, this mapper forwards it to the newly selected tool. The strict SCM parsers reject that inactive key, so switching operations can make the block fail; filter the mapped values to the selected operation's parameters before validation.</violation>
</file>

<file name="apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-projection.test.ts">

<violation number="1" location="apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-projection.test.ts:22">
P3: The module comment says 'Only the Slack block is read, so only it is registered,' but the mock now registers both the Slack and oracle_fusion_scm blocks and the new test reads oracle_fusion_scm. Update the comment to name both blocks so it does not mislead future maintainers about the mock's contents.</violation>
</file>

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

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-scm/operations.ts:191">
P2: When an Oracle self link ends in a whitespace-only segment such as `%20%20`, this projection emits that segment as the synthetic key. The detail input schema rejects the same key as blank, so list results cannot be used for a follow-up get; reject trim-only derived keys while preserving surrounding whitespace on nonblank keys.

(Based on your team's feedback about Oracle opaque-key blank-value handling.)</violation>
</file>

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

<violation number="1" location="apps/sim/lib/internal/oracle-fusion-scm/schema.ts:357">
P2: When an unsafe integral Oracle ID arrives in exponent or zero-fraction notation, this preprocessor changes the exact token preserved by the shared client. Preserve the raw token through SCM projection while still validating that it is an integral identifier.</violation>
</file>

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

Fix all with cubic | Re-trigger cubic

...rest
} = params
return {
...rest,

@cubic-dev-ai cubic-dev-ai Bot Sep 3, 2026

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.

P2: When a workflow retains a key from a previous SCM operation, this mapper forwards it to the newly selected tool. The strict SCM parsers reject that inactive key, so switching operations can make the block fail; filter the mapped values to the selected operation's parameters before validation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/blocks/blocks/oracle_fusion_scm.ts, line 487:

<comment>When a workflow retains a key from a previous SCM operation, this mapper forwards it to the newly selected tool. The strict SCM parsers reject that inactive key, so switching operations can make the block fail; filter the mapped values to the selected operation's parameters before validation.</comment>

<file context>
@@ -0,0 +1,760 @@
+          ...rest
+        } = params
+        return {
+          ...rest,
+          q: optionalString(q, 'Filter'),
+          finder: optionalString(finder, 'Finder'),
</file context>
Fix with cubic

const parsed = parseOracleFusionScmResource(resource, value)
const definition = RESOURCE_DEFINITIONS[resource]
return {
[definition.keyField]: extractOracleFusionOpaqueKey(

@cubic-dev-ai cubic-dev-ai Bot Sep 3, 2026

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.

P2: When an Oracle self link ends in a whitespace-only segment such as %20%20, this projection emits that segment as the synthetic key. The detail input schema rejects the same key as blank, so list results cannot be used for a follow-up get; reject trim-only derived keys while preserving surrounding whitespace on nonblank keys.

(Based on your team's feedback about Oracle opaque-key blank-value handling.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/lib/internal/oracle-fusion-scm/operations.ts, line 191:

<comment>When an Oracle self link ends in a whitespace-only segment such as `%20%20`, this projection emits that segment as the synthetic key. The detail input schema rejects the same key as blank, so list results cannot be used for a follow-up get; reject trim-only derived keys while preserving surrounding whitespace on nonblank keys.

(Based on your team's feedback about Oracle opaque-key blank-value handling.) </comment>

<file context>
@@ -0,0 +1,393 @@
+  const parsed = parseOracleFusionScmResource(resource, value)
+  const definition = RESOURCE_DEFINITIONS[resource]
+  return {
+    [definition.keyField]: extractOracleFusionOpaqueKey(
+      parsed,
+      instanceUrl,
</file context>
Fix with cubic


const oracleIdentifier = z.preprocess((value) => {
if (value === undefined || value === null) return value
return normalizeOracleFusionScmIdentifier(value) ?? value

@cubic-dev-ai cubic-dev-ai Bot Sep 3, 2026

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.

P2: When an unsafe integral Oracle ID arrives in exponent or zero-fraction notation, this preprocessor changes the exact token preserved by the shared client. Preserve the raw token through SCM projection while still validating that it is an integral identifier.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/lib/internal/oracle-fusion-scm/schema.ts, line 357:

<comment>When an unsafe integral Oracle ID arrives in exponent or zero-fraction notation, this preprocessor changes the exact token preserved by the shared client. Preserve the raw token through SCM projection while still validating that it is an integral identifier.</comment>

<file context>
@@ -0,0 +1,833 @@
+
+const oracleIdentifier = z.preprocess((value) => {
+  if (value === undefined || value === null) return value
+  return normalizeOracleFusionScmIdentifier(value) ?? value
+}, z.string().regex(/^\d+$/).max(MAX_IDENTIFIER_DIGITS).nullable().optional())
+
</file context>
Fix with cubic

return partialBlockRegistry(await import('@/blocks/blocks/slack'))
return partialBlockRegistry(
await import('@/blocks/blocks/slack'),
await import('@/blocks/blocks/oracle_fusion_scm')

@cubic-dev-ai cubic-dev-ai Bot Sep 3, 2026

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.

P3: The module comment says 'Only the Slack block is read, so only it is registered,' but the mock now registers both the Slack and oracle_fusion_scm blocks and the new test reads oracle_fusion_scm. Update the comment to name both blocks so it does not mislead future maintainers about the mock's contents.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/lib/copilot/tools/server/blocks/get-blocks-metadata-projection.test.ts, line 22:

<comment>The module comment says 'Only the Slack block is read, so only it is registered,' but the mock now registers both the Slack and oracle_fusion_scm blocks and the new test reads oracle_fusion_scm. Update the comment to name both blocks so it does not mislead future maintainers about the mock's contents.</comment>

<file context>
@@ -17,7 +17,10 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
-  return partialBlockRegistry(await import('@/blocks/blocks/slack'))
+  return partialBlockRegistry(
+    await import('@/blocks/blocks/slack'),
+    await import('@/blocks/blocks/oracle_fusion_scm')
+  )
 })
</file context>
Fix with 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