Skip to content

Two SUMMARY render paths produce different output — projection fidelity issue #17

@igouss

Description

@igouss

Summary

Task completion and projection rendering use two different functions to produce SUMMARY.md content. They produce structurally different output for the same data.

The Two Paths

  1. At completion time: renderSummaryMarkdown() in complete-task.ts:45-114 — renders rich markdown from params, stores result in full_summary_md DB column.

  2. At projection time: renderSummaryContent() in workflow-projections.ts:147-210 — renders from DB row fields when regenerating projections.

These produce different frontmatter fields, different section ordering, and different formatting.

Impact

  • Delete a SUMMARY.md and regenerate it via renderSummaryProjection() → you get a different file than the original
  • Undermines the architectural claim that projections are purely derived views from DB state
  • Makes it impossible to verify projection integrity by regenerating and comparing

Fix

Option A: Always use the full_summary_md stored in the DB when rendering projections. The projection renderer should just emit what was stored, not re-derive it.

Option B: Remove full_summary_md from the DB entirely and make renderSummaryContent() the single source of truth. Complete-task would call the same function.

Option A is simpler and preserves the richer formatting from completion time.

Files

  • src/resources/extensions/gsd/tools/complete-task.ts — lines 45-114 (renderSummaryMarkdown)
  • src/resources/extensions/gsd/workflow-projections.ts — lines 147-210 (renderSummaryContent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions