Skip to content

Look up config properties in the published reference, not the UI sample - #455

Open
JakeSCahill wants to merge 1 commit into
mainfrom
fix/property-lookup-published-reference
Open

JakeSCahill wants to merge 1 commit into
mainfrom
fix/property-lookup-published-reference

Conversation

@JakeSCahill

Copy link
Copy Markdown
Contributor

Ask AI's lookup_config_property tool read redpanda-properties.json from the UI bundle. That file is a 9-property sample, and production serves it too, so common properties such as default_topic_replications and write_caching_default came back "not found". The tool tells the model to use it for grounded values, so it was steering answers away from exact values.

The tool now reads the reference the property tooltips already use: the file that <meta name="properties-json-url"> names, which the docs build publishes per release. Today that's /streaming/current/reference/_attachments/redpanda-properties-v26.2.4.json, with 691 properties. Solutions pages carry the same meta.

  • On a page with no meta, it says the page names no property reference, so the model falls back to docs search. It never reads the sample outside the docs-ui preview.
  • In the docs-ui preview, which has no docs build behind it, it still reads the bundled sample.
  • It caches by URL, and retries after a failed fetch.
  • It also returns cloudEditable, cloudReadonly and cloudByocOnly when the reference has them.

Tests: tests/property-lookup-tool (7 cases), wired into test:all and validate-build.yml. With main's loader restored, 6 of the 7 fail. The tests pass on Node 18 (node:18-alpine) and lint is clean. A run against the live 26.2.4 file returns default_topic_replications (default 1, cluster) and write_caching_default, and reports an unknown name as not found.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1cd8f0ac-ff9d-4559-964c-fe73f298a1b9
Commits

Reviewing files that changed from the base of the PR and between 78442c3 and fce8331.

Files selected for processing: 5
  • .github/workflows/validate-build.yml
  • package.json
  • src/js/react/agentTools.js
  • tests/property-lookup-tool/fixture-published.json
  • tests/property-lookup-tool/property-lookup-tool.test.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The property lookup tool now uses the property-reference URL in page metadata. UI-preview pages without that URL use the UI-root JSON file; other pages without a reference return an error. Successful references are cached by URL, and failed loads can be retried. Lookup results include three Cloud-related fields. New tests cover reference selection, caching, retries, and preview fallback. The tests are added to the full test sequence and build validation workflow.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PageMetadata
  participant lookup_config_property
  participant fetch
  PageMetadata->>lookup_config_property: provide properties-json-url
  lookup_config_property->>fetch: request property reference
  fetch-->>lookup_config_property: return property records
  lookup_config_property-->>PageMetadata: return property data and Cloud fields
Loading

Suggested reviewers: feediver1

Merge Risk: Minimal · up to fce83

The property lookup change is mergeable after normal checks; no actionable risk is established by the supplied evidence.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description check Passed The description clearly explains the change from the UI sample to the published property reference, fallback behavior, caching, returned fields, and test coverage.
Title check Passed The title clearly and concisely summarizes the main change: looking up configuration properties in the published reference instead of the UI sample.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 2 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

package.json

Parsing error: Unexpected token :

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit fce8331
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6ae0dc0edc60a2dc17e51b01
😎 Deploy Preview https://deploy-preview-455--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 44 (🟢 up 4 from production)
Accessibility: 89 (no change from production)
Best Practices: 83 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@JakeSCahill
JakeSCahill marked this pull request as ready for review October 27, 2026 17:16
@JakeSCahill
JakeSCahill requested a review from a team as a code owner October 27, 2026 17:16
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.

1 participant