One three-valued logic for CI conditions, or a recorded reason to keep them apart

Open
#610 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
cmake, github, gitlab, python

Research direction

Read ci/gitlab_rules.py:59-73, ci/github_expressions.py:187-203, and the condition functions under facts/conditions used by cmake/generator_expressions.py. Compare their three-valued semantics and decide whether one lattice can serve all three or document why they should remain separate. Done means recording and justifying that decision; the issue allows no code change.

Written by the indexing model from the issue text.

Description

Problem

Three pairs of three-valued condition functions exist:

  • _either / _both in ci/gitlab_rules.py:59-73 (settles run/required);
  • _either / _both in ci/github_expressions.py:187-203 (GitHub's truthy operands);
  • either / both in facts/conditions, used by cmake/generator_expressions.py.

Their semantics differ, so this is design-level repetition, not copy-paste.

Expected

A design pass: either one lattice serves all three, or the docs record why they stay apart. "No change, with a reason" is an acceptable outcome.

Not planned for the release unless decided otherwise.

Split from #543. Checked against main at 4b4dbb6c on 2026-12-03: the cases above were reproduced with small fixtures or found in the code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Dominant language
Python
Stars
4
Forks
1
Avg merge
6h 31m
Merged PRs (30d)
238

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cpp-best-practices/project_validator

All issues in cpp-best-practices/project_validator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.