docs: add contributing guide and clean up docs#40
Conversation
📝 WalkthroughWalkthroughConsolidated and reformatted documentation across multiple guides, added a new CONTRIBUTING.md with development and contribution workflows, standardized terminology (e.g., "backend" → "executor", "Affinetes" capitalization), and applied minor doc updates in code comments and a miner Dockerfile; no functional code changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kinitro/miner/template/Dockerfile (1)
5-7:⚠️ Potential issue | 🟡 MinorUpdate Docker image name for consistency.
Lines 5-7 reference
robo-policy, which conflicts with the "Kinitro Miner Policy Server" header (line 1) and thekinitro miner pushcommand (line 9). Update these examples to usekinitro-policyfor naming consistency across the Dockerfile.Suggested fix
-# Build: docker build -t your-username/robo-policy:v1 . -# Test: docker run -p 8000:8000 your-username/robo-policy:v1 -# Push: docker push your-username/robo-policy:v1 +# Build: docker build -t your-username/kinitro-policy:v1 . +# Test: docker run -p 8000:8000 your-username/kinitro-policy:v1 +# Push: docker push your-username/kinitro-policy:v1
🤖 Fix all issues with AI agents
In `@docs/backend-guide.md`:
- Around line 326-334: The heading "#### `GET /v1/weights/latest`" skips a level
under the existing "## API Reference"; change it to a level-3 heading ("### `GET
/v1/weights/latest`") so the hierarchy increments by one level, and ensure any
sibling API endpoint headings follow the same h3 pattern to satisfy MD001;
update the heading text only (leave the JSON example unchanged).
In `@kinitro/environments/registry.py`:
- Around line 19-20: The inline comment above _ENVIRONMENTS_DIR is inaccurate:
Path(__file__).parent.parent.parent / "environments" resolves to the repo-root
environments directory (three levels up), not kinitro/environments/; update the
comment to state that this constant points to the repository-root
"environments/" directory (or alternatively change the Path expression to
parent.parent / "environments" if you intended kinitro/environments) and ensure
the comment and the Path(...) usage for _ENVIRONMENTS_DIR are consistent.
🧹 Nitpick comments (2)
kinitro/miner/template/Dockerfile (1)
11-37: Consider adding a non-root user for improved security.The Dockerfile runs the application as root, which is a security risk. As miners will deploy this template, consider adding a non-root user to follow container security best practices.
🛡️ Proposed security improvement
FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ libgl1 \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy policy server code COPY server.py . COPY policy.py . # Copy model weights (uncomment and modify as needed) # COPY model.pt . # COPY models/ ./models/ +# Create non-root user +RUN useradd -m -u 1000 miner && chown -R miner:miner /app +USER miner + # Expose port for FastAPI EXPOSE 8000 # Run the FastAPI server CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]CONTRIBUTING.md (1)
207-210: Add a language identifier to the fenced code block.Static analysis flags this block (MD040). Since this shows a commit message template, you could use
textor leave a brief identifier to satisfy linting.Suggested fix
-``` +```text <type>(<scope>): <description></details> </blockquote></details> </blockquote></details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
629c6e3 to
1a00e24
Compare
Summary by CodeRabbit
Documentation
Chores