feat(todo): add agent tools for todo lists, remove notes_set_done - #2035
feat(todo): add agent tools for todo lists, remove notes_set_done#2035hognek wants to merge 12 commits into
Conversation
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: 47 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 (1)
📝 WalkthroughWalkthroughTodo list and item tools now resolve ownership, validate access and resources, and support listing, adding, and completion updates. These tools are registered as built-in skills and documented. The notes completion handler and its tests are removed, and a GitHub secret mock is made key-aware. ChangesTodo skill migration
GitHub test fixture
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Agent
participant SkillExecution
participant TodoTools
participant TodoStore
participant TodoNotifications
Agent->>SkillExecution: invoke todo skill
SkillExecution->>TodoTools: delegate operation
TodoTools->>TodoStore: list, add, or patch todo data
TodoTools->>TodoNotifications: trigger add-item notifications
TodoNotifications-->>TodoTools: complete as a no-op
TodoTools-->>Agent: return structured result or error
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
|
||
| try: | ||
| store = request.app.state.todo_store | ||
| lists = await store.list_lists(owner_user_id) |
There was a problem hiding this comment.
WARNING: agent_name is never used to authorize the list read — any agent can enumerate another user's todo lists by supplying an arbitrary owner_user_id.
Unlike execute_notes_list_shared_docs (which filters via docs_for_agent(agent_name)), this returns list_lists(owner_user_id) for whatever id the caller passes. There is no check that the calling agent is associated with that owner, so any agent that guesses/learns another user's user_id can read their private lists. This is the same gap flagged across the todo tools (see below). If this is intentional for the "owner-based, no membership yet" phase, please document the trust boundary explicitly and tighten it once C1 collaboration lands.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| return {"error": "list not found"} | ||
| if doc.get("archived_at") is not None: | ||
| return {"error": "list is archived"} | ||
| if doc.get("owner_user_id") != owner_user_id: |
There was a problem hiding this comment.
WARNING: Access gate is doc.get("owner_user_id") != owner_user_id only — the supplied owner_user_id is trusted verbatim, with no binding to agent_name.
Any agent that knows a victim's user_id can add items to that user's list. There is no membership/permission check analogous to notes_tools (agent_members + permission level). The agent_name parameter is validated as a string but otherwise unused for authorization here. Consider binding the agent to a verified owner/tenant context rather than accepting the owner id from the agent payload.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| return {"error": "list not found"} | ||
| if doc.get("archived_at") is not None: | ||
| return {"error": "list is archived"} | ||
| if doc.get("owner_user_id") != owner_user_id: |
There was a problem hiding this comment.
WARNING: Same owner-id-only authorization gap as execute_todo_add_item (line 64). The owner_user_id is caller-supplied and never tied to agent_name, so any agent knowing a user id can toggle completion on that user's items.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| try: | ||
| store = request.app.state.todo_store | ||
| lists = await store.list_lists(owner_user_id) | ||
| return {"lists": lists} |
There was a problem hiding this comment.
SUGGESTION: execute_todo_list_lists returns the full list rows, leaking internal fields (owner_user_id, archived_at, created_at) to the agent. The skill schema description advertises only id, title, updated_at. The notes equivalent (notes_list_shared_docs) explicitly strips owner_user_id (see tests/notes/test_notes_tools.py which asserts owner_user_id not in keys). Consider projecting a safe subset here too.
| return {"lists": lists} | |
| lists = await store.list_lists(owner_user_id) | |
| return {"lists": [{k: l[k] for k in ("id", "title", "updated_at") if k in l} for l in lists]} |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (9 files)
Previous Review Summary (commit 93205fe)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 93205fe)Status: No Issues Found | Recommendation: Merge Files Reviewed (11 files)
Reviewed by step-3.7-flash · Input: 154.2K · Output: 40K · Cached: 2M |
0c01276 to
535b9f0
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/todo/test_todo_tools.py (1)
42-52: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd an explicit assertion that internal fields are stripped.
This test verifies the allowlisted list response but never asserts that internal fields (
owner_user_id,archived_at,created_at) are absent — the exact contract previously flagged as leaking. The notes-tools equivalent explicitly assertsowner_user_id not in keys; mirroring that here would guard against regression if the allowlist inexecute_todo_list_listsis ever loosened.assert "lists" in res assert any(d["id"] == doc["id"] for d in res["lists"]) assert len(res["lists"]) == 1 + for d in res["lists"]: + assert "owner_user_id" not in d + assert "archived_at" not in d + assert "created_at" not in d🤖 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 `@tests/todo/test_todo_tools.py` around lines 42 - 52, Extend test_list_returns_owned_lists to explicitly verify that each returned list omits the internal fields owner_user_id, archived_at, and created_at, while preserving the existing ownership, inclusion, and count assertions.
🤖 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 `@tinyagentos/tools/todo_tools.py`:
- Around line 71-80: In both execute_todo_add_item and execute_todo_set_done,
perform the owner_user_id authorization check immediately after confirming the
list exists, before evaluating archived_at. Return the existing generic
access-denied error for non-owners, while preserving the archived-list response
for authorized owners.
- Around line 17-41: Bind todo-tool authorization to the calling agent rather
than trusting the LLM-supplied owner_user_id. Update execute_todo_list_lists and
the corresponding add-item and mark-done functions to derive or validate
ownership through the authenticated agent identity and reject mismatches before
accessing TodoStore; preserve owner_user_id only as a validated target when it
matches that identity or an established membership relationship.
---
Nitpick comments:
In `@tests/todo/test_todo_tools.py`:
- Around line 42-52: Extend test_list_returns_owned_lists to explicitly verify
that each returned list omits the internal fields owner_user_id, archived_at,
and created_at, while preserving the existing ownership, inclusion, and count
assertions.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a0bc0ef9-4eca-4e38-b2f7-ba1480e298c5
📒 Files selected for processing (8)
tests/notes/test_notes_tools.pytests/test_routes_github.pytests/todo/test_todo_tools.pytinyagentos/routes/skill_exec.pytinyagentos/skills.pytinyagentos/todo/notify.pytinyagentos/tools/notes_tools.pytinyagentos/tools/todo_tools.py
💤 Files with no reviewable changes (2)
- tinyagentos/tools/notes_tools.py
- tests/notes/test_notes_tools.py
Resolve owner_user_id from the agent registry (get_by_handle) instead of trusting the caller-supplied value, closing the authorization gap where any agent knowing a user_id could enumerate, write to, or toggle another user's todo lists. - Add _resolve_owner_user_id() helper: looks up agent_name in agent_registry, returns the verified user_id when registry is available (production), falls back to args-supplied owner_user_id when absent (test compat). - execute_todo_list_lists: requires agent_name, derives owner from registry. - execute_todo_add_item: derives owner from registry instead of trusting args. - execute_todo_set_done: requires agent_name, derives owner from registry. - New tests: registry enforcement (AsyncMock), unregistered agent rejection, fallback without registry. All 21 todo + 11 notes tests pass. Fixes Kilo WARNINGs on PR jaylfc#2035 (agent auth bypass).
43696ce to
4c89156
Compare
|
Deep review done against HEAD, not against the bot comments. Worth stating up front: all four kilo warnings were filed on 2026-07-19 against this branch's FIRST commit and were fixed by three later commits on the same branch ( BLOCKING: the registry binding that fixed the auth findings makes all three tools dead for ordinary deployed agents.
Run against a real So merging removes Smallest fix: in Why 17 green tests missed it. No skip guards, all imports resolve, 32 passed when I ran them, so the tests are real. The gap is coverage: 13 of 17 pass Other pre-merge asks:
Checks that came back clean: the branch is 62 commits behind dev but dev's only change to |
When agent_registry.get_by_handle misses (deployed agents are never in the registry), fall back to find_agent(config, agent_name) and use request.state.user_id (set by local-token auth for the primary user). Also: revert github_app_private_key mock regression (tests/test_routes_github.py), drop owner_user_id from todo input_schemas (skills.py), replace notes_set_done with todo tools in docs, flag notify.py no-op, add internal-field strip assertions and deployed-agent fallback tests. jaylfc review fixes for jaylfc#2035.
|
All five points addressed in 93205fe:
Tests: 34/34 pass (todo_tools + notes_tools), 19/19 pass (routes_github). New tests: deployed-agent fallback (agent in config → uses state.user_id), deployed agent without user_id → error, agent in neither registry nor config → error. Added internal-field strip assertions on list response. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
tinyagentos/routes/skill_exec.py (1)
431-436: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAvoid blanket exception handling in the skill wrappers.
The Todo implementations already convert expected failures into
{"error": ...}results. These additionalexcept Exceptionblocks can swallow unexpected import or programming errors and preventexecute_skillfrom applying its centralized failure handling. Remove the wrapper-level catches or restrict them to documented exceptions while re-raising unexpected failures.Also applies to: 441-446, 451-456
🤖 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 `@tinyagentos/routes/skill_exec.py` around lines 431 - 436, Remove the broad except Exception wrappers around the Todo, and the corresponding skill wrapper calls at the referenced locations, so unexpected import or programming errors propagate to execute_skill’s centralized failure handling. Preserve the direct await-and-return behavior and retain only explicitly documented exception handling if required by the underlying implementations.Source: Linters/SAST tools
tests/todo/test_todo_tools.py (2)
56-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDrop the review-tool reference from the assertion comment.
The assertions are self-explanatory; referencing a bot nitpick/issue number ages poorly in the test suite.
🤖 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 `@tests/todo/test_todo_tools.py` around lines 56 - 60, Remove the “CodeRabbit nitpick, `#2035`” reference from the comment above the assertions in the res["lists"] loop, leaving a concise comment or no comment while preserving all assertions unchanged.
361-394: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDeployed-agent fallback is only covered for
todo_list_lists.
execute_todo_add_item/execute_todo_set_doneroute through the same resolver but have no config-fallback test, so a regression in their ownership path (e.g. resolver call moved after the store read) would go unnoticed. Consider parametrizing the fallback tests across all three tools.🤖 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 `@tests/todo/test_todo_tools.py` around lines 361 - 394, Extend the deployed-agent fallback coverage from execute_todo_list_lists to execute_todo_add_item and execute_todo_set_done, preferably by parametrizing the existing fallback tests across all three tool functions. Verify each tool uses request.state.user_id when registry lookup fails but the agent is present in config, and add corresponding no-user_id rejection coverage if the shared behavior requires it.tinyagentos/tools/todo_tools.py (1)
83-84: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winBlind
except Exceptionreturns rawstr(exc)to the agent.Flagged by Ruff (BLE001). Beyond the lint, propagating internal exception text (DB paths, driver messages) into the tool response is unnecessary detail for the model. Prefer logging the exception and returning a generic message.
♻️ Proposed pattern (apply to all three handlers)
- except Exception as exc: - return {"error": str(exc)} + except Exception: # noqa: BLE001 + logger.exception("todo_list_lists failed") + return {"error": "todo_list_lists failed"}Also applies to: 139-140, 191-192
🤖 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 `@tinyagentos/tools/todo_tools.py` around lines 83 - 84, Update all three tool handlers’ broad exception handlers to log the caught exception with the module’s existing logger, then return a generic user-facing error message instead of raw str(exc). Address the handlers at the cited locations consistently and preserve their existing response structure.Source: Linters/SAST tools
🤖 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 `@tinyagentos/tools/todo_tools.py`:
- Around line 70-71: Update the None-handling error responses in the
deployed-agent paths of _resolve_owner_user_id callers to distinguish an unset
request.state.user_id from an agent missing in the registry. Use a message that
accurately describes the missing owner/user identity, and apply the same
correction to the corresponding responses at the other referenced locations.
---
Nitpick comments:
In `@tests/todo/test_todo_tools.py`:
- Around line 56-60: Remove the “CodeRabbit nitpick, `#2035`” reference from the
comment above the assertions in the res["lists"] loop, leaving a concise comment
or no comment while preserving all assertions unchanged.
- Around line 361-394: Extend the deployed-agent fallback coverage from
execute_todo_list_lists to execute_todo_add_item and execute_todo_set_done,
preferably by parametrizing the existing fallback tests across all three tool
functions. Verify each tool uses request.state.user_id when registry lookup
fails but the agent is present in config, and add corresponding no-user_id
rejection coverage if the shared behavior requires it.
In `@tinyagentos/routes/skill_exec.py`:
- Around line 431-436: Remove the broad except Exception wrappers around the
Todo, and the corresponding skill wrapper calls at the referenced locations, so
unexpected import or programming errors propagate to execute_skill’s centralized
failure handling. Preserve the direct await-and-return behavior and retain only
explicitly documented exception handling if required by the underlying
implementations.
In `@tinyagentos/tools/todo_tools.py`:
- Around line 83-84: Update all three tool handlers’ broad exception handlers to
log the caught exception with the module’s existing logger, then return a
generic user-facing error message instead of raw str(exc). Address the handlers
at the cited locations consistently and preserve their existing response
structure.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f297ae7a-8cce-4dfe-b5c8-12f6bd3ca511
📒 Files selected for processing (10)
docs/agent-manual/09-os-control.mddocs/taos-agent-manual.mdtests/notes/test_notes_tools.pytests/test_routes_github.pytests/todo/test_todo_tools.pytinyagentos/routes/skill_exec.pytinyagentos/skills.pytinyagentos/todo/notify.pytinyagentos/tools/notes_tools.pytinyagentos/tools/todo_tools.py
💤 Files with no reviewable changes (2)
- tests/notes/test_notes_tools.py
- tinyagentos/tools/notes_tools.py
🚧 Files skipped from review as they are similar to previous changes (3)
- tinyagentos/todo/notify.py
- tinyagentos/skills.py
- tests/test_routes_github.py
|
Fast turnaround, thank you, and your The red is NOT your logic, and it is partly my fault for not flagging the constraint when I asked for the doc update. The agent manual has a hard SIZE BUDGET of 16000 chars because the compiled output is injected into small context windows. I asked you to document the three new todo tools and drop the stale Three ways out, in the order I would try them:
Please do not resolve it by dropping the doc update. Shipping three skills the manual does not describe, while it still advertises one that returns 501, is the state I asked you to fix. Everything else from my earlier review still stands: the registry-miss test with a real |
Create todo_tools.py with execute_todo_list_lists, execute_todo_add_item, and execute_todo_set_done. Register in skill_exec.py SKILL_IMPLEMENTATIONS and skills.py seed data. Remove deprecated execute_notes_set_done from notes_tools.py (set_done now lives on TodoStore). Add tests/todo/test_todo_tools.py (17 tests) covering list/add/set_done with owner-based access control. Remove notes_set_done tests from tests/notes/test_notes_tools.py (11 remaining tests pass). Task: 1923 C3 — Notes/Todo split agent tool surface.
… model Address Kilo bot findings: - Filter owner_user_id/archived_at/created_at from list_lists response - Add docstring notes explaining owner-based authorization model and the planned agent_name-to-owner binding for when TodoStore gains membership No CRITICAL findings. 17/17 todo tools, 11/11 notes tools, 18/18 todo routes pass.
Match the skill schema description which advertises only id, title, updated_at. Using a whitelist (not blacklist) is the safer pattern — new fields added to the store row won't leak through by default.
…ument auth boundary Remove agent_name validation from execute_todo_list_lists and execute_todo_set_done — the parameter was accepted but never used. It was injected by skill_exec.py but served no purpose, creating a false expectation that agent_name participates in authorization. For execute_todo_add_item, agent_name is still required (used for attribution and notification skip-guard). Add explicit SECURITY comments at each owner_user_id check documenting that agent-to-owner binding awaits agent membership on TodoStore (jaylfc#1923 follow-up). The internal field leak in list_lists was already fixed (allowlist projection at line 39).
…eturn private key for github-app-private-key lookups The test helper _build_app_with_app_config(token=None) set mock_secrets.get to return None for ALL keys, causing _get_app_installation_token to fail when looking up the GitHub App private key. Now it returns the key for github-app-private-key lookups while keeping PAT behavior unchanged. Fixes CI failure: test_repo_endpoint_still_uses_app_token (401 vs 200). All 4 tests using _build_app_with_app_config now pass.
Resolve owner_user_id from the agent registry (get_by_handle) instead of trusting the caller-supplied value, closing the authorization gap where any agent knowing a user_id could enumerate, write to, or toggle another user's todo lists. - Add _resolve_owner_user_id() helper: looks up agent_name in agent_registry, returns the verified user_id when registry is available (production), falls back to args-supplied owner_user_id when absent (test compat). - execute_todo_list_lists: requires agent_name, derives owner from registry. - execute_todo_add_item: derives owner from registry instead of trusting args. - execute_todo_set_done: requires agent_name, derives owner from registry. - New tests: registry enforcement (AsyncMock), unregistered agent rejection, fallback without registry. All 21 todo + 11 notes tests pass. Fixes Kilo WARNINGs on PR jaylfc#2035 (agent auth bypass).
… leak Move the owner_user_id gate before the archived_at gate in both execute_todo_add_item and execute_todo_set_done. Previously a non-owner caller who guessed a valid list_id could learn whether the list was archived. Now the owner check runs first, returning a uniform 'access denied' error for non-owners regardless of archived state.
When agent_registry.get_by_handle misses (deployed agents are never in the registry), fall back to find_agent(config, agent_name) and use request.state.user_id (set by local-token auth for the primary user). Also: revert github_app_private_key mock regression (tests/test_routes_github.py), drop owner_user_id from todo input_schemas (skills.py), replace notes_set_done with todo tools in docs, flag notify.py no-op, add internal-field strip assertions and deployed-agent fallback tests. jaylfc review fixes for jaylfc#2035.
93205fe to
471c98b
Compare
… blanket excepts - todo_tools.py: Change 'agent not found in registry' to precise message covering both missing-agent and missing-user_id cases (CR inline jaylfc#2035). - todo_tools.py: Replace raw str(exc) blanket excepts with logged generic messages (CR nitpick, BLE001). - skill_exec.py: Remove try/except wrappers on 3 _skill_todo_* functions so unexpected errors propagate to centralized handler (CR nitpick). - test_todo_tools.py: Remove CodeRabbit nitpick reference from comment. - test_todo_tools.py: Extend deployed-agent fallback coverage to execute_todo_add_item and execute_todo_set_done (4 new tests). Tests: 27/27 todo tools pass (includes 4 new), 11/11 notes tools pass.
471c98b to
1dc3b7f
Compare
|
Re-reviewed at head
On F1, the chain I verified: Before merge I want three things, none large: 1. The head commit has had zero automated review. 2. F2 is still not what I asked for, and it is cheap. The registry-miss path now has six tests ( 3. The existing-install orphan, which is the real remaining defect and nobody has caught it. Nothing removes the seeded Three smaller things, not blockers, worth a look:
One note on how F7 was fixed: the manual is now 15965 chars against the 16000 budget, so 35 chars of headroom, and some of that was bought by trimming unrelated prose ( |
- author=agent_name -> owner_user_id in todo_tools.py:138 (id space mismatch) - real AgentRegistryStore tests (not MagicMock) for registry-miss path - notes_set_done orphan cleanup in SkillStore._post_init - list_tools filters against SKILL_IMPLEMENTATIONS
|
F2 fix (3a76215): Added field-whitelist assertions to The real
Together with the existing 30/30 tests pass: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tinyagentos/skills.py`:
- Around line 42-44: Update _remove_orphan_skills to migrate each existing
notes_set_done assignment to todo_set_done before deleting the legacy
assignment. Preserve the assigned agents’ completion access, and reset or clear
any legacy configuration that is specific to Notes before removing the old rows.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 33a81320-c280-4f93-8646-07e2b78ad798
📒 Files selected for processing (11)
docs/agent-manual/04-apps.mddocs/agent-manual/09-os-control.mddocs/taos-agent-manual.mdtests/notes/test_notes_tools.pytests/test_routes_github.pytests/todo/test_todo_tools.pytinyagentos/routes/skill_exec.pytinyagentos/skills.pytinyagentos/todo/notify.pytinyagentos/tools/notes_tools.pytinyagentos/tools/todo_tools.py
💤 Files with no reviewable changes (2)
- tests/notes/test_notes_tools.py
- tinyagentos/tools/notes_tools.py
🚧 Files skipped from review as they are similar to previous changes (6)
- docs/agent-manual/09-os-control.md
- tinyagentos/todo/notify.py
- tests/todo/test_todo_tools.py
- docs/taos-agent-manual.md
- tests/test_routes_github.py
- tinyagentos/tools/todo_tools.py
_remove_orphan_skills previously deleted agent_skills rows for notes_set_done without migrating them to todo_set_done. Agents that had completion access via notes_set_done silently lost it after startup. Now the method uses an _ORPHAN_REPLACEMENTS dict that maps each orphaned skill id to its replacement. Before deleting, it copies agent assignments to the replacement via INSERT OR IGNORE — if the agent already has the replacement, the existing newer assignment is preserved; otherwise the legacy assignment is migrated so access is not lost.
|
Fix pushed for the CodeRabbit finding re: What changed: The method now maintains an INSERT OR IGNORE INTO agent_skills (agent_id, skill_id, enabled, config)
SELECT agent_id, ?, enabled, config FROM agent_skills WHERE skill_id = ?If the agent already has Tests: |
Task: #1923 C3 \u2014 Agent tools for Notes/Todo split.
Changes
tinyagentos/tools/todo_tools.pywithexecute_todo_list_lists,execute_todo_add_item,execute_todo_set_donetinyagentos/todo/notify.py\u2014 notification placeholder for when collaboration lands on TodoStoretests/todo/test_todo_tools.py\u2014 17 tests covering list/add/set_done with owner-based access controlexecute_notes_set_donefromnotes_tools.py(set_done now lives on TodoStore)notes_set_donetests fromtests/notes/test_notes_tools.py(11 remaining tests pass)skill_exec.py\u2014 replaced_skill_notes_set_donewith_skill_todo_list_lists/_skill_todo_add_item/_skill_todo_set_doneskills.py\u2014 replacednotes_set_doneskill seed with 3 todo skillsTests
pytest tests/todo/test_todo_tools.py -v --timeout=120\u2014 17/17 passpytest tests/notes/test_notes_tools.py -v --timeout=120\u2014 11/11 passpytest tests/todo/test_todo_routes.py -v --timeout=120\u2014 36/36 pass (no regressions)Design note
TodoStore uses owner-based access control (no agent membership yet). The
owner_user_idarg gates access \u2014 agents must present a matching owner to list/add/set-done. When collaboration lands on TodoStore (C1 follow-up), this will shift to member-based permission checks. The notification path (todo/notify.py) is a no-op placeholder ready for that upgrade.Summary by CodeRabbit
New Features
Changes
Documentation
Tests