Skip to content

Add actionlint workflow and fix requirements traceability validator#279

Merged
NestorMonroy merged 1 commit intodevelopfrom
feature/review-files-in-.github/workflows-22-58-17
Nov 18, 2025
Merged

Add actionlint workflow and fix requirements traceability validator#279
NestorMonroy merged 1 commit intodevelopfrom
feature/review-files-in-.github/workflows-22-58-17

Conversation

@2-Coatl
Copy link
Collaborator

@2-Coatl 2-Coatl commented Nov 18, 2025

Summary

  • add an actionlint workflow to validate GitHub Actions syntax on pushes, pull requests, and manual runs
  • rewrite the requirements traceability validator to use PyYAML and handle invalid front matter safely
  • update the workflows review document with findings and recommendations

Testing

  • not run (not requested)

Codex Task

Copilot AI review requested due to automatic review settings November 18, 2025 22:58
@NestorMonroy NestorMonroy merged commit 0d6b7b3 into develop Nov 18, 2025
4 of 19 checks passed
@NestorMonroy NestorMonroy deleted the feature/review-files-in-.github/workflows-22-58-17 branch November 18, 2025 22:59
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +24 to 29
- name: Install validation dependencies
run: pip install pyyaml

- name: Setup Python
uses: actions/setup-python@v5
with:

Choose a reason for hiding this comment

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

P1 Badge Install PyYAML after selecting runner Python

The workflow installs PyYAML before running actions/setup-python, so the package is placed in the runner’s default Python (currently 3.10) but the validation script later runs with the 3.11 interpreter configured by the setup step. On ubuntu-latest this causes the import yaml at runtime to fail with ModuleNotFoundError, preventing the traceability check from running on any branch. Move the pip install after the setup-python step (or use python -m pip from the configured interpreter) so the dependency is available to the Python version executing the script.

Useful? React with 👍 / 👎.

Copy link

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 GitHub Actions workflow validation and improves requirements traceability validation by:

  • Adding an actionlint workflow to validate GitHub Actions syntax automatically
  • Rewriting the requirements traceability validator to use PyYAML for robust YAML parsing
  • Documenting workflow review findings and optimization recommendations

Key Changes

  • New actionlint workflow enables syntax validation on workflow changes via push, pull requests, and manual dispatch
  • Requirements validator now uses PyYAML instead of manual parsing, adds error handling for invalid front matter, and reports parsing failures
  • Documentation added summarizing all workflows with highlighted findings about validation improvements

Reviewed Changes

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

File Description
.github/workflows/actionlint.yml New workflow to validate GitHub Actions syntax using actionlint v1.7.1
.github/workflows/requirements_validate_traceability.yml Replaced manual YAML parsing with PyYAML, added invalid front matter tracking, improved error handling and code formatting
.github/workflows/REVIEW.md New documentation summarizing all workflows with triggers, jobs, and key findings about validation improvements

Comment on lines +24 to 27
- name: Install validation dependencies
run: pip install pyyaml

- name: Setup Python
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

Dependencies are installed before Python is set up. The 'Install validation dependencies' step should be moved after 'Setup Python' to ensure pip uses the correct Python version and environment. The current order may use the system Python instead of the configured 3.11 version.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +44
from typing import Iterable, List

import yaml

FRONT_MATTER_PATTERN = re.compile(r"^---\s*\n(.*?)\n---\s*", re.DOTALL)

def ensure_list(value: Iterable | str | None) -> List[str]:
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

The type hint Iterable | str | None is too broad. Since str is itself an Iterable, this may cause unexpected behavior if a string is processed as an iterable of characters rather than as a single string value. Consider using Iterable[Any] | str | None or reordering to str | Iterable | None with explicit type checks to ensure strings are handled correctly before other iterables.

Suggested change
from typing import Iterable, List
import yaml
FRONT_MATTER_PATTERN = re.compile(r"^---\s*\n(.*?)\n---\s*", re.DOTALL)
def ensure_list(value: Iterable | str | None) -> List[str]:
from typing import Iterable, List, Any
import yaml
FRONT_MATTER_PATTERN = re.compile(r"^---\s*\n(.*?)\n---\s*", re.DOTALL)
def ensure_list(value: str | Iterable[Any] | None) -> List[str]:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants