feat(council): role registry + member store (#1818 slice S1)#1833
Conversation
Docs-Reviewed: council role registry + member store slice per taos-council.md
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
|
||
| from tinyagentos.council.role_registry import RoleRegistry | ||
| from tinyagentos.council.member_store import MemberStore | ||
| council_role_registry = RoleRegistry(data_dir / "council.db") |
There was a problem hiding this comment.
WARNING: Two stores open the same council.db file with separate connections
Both council_role_registry and council_member_store point at data_dir / "council.db" as independent BaseStore instances, so two separate aiosqlite connections are opened against one file. This is inconsistent with the rest of the codebase (every other store gets its own .db), and under any concurrent read/write from the two connections SQLite can raise "database is locked". Consider giving each store its own file (e.g. council_roles.db / council_members.db) or merging them into a single store.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
|
||
| async def list_members(self) -> list[dict]: | ||
| async with self._db.execute( | ||
| "SELECT id, canonical_id, model_id, provider, roles, autonomy, status, added_at FROM council_members ORDER BY added_at" |
There was a problem hiding this comment.
SUGGESTION: list_members orders only by added_at, which uses second-granularity timestamps
added_at is formatted as %Y-%m-%dT%H:%M:%SZ (no sub-second precision) and it is the sole ORDER BY key. Members inserted within the same second have undefined order, which will make any future count/order assertion on list_members flaky. Add a deterministic secondary sort key, e.g. ORDER BY added_at, id (or canonical_id).
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| slug TEXT PRIMARY KEY, | ||
| display_name TEXT NOT NULL, | ||
| description TEXT NOT NULL DEFAULT '', | ||
| gauge_status TEXT NOT NULL, |
There was a problem hiding this comment.
SUGGESTION: gauge_status (and the seed's "designed" value) is unconstrained
gauge_status TEXT NOT NULL has no CHECK constraint or validation, so arbitrary strings are accepted. The seed also introduces a "designed" status that the route tests never assert on (only "proven"/"provisional" are exercised) — if that isn't a defined gauge status it will be persisted silently. Add a CHECK constraint (e.g. gauge_status IN ('proven','designed','provisional',...)) and validate inputs.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| router = APIRouter() | ||
|
|
||
|
|
||
| @router.get("/api/council/roles") |
There was a problem hiding this comment.
SUGGESTION: Read endpoints expose the internal council roster without any auth/authorization
GET /api/council/roles and GET /api/council/members return the seeded role taxonomy and any registered agent members with no authentication dependency. Since members carry provider/model_id/identity-style data, confirm these are intended to be publicly readable, or attach the app's existing auth dependency.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| ) -> dict: | ||
| member_id = uuid.uuid4().hex | ||
| now = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()) | ||
| await self._db.execute( |
There was a problem hiding this comment.
SUGGESTION: Duplicate canonical_id surfaces a raw sqlite3.IntegrityError
add_member performs the INSERT without handling the UNIQUE violation on canonical_id, so callers receive a low-level sqlite3.IntegrityError (the test only asserts Exception). Consider catching it and raising a domain-specific error, and explicitly rollback() so a failed transaction doesn't leak into subsequent statements on the shared connection.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (9 files)
Fix these issues in Kilo Cloud Reviewed by hy3:free · Input: 98.9K · Output: 23.5K · Cached: 667.5K |
Implements Slice S1 of the taOS Council feature (#1818).
Changes:
tinyagentos/council/role_registry.py: seeded taxonomy of 10 roles (Coder, Reviewer, Writer, Editor, Summarizer, Translator, Researcher, Planner, Critic, Data-analyst) with gauge status and descriptionstinyagentos/council/member_store.py: members with role assignments, autonomy dials, and trust statetinyagentos/routes/council.py: read-only GET /api/council/roles and GET /api/council/memberstinyagentos/app.pyand router intotinyagentos/routes/__init__.pytests/test_council_stores.pyandtests/test_council_routes.pyNo writes beyond seeding; no identity interaction yet.