Add generic RPG runtime harness#2530
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR updates Docker build and startup behavior for single-user and multi-user container setups, adjusts GitHub Actions setup and workflow gates across CI and publishing, and adds or rewrites repository docs, ignore rules, and design assets. ChangesContainer build and startup
GitHub Actions and release workflows
Repository docs and guardrails
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request implements RPG rules-pack attachment and retrieval-backed lookup, allowing campaigns and sessions to link user-owned media items or collections as rules references. It introduces reference normalization, scoped retrieval, grounded answer generation, and parallel REST and MCP interfaces. The review feedback highlights three key areas for improvement: concurrently executing reference validations using asyncio.gather to reduce I/O latency, converting the _rules_service dependency into a yield-dependency to prevent resource leaks from unclosed retrievers, and defensively handling potential ValueError exceptions in rules_pack_ref_from_dict to avoid raw 500 errors on malformed reference IDs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
PR Summary by QodoAdd event-sourced RPG runtime harness with rules-pack retrieval + optional MCP tools Description
Diagram
High-Level Assessment
Files changed (53)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
74 rules 1.
|
0f0137d to
afb2c9e
Compare
|
Rebased this PR onto latest Review fixes included in afb2c9e:
Verification:
|
afb2c9e to
49ab15f
Compare
|
Updated PR #2530 after rebasing onto latest dev. Commit: 49ab15f Review follow-up fixes:
Fresh verification on the rebased branch:
|
49ab15f to
cce4045
Compare
Summary
Verification
python -m pytest tldw_Server_API/tests/RPG tldw_Server_API/tests/Privileges/test_privilege_introspection.py::test_privilege_registry_snapshot_matches_live_app tldw_Server_API/tests/PrivilegeCatalog/test_endpoint_scope_catalog_sync.py -q-> 176 passed, 425 warnings.python -m ruff checkon the new RPG code/test scope -> All checks passed.python -m bandit -r <touched app scope> -f json -o /tmp/bandit_task12030_focused.json-> 0 findings, 0 errors.git diff --check-> clean.Notes
origin/main.Summary by cubic
Adds a generic RPG runtime with event-sourced campaigns/sessions, deterministic snapshots, rules adapters, and retrieval-backed rules lookup using user-owned media. Exposes REST
rpgendpoints and an optional MCPrpgmodule; answer generation over MCP remains disabled pending TASK-12031.New Features
rpgendpoints with RBAC, token-scope guards, and rate limits; JSON schemas for create/read/lookup/context.rpgmodule (MCP_ENABLE_RPG_MODULE); answer mode fail-closed until TASK-12031.media.readandrpgscopes to the privilege catalog.Migration
rpg.*andmedia.read.MCP_ENABLE_RPG_MODULE=trueto load MCP tools.Written for commit cce4045. Summary will update on new commits.