fix: preserve manual content in nodes index and include MCP config in docs#418
Conversation
… docs - Add a <!-- manual-content-below --> marker to nodes/index.md so that render_nodes_index() preserves hand-written content (e.g. the Feature-gated nodes section) across regenerations. - Update justfile gen-docs-reference recipe to compile with --features mcp for future-proofing. - Regenerate all reference docs, which now includes the [mcp] config section and updated node definitions. - Add tests for marker content preservation and MCP config schema inclusion. Fixes #411 Fixes #412 Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[allow(clippy::unwrap_used, clippy::expect_used)] |
There was a problem hiding this comment.
🔴 Clippy suppression is missing the required rationale
The new test module suppresses clippy::unwrap_used and clippy::expect_used without the // reason required by the repository's AGENTS.md linting-discipline rule. This is a mandatory repository rule for all lint suppressions, so the suppression should include a concise rationale explaining why it is acceptable here.
| #[allow(clippy::unwrap_used, clippy::expect_used)] | |
| #[allow(clippy::unwrap_used, clippy::expect_used)] // Test setup uses fallible tempfile/write helpers; panicking keeps failures clear. |
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
Fixed in 92179d1 — added rationale comment to the #[allow] attribute.
| out.push_str(&format!("\n{MANUAL_CONTENT_MARKER}\n")); | ||
|
|
||
| if let Some(manual) = read_manual_content(existing_path) { | ||
| out.push_str(&manual); |
There was a problem hiding this comment.
📝 Info: Manual node-index content now depends on the marker being present
The generator now preserves hand-written node-index content only by slicing the existing file after <!-- manual-content-below -->. This means future manual additions above the marker will still be regenerated away, and if the marker is accidentally removed in a future edit the manual section will be dropped on the next generation. That behavior appears intentional for a generated page rather than a bug in this PR, but reviewers should keep the marker placement in mind when editing docs/src/content/docs/reference/nodes/index.md.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
| gen-docs-reference: | ||
| @echo "Generating reference documentation (nodes + plugins + packets)..." | ||
| @cargo run -p streamkit-server --bin gen-docs-reference | ||
| @cargo run -p streamkit-server --features mcp --bin gen-docs-reference |
There was a problem hiding this comment.
📝 Info: Docs generation now documents MCP by enabling the feature
The gen-docs-reference recipe now runs the server crate with --features mcp, which makes the generated configuration reference include the [mcp] section and matches the added regression test in apps/skit/src/bin/gen-docs-reference.rs:1539-1543. I considered whether this would drop default features or node features, but Cargo feature flags are additive unless --no-default-features is used, so the existing default node set remains enabled while MCP is added.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
| <!-- manual-content-below --> | ||
| ## Feature-gated nodes | ||
|
|
||
| These nodes require optional Cargo features and may not be included in all builds. Official Docker images include most of these; check `GET /api/v1/schema/nodes` for what's available in your build. |
There was a problem hiding this comment.
🚩 Generated node docs include feature-gated nodes from the current build
The regenerated node index now lists nodes such as MP4, AV1, OpenH264, RTMP, object store, and MSE because the default feature set for the nodes crate includes these features in this checkout. The preserved manual section still separately calls out some feature-gated nodes, so there is overlap between the generated list and the manual notes. This is not necessarily incorrect—the runtime schema is build-dependent and the manual section explains feature gating—but reviewers may want to decide whether the wording should clarify that the checked-in reference reflects the default docs-generation feature set.
(Refers to lines 81-100)
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
Summary
Fixes two related issues found during the v0.5 docs review (#407):
Issue #411 — Nodes index overwrites hand-written content:
render_nodes_index()generated the entirenodes/index.mdfrom scratch, destroying the hand-written "Feature-gated nodes" section on each re-run. Fixed by:<!-- manual-content-below -->marker commentrender_nodes_index()now reads the existing file, finds the marker, and appends any content below it to the regenerated outputread_manual_content()helper with proper handling for missing files, missing markers, and empty trailing contentIssue #412 — Missing
[mcp]config section:The generated config reference omitted the
[mcp]section.McpConfigis not actually behind a#[cfg(feature = "mcp")]gate (it's always part ofConfig), so the fix was simply to regenerate the docs from the current codebase. Additionally, updated thegen-docs-referencejustfile recipe to compile with--features mcpfor future-proofing.Also regenerated all node reference pages to bring them up to date with the current default feature set (new pages for
containers::mp4::muxer,core::object_store_writer,core::param_bridge,transport::http::mse,transport::rtmp::publish,video::av1::*,video::openh264::encoder).Tests added:
read_manual_content_preserves_text_below_markerread_manual_content_returns_none_when_no_markerread_manual_content_returns_none_for_missing_fileread_manual_content_returns_none_when_nothing_after_markerrender_nodes_index_embeds_marker_and_preserves_manual_sectionconfig_schema_includes_mcp_sectionFixes #411
Fixes #412
Review & Testing Checklist for Human
<!-- manual-content-below -->marker appears innodes/index.mdand the "Feature-gated nodes" section is preserved below itjust gen-docs-referencetwice — confirm the manual section survives re-runsconfiguration-generated.mdnow includes the[mcp]section withenabled,endpoint, andallowed_hostsfieldsjust build-docsand visually confirm the nodes index page and config reference render correctlyNotes
.soartifacts aren't available in the build environment. A separatejust gen-docs-referencerun with built plugins would update those.av1,openh264,mp4, andrtmpnodes.Link to Devin session: https://staging.itsdev.in/sessions/6fc1cf8097cc4807a44e077c4ed660d5
Requested by: @streamer45
Devin Review
405a016(HEAD is92179d1)