Skip to content

Time Object ID Lookup Endpoint#4807

Draft
Elutrixx wants to merge 9 commits into
CactuseSecurity:developfrom
Elutrixx:Endpoint-getTimeObjectId
Draft

Time Object ID Lookup Endpoint#4807
Elutrixx wants to merge 9 commits into
CactuseSecurity:developfrom
Elutrixx:Endpoint-getTimeObjectId

Conversation

@Elutrixx

Copy link
Copy Markdown
Contributor

Adds a new GetTimeObjectId endpoint to the flow catalog controller, mirroring the existing address and service object ID lookups. The endpoint validates the request in the same schema-driven way, honors the visibleInRequest filter, and returns the matching time object ID and name when the startTime/endTime range exists in the DB.

@Elutrixx Elutrixx marked this pull request as ready for review June 30, 2026 09:24
@Elutrixx Elutrixx requested review from Y4nnikH and tpurschke June 30, 2026 09:24
@Elutrixx Elutrixx marked this pull request as draft June 30, 2026 10:00
@Elutrixx Elutrixx removed request for Y4nnikH and tpurschke June 30, 2026 10:00
@Elutrixx

Copy link
Copy Markdown
Contributor Author

@codex please review this branch

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03adf43620

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{
List<FlowTimeObject> result = await apiConnection.SendQueryAsync<List<FlowTimeObject>>(
FlowQueries.getFlowTimeObjectId,
BuildLookupQueryVariables(visibleInRequest, ("start_time", startTime), ("end_time", endTime))) ?? [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Support one-sided time object lookups

When the flow time object is open-ended (only start_time or only end_time is set), this lookup cannot resolve it because the new request requires both bounds and the query always emits _eq predicates for both fields. The existing flow creation path treats one-sided time objects as valid (FlowDbCreator.ResolveOrCreateTimeObject creates one when either bound is present, and FlowHashGenerator.GenerateTimeObjectHash allows either bound), so API clients trying to look up a deadline-only or start-only object will get a 400 for the omitted field or no match instead of the existing id. Make the bounds nullable and generate _is_null predicates for missing bounds.

Useful? React with 👍 / 👎.

Elutrixx added 2 commits July 7, 2026 13:18
# Conflicts:
#	roles/tests-unit/files/FWO.Test/FlowQueriesTest.cs
@Elutrixx

Elutrixx commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex please review this

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afa12027d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return errorResult!;
}

if (request.StartTime.HasValue && request.EndTime.HasValue && request.StartTime > request.EndTime)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject time ID lookups with no bounds

When a caller posts {} or only filter, this validation still falls through to GetTimeObjectIdAsync with both timestamps null, which builds start_time: {_is_null: true} and end_time: {_is_null: true} and returns the first matching custom/unbounded time object. The flow model treats null/null time objects as non-deterministic custom objects (FlowHashGenerator.GenerateTimeObjectHash refuses them), so an omitted range can resolve to an unrelated ID instead of being rejected; require at least one of startTime or endTime before querying.

Useful? React with 👍 / 👎.

@Elutrixx

Elutrixx commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@codex review this please

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 2c7c54a13c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread roles/common/files/fwo-api-calls/flow/getFlowTimeObjectId.graphql
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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.

2 participants