Skip to content

fix(resolve): unescaped {reason} in Tracked cell can break a resolution-summary table row #330

Description

@dean0x

Problem

src/assets/commands/resolve.mds interpolates a {reason} value into the Tracked cell of the ## Fix Separately table:

  • Line 244: (pending — TRACEABILITY: DEGRADED ({reason}))
  • Line 354: Tracked stays (pending — TRACEABILITY: DEGRADED ({reason})) for each affected item

If the {reason} string contains a pipe character (|), the markdown table row breaks — the parser sees an extra column separator, splitting the cell and corrupting the table layout.

No escaping rule is stated anywhere in resolve.mds for values interpolated into table cells.

Evidence

  • src/assets/commands/resolve.mds:244 — first interpolation site
  • src/assets/commands/resolve.mds:354 — Phase 9 backfill interpolation site
  • src/assets/commands/resolve.mds:619 — the ## Fix Separately table where the broken row lands

{reason} derives from the Git agent's TRACEABILITY: DEGRADED (reason) output, which in turn comes from gh/API error messages — these are third-party strings that can contain any character including |.

Blast Radius

Display-only: the /code-review convergence parser reads only the Deferred/Fixed/False Positive Statistics rows and the ## Fixed Issues/## False Positives headings, so a broken ## Fix Separately row does not corrupt the convergence formula.

Fix

Either:

  1. State an escaping rule: before writing any {reason} into a table cell, replace | with \| (or an equivalent safe representation). Apply the same rule to any other free-text interpolation into table cells.
  2. Move the reason out of the table: put the DEGRADED notice in a prose paragraph below the ## Fix Separately section instead of inside the cell.

Option 1 is simpler and consistent with how other Markdown table generators handle this.

Found during review of PR #327.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions