Skip to content

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

Open
niemyjski with Copilot wants to merge 14 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 14 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".

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

ℹ️ 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/Extensions/PersistentEventExtensions.cs Outdated
Comment thread src/Exceptionless.Core/Migrations/003_BackfillParentReferences.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: 85e61cecba

ℹ️ 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/Migrations/003_BackfillParentReferences.cs Outdated
@niemyjski

niemyjski commented Jul 26, 2026

Copy link
Copy Markdown
Member

Follow-up reviewer audit complete on head 2991ef0e0a00e9ee4ca52b1d1b3851a20939fdd4.

Feedback classification:

  • Four historical Codex threads were already fixed and outdated on the current diff.
  • The Svelte premium-guard P2 was already fixed by a507d669d; it was replied to and resolved.
  • Two Codex P1s were valid and fixed in 85e61cecb: SetEventReference again preserves legacy/custom names at the public write boundary, and migration 3 string-normalizes legacy parent values and rejects task errors, embedded failures, and version conflicts instead of completing partially.
  • A post-push Codex P2 was valid and fixed in 3e5f26322: persisted @ref:Parent and other casing variants are backfilled via a canonical-first, case-insensitive fallback.
  • A later Codex P2 was valid and fixed in d7a0b3764: the by-reference page consumes existing total metadata, labels the bounded preview honestly, and directs the complete parent-aware result set to the paginated Events view.
  • The final Codex P2 was valid and fixed in 2991ef0e0: the client premium guard now recognizes hyphenated and Unicode custom reference fields instead of silently disagreeing with backend entitlement enforcement.
  • Submitted-review boilerplate and coverage bot comments were informational; the Copilot CLA remains the sole external gate.

Thermo-nuclear review of the complete current branch-vs-main diff found and fixed a partial-update risk where Conflicts.Proceed could silently skip documents. It also drove a code-judo simplification of the client field extractor: the brittle duplicated character grammar was deleted while the free-field allowlist remains the canonical entitlement decision. No PR file crosses 1,000 lines because of this change, and no further structural, abstraction, type-boundary, or canonical-helper issue remains.

Local verification: backend build passed with 0 warnings/errors; compatibility tests 3/3; migration task-result tests 4/4; service-backed migration 1/1; free-plan ingestion 1/1; organization/project by-reference endpoints 2/2; query validator 70/70; frontend unit tests 332/332; focused reference-page tests 3/3; focused premium-filter tests 4/4; npm run validate passed with 0 Svelte errors/warnings; frontend production build, scoped dotnet format --verify-no-changes, and git diff --check passed. All ten review threads are resolved.

Authoritative GitHub Actions run 30212517562 passed on this exact head: API/coverage, client, E2E, Docker, and version are green. The external Copilot contributor CLA is the only pending check.

@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: 3e5f263221

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

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

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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Core 73% 65% 9549
Exceptionless.AppHost 38% 40% 139
Exceptionless.Insulation 23% 23% 205
Exceptionless.Web 84% 67% 6935
Summary 77% (22613 / 29545) 65% (10398 / 15910) 16828

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