Skip to content

fix(ci): evaluate jq interpolations in skill-review detailed output - #71

Merged
gautambaghel merged 1 commit into
hashicorp:mainfrom
sahildmk:fix/jq-interpolation-escaping
May 11, 2026
Merged

fix(ci): evaluate jq interpolations in skill-review detailed output#71
gautambaghel merged 1 commit into
hashicorp:mainfrom
sahildmk:fix/jq-interpolation-escaping

Conversation

@sahildmk

@sahildmk sahildmk commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The Detailed Review section of every Tessl Skill Review PR comment renders per-criterion lines as literal text instead of real scores — e.g. PR #66, PR #64:

    \(.key): \(.value.score)/3 - \(.value.reasoning)

Cause and fix

Lines 228 and 234 of .github/workflows/tessl-skill-review.yml over-escape jq interpolations. The jq program is single-quoted in bash, so jq sees \\(.key)\\ is an escaped backslash, leaving a literal \ before (.key) that jq prints verbatim instead of interpolating.

- map("    \\(.key): \\(.value.score)/3 - \\(.value.reasoning)")
+ map("    \(.key): \(.value.score)/3 - \(.value.reasoning)")

Surrounding \\n sequences are intentionally kept — they're consumed downstream by printf '%b'.

Test plan

Reproduced the upstream workflow verbatim (real tessl skill review --json against a sample skill, no API key) and confirmed:

  • Before: \(.key): \(.value.score)/3 - \(.value.reasoning)
  • After: specificity: 2/3 - It mentions 'print a hello world greeting' ...

Table, score column, suggestions, and <details> collapsing render identically before/after. Does not touch the TABLE= / DETAILS= lines fixed in #67.

The DESC_EVAL and CONTENT_EVAL jq programs used `\\(.key)` /
`\\(.value...)` inside a single-quoted format string. In jq, `\\` is an
escaped backslash, so the program contains a literal backslash followed
by `(.key)` — not an interpolation — and the PR comment renders as

    \(.key): \(.value.score)/3 - \(.value.reasoning)

for every criterion (e.g. PR hashicorp#66, PR hashicorp#64).

Drop the redundant backslash so jq evaluates the interpolation. The
surrounding `join("\\n")` and `"\\n\\n"` are intentionally kept — those
literal `\n` tokens are consumed downstream by `printf '%b'`.
@sahildmk
sahildmk requested a review from a team as a code owner May 11, 2026 17:30
@gautambaghel
gautambaghel merged commit 43ca9b0 into hashicorp:main May 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants