Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/prompts/codex-pr-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Open CoDesign is an open-source AI design tool — Electron desktop app that tur

**Project constraints:**
- ≤ 30 prod dependencies
- MIT-compatible permissive licenses only (reject GPL/AGPL/SSPL/proprietary/unclear copied assets)
- Shipped app/runtime dependencies and copied/bundled assets must be MIT-compatible permissive. Workflow-only CI/release actions may use copyleft licenses when they are not vendored or distributed and their outputs are ordinary metadata/manifests.
- All LLM calls via `@mariozechner/pi-ai` (no direct provider SDK imports in app code)
- No silent fallbacks for user-visible failure, data loss, auth/security decisions,
or persisted state. Best-effort cleanup, optional discovery, and non-critical
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [main, dev/v0.2]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -17,13 +20,13 @@ jobs:
name: Lint, typecheck, test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
schedule:
- cron: '23 4 * * 1'

permissions:
contents: read

jobs:
analyze:
name: Analyze
Expand All @@ -26,10 +29,10 @@ jobs:
matrix:
language: [javascript-typescript]
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: github/codeql-action/init@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
with:
languages: ${{ matrix.language }}
- uses: github/codeql-action/analyze@v3
- uses: github/codeql-action/analyze@0daab03d71ff584ef619d027a3fd9146679c5d84 # v3
with:
category: "/language:${{ matrix.language }}"
21 changes: 15 additions & 6 deletions .github/workflows/codex-pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ concurrency:
group: codex-pr-review-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pr-review:
# Fork PRs can carry adversarial content. Run the write-token bot only
# after a maintainer explicitly adds safe-to-review.
if: |
github.event.pull_request.draft == false &&
!endsWith(github.actor, '[bot]') &&
!contains(github.event.pull_request.labels.*.name, 'bot-skip') &&
vars.CODEX_BOT_ENABLED == 'true'
vars.CODEX_BOT_ENABLED == 'true' &&
(
github.event.pull_request.head.repo.full_name == github.repository ||
contains(github.event.pull_request.labels.*.name, 'safe-to-review')
)
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -25,7 +34,7 @@ jobs:
steps:
- name: Check bot review state
id: check_bot
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const marker = "*Open-CoDesign Bot*";
Expand Down Expand Up @@ -67,9 +76,9 @@ jobs:

- name: Checkout repository
if: steps.check_bot.outputs.has_review_for_current_head != 'true'
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.base.ref }}
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 0

- name: Pre-fetch base and head refs
Expand All @@ -85,7 +94,7 @@ jobs:
# This workflow runs under pull_request_target so it can post reviews.
# The checked-out merge ref is untrusted contributor content; never
# let a PR modify the prompt that receives write-token access.
git show "origin/${{ github.event.pull_request.base.ref }}:.github/prompts/codex-pr-review.md" \
git show "${{ github.event.pull_request.base.sha }}:.github/prompts/codex-pr-review.md" \
> .github/prompts/codex-pr-review.md

- name: Resolve review provider config
Expand Down Expand Up @@ -155,7 +164,7 @@ jobs:
- name: Run Codex for PR Review
id: run_codex
if: steps.check_bot.outputs.has_review_for_current_head != 'true' && steps.review_config.outputs.is_deepseek != 'true'
uses: openai/codex-action@v1
uses: openai/codex-action@e0fdf01220eb9a88167c4898839d273e3f2609d1 # v1
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ jobs:
if: github.event.repository.visibility == 'public'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4
with:
fail-on-severity: moderate
deny-licenses: GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only, GPL-3.0-or-later, AGPL-3.0-only, AGPL-3.0-or-later, SSPL-1.0
# Workflow-only release tooling is not bundled, linked, vendored, or
# distributed with the app. Keep shipped/runtime deps under the deny
# list above, but allow this action so winget automation can run.
allow-dependencies-licenses: pkg:githubactions/vedantmgoyal9/winget-releaser
40 changes: 6 additions & 34 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
Expand All @@ -19,15 +17,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 9.15.0

- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
Expand All @@ -38,9 +36,9 @@ jobs:
- name: Build website
run: pnpm --filter open-codesign-website build

- uses: actions/configure-pages@v4
- uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4

- uses: actions/upload-pages-artifact@v3
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: website/.vitepress/dist

Expand All @@ -54,33 +52,7 @@ jobs:
contents: read
pages: write
id-token: write
actions: write
steps:
# Work around actions/upload-pages-artifact@v3 bug where transient
# network hiccups during upload can produce >1 artifact named
# "github-pages" in a single run, which then makes deploy-pages@v4
# fail with "Multiple artifacts named 'github-pages'". Delete all
# but the most recent before deploying.
- name: Prune duplicate github-pages artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.run_id }}
REPO: ${{ github.repository }}
run: |
set -euo pipefail
artifacts=$(gh api "/repos/$REPO/actions/runs/$RUN_ID/artifacts" \
--jq '[.artifacts[] | select(.name == "github-pages")] | sort_by(.created_at) | reverse')
count=$(echo "$artifacts" | jq 'length')
echo "Found $count github-pages artifact(s) in this run."
if [ "$count" -le 1 ]; then
exit 0
fi
# Keep index 0 (newest); delete the rest.
echo "$artifacts" | jq -r '.[1:] | .[].id' | while read -r id; do
echo "Deleting duplicate artifact $id"
gh api -X DELETE "/repos/$REPO/actions/artifacts/$id"
done

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
9 changes: 6 additions & 3 deletions .github/workflows/issue-auto-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ concurrency:
group: issue-auto-response-${{ github.event.issue.number }}
cancel-in-progress: false

permissions:
contents: read

jobs:
auto-response:
if: |
Expand All @@ -23,7 +26,7 @@ jobs:
steps:
- name: Check for existing bot response
id: check_bot
uses: actions/github-script@v7
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const marker = "*Open-CoDesign Bot*";
Expand All @@ -50,7 +53,7 @@ jobs:

- name: Checkout repository
if: steps.check_bot.outputs.has_bot != 'true'
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -105,7 +108,7 @@ jobs:

- name: Run Codex for Issue Auto Response
if: steps.check_bot.outputs.has_bot != 'true' && steps.issue_config.outputs.is_deepseek != 'true'
uses: openai/codex-action@v1
uses: openai/codex-action@e0fdf01220eb9a88167c4898839d273e3f2609d1 # v1
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
9 changes: 6 additions & 3 deletions .github/workflows/packaging-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ on:
- '.github/workflows/release.yml'
- '.github/workflows/release-macos-x64-native-check.yml'

permissions:
contents: read

# Per-SHA group, no cancellation. Each commit gets an independent smoke
# that always runs to completion (or fails loudly). Skipping the
# cancel-in-progress saves us from the ci.yml bug where an unrelated
Expand All @@ -52,13 +55,13 @@ jobs:
# and got killed with no useful diagnostic.
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-macos-x64-native-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
CHECK_REF: ${{ github.event_name == 'push' && github.ref || inputs.ref }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ env.CHECK_REF }}
fetch-depth: 0
Expand All @@ -37,7 +37,7 @@ jobs:
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
exit 1

- name: Upload native x64 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: native-check-macos-x64
path: apps/desktop/release/*.dmg
Expand Down
Loading
Loading