Review: sync_board should propagate note title changes to phase board items

review-281-2026-03-28 Doc

review needs-refinement

Verdict: NEEDS_REFINEMENT

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- traced to plan-pal-e-docs, Westside docs sync
  • [x] Repo -- forgejo_admin/pal-e-docs (now pal-e-api)
  • [x] User Story -- clear: agent updating phase notes wants sync_board to propagate title drift
  • [x] Context -- sufficient background including discovery origin and prior review
  • [x] File Targets -- specific file and function identified
  • [x] Acceptance Criteria -- 4 testable conditions
  • [x] Test Expectations -- 3 unit tests with run command
  • [x] Constraints -- pattern to follow, count semantics, non-regression
  • [x] Checklist -- PR, tests, no unrelated changes
  • [x] Related -- project, SOP, phase note, prior review
All required template sections present. Issue was previously reviewed (review-281-2026-03-22, NEEDS_REFINEMENT) and rescoped to sync_board title drift only. The rescoped body is well-structured.

Traceability

  • [ ] story:X label -- MISSING. Board item labels are type:feature,scope:board-api,discovered-scope. The user story describes an agent updating phase notes. Suggest story:superuser-maintain or story:kanban-daily-review.
  • [ ] arch:X label -- MISSING. scope:board-api is present but the convention is arch:board-api. Should be added.
  • [x] Forgejo issue -- https://forgejo.tail5b443a.ts.net/forgejo_admin/pal-e-api/issues/192, open

File Targets

  • [x] src/pal_e_docs/routes/boards.py -- verified exists. sync_board function confirmed. Title drift gap confirmed: lines 362-367 compare column only, no title comparison.
  • [ ] Line numbers stale -- Issue says "sync_board (line 251+)" but function is at line 324. Issue says "sync_issues pattern (lines 394-399)" but the actual drift detection code is at lines 458-462 (394-399 is the docstring). Code has changed since issue was written. Function names are correct so agent can still find the code, but line numbers should be updated for accuracy.
  • [x] sync_issues drift pattern verified at line 461: if existing.title != issue_title. Pattern is clear and directly applicable.
  • [x] BoardItemUpdate.title in schemas.py:294 -- confirmed exists (do-not-touch, correctly identified).

Repo Placement

OK after rescope. Issue filed on forgejo_admin/pal-e-api (formerly pal-e-docs). Fix is entirely within this repo's routes/boards.py. The MCP layer gap was split to a separate issue (board item #282, now done).

Dependencies

  • [x] Board item #524 "Fix 12 failing board_sync tests" -- done. Tests are passing, so new tests can be added safely.
  • [x] Board item #282 (MCP title param) -- done. The MCP layer fix shipped independently.
  • [x] No unresolved blockers. No items depend on this ticket.

Acceptance Criteria

  • AC 1: "sync_board detects when a phase board item title differs from its linked note title and updates it" -- Clear, testable. Verified the gap exists (lines 362-367 only check column).
  • AC 2: "Updated items increment the updated count in sync response" -- Clear, testable. The counter pattern already exists in the function.
  • AC 3: "Items with current titles are skipped (no unnecessary writes)" -- Clear, testable.
  • AC 4: "Non-phase items with manually set titles are not overwritten" -- Inherently true since sync_board only iterates phase children of plans. Still worth a test to confirm and prevent regression.
All 4 ACs are agent-verifiable. Test command pytest tests/ -k board_sync or sync_board is valid.

Blast Radius

  • sync_board only processes phase-type items linked to plan notes. Low blast radius.
  • sync_issues already handles title drift for issue-type items independently -- no interaction.
  • The change is additive: adds a title check alongside the existing column check. No destructive behavior.
  • Rollback is straightforward: revert the single commit.

Decomposition Assessment

No decomposition needed.
  • 1 file target in 1 repo -- under the 3-file limit
  • 4 acceptance criteria -- under the 5-AC limit
  • Estimated work: ~5 lines of production code + 3 unit tests -- well within the 5-minute rule
  • No independent subtasks to parallelize

Recommendation

  • [LABEL] Add story:superuser-maintain label to board item #281
  • [LABEL] Add arch:board-api label to board item #281 (replace or supplement scope:board-api)
  • [BODY] Update stale line numbers in issue body: sync_board is at line 324 (not "line 251+"), sync_issues drift pattern is at lines 458-462 (not "lines 394-399")
  • [BODY] Update Repo field from forgejo_admin/pal-e-docs to forgejo_admin/pal-e-api (repo was renamed)