Skip to content

fix: CI Mutation Testing failing due to missing structlog module (issue #738)#740

Merged
anchapin merged 3 commits intomainfrom
fix/issue-738-structlog-mutation-testing
Mar 7, 2026
Merged

fix: CI Mutation Testing failing due to missing structlog module (issue #738)#740
anchapin merged 3 commits intomainfrom
fix/issue-738-structlog-mutation-testing

Conversation

@anchapin
Copy link
Owner

@anchapin anchapin commented Mar 7, 2026

Description

This PR fixes GitHub issue #738: 'CI: Mutation Testing failing due to missing structlog module'.

Problem

The mutation testing CI jobs for both backend and ai-engine were failing with:

Root Cause

The structlog module was listed in both and , but it was NOT included in the package metadata ( and ).

When the CI runs mutation testing, it uses for ai-engine which installs from the package metadata, NOT from requirements.txt. Since structlog wasn't in the package metadata, it wasn't being installed.

Fix

Added to:

  • (dependencies section)
  • (install_requires)
  • (install_requires)

This ensures structlog is installed regardless of whether the package is installed via or via requirements.txt.

Testing

  • Local verification: structlog can be imported successfully in the ai-engine environment
  • The CI mutation testing jobs should now pass

- Add contact email for vulnerability reporting
- Document disclosure process with timeline
- Include supported versions section
- Add security best practices for contributors
- Reference related security documentation

Co-authored-by: openhands <openhands@all-hands.dev>
- Added Priority field (P1-P4) to all issue templates
- Added Component field (Backend, Frontend, AI Engine, Database, etc.) to all templates
- Updated bug_report.md, feature_request.md, config.md, documentation.md, and question.md

This implements issue #704 requirements for structured task submission with custom fields.
Add structlog>=24.0.0 to:
- ai-engine/pyproject.toml (dependencies)
- ai-engine/setup.py (install_requires)
- backend/setup.py (install_requires)

This fixes the CI mutation testing failure (issue #738) where structlog
was not being installed because it was only listed in requirements.txt
but not in the package metadata used during pip install -e operations.

Co-authored-by: openhands <openhands@all-hands.dev>
Copilot AI review requested due to automatic review settings March 7, 2026 22:19
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @anchapin, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Copy link
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

Fixes CI mutation testing failures caused by structlog not being included in Python package metadata used during CI installs.

Changes:

  • Add structlog>=24.0.0 to backend package metadata (backend/setup.py).
  • Add structlog>=24.0.0 to AI Engine package metadata (ai-engine/setup.py, ai-engine/pyproject.toml).
  • Add a new SECURITY.md and expand GitHub issue templates with Priority/Component sections.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
backend/setup.py Adds structlog to backend install metadata so CI installs include it.
ai-engine/setup.py Adds structlog to AI Engine setup.py install requirements.
ai-engine/pyproject.toml Adds structlog to AI Engine PEP 621 dependencies.
SECURITY.md Introduces a security policy document (new scope vs PR description).
.github/ISSUE_TEMPLATE/question.md Adds Priority/Component checklists (new scope vs PR description).
.github/ISSUE_TEMPLATE/feature_request.md Adds Priority/Component checklists (new scope vs PR description).
.github/ISSUE_TEMPLATE/documentation.md Adds Priority/Component checklists (new scope vs PR description).
.github/ISSUE_TEMPLATE/config.md Adds Priority checklist (new scope vs PR description).
.github/ISSUE_TEMPLATE/bug_report.md Adds Priority/Component checklists (new scope vs PR description).

Comment on lines +1 to +6
# Security Policy

## Reporting a Vulnerability

We take security vulnerabilities seriously. If you discover a security issue, please report it responsibly.

Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

This PR introduces additional scope beyond the stated goal of fixing CI mutation testing (adds a new SECURITY.md). Please either update the PR description to cover this change or move the security policy addition into a separate PR to keep review/rollback focused.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +22
**Priority**
- [ ] P1 - Critical: System completely broken, data loss
- [ ] P2 - High: Major functionality broken
- [ ] P3 - Medium: Minor functionality affected
- [ ] P4 - Low: Minor issue, cosmetic

**Component**
- [ ] Backend
- [ ] Frontend
- [ ] AI Engine
- [ ] Database
- [ ] Documentation
- [ ] CI/CD
- [ ] Other
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

These issue template changes (Priority/Component sections) are unrelated to the PR description about mutation testing/structlog. Please update the PR description to include them or split them into a separate PR to avoid mixing workflow changes with dependency fixes.

Copilot uses AI. Check for mistakes.
@anchapin anchapin merged commit 2a26669 into main Mar 7, 2026
24 checks passed
@anchapin anchapin deleted the fix/issue-738-structlog-mutation-testing branch March 7, 2026 22:35
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.

3 participants