Skip to content

ci: Adding Antithesis Bug report action#3868

Merged
philippemnoel merged 5 commits intomainfrom
chang-xiao-antithesis/main
Jan 8, 2026
Merged

ci: Adding Antithesis Bug report action#3868
philippemnoel merged 5 commits intomainfrom
chang-xiao-antithesis/main

Conversation

@philippemnoel
Copy link
Copy Markdown
Member

Ticket(s) Closed

  • Closes #N/A

What

Replaces #3866

Why

How

Tests

Copilot AI review requested due to automatic review settings January 8, 2026 00:18
@philippemnoel philippemnoel added the Do Not Cherry Pick PR should not be cherry-picked to other branches label Jan 8, 2026
@philippemnoel philippemnoel merged commit fec7fb7 into main Jan 8, 2026
9 of 10 checks passed
@philippemnoel philippemnoel deleted the chang-xiao-antithesis/main branch January 8, 2026 00:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds a new GitHub Actions workflow for generating Antithesis bug reports and standardizes naming conventions across all Antithesis-related workflows. It replaces PR #3866 with an improved implementation for debugging Antithesis test failures.

Key changes:

  • Adds new antithesis-run-bug-report.yml workflow that extracts moment data from Antithesis findings and triggers bug report generation
  • Renames workflows and jobs to follow a consistent "Antithesis - [Action]" naming pattern
  • Updates concurrency group names to match the new naming convention

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
.github/workflows/antithesis-run-bug-report.yml New workflow that parses Antithesis moment data and triggers bug report generation via the antithesishq action
.github/workflows/antithesis-trigger-run.yml Updates workflow and job names to "Antithesis - Trigger Run" for consistency; updates concurrency group identifier
.github/workflows/antithesis-launch-debugger.yml Updates workflow and job names to "Antithesis - Launch Debugger" for consistency
Comments suppressed due to low confidence (1)

.github/workflows/antithesis-trigger-run.yml:28

  • The concurrency group identifier is missing a hyphen separator between the group name and the variable. This should be antithesis-trigger-run-${{ github.head_ref || github.ref }} to maintain consistency with typical GitHub Actions concurrency group naming patterns.

description: Bug oracle (look for output_text in the findings report)
emails:
type: string
required: true
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The description states the input is required and should default to '[email protected]', but marking it as required means users must provide a value. Either remove 'required: true' to allow the default, or update the description to remove the mention of the default since users will be forced to provide a value.

Suggested change
required: true

Copilot uses AI. Check for mistakes.
echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT"

- name: Trigger Antithesis Bug Report Generation
uses: antithesishq/antithesis-trigger-action@main
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The action reference uses @main which points to a moving target and could introduce breaking changes or security vulnerabilities without notice. Consider pinning to a specific commit SHA or version tag for better stability and security (e.g., @v1.0.0 or @abc123).

Suggested change
uses: antithesishq/antithesis-trigger-action@main
uses: antithesishq/antithesis-trigger-action@v1

Copilot uses AI. Check for mistakes.
bug_oracle:
type: string
required: true
description: Bug oracle (look for output_text in the findings report)
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The description instructs users to look for 'output_text' in the findings report to get the bug oracle value, but this could be clearer. Consider providing more specific guidance on where to find this value or what format it should be in, especially since line 64 hardcodes custom.bug_oracle_type=output_text.

Suggested change
description: Bug oracle (look for output_text in the findings report)
description: Bug oracle value (paste the exact contents of the `output_text` field from the findings report)

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +43
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The variable input should be quoted to prevent potential word splitting and pathname expansion. This is inconsistent with line 35 where the variable is properly quoted. Change echo $input to echo "$input" for consistency and safety.

Suggested change
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
session_id_2=$(echo "$input" | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo "$input" | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo "$input" | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +43
vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9.]*\).*/\1/p')

session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The regex pattern [0-9.]* on line 39 will match sequences with multiple or consecutive dots (e.g., "1..2" or "..."), which could lead to invalid vtime values. Consider using [0-9]+\.[0-9]+ or [0-9]+(\.[0-9]+)? to match valid numeric formats more precisely.

Suggested change
vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9.]*\).*/\1/p')
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9]\+\(\.[0-9]\+\)\?\).*/\1/p')
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/p')

Copilot uses AI. Check for mistakes.

session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The sed pattern [0-9]*\.[0-9]* will match strings with only dots or empty matches (e.g., ".", "..", or even no digits at all), which could result in invalid vtime values. Use [0-9]+\.[0-9]+ to ensure at least one digit appears before and after the decimal point.

Suggested change
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]\+\.[0-9]\+\).*/\1/p')

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +48
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')

echo "session_id=${session_id_1:-$session_id_2}" >> "$GITHUB_OUTPUT"
echo "input_hash=${input_hash_1:-$input_hash_2}" >> "$GITHUB_OUTPUT"
echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT"

Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The extraction step doesn't validate whether the parsed values are non-empty before using them in the next step. If both parsing attempts fail, empty values will be passed to the Antithesis action, which could cause the bug report generation to fail silently or with unclear errors. Consider adding validation to ensure extracted values are non-empty and failing early with a clear error message if extraction fails.

Suggested change
session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
echo "session_id=${session_id_1:-$session_id_2}" >> "$GITHUB_OUTPUT"
echo "input_hash=${input_hash_1:-$input_hash_2}" >> "$GITHUB_OUTPUT"
echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT"
session_id_2=$(echo "$input" | sed -n 's/.*id: "\([^"]*\)".*/\1/p')
input_hash_2=$(echo "$input" | sed -n "s/.*), *'\([^']*\)'.*/\1/p")
vtime_2=$(echo "$input" | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p')
session_id="${session_id_1:-$session_id_2}"
input_hash="${input_hash_1:-$input_hash_2}"
vtime="${vtime_1:-$vtime_2}"
if [ -z "$session_id" ] || [ -z "$input_hash" ] || [ -z "$vtime" ]; then
echo "::error::Failed to extract session_id, input_hash, or vtime from input_string. Please ensure the input matches an expected Antithesis moment format."
exit 1
fi
echo "session_id=$session_id" >> "$GITHUB_OUTPUT"
echo "input_hash=$input_hash" >> "$GITHUB_OUTPUT"
echo "vtime=$vtime" >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Do Not Cherry Pick PR should not be cherry-picked to other branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants