Skip to content

feature/LCHIB-777: remove stop command and escape content from :: - #1373

Merged
jothikumar-CB merged 1 commit into
v1from
feature/LCHIB-777-improve-gate-command-output-v1
Aug 31, 2026
Merged

feature/LCHIB-777: remove stop command and escape content from ::#1373
jothikumar-CB merged 1 commit into
v1from
feature/LCHIB-777-improve-gate-command-output-v1

Conversation

@jothikumar-CB

Copy link
Copy Markdown
Contributor

In GitHub Actions, failure details are wrapped in ::group:: / ::endgroup:: for collapsible accordions. Replaced the previous ::stop-commands:: approach (which caused GHA to mask the token as *** and display it literally) with per-line escaping, lines starting with :: in stderr are escaped to %3A%3A to prevent GHA from interpreting test output as workflow commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the gate command’s GitHub Actions output hardening by removing the ::stop-commands:: mechanism and instead escaping stderr lines that begin with ::, preventing GitHub Actions from interpreting test output as workflow commands.

Changes:

  • Removed ::stop-commands:: / resume-token wrapping from GitHub Actions formatted output.
  • Added per-line escaping for stderr lines that start with :: (escaped to %3A%3A...).
  • Updated tests to assert escaped output for known dangerous command-like lines.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
launchable/commands/gate.py Removes stop-commands usage and escapes stderr lines starting with :: before emitting them in GHA groups.
tests/commands/test_gate.py Adjusts assertions to match the new escaping approach for GitHub Actions output.
Suppressed comments (1)

tests/commands/test_gate.py:206

  • These assertions confirm escaped output is present, but they don't verify the raw workflow-command lines are absent. Adding assertNotIn checks makes the test fail if both escaped and unescaped forms are ever emitted.
        # dangerous :: lines are escaped so GHA won't interpret them as commands
        self.assertIn('%3A%3Aerror::some error', result.output)
        self.assertIn('%3A%3Awarning::spoofed', result.output)
        self.assertIn('%3A%3Aadd-mask::secret-value', result.output)
        self.assertIn('%3A%3Aset-output name=x::y', result.output)


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/commands/test_gate.py
@jothikumar-CB
jothikumar-CB merged commit 9ffdcd2 into v1 Aug 31, 2026
15 checks passed
@jothikumar-CB
jothikumar-CB deleted the feature/LCHIB-777-improve-gate-command-output-v1 branch August 31, 2026 08:57
@github-actions github-actions Bot mentioned this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Smart Tests CLI The next gen CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants