feat(oracle-fusion): add shared integration foundation - #7427
feat(oracle-fusion): add shared integration foundation#7427BillLeoutsakosvl346 wants to merge 13 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryAdds a shared, product-neutral Oracle Fusion integration foundation without registering a user-facing product service.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/internal/oracle-fusion/client.ts | Introduces the DNS-pinned, deadline-aware Oracle request boundary with closed methods, media types, headers, retries, and response handling. |
| apps/sim/lib/internal/oracle-fusion/protocol.ts | Adds bounded collection parsing, pagination validation, opaque-key extraction, and stable next-offset behavior. |
| apps/sim/lib/internal/oracle-fusion/request-body.ts | Adds bounded serialization for plain JSON mutation bodies while rejecting unsupported object shapes and unsafe numeric values. |
| apps/sim/lib/credentials/client-credential-accounts/descriptors.ts | Registers the reusable Oracle Fusion credential descriptor and strict canonical Oracle application-origin normalization. |
| apps/sim/lib/credentials/client-credential-accounts/minters/oracle-fusion.ts | Validates integration-user credentials and locally derives short-lived cached Basic authentication material without a provider probe. |
| apps/sim/lib/oauth/token-resolution.ts | Enforces declared credential kind and service-account provider binding before tool credential resolution. |
| apps/sim/lib/selectors/server/credentials.ts | Applies credential-kind constraints to selector authorization while preserving policies that omit the constraint. |
| apps/sim/lib/credentials/service-account-secret.ts | Limits data-center persistence to credential descriptors that actually declare that field. |
Sequence Diagram
sequenceDiagram
participant Caller as Product-owned caller
participant Cred as Credential resolver
participant Client as Oracle Fusion client
participant Guard as DNS validation and pinned transport
participant Oracle as Oracle Fusion API
Caller->>Cred: Resolve Oracle integration-user credential
Cred-->>Caller: Canonical origin and Basic material
Caller->>Client: Fixed family, relative path, method, and bounded body
Client->>Client: Validate address, headers, identifiers, and payload
Client->>Guard: Validate origin and pin public IP
Guard->>Oracle: Bounded request with redirects disabled
Oracle-->>Guard: Response
Guard-->>Client: Size-limited response
alt Eligible transient GET response
Client->>Guard: Retry once within execution deadline
Guard->>Oracle: Repeat GET
Oracle-->>Client: Final response
end
Client-->>Caller: Bounded JSON, empty result, or fixed error
Reviews (11): Last reviewed commit: "fix(oracle-fusion): preserve self-link k..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@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 review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
3 issues found across 29 files
Confidence score: 3/5
apps/sim/lib/internal/oracle-fusion/protocol.ts:extractOracleFusionOpaqueKeycan return an altered opaque key when a self-link contains raw tab, newline, or carriage-return characters, becausenew URL(href)strips them before validation; preserve the raw value or validate before URL normalization.apps/sim/lib/internal/oracle-fusion/request-body.ts: Proxy-backed containers can pass the plain-object checks whileJSON.stringifytriggers traps or custom serialization, allowing the serialized request to differ from the validated values; reject proxy-backed values or serialize the validated descriptor values directly.apps/sim/lib/internal/oracle-fusion/protocol.ts: Valid empty terminal pages for offsets beyond the result set can be rejected becausetotalResultsis compared withoffset + counteven whencountis zero; adjust the boundary check for zero-count pages.
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.ts">
<violation number="1" location="apps/sim/lib/internal/oracle-fusion/request-body.ts:26">
P2: A proxy-backed container can pass the plain-object checks, then `JSON.stringify` invokes its traps and custom serialization. Reject proxy-backed values or serialize the validated descriptor values directly so custom code cannot alter the body or allocate an over-limit payload after validation.</violation>
</file>
<file name="apps/sim/lib/internal/oracle-fusion/protocol.ts">
<violation number="1" location="apps/sim/lib/internal/oracle-fusion/protocol.ts:85">
P2: When a caller requests an offset beyond the result set, an empty terminal page can have `totalResults < offset`; this check rejects that valid page because it compares against `offset + count` even when `count` is zero. Enforce the lower bound only for non-empty pages.</violation>
<violation number="2" location="apps/sim/lib/internal/oracle-fusion/protocol.ts:132">
P2: When a self-link contains a raw tab, newline, or carriage return in its opaque key, `new URL(href)` strips it before `validateOpaqueKey` runs. `extractOracleFusionOpaqueKey` can therefore return a different key and lead callers to a different resource; reject ASCII controls in `href` before URL parsing.
(Based on your team's feedback about rejecting malformed Oracle path input.)</violation>
</file>
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
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
2 issues found across 29 files
Confidence score: 3/5
- In
apps/sim/lib/internal/oracle-fusion/protocol.ts, contradictory pagination metadata can sethasMore: falseeven when results remain, causing valid-looking pages to truncate pagination; reject this metadata, including on empty pages, before returning the page. - In
apps/sim/lib/internal/oracle-fusion/protocol.ts, self-link validation can accept traversal and encoded-dot variants becausenew URL(href)normalizes them first, weakening path validation; reject raw dot segments, backslashes, and encoded-dot components before canonicalization.
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/protocol.ts">
<violation number="1" location="apps/sim/lib/internal/oracle-fusion/protocol.ts:86">
P2: When `totalResults` exceeds `offset + count`, `hasMore: false` makes a valid-looking page truncate pagination. Reject this contradictory metadata, including empty pages, before returning the page.</violation>
<violation number="2" location="apps/sim/lib/internal/oracle-fusion/protocol.ts:133">
P2: Self-link validation accepts traversal and encoded-dot variants because `new URL(href)` normalizes them before path validation. Reject raw dot segments, backslashes, and encoded dot path components before URL canonicalization so only the provider’s canonical resource link can be accepted.
(Based on your team's feedback about rejecting malformed Oracle path variants.)</violation>
</file>
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
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
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
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
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
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
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
Summary
Adds the shared Oracle Fusion foundation used by sibling product integrations without registering or advertising any product service.
The credential provider/kind enforcement is isolated as a platform-security commit. Oracle addressing/protocol stabilization and bounded mutations are 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
Testing
Reviewers should focus on the central credential boundary, fixed-origin and family-root enforcement, exact identifiers, mutation serialization/header constraints, retry/deadline behavior, and product-neutral protocol invariants.
Checklist
Screenshots/Videos
Not applicable. This foundation does not add a product UI surface; it only exports the existing Oracle oval under a shared alias.