Repository navigation
Feat: Put some wiki templates. - #16617
Conversation
📝 WalkthroughWalkthroughAdds a new authenticated GET endpoint ChangesWiki Presets Loading and Templates
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
api/db/init_data/compilation_templates/wiki/product.yaml (1)
33-39: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMalformed/outdated Rust snippet in example content.
The fenced code block is missing a closing
}forquick_task, andawait!(...)is obsolete pre-stabilization async syntax (current Rust uses.await). Since this is example content fed as an LLM prompt, a malformed snippet may degrade generation quality.✏️ Suggested fix
``` async fn quick_task() -> Result<&'static str> { println!("START quick_task"); - await!(delay(10)).context("delay failed")?; + delay(10).await.context("delay failed")?; println!("END quick_task"); Ok("quick_task result") + } ```🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/db/init_data/compilation_templates/wiki/product.yaml` around lines 33 - 39, The example Rust snippet is malformed and uses outdated async syntax, so update the fenced `quick_task` snippet to be valid current Rust. In the `quick_task` example, close the function body with the missing brace and replace the obsolete `await!(delay(10))` usage with the modern `.await` form. Keep the snippet consistent with the surrounding documentation so the prompt content remains syntactically correct and up to date.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/db/init_data/compilation_templates/wiki.yaml`:
- Around line 9-11: The wiki template text includes a stray literal "\n" at the
end of the “See also” instruction, which will be rendered verbatim in the
prompt. Remove the escaped newline from the YAML block scalar content in
wiki.yaml so the instruction text ends cleanly; check the affected bullet in the
template string and keep the formatting consistent with the surrounding entries.
In `@api/db/init_data/compilation_templates/wiki/engineering.yaml`:
- Around line 39-40: The task list item in the wiki template is malformed
because the checkbox syntax is missing the required list marker, so it will not
render correctly in GitHub-Flavored Markdown. Update the Open questions entry in
the engineering template so the checked item uses proper task-list formatting,
keeping the existing text but adding the correct list prefix around the [x]
item.
In `@api/db/init_data/compilation_templates/wiki/general.yaml`:
- Around line 2-8: The instruction text in the YAML block scalar contains a
stray literal backslash-n sequence, so the parsed content will include “\n”
verbatim instead of a real line break. Update the general.yaml instruction block
to remove the escaped newline from the See also bullet in the instruction
string, keeping the content as plain multiline prose under the instruction key.
Refer to the instruction field in the YAML block literal and ensure the final
rendered text does not contain any literal escape sequences.
---
Nitpick comments:
In `@api/db/init_data/compilation_templates/wiki/product.yaml`:
- Around line 33-39: The example Rust snippet is malformed and uses outdated
async syntax, so update the fenced `quick_task` snippet to be valid current
Rust. In the `quick_task` example, close the function body with the missing
brace and replace the obsolete `await!(delay(10))` usage with the modern
`.await` form. Keep the snippet consistent with the surrounding documentation so
the prompt content remains syntactically correct and up to date.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2f3b4539-a6c9-4c14-8420-65d69ebc19a6
📒 Files selected for processing (10)
api/apps/restful_apis/compilation_template_api.pyapi/db/init_data/compilation_templates/wiki.yamlapi/db/init_data/compilation_templates/wiki/brand.yamlapi/db/init_data/compilation_templates/wiki/engineering.yamlapi/db/init_data/compilation_templates/wiki/general.yamlapi/db/init_data/compilation_templates/wiki/market.yamlapi/db/init_data/compilation_templates/wiki/product.yamlapi/db/init_data/compilation_templates/wiki/user_interview.yamlapi/db/services/compilation_template_service.pyapi/db/services/dialog_service.py
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | ||
| - 4. Examples or implications where the source provides them. | ||
| - 5. ## See also section at the end with artifactlinks to highly related pages(less than 12).\n | ||
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Stray literal \n in instruction text.
Line 11 ends with a literal \n inside a YAML block scalar (|), so it won't render as a newline — it will appear verbatim as \n in the prompt text shown to the model.
✏️ Suggested fix
- - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n
+ - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | |
| - 4. Examples or implications where the source provides them. | |
| - 5. ## See also section at the end with artifactlinks to highly related pages(less than 12).\n | |
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n | |
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | |
| - 4. Examples or implications where the source provides them. | |
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12). |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@api/db/init_data/compilation_templates/wiki.yaml` around lines 9 - 11, The
wiki template text includes a stray literal "\n" at the end of the “See also”
instruction, which will be rendered verbatim in the prompt. Remove the escaped
newline from the YAML block scalar content in wiki.yaml so the instruction text
ends cleanly; check the affected bullet in the template string and keep the
formatting consistent with the surrounding entries.
| ## Open questions | ||
| [x] E.g. is this part of the free plan? |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Malformed GFM task-list syntax.
[x] E.g. ... is missing the leading - required for GitHub-Flavored-Markdown task lists, so it won't render as a checkbox.
Proposed fix
## Open questions
- [x] E.g. is this part of the free plan?
+ - [x] E.g. is this part of the free plan?📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Open questions | |
| [x] E.g. is this part of the free plan? | |
| ## Open questions | |
| - [x] E.g. is this part of the free plan? |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@api/db/init_data/compilation_templates/wiki/engineering.yaml` around lines 39
- 40, The task list item in the wiki template is malformed because the checkbox
syntax is missing the required list marker, so it will not render correctly in
GitHub-Flavored Markdown. Update the Open questions entry in the engineering
template so the checked item uses proper task-list formatting, keeping the
existing text but adding the correct list prefix around the [x] item.
| instruction: | | ||
| - Each page must be a proper encyclopedic article, NOT a flat bullet list: | ||
| - 1. Opening paragraph (2-4 sentences defining what this is). No heading. | ||
| - 2. Sections with H2 headings, each starting with prose before sub-bullets. | ||
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | ||
| - 4. Examples or implications where the source provides them. | ||
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Stray literal \n in YAML block literal.
Inside a YAML | block scalar, \n is not interpreted as a newline — it becomes a literal backslash+n in the parsed instruction string, which will be surfaced verbatim wherever this instruction text is rendered.
Proposed fix
- - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n
+ - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| instruction: | | |
| - Each page must be a proper encyclopedic article, NOT a flat bullet list: | |
| - 1. Opening paragraph (2-4 sentences defining what this is). No heading. | |
| - 2. Sections with H2 headings, each starting with prose before sub-bullets. | |
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | |
| - 4. Examples or implications where the source provides them. | |
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12).\n | |
| instruction: | | |
| - Each page must be a proper encyclopedic article, NOT a flat bullet list: | |
| - 1. Opening paragraph (2-4 sentences defining what this is). No heading. | |
| - 2. Sections with H2 headings, each starting with prose before sub-bullets. | |
| - 3. Bold key terms on first use; link them with [[ ]] wikilinks. | |
| - 4. Examples or implications where the source provides them. | |
| - 5. ## See also section at the end with wikilinks to highly related pages(less than 12). |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@api/db/init_data/compilation_templates/wiki/general.yaml` around lines 2 - 8,
The instruction text in the YAML block scalar contains a stray literal
backslash-n sequence, so the parsed content will include “\n” verbatim instead
of a real line break. Update the general.yaml instruction block to remove the
escaped newline from the See also bullet in the instruction string, keeping the
content as plain multiline prose under the instruction key. Refer to the
instruction field in the YAML block literal and ensure the final rendered text
does not contain any literal escape sequences.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16617 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
### Summary Add a few of wiki templates.
### Summary Add a few of wiki templates.
Summary
Add a few of wiki templates.