Skip to content

fix: preserve manual content in nodes index and include MCP config in docs#418

Merged
streamer45 merged 2 commits into
mainfrom
devin/1778348370-fix-docs-generator
May 10, 2026
Merged

fix: preserve manual content in nodes index and include MCP config in docs#418
streamer45 merged 2 commits into
mainfrom
devin/1778348370-fix-docs-generator

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration Bot commented May 9, 2026

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 entire nodes/index.md from scratch, destroying the hand-written "Feature-gated nodes" section on each re-run. Fixed by:

  • Adding a <!-- manual-content-below --> marker comment
  • render_nodes_index() now reads the existing file, finds the marker, and appends any content below it to the regenerated output
  • Added read_manual_content() helper with proper handling for missing files, missing markers, and empty trailing content

Issue #412 — Missing [mcp] config section:
The generated config reference omitted the [mcp] section. McpConfig is not actually behind a #[cfg(feature = "mcp")] gate (it's always part of Config), so the fix was simply to regenerate the docs from the current codebase. Additionally, updated the gen-docs-reference justfile recipe to compile with --features mcp for 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_marker
  • read_manual_content_returns_none_when_no_marker
  • read_manual_content_returns_none_for_missing_file
  • read_manual_content_returns_none_when_nothing_after_marker
  • render_nodes_index_embeds_marker_and_preserves_manual_section
  • config_schema_includes_mcp_section

Fixes #411
Fixes #412

Review & Testing Checklist for Human

  • Verify the <!-- manual-content-below --> marker appears in nodes/index.md and the "Feature-gated nodes" section is preserved below it
  • Run just gen-docs-reference twice — confirm the manual section survives re-runs
  • Check that configuration-generated.md now includes the [mcp] section with enabled, endpoint, and allowed_hosts fields
  • Run just build-docs and visually confirm the nodes index page and config reference render correctly

Notes

  • Plugin reference pages were not regenerated since native plugin .so artifacts aren't available in the build environment. A separate just gen-docs-reference run with built plugins would update those.
  • The node reference pages were regenerated to reflect the current default feature set, which now includes av1, openh264, mp4, and rtmp nodes.

Link to Devin session: https://staging.itsdev.in/sessions/6fc1cf8097cc4807a44e077c4ed660d5
Requested by: @streamer45


Devin Review

Status Commit
🕐 Outdated 405a016 (HEAD is 92179d1)

Run Devin Review

Open in Devin Review (Staging)

… 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>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

Open in Devin Review (Staging)
Debug

Playground

Comment thread apps/skit/src/bin/gen-docs-reference.rs Outdated
}

#[cfg(test)]
#[allow(clippy::unwrap_used, clippy::expect_used)]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔴 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.

Suggested change
#[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.
Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 92179d1 — added rationale comment to the #[allow] attribute.

Comment on lines +663 to +666
out.push_str(&format!("\n{MANUAL_CONTENT_MARKER}\n"));

if let Some(manual) = read_manual_content(existing_path) {
out.push_str(&manual);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

📝 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.

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Comment thread justfile
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

📝 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.

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Comment on lines +81 to 84
<!-- 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.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🚩 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)

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@streamer45 streamer45 merged commit 7e88a3f into main May 10, 2026
16 checks passed
@streamer45 streamer45 deleted the devin/1778348370-fix-docs-generator branch May 10, 2026 17:05
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.

gen-docs-reference: include MCP config section in generated configuration page gen-docs-reference: preserve hand-written feature-gated nodes section

2 participants