Skip to content

chore(eyetracker): workflow hygiene — ubuntu-24.04, permissions#49

Open
KooshaPari wants to merge 5 commits into
mainfrom
chore/workflow-hygiene-ubuntu-24
Open

chore(eyetracker): workflow hygiene — ubuntu-24.04, permissions#49
KooshaPari wants to merge 5 commits into
mainfrom
chore/workflow-hygiene-ubuntu-24

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented May 28, 2026

User description

Summary

  • Replace ubuntu-latest with ubuntu-24.04 across all workflow files
  • Add minimal permissions: blocks to workflow files missing them

Test plan

  • CI passes on this branch
  • Merge after review

🤖 Generated with Claude Code


Note

Medium Risk
CI behavior changes (new test/clippy gate, Trufflehog installed from @latest, and a possibly broken .gitignore line) can affect build reliability and secret-scanning reproducibility without touching application runtime code.

Overview
Standardizes GitHub Actions across the repo: ubuntu-latestubuntu-24.04, workflow-level concurrency (cancel in-progress), and minimal permissions where they were missing. Third-party steps are pinned to commit SHAs (or tagged versions) on audit, deny, machete, semver, CodeQL, Scorecard, and Journey Gate workflows.

Adds a new CI workflow that runs cargo test --all-features --workspace and clippy (with check fallback). Trufflehog no longer uses the composite setup action; it installs via Go and trufflehog@v3@latest, and fixes GH_TOKEN expression escaping.

Repo hygiene: issue template config with a Phenotype org contact link; .gitignore extended with Cargo.lock, Python/cache/env patterns (note the diff may have merged *.orig and Cargo.lock into one line — worth a quick fix); workspace crates get license = "MIT OR Apache-2.0" for policy checks like cargo-deny.

Reviewed by Cursor Bugbot for commit 18f4f43. Bugbot is set up for automated code reviews on this repo. Configure here.


CodeAnt-AI Description

Standardize CI workflows and add a workspace test gate

What Changed

  • GitHub Actions now run on Ubuntu 24.04, cancel older in-progress runs, and use tighter job permissions where needed.
  • Several security and maintenance checks now use pinned action versions, making their results more consistent.
  • A new CI workflow runs the full workspace test suite, then checks clippy warnings.
  • The secrets scan now installs Trufflehog through Go and fixes token passing so the scan can run correctly.
  • Repository setup now includes an issue template contact link, and workspace crates declare an MIT or Apache-2.0 license for policy checks.

Impact

✅ Fewer flaky CI runs
✅ More reliable security scans
✅ Faster feedback on test and clippy failures

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Copilot AI review requested due to automatic review settings May 28, 2026 08:30
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 28, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@KooshaPari, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 17 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 79f0a07a-7803-438e-8612-c98b3d439169

📥 Commits

Reviewing files that changed from the base of the PR and between 41d417c and 18f4f43.

📒 Files selected for processing (16)
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/workflows/cargo-audit.yml
  • .github/workflows/cargo-deny.yml
  • .github/workflows/cargo-machete.yml
  • .github/workflows/cargo-semver-checks.yml
  • .github/workflows/ci.yml
  • .github/workflows/codeql-rust.yml
  • .github/workflows/codeql.yml
  • .github/workflows/journey-gate.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/trufflehog.yml
  • .gitignore
  • crates/eyetracker-core/Cargo.toml
  • crates/eyetracker-domain/Cargo.toml
  • crates/eyetracker-ffi/Cargo.toml
  • crates/eyetracker-math/Cargo.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/workflow-hygiene-ubuntu-24
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/workflow-hygiene-ubuntu-24

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request configures issue templates, updates .gitignore rules, and adds dual MIT/Apache-2.0 licenses to several Cargo manifests. A critical issue was identified in .gitignore where the lack of a trailing newline caused *.orig and Cargo.lock to concatenate into *.origCargo.lock, which prevents .orig files from being ignored correctly.

Comment thread .gitignore
*.tmp
*.bak
*.orig No newline at end of file
*.origCargo.lock
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The .gitignore file did not end with a newline, which caused *.orig and Cargo.lock to be concatenated into *.origCargo.lock. This prevents .orig files from being ignored correctly. Please separate them with a newline.

*.orig

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label May 28, 2026
Comment thread .github/workflows/ci.yml
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo test --all-features --workspace
- run: cargo clippy --all-features -- -D warnings 2>/dev/null || cargo check
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 Architect Review — HIGH

The clippy step falls back to cargo check on any cargo clippy failure, so lint violations with -D warnings are treated as success and the new CI workflow does not actually enforce a clippy quality gate.

