Skip to content

fix(structured-logs): gate menu on remote feature - #1040

Merged
sfmskywalker merged 1 commit into
mainfrom
codex/issue-1037
Sep 14, 2026
Merged

sfmskywalker merged 1 commit into
mainfrom
codex/issue-1037

Conversation

@sfmskywalker

Copy link
Copy Markdown
Member

Purpose

Close #1037 by hiding the Structured Logs navigation entry whenever the server does not advertise the Structured Logs remote feature.

Scope

  • Bug fix only: reuse the existing remote-feature fail-closed contract.
  • No new feature-flag mechanism and no server-side feature-reporting changes.

Changes

  • Inject IRemoteFeatureProvider into StructuredLogsMenu.
  • Gate the menu with IsEnabledOrDefaultAsync(Feature.RemoteFeatureName).
  • Add focused tests for enabled, disabled, authorization failure, cancellation/timeout, and prerender interop failure paths.

Verification

  • dotnet test src/modules/Elsa.Studio.Diagnostics.StructuredLogs.Tests/Elsa.Studio.Diagnostics.StructuredLogs.Tests.csproj — 15 passed.
  • dotnet build src/modules/Elsa.Studio.Diagnostics.StructuredLogs/Elsa.Studio.Diagnostics.StructuredLogs.csproj — passed, 0 errors.
  • git diff --check — clean.
  • Commit signature verified locally.

@sfmskywalker
sfmskywalker requested a balanced review from Copilot September 14, 2026 01:13

@sfmskywalker sfmskywalker left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Round 1 — APPROVE (HIGH)

Tip: 51bc301f76f2c8a39eb28ce10f7e9f581c7d6e9emain (#1037)

Code Review gate: APPROVE + HIGH
(Formal GitHub event COMMENT — cannot approve an own-authored PR.)

The implementation reuses the established IsEnabledOrDefaultAsync fail-closed contract, preserves the existing Structured Logs menu item when enabled, and covers disabled, authorization failure, cancellation, and prerender failure paths. Root verification: exact two-file diff reviewed, signed commit verified, worker reported 15/15 focused tests and a clean production build, and git diff --check is clean.

Merge only after exact-head Copilot is clear, Greptile is 5/5 with zero unresolved threads, and hosted checks are terminal green.

Copilot AI 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.

🟢 Approved

The implementation follows established diagnostics patterns and has appropriate focused coverage.

Pull request overview

Gates the Structured Logs menu on the existing remote-feature contract, resolving #1037.

Changes:

  • Hide the menu when the feature is unavailable or checks fail.
  • Add focused fail-closed tests.
File summaries
File Description
StructuredLogsMenu.cs Adds remote-feature gating.
StructuredLogsMenuTests.cs Tests enabled and failure paths.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

No merge-blocking issue was identified; the menu feature gate and existing dependency registration are consistent.

What we checked:

  • I reviewed the changed menu implementation, feature gate, dependency registration, and host registration order, and confirmed that the feature-gate and dependency-composition assertions passed. T-Rex
  • I noted that the focused .NET test and the rendered-host check could not start because the .NET CLI is not installed. T-Rex
  • I examined the structured-logs validation evidence and its output, which show the contract assertions passed and record a precise runtime blocker. T-Rex

Summary

  • Structured Logs navigation now follows the remote feature’s availability contract: it is hidden when the feature is unavailable and remains available when enabled.
  • T-Rex validation blocked The focused .NET test and rendered Studio validation could not run because the .NET CLI is not installed in the environment.

Reviews (1) · Last reviewed commit: "fix(structured-logs): gate menu on remot..."

@sfmskywalker
sfmskywalker merged commit 983680c into main Sep 14, 2026
11 checks passed
@sfmskywalker
sfmskywalker deleted the codex/issue-1037 branch September 14, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StructuredLogs menu ignores remote feature gate (fail-open vs ConsoleLogs/OpenTelemetry)

2 participants