Phase 8f-3 + 8f-4: Param alignment audit + QA nits cleanup #24
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-mcp#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-2026-02-26-tf-modularize-postgres→ Phase 8 (SDK + MCP Rewrite) → Phase 8f (MCP Rewrite) → Phase 8f-3 (Param Alignment Audit)Repo
forgejo_admin/pal-e-docs-mcpUser Story
As an AI agent using pal-e-docs MCP tools
I want param translations between MCP and SDK to be correct and edge-case-safe
So that tool invocations never silently produce wrong results
Context
Phase 8f-2 (PR #23) rewrote all 26 MCP tools to wrap the pal-e-docs SDK instead of raw httpx, and added 7 new tools. The rewrite introduced translation layers where MCP tool params differ from SDK method params (CSV strings → lists, field renames, sentinel handling, default values).
Betty Sue audited every MCP tool on
origin/main(commit2c41b7a) against every SDK method signature. The 8 originally-documented mismatches are all correctly implemented. However, the audit found 5 additional items — 1 at MEDIUM risk that may need a code fix.Full audit details:
phase-postgres-8f3-param-alignmentin pal-e-docs.File Targets
Files the agent should modify:
src/pal_e_docs_mcp/tools/notes.py— fixcreate_notetags edge case if regression confirmedsrc/pal_e_docs_mcp/tools/sprints.py— add code comment documentingmove_sprint_item→update_sprint_itemname mappingFiles the agent should NOT touch:
src/pal_e_docs_mcp/server.py— no changes neededsrc/pal_e_docs_mcp/tools/blocks.py— no param translations, all pass-throughAcceptance Criteria
Live verification (all 8 documented translations):
search_notes(query=...)correctly passes to SDKsearch_notes(q=...)create_note(content=..., project=..., tags="a,b")correctly maps to SDKhtml_content,project_slug,tags=["a","b"]update_note(content=..., project=..., tags="a,b")same mappings as createupdate_note_links(target_slugs="slug-a, slug-b")splits to["slug-a","slug-b"]create_sprint()without status defaults to"planning"add_sprint_item()usesposition=0default;labels="a,b"splits correctlybulk_move_items(items='[{"id":1,"column":"done"}]')parses JSON correctlyupdate_sprint()sentinel handling: omitted fields are NOT sent as null to APIEdge case #12 — tags=None vs tags=[] (MEDIUM risk):
create_notewithout tags param → verify note is created with no tags (not inherited/default tags)"tags": []explicitly)create_noteto passtags=[]when tags param is None (matching old behavior)Edge case #13 — labels falsy check:
add_sprint_item(labels="")is treated as "no labels" (current behavior, should be correct)CSV edge cases:
tags="sop,active,"— should not produce empty string elementtags=" sop , active "— should strip to["sop","active"]tags="sop"— should produce["sop"]Documentation:
move_sprint_itemexplaining it maps to SDKupdate_sprint_itemTest Expectations
create_notewithtags=Nonepytest tests/ -vConstraints
tools/notes.pyandtools/sprints.pyruff format --checkbefore pushing — CI will catch it otherwiseChecklist
Related
phase-postgres-8f3-param-alignment— full audit results in pal-e-docsphase-postgres-8f-mcp-rewrite— parent phasePhase 8f-3: Param alignment audit + edge case fixesto Phase 8f-3 + 8f-4: Param alignment audit + QA nits cleanup8f-4 Scope (batched into this issue)
Lineage:
plan-2026-02-26-tf-modularize-postgres→ Phase 8 → Phase 8f → Phase 8f-4 (QA Nits Cleanup)Two non-blocking nits from PR #23 QA review:
Fix 1: Add
.claude/to .gitignoreSafety measure to prevent worktree artifacts from being staged.
File:
.gitignoreFix 2: Rename
l→lblin sprints.pyLines 162 and 199 use
las loop variable in CSV split comprehensions, triggering E741 ambiguous variable name lint. Rename tolbland removenoqa: E741comments.File:
src/pal_e_docs_mcp/tools/sprints.pyAdditional acceptance criteria
.claude/added to.gitignorelrenamed tolblin sprints.py CSV split comprehensions (2 occurrences)# noqa: E741comments removed from those linesruff checkpasses without E741 warningsThis closes out Phase 8f entirely when merged.