Suggestion: Make the clippy step fail the job when cargo clippy --all-features -- -D warnings fails, and if needed add a separate, narrowly scoped fallback only for tool-unavailability rather than unconditionally running cargo check.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.

**Path:** .github/workflows/ci.yml
**Line:** 18:18
**Comment:**
	*HIGH: The clippy step falls back to `cargo check` on any `cargo clippy` failure, so lint violations with `-D warnings` are treated as success and the new CI workflow does not actually enforce a clippy quality gate.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 28, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Gitignore entry corrupted by line concatenation error
    • Replaced concatenated pattern *.origCargo.lock with separate *.orig line to properly ignore merge conflict artifacts.
  • ✅ Fixed: Clippy step silently swallows all warnings and failures
    • Removed stderr redirect (2>/dev/null) and fallback (|| cargo check) to allow clippy to properly enforce warnings and fail CI.

Create PR

Or push these changes by commenting:

@cursor push c7eb39a8f6
Preview (c7eb39a8f6)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,4 +15,4 @@
       - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
       - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
       - run: cargo test --all-features --workspace
-      - run: cargo clippy --all-features -- -D warnings 2>/dev/null || cargo check
+      - run: cargo clippy --all-features -- -D warnings

diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -39,7 +39,7 @@
 # Misc
 *.tmp
 *.bak
-*.origCargo.lock
+*.orig
 Cargo.lock
 
 # ===== Standard auto-generated hygiene ignores (do not edit manually) =====

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 18f4f43. Configure here.

Comment thread .gitignore
*.bak
*.orig No newline at end of file
*.origCargo.lock
Cargo.lock
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gitignore entry corrupted by line concatenation error

Medium Severity

The removal of *.orig and addition of Cargo.lock resulted in the two being concatenated into the nonsensical pattern *.origCargo.lock on line 42. This means *.orig files (merge conflict artifacts) are no longer ignored by git, and the gitignore contains a pattern that will never match anything useful. Cargo.lock still appears correctly on the next line, so only the *.orig rule is lost.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 18f4f43. Configure here.

Comment thread .github/workflows/ci.yml
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo test --all-features --workspace
- run: cargo clippy --all-features -- -D warnings 2>/dev/null || cargo check
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clippy step silently swallows all warnings and failures

Medium Severity

The cargo clippy command has 2>/dev/null which suppresses all diagnostic output, combined with || cargo check which swallows any non-zero exit code. This means clippy can never fail CI and never display warnings — it's functionally equivalent to just running cargo check. The project's rust-toolchain.toml explicitly installs the clippy component, suggesting clippy enforcement is intended, but this step completely neuters it.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 18f4f43. Configure here.

Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment thread .gitignore
*.tmp
*.bak
*.orig No newline at end of file
*.origCargo.lock
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Gitignore line concatenation error

Line 42 has *.origCargo.lock but should be two separate entries: *.orig and Cargo.lock. The missing newline separator means *.orig files will NOT be ignored, potentially allowing merge conflict artifacts to be committed.

Comment thread .github/workflows/ci.yml
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo test --all-features --workspace
- run: cargo clippy --all-features -- -D warnings 2>/dev/null || cargo check
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Clippy step silently swallows warnings

cargo clippy --all-features -- -D warnings 2>/dev/null || cargo check hides clippy failures. The 2>/dev/null suppresses warnings/errors, and || cargo check runs as fallback instead of failing. This defeats the purpose of enforcing -D warnings. Either:

  1. Remove the suppress-and-fallback pattern to let clippy failures fail CI
  2. Or if deliberately ignoring warnings, remove -D warnings and the || cargo check

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 28, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
.gitignore 42 Gitignore line concatenation error - *.origCargo.lock should be separate entries *.orig and Cargo.lock

WARNING

File Line Issue
.github/workflows/ci.yml 18 Clippy step silently swallows warnings with `2>/dev/null
Other Observations (not in diff)
  • The scorecard.yml has both workflow-level permissions: read-all and job-level permissions: block - this is redundant but acceptable
  • All action SHAs are now properly pinned (good improvement)
  • New CI workflow added with workspace-wide test gate (positive change)
Files Reviewed (8 files)
  • .gitignore - 1 issue
  • .github/workflows/ci.yml - 1 issue
  • .github/workflows/trufflehog.yml
  • .github/workflows/cargo-audit.yml
  • .github/workflows/cargo-deny.yml
  • .github/workflows/cargo-machete.yml
  • .github/workflows/cargo-semver-checks.yml
  • .github/workflows/codeql-rust.yml
  • .github/workflows/codeql.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/journey-gate.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • Cargo.toml files (5 crates)

Reviewed by laguna-m.1-20260312:free · 570,940 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants