Skip to content

feat(oracle-fusion): add shared integration foundation - #7427

Open
BillLeoutsakosvl346 wants to merge 17 commits into
stagingfrom
feat/oracle-fusion-foundation
Open

feat(oracle-fusion): add shared integration foundation#7427
BillLeoutsakosvl346 wants to merge 17 commits into
stagingfrom
feat/oracle-fusion-foundation

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the shared Oracle Fusion foundation used by sibling product integrations without registering or advertising any product service.

  • Registers one reusable integration-user credential with strict Oracle-assigned origin validation, encrypted username/password storage, local Basic derivation, and no save-time provider probe.
  • Adds canonical fixed-version HCM, FSCM, and CRM resource addressing plus shared exact decimal-identifier and opaque-key validation.
  • Adds a DNS-pinned client limited to GET, POST, PATCH, PUT, and DELETE. GET may retry once for 429, 503, or 504 when the execution deadline permits; mutations never retry.
  • Restricts mutations to bounded plain JSON, three documented media types, and the Effective-Of, If-Match, and Upsert-Mode operation headers. Callers cannot supply arbitrary URLs, roots, versions, methods, or headers.
  • Provides separate bounded JSON and empty-response APIs, 30-second wall-clock attempt deadlines, fixed provider-message-free errors, safe collection parsing, expected offsets, pre-projection item limits, and nextOffset.
  • Uses the existing client-credential and service-account registries without changing platform-wide token resolution, selector authorization, shared cache policy, or icon exports.

Oracle addressing/protocol stabilization and bounded mutations remain separate commits for independent review.

Product-specific services, blocks, routes below the family root, schemas, selectors, registrations, operations, and documentation remain child-owned. Downloads, binary bodies, streaming, automatic pagination, mutation retries, arbitrary transport inputs, and async-job infrastructure are intentionally excluded.

Fixes: N/A

Type of Change

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

Testing

  • Focused Oracle credential, addressing, identifier, protocol, serializer, and client tests
  • bun run type-check in apps/sim
  • bun run agent-stream-docs:generate
  • bun run skills:sync
  • bun run lint
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging
  • bun run check:audits
  • git diff --check

Reviewers should focus on fixed-origin and family-root enforcement, exact identifiers, mutation serialization/header constraints, retry/deadline behavior, and product-neutral protocol invariants.

Checklist

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

Screenshots/Videos

Not applicable. This foundation does not add a product UI surface.

@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 5, 2026 12:38am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds the shared Oracle Fusion credential, addressing, transport, serialization, and response-validation foundation without exposing a product integration.

  • Registers and locally resolves canonical Oracle Fusion integration-user credentials.
  • Adds fixed HCM, FSCM, and CRM resource addressing with strict path, identifier, self-link, and pagination validation.
  • Adds bounded DNS-pinned requests, mutation constraints, deadline-aware GET retries, and sanitized provider errors.
  • Adds bounded plain-JSON serialization with exact decimal-integer support and focused tests.

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/credentials/client-credential-accounts/descriptors.ts Adds the Oracle Fusion provider descriptor and strict canonical application-origin normalization.
apps/sim/lib/credentials/client-credential-accounts/minters/oracle-fusion.ts Adds local validation and Basic credential derivation without a provider-side save-time probe.
apps/sim/lib/internal/oracle-fusion/client.ts Adds the DNS-pinned bounded transport, retry/deadline behavior, response parsing, and sanitized errors.
apps/sim/lib/internal/oracle-fusion/protocol.ts Adds collection-envelope, pagination, self-link, and opaque-resource-key validation.
apps/sim/lib/internal/oracle-fusion/request-body.ts Adds bounded plain-JSON serialization and explicit support for exact decimal integer tokens.
apps/sim/lib/internal/oracle-fusion/paths.ts Adds fixed-version family roots and traversal-resistant relative resource-path construction.
apps/sim/lib/internal/oracle-fusion/identifiers.ts Adds exact bounded normalization for Oracle decimal identifiers.

Sequence Diagram

sequenceDiagram
  participant Caller as Product Integration
  participant Creds as Credential Resolver
  participant Client as Oracle Fusion Client
  participant DNS as DNS Validator
  participant Oracle as Oracle Fusion
  Caller->>Creds: Resolve integration-user credential
  Creds-->>Caller: Canonical origin and Basic material
  Caller->>Client: Fixed family, relative path, bounded request
  Client->>DNS: Validate configured origin
  DNS-->>Client: Public pinned IP
  Client->>Oracle: Bounded request to fixed API root
  Oracle-->>Client: JSON or empty response
  Client-->>Caller: Validated result or sanitized error
Loading

Reviews (13): Last reviewed commit: "feat(oracle-fusion): serialize exact int..." | 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 18 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/client.ts Outdated
Comment thread apps/sim/lib/credentials/client-credential-accounts/descriptors.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 18 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/client.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.

All reported issues were addressed across 18 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/client.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.

No issues found across 18 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

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 4, 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 29 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/protocol.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 4, 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 29 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/protocol.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 4, 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 29 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

@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 4, 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 19 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

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

1 issue found across 19 files

Confidence score: 4/5

  • apps/sim/lib/internal/oracle-fusion/request-body.test.ts: the incorrect .length expectation makes the test fail despite the request payload being within the 100,000-node budget; update the expected serialized length to 199,997.
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/lib/internal/oracle-fusion/request-body.test.ts">

<violation number="1" location="apps/sim/lib/internal/oracle-fusion/request-body.test.ts:128">
P2: The `.length` assertion is wrong, so this test fails. `new Array(99_999).fill(integer)` serializes to 99,999 `0`s joined by 99,998 commas, giving length 199,997, not 199,999 (and the node budget of 100,000 allows it to serialize rather than throw). Correct the expected length to 199_997.</violation>
</file>

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

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

expect(serializeOracleFusionJsonBody(nested)).toBe(`${'['.repeat(100)}0${']'.repeat(100)}`)
expect(() => serializeOracleFusionJsonBody([nested])).toThrow('nesting limit')

expect(serializeOracleFusionJsonBody(new Array(99_999).fill(integer)).length).toBe(199_999)

@cubic-dev-ai cubic-dev-ai Bot Sep 5, 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: The .length assertion is wrong, so this test fails. new Array(99_999).fill(integer) serializes to 99,999 0s joined by 99,998 commas, giving length 199,997, not 199,999 (and the node budget of 100,000 allows it to serialize rather than throw). Correct the expected length to 199_997.

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/request-body.test.ts, line 128:

<comment>The `.length` assertion is wrong, so this test fails. `new Array(99_999).fill(integer)` serializes to 99,999 `0`s joined by 99,998 commas, giving length 199,997, not 199,999 (and the node budget of 100,000 allows it to serialize rather than throw). Correct the expected length to 199_997.</comment>

<file context>
@@ -0,0 +1,262 @@
+    expect(serializeOracleFusionJsonBody(nested)).toBe(`${'['.repeat(100)}0${']'.repeat(100)}`)
+    expect(() => serializeOracleFusionJsonBody([nested])).toThrow('nesting limit')
+
+    expect(serializeOracleFusionJsonBody(new Array(99_999).fill(integer)).length).toBe(199_999)
+    expect(() =>
+      serializeOracleFusionJsonBody({ values: new Array(99_998).fill(integer), extra: integer })
</file context>
Suggested change
expect(serializeOracleFusionJsonBody(new Array(99_999).fill(integer)).length).toBe(199_999)
expect(serializeOracleFusionJsonBody(new Array(99_999).fill(integer)).length).toBe(199_997)
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