Skip to content

Include ref.parent matches in events by-reference navigation#2280

Open
niemyjski with Copilot wants to merge 8 commits into
mainfrom
copilot/fix-parent-url-navigation
Open

Include ref.parent matches in events by-reference navigation#2280
niemyjski with Copilot wants to merge 8 commits into
mainfrom
copilot/fix-parent-url-navigation

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

/events/by-ref/{referenceId} only matched reference:{id}, so child events that stored their relationship in ref.parent could not be reached through Parent navigation.

Root cause

  • The by-reference handlers queried only the top-level reference field.
  • Adding ref.parent to the query initially made the route premium-only because dynamic reference fields were classified as premium.
  • Free-plan ingestion also skipped dynamic indexing, so real posted events did not persist idx.parent-r even though test fixtures did.
  • The Svelte event-list link still emitted a direct-reference-only filter, dropping parent matches after navigation.
  • Reference IDs were constrained, but programmatic reference names were not validated at the write boundary even though indexing only accepts field names with 1–25 letters, digits, or hyphens.

Changes

  • Match either reference:{id} or ref.parent:{id} in organization- and project-scoped handlers and frontend navigation.
  • Classify the built-in parent reference as free so existing by-reference behavior remains available to free organizations.
  • Index only @ref:parent for free-plan events; arbitrary custom data remains unindexed.
  • Run versioned migration 3 to backfill missing idx.parent-r values for retained events without overwriting existing indexes.
  • Validate programmatic reference names against the existing index field-name contract, and reject invalid ref.<name> query fields.
  • Render arbitrary valid reference filters as ref.<name> and suppress unsafe/invalid filter controls.
  • Centralize built-in parent and session reference names.
  • Add endpoint, query-validator, production-pipeline, reference-filter, and identifier coverage.
  • Merge the latest origin/main into the PR branch.

Verification

  • dotnet build tests/Exceptionless.Tests/Exceptionless.Tests.csproj --no-restore --disable-build-servers -m:1 — 0 warnings, 0 errors.
  • StringExtensionsTests — 43 passed.
  • PersistentEventQueryValidatorTests — 70 passed.
  • EventPipelineTests — 60 passed, 1 intentional skip.
  • EventEndpointTests — 104 passed.
  • BackfillParentReferencesMigrationTests — passed against Elasticsearch.
  • Frontend reference-filter unit tests — 77 passed.
  • npm run validate — passed (Prettier, ESLint, and Svelte check with 0 errors/warnings).
  • Scoped dotnet format --verify-no-changes — passed.
  • Previous full backend suite — 2,424 passed, 2 intentional skips, 0 failed.
  • Thermo-nuclear maintainability review — passed with no unresolved PR-scope findings.

Compatibility and scope

  • No route, response-contract, or authorization changes.
  • Existing direct-reference matches remain supported.
  • Reference IDs remain constrained by the identifier route constraint and event validation to 8–100 letters, digits, or hyphens.
  • Raw legacy events containing invalid reference names are preserved but those invalid names are not indexed; new programmatic writes reject them.
  • Newly ingested free-plan events persist only the built-in idx.parent-r search field; arbitrary dynamic reference fields remain premium-only.
  • Arbitrary valid premium reference names still consume dynamic Elasticsearch mappings. The index total-field limit is a failure ceiling, not cardinality governance; managed organization-scoped custom-field slots remain a separate follow-up.

@CLAassistant

CLAassistant commented May 31, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ niemyjski
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix navigation issue from 'Parent' URL in Exceptionless 4.1.0 Include ref.parent matches in events by-reference navigation Jun 1, 2026
Copilot AI requested a review from niemyjski June 1, 2026 00:11
Copilot AI and others added 2 commits July 10, 2026 13:32
@niemyjski
niemyjski force-pushed the copilot/fix-parent-url-navigation branch from e666187 to 8f5e641 Compare July 10, 2026 18:47
@niemyjski
niemyjski changed the base branch from bugfix/1287-investigate-references to main July 10, 2026 18:47
# Conflicts:
#	src/Exceptionless.Web/Controllers/EventController.cs
@niemyjski
niemyjski marked this pull request as ready for review July 21, 2026 02:08

@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: ae3cc52eb3

ℹ️ 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 src/Exceptionless.Web/Api/Handlers/EventHandler.cs Outdated

@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: 6f152edde5

ℹ️ 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".

@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: 775c14f17c

ℹ️ 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 src/Exceptionless.Core/Pipeline/035_CopySimpleDataToIdxAction.cs Outdated
Comment thread src/Exceptionless.Web/Api/Handlers/EventHandler.cs Outdated

@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: 5f0dd46364

ℹ️ 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 `reference:${quoteIfSpecialCharacters(this.value)}`;
const reference = quoteIfSpecialCharacters(this.value);
return `(reference:${reference} OR ref.parent:${reference})`;

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 Keep parent reference filters free in the Svelte guard

When this filter is used on the events route, (app)/+layout.svelte calls filterUsesPremiumFeatures() on the filter query string, and premium-filter.ts still treats any ref.parent field as premium because its free-field list only contains reference/reference_id. For free-plan organizations, clicking a Reference filter or the by-ref page's “View In Events” link now shows the premium-upgrade notification even though the backend validator intentionally made parent-reference lookup free; the client free-field list needs the same ref.parent allowance.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Insulation 23% 23% 205
Exceptionless.Core 72% 64% 8887
Exceptionless.AppHost 38% 39% 144
Exceptionless.Web 84% 67% 6841
Summary 76% (21426 / 28194) 65% (9826 / 15190) 16077

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.

Exceptionless 4.1.0 cannot navigate from the 'Parent' url

3 participants