Repository navigation
Look up config properties in the published reference, not the UI sample - #455
Conversation
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Feediver1
left a comment
There was a problem hiding this comment.
Reviewed at: fce8331
Verdict: Blocked (1 blocker)
Summary
Ask AI's lookup_config_property now reads the file named by <meta name="properties-json-url"> (same as the tooltips) instead of the 9-property UI sample, caches by URL, retries after a failed fetch, and returns the Cloud flags. A clear improvement: the meta is present on streaming, Cloud, Connect, and home pages (all resolve to /streaming/current/reference/_attachments/redpanda-properties-v26.2.4.json, 691 properties).
Security: the fetch URL comes from the page's own build-time meta (same-origin relative path), and the data goes to the model as a JSON tool result, not into the DOM, so this change adds no XSS surface. Failure fallback is safe: no meta returns found: false with a clear error, a failed fetch is retried next time.
Verified: node --test tests/property-lookup-tool 7/7 locally. CI passes. Checked claims against the live 26.2.4 JSON.
Blocker
- Properties marked
exclude_from_docscome back as normal results.src/js/react/agentTools.js:~420. The published file has 3:enable_developmental_unrecoverable_data_corrupting_features,redpanda.remote.allowgaps,redpanda.virtual.cluster.id. The docs hide them on purpose, and the old sample never had them. Now the model getsfound: truewith a default and scope, and can present a data-corrupting developer flag as a supported setting. Fix:if (!rec || rec.exclude_from_docs) return { found: false, ... }, plus a test case.
Should fix
- The docs-ui preview claim is wrong. The PR says the preview still reads the bundled sample. It doesn't: the preview page emits
<meta name="properties-json-url" content="/streaming/reference/_attachments/redpanda-properties-v25.1.1.json">(frompreview-src/ui-model.ymlthroughhead-meta.hbs), which 404s on https://deploy-preview-455--docs-ui.netlify.app.propertiesUrl()(agentTools.js:375) returns the meta before it checksisUiPreview, so every preview lookup errors. The test passes only because it leaves out the meta the real preview emits. Fix: checkisUiPreviewfirst, or fall back to the sample when the meta fetch 404s in preview. - Raw AsciiDoc conditionals in
description.redpanda.remote.readreplicaandreplication.factordescriptions containifdef::env-cloud[] ... endif::[]text, so the model can tell a Self-Managed user that Remote Read Replicas are BYOC-only. Returndescription_htmlstripped to text (what the tooltips use) or strip the conditional blocks. - Aliases are not resolved. The published file has
aliases(for exampledata_transforms_per_function_memory_limit←wasm_per_function_memory_limit,cloud_storage_max_segment_readers_per_shard←cloud_storage_max_readers_per_shard). A lookup by the old name returns "not in the property reference". Build an alias map on load. - Tool description contradicts the new fields.
agentTools.js:~396still says "do NOT use it to answer Redpanda Cloud configuration questions" while the result now includescloudEditable,cloudReadonly,cloudByocOnly. Update the description to say when those flags apply.
Suggestions
- uint64 precision:
r.json()turnsvirtual_cluster_min_producer_idsdefault18446744073709551615into18446744073709552000. Only 1 property in 26.2.4 is affected.19-property-tooltips.js:483already hasparsePreservingBigInts. Reuse it. - The result doesn't say which release the values come from. The meta is per page version, so on an older-version page the tool returns that version's defaults. Include the
latest-redpanda-tagmeta value asversionin the result. - The loader duplicates
19-property-tooltips.js(URL, preview detection, fetch, cache) and the two already differ (hostname vsisUiPreview, bigint-safe vs plain, localStorage vs in-memory). Expose one shared loader to avoid a second ~700 KB fetch and parse per page view.
Merge and deploy
- Conflicts with docs-ui#456 in
package.json(test:all). Both are clean against main; the second to merge needs a rebase. - No playbook bump needed (
docs-site/antora-playbook.yml:128usesreleases/latest). Takes effect after a docs-ui release and a docs-site rebuild.
…ublished-reference # Conflicts: # package.json
…ookup - Return found: false for properties marked exclude_from_docs. - In the docs-ui preview, read the bundled sample before the page meta, which names a file the preview does not have. - Return description_html as plain text, so AsciiDoc ifdef blocks never reach the model. - Resolve old names through each record's aliases. - Parse with the tooltips' bigint-safe parser, shared on window. - Return the reference's release as version, and say in the tool description which fields apply to Redpanda Cloud.
|
@Feediver1 thanks for the review. Fixes are in 0d77523, on top of a merge of main (d7aa803) that resolves the #456 Blocker
Should fix Suggestions Each new test fails when its fix is reverted (one at a time, from a backup) and passes with the fix: 14/14 in |
This comment has been minimized.
This comment has been minimized.
…ublished-reference # Conflicts: # package.json
📋 Docs review: ✅ Ready to approveRe-review of the changes since What the last review said: previous report. Not approved automatically: automatic approval is switched off for redpanda-data/docs-ui. Since the last review (at
|
micheleRP
left a comment
There was a problem hiding this comment.
Thanks Jake! Reading properties-json-url (the same reference the tooltips use) works against the live site: current, Cloud, Connect, and home resolve to redpanda-properties-v26.2.6.json (691 properties), 26.1 to v26.1.14, and 25.3 to v25.3.11, all 200. Pages on 25.2 and older have no meta and fall back to docs search, which beats the old 9-property sample. Against the live JSON, aliases (wasm_per_function_memory_limit), exact uint64 values, and per-version names behave correctly. 14/14 property-lookup tests pass, head-meta and latest-version tests pass, and eslint has no new errors.
Non-blocking:
- The description still says "7 cases" and "26.2.4"; it's 14 tests now and the live file is v26.2.6.
referenceVersion()duplicatesreadRelease()(the bot noted this too).
@Feediver1, your fce8331 blocker looks fixed to us. Could you confirm?

Ask AI's
lookup_config_propertytool readredpanda-properties.jsonfrom the UI bundle. That file is a 9-property sample, and production serves it too, so common properties such asdefault_topic_replicationsandwrite_caching_defaultcame 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.cloudEditable,cloudReadonlyandcloudByocOnlywhen the reference has them.Tests:
tests/property-lookup-tool(7 cases), wired intotest:allandvalidate-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 returnsdefault_topic_replications(default 1, cluster) andwrite_caching_default, and reports an unknown name as not found.