fix(playbook): collapse blank lines around issue context partials#96
Merged
Conversation
Summary:
- Inline the issue description right after "Description:" and trim the
empty "Recent comments"/"Linked issues" if-blocks with {%-/-%} so they
emit nothing instead of stray blank lines.
- Make continuation_context render to an empty string when no attempt is
set, instead of leaking surrounding newlines.
Rationale:
- Liquid tags on their own lines preserve their trailing newline, so the
unguarded if/for blocks left several blank lines in the rendered prompt
whenever optional sections (comments, links, retry context) were empty.
Whitespace control keeps the source readable while collapsing the gaps.
Tests:
- mix test test/symphony_elixir/workflow_preview_test.exs
test/symphony_elixir/prompt_builder_test.exs
test/symphony_elixir/quality_gate/prompt_test.exs (+ core prompt cases)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
symphony workflow previewrendered a stack of blank lines around the issue-context block whenever optional sections (description, comments, links, retry context) were empty, making the prompt harder to scan.TL;DR
Use Liquid whitespace control so empty issue-context sections collapse instead of leaving stray blank lines.
Summary
Description:so there is no blank line between the label and the body.Recent commentsandLinked issues{% if %}blocks with{%-/-%}so they emit nothing when empty.continuation_contextto an empty string when no retryattemptis set, instead of leaking surrounding newlines.Alternatives
Test Plan
make allmix test test/symphony_elixir/workflow_preview_test.exs test/symphony_elixir/prompt_builder_test.exs test/symphony_elixir/quality_gate/prompt_test.exs(+ core prompt cases) — greensymphony workflow previewbefore/after: blank line afterDescription:gone; trailing gap cut from 6 blank lines to 1