Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bace9bf
chore: make local admission resource safe
qnbs Aug 24, 2026
a3287ed
fix: avoid cache key secret scan false positive
qnbs Aug 24, 2026
a656835
fix: harden local admission policy checks
qnbs Aug 24, 2026
e295616
fix: close admission review gaps
qnbs Aug 24, 2026
c36b9f0
fix: close admission review gaps
qnbs Aug 24, 2026
3445f7e
fix: harden admission review controls
qnbs Aug 24, 2026
cef5001
fix: close admission review gaps
qnbs Aug 24, 2026
b4f281b
fix: harden admission edge cases
qnbs Aug 24, 2026
591671e
fix: close local admission review gaps
qnbs Aug 24, 2026
43f3565
fix: harden bounded admission cleanup
qnbs Aug 24, 2026
9ce0697
fix: close workflow and admission review gaps
qnbs Aug 24, 2026
71fa70f
fix: close admission trigger review gaps
qnbs Aug 24, 2026
161550e
fix: harden local admission termination and release policy checks
qnbs Aug 24, 2026
a4117a4
fix: fail closed on unresolved admission state
qnbs Aug 24, 2026
bd9f10d
fix: close review gaps in admission policy guards
qnbs Aug 24, 2026
35adf7f
fix: harden qualification and diff policy checks
qnbs Aug 24, 2026
8a5ab2d
fix: close release mutation and aggregate guard gaps
qnbs Aug 24, 2026
0947aa3
fix: close latest review gaps in local admission
qnbs Aug 24, 2026
d017ee8
fix: close scanner descriptors on allocation failure
qnbs Aug 24, 2026
811d391
fix: close workflow policy bypass classes
qnbs Aug 24, 2026
cad6b34
fix: normalize quoted workflow policy keys
qnbs Aug 24, 2026
1807529
fix: close review policy edge cases
qnbs Aug 24, 2026
b303cb2
fix: close admission review edge cases
qnbs Aug 24, 2026
05359d5
fix: close subprocess and workflow policy races
qnbs Aug 24, 2026
52fb719
refactor: converge local admission authorities
qnbs Aug 24, 2026
e4c285e
fix: close exact-tree admission review findings
qnbs Aug 24, 2026
d93e992
fix: close process and workflow policy review findings
qnbs Aug 24, 2026
df19fae
fix: close latest workflow admission findings
qnbs Aug 24, 2026
9bbeded
fix: close final workflow admission review findings
qnbs Aug 24, 2026
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 .cursor/rules/800-testing-standards.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ alwaysApply: false

| Tier | Befehle |
|------|---------|
| **Lokal schnell** | `lint`, `typecheck`, `i18n:check`; optional `pnpm exec vitest run` **ohne** `--coverage` |
| **Lokal schnell** | `pnpm run ci:prepush` (änderungsbewusst; `DEFERRED_TO_REQUIRED_CI` für `DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING` und nicht-TS-`TEST_ONLY`); optional `pnpm exec vitest run <path>` **ohne** `--coverage` |
| **CI schwer** | Vitest **mit** Coverage (Schwellen 63/55/54/62 — lines/branches/functions/statements), `CI=true pnpm run test:e2e`, LHCI, `bundle:budget` |

- Merge-Bar = **grüner GitHub-Workflow**, nicht voller lokaler E2E auf schwacher Hardware.
Expand Down
2 changes: 1 addition & 1 deletion .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Kurz und konkret:

- Wenn der Nutzer **Deutsch** wünscht: Antworten auf **Deutsch**; Code- und API-Bezeichner unverändert nach Repo-Konvention.
- Zusätzliche Repo-Leitplanken: **`.cursor/index.mdc`** (Manifest, `alwaysApply`) und **`.cursor/rules/*.mdc`** (001 Security, 100 KI/Storage, 150 i18n/Content, 200 Architektur, 300 UI, 800 Testing, 850 Doku/MCP). Nach Code-Änderungen optional **`pnpm run graphify:update`** bzw. `graphify:bootstrap`.
- Qualität lokal (schnell): `pnpm run lint`, `typecheck`, `i18n:check`; schwere Suites CI-first — siehe **`docs/CI.md`** und Regel **`800-testing-standards.mdc`**.
- Qualität lokal (schnell): `pnpm run ci:prepush` (änderungsbewusst; `DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING` und nicht-TS-`TEST_ONLY` melden `DEFERRED_TO_REQUIRED_CI`), `node scripts/ci-prepush-lowend.mjs --full` auf leistungsfähiger Hardware; schwere Suites CI-first — siehe **`docs/CI.md`** und Regel **`800-testing-standards.mdc`**.
- Bestehende Projekt-Tools (z. B. **Biome**, **Vitest**, **Playwright**, **Vite**) vor neuen Hilfsmitteln bevorzugen.
- Keine unnötigen neuen Markdown-Dateien; Ausnahme: ausdrücklich gewünschte Doku (z. B. diese Rules).

Expand Down
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ types.ts → Core shared interfaces and types
3. Implement the real **root-cause** fix (code **+ tests + i18n + docs**), or reply with evidence
if false-positive / by-design. **Never** add a new `biome-ignore` (suppression ratchet fails
CI — refactor instead; run `node scripts/check-suppressions.mjs`).
4. Local gate (sequential): lint + typecheck + targeted vitest green.
4. Local admission (sequential): `pnpm run ci:prepush`; it is change-aware and may explicitly defer TypeScript to required cloud CI for `DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING`, or non-TypeScript `TEST_ONLY` changes.
5. Commit + push; reply to **every** thread citing the resolving commit, then resolve it → **0 unresolved**.
6. Re-trigger: `gh pr comment <N> --body "@coderabbitai review"`; check the **full** review history,
not just the latest status (a rate-limited latest status can hide an earlier real review).
Expand Down Expand Up @@ -169,7 +169,7 @@ On any non-trivial code change add a single-line comment explaining **why**, not
- Conventional Commits format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`
- Pre-commit: after explicit `pnpm run hooks:install`, `simple-git-hooks` runs Biome on staged files; CI is mandatory regardless
- **⚠️ Constrained local hardware — do NOT run heavy suites locally.** This machine has ~3–4 GB RAM. **Never** run the full Vitest **coverage** suite, **Playwright E2E**, **Stryker mutation**, **Lighthouse CI**, or the **Storybook test-runner** locally — they are **CI-only by design**. Run **one heavy command at a time** (no parallel `vitest`/`biome`/`tsc`/`vite`).
- Local preflight (sequential, minimal): `pnpm run lint` → `pnpm run typecheck` → `pnpm run i18n:check` (only when locale JSON changed) → **targeted** `pnpm exec vitest run <path>` (no `--coverage`). Run `pnpm run build && pnpm run smoke:prod` only when you touched `vite.config.ts`, `packages/ai-core`, or `workers/`. Coverage, E2E, Lighthouse, Stryker, and Storybook are **CI gate jobs** — let GitHub Actions run them.
- Local preflight (sequential, minimal): `pnpm run ci:prepush` → optional targeted `pnpm exec vitest run <path>` (no `--coverage`). The admission gate classifies changes and reports `DEFERRED_TO_REQUIRED_CI` for `DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING`, or non-TypeScript `TEST_ONLY` changes; use `node scripts/ci-prepush-lowend.mjs --full` on capable hardware. Run `pnpm run build && pnpm run smoke:prod` only when you touched `vite.config.ts`, `packages/ai-core`, or `workers/`. Coverage, E2E, Lighthouse, Stryker, and Storybook are **CI gate jobs** — let GitHub Actions run them.
- **Vitest watch-mode hard rule:** Never run `pnpm test`, `npm run test`, a bare Vitest command, or an untargeted wrapper. Always use `pnpm exec vitest run <path>`; CI is the only place that runs the full coverage suite.
- CI pipeline (see [`docs/CI.md`](../docs/CI.md)): **`security` → `quality`** (Biome + `tsc` + Vitest matrix) **→ `build` / `e2e` / `storybook` in parallel** → **`lighthouse`** after build → **`deploy`** on `main` after build+e2e
- Branch protection should require the **`quality`** job (and other checks your team enables); job ids match `.github/workflows/ci.yml`
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ jobs:
- name: Doc metrics drift gate (locale/key counts, stale PLANNED status)
run: pnpm run docs:check

- name: Workflow governance policy gate
run: node scripts/check-workflow-policy.mjs

- name: CSP source synchronization and parity
run: pnpm run csp:verify

Expand Down Expand Up @@ -486,6 +489,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [ci-success]
# QNBS-v3: deployment is explicitly outside the aggregate and gated by its successful result.
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && needs.ci-success.result == 'success'
permissions:
contents: read
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
- cron: '30 4 * * 1' # every Monday 04:30 UTC
workflow_dispatch:

# Minimal read-all default; individual job overrides what it needs.
permissions: read-all
# QNBS-v3: top-level read-only; the analysis job scopes its extra permissions explicitly.
permissions:
contents: read

jobs:
analysis:
Expand Down
167 changes: 167 additions & 0 deletions .github/workflows/tauri-intel-qualification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Non-publishing Intel qualification; this workflow never creates a release or latest.json.
name: Tauri Intel qualification

on:
workflow_dispatch:
inputs:
qualification_ref:
description: Exact branch, tag, or SHA to qualify (defaults to the dispatched ref)
required: false
type: string

permissions:
contents: read

concurrency:
group: tauri-intel-qualification-${{ github.ref }}-${{ inputs.qualification_ref || github.sha }}
cancel-in-progress: true

jobs:
resolve-ref:
name: Resolve qualification ref
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
sha: ${{ steps.resolve.outputs.sha }}
steps:
- name: Resolve requested ref once
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.qualification_ref || github.sha }}
fetch-depth: 1
persist-credentials: false
- name: Export immutable qualification SHA
id: resolve
run: |
set -euo pipefail
sha="$(git rev-parse HEAD)"
git cat-file -e "$sha^{commit}"
printf 'sha=%s\n' "$sha" >> "$GITHUB_OUTPUT"
printf 'resolved_sha=%s\n' "$sha" > qualification-resolved-ref.txt
cat qualification-resolved-ref.txt

qualify:
name: ${{ matrix.role }} (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
needs: [resolve-ref]
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15-intel
role: primary-production-candidate
- runner: macos-26-intel
role: advisory-forward-compatibility

steps:
- name: Check out the exact qualification ref
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.resolve-ref.outputs.sha }}
fetch-depth: 1
persist-credentials: false
Comment thread
qnbs marked this conversation as resolved.

- name: Record source ref
env:
REQUESTED_REF: ${{ inputs.qualification_ref || github.sha }}
RESOLVED_REF: ${{ needs.resolve-ref.outputs.sha }}
run: |
set -euo pipefail
printf 'source_ref=%s\n' "$(git rev-parse HEAD)" > qualification-source.txt
printf 'requested_ref=%s\n' "$REQUESTED_REF" >> qualification-source.txt
printf 'resolved_ref=%s\n' "$RESOLVED_REF" >> qualification-source.txt
cat qualification-source.txt

- uses: ./.github/actions/setup

- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- uses: Swatinem/rust-cache@f0d9c3887740aee45f6153b24b3a6b815192ec16 # v2
with:
workspaces: src-tauri
cache-all-crates: true
prefix-key: "intel-qual-v1"

- name: Install macOS packaging dependency
run: brew install create-dmg

- name: Prepare non-publishing bundle configuration
run: |
set -euo pipefail
# QNBS-v3: qualification must not publish or mutate release metadata.
jq '.bundle.createUpdaterArtifacts = false' src-tauri/tauri.conf.json > src-tauri/tauri.conf.json.tmp
mv src-tauri/tauri.conf.json.tmp src-tauri/tauri.conf.json
printf 'updater_artifacts=disabled\n' > qualification-config.txt
printf 'release_publication=disabled\n' >> qualification-config.txt
cat qualification-config.txt

- name: Build non-publishing Tauri bundle
run: |
set -euo pipefail
pnpm exec tauri build

- name: Verify Intel architecture and deployment target
shell: bash
run: |
set -euo pipefail
test "$(uname -s)" = "Darwin"
host_arch="$(uname -m)"
test "$host_arch" = "x86_64"

app="$(find src-tauri/target/release/bundle -type d -name '*.app' -print -quit)"
test -n "$app"
executable_name="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$app/Contents/Info.plist")"
executable="$app/Contents/MacOS/$executable_name"
test -x "$executable"

file "$executable" | tee qualification-file.txt
grep -Eq 'x86_64' qualification-file.txt
lipo -info "$executable" | tee qualification-lipo.txt
lipo_archs="$(lipo -archs "$executable")"
test "$lipo_archs" = "x86_64"

load_commands="$(otool -l "$executable")"
printf '%s\n' "$load_commands" > qualification-otool.txt
minimum_os="$(awk '/LC_BUILD_VERSION/{mode="build"; next} /LC_VERSION_MIN_MACOSX/{mode="legacy"; next} mode == "build" && $1 == "minos"{print $2; exit} mode == "legacy" && $1 == "version"{print $2; exit}' qualification-otool.txt)"
test "$minimum_os" = "11.0"

dmg="$(find src-tauri/target/release/bundle -type f -name '*.dmg' -print -quit)"
test -n "$dmg"
test -s "$dmg"

updater_bundles="$(find src-tauri/target/release/bundle -type f \( -name '*.app.tar.gz' -o -name '*.app.tar.gz.sig' \) -print)"
printf 'updater_bundles=%s\n' "$updater_bundles" > qualification-updater-check.txt
test -z "$updater_bundles"

cat > qualification-result.json <<EOF
{
"runner": "${{ matrix.runner }}",
"role": "${{ matrix.role }}",
"sourceRef": "$(git rev-parse HEAD)",
"hostArchitecture": "$host_arch",
"binaryArchitecture": "x86_64",
"minimumMacOS": "$minimum_os",
"appBundle": "$app",
"dmg": "$dmg",
"updaterBundle": "NOT_PRODUCED: non-publishing qualification",
Comment thread
qnbs marked this conversation as resolved.
"releasePublication": false
}
EOF
cat qualification-result.json

- name: Upload qualification evidence
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Comment thread
qnbs marked this conversation as resolved.
with:
name: tauri-intel-qualification-${{ matrix.runner }}
path: |
qualification-source.txt
qualification-config.txt
qualification-result.json
qualification-updater-check.txt
qualification-file.txt
qualification-lipo.txt
qualification-otool.txt
if-no-files-found: warn
retention-days: 30
3 changes: 3 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ useDefault = true
# archive caching — static, non-secret cache-namespace strings. Flagged by the same generic-api-key
# heuristic: YAML `key:` field name next to a hyphenated alphanumeric string. Reviewed 2026-08-19:
# both are cache keys with a fixed literal suffix (`-v1`), not credentials.
# intel-qualification-v1 was the original non-secret Rust-cache namespace in this PR; the current
# workflow uses intel-qual-v1, but the historical commit remains in the PR scan range.
[allowlist]
description = "Cache-key / record-key literals flagged by generic-api-key's key-adjacent-string heuristic — not credentials"
regexes = [
'''^idb_passphrase_sentinel_v1$''',
'''^apt-cef-harness-deps-v1$''',
'''^apt-tauri-linux-deps-v1$''',
'''^intel-qualification-v1$''',
]
10 changes: 7 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The app supports a multi-provider AI stack (Gemini, OpenAI, Claude, Grok, OpenRo
```bash
pnpm run ci:prepush
```
This gate is mandatory before every push and after every local correction before re-pushing; it runs sequentially with a single-checker project typecheck, i18n parity/quality and bundle checks, release/doc truth, and lightweight native guardrails. The pre-commit hook separately runs staged-file Biome checks. Full repository lint, coverage, E2E, Storybook, Lighthouse, and mutation checks belong to cloud CI. If branch switching or a lockfile/package-manifest change makes pnpm report dependency verification errors, run `node scripts/dependency-state.mjs reconcile` and rerun the complete pre-push gate.
This gate is mandatory before every push and after every local correction before re-pushing; it is change-aware: `DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING`, and non-TypeScript `TEST_ONLY` changes explicitly defer TypeScript to required CI, while application, contract, dependency, build, mixed, ambiguous, or TypeScript test changes run bounded single-checker `tsgo` locally. It always runs the cheap policy guards applicable to the change. The pre-commit hook separately runs staged-file Biome checks. Full repository lint, coverage, E2E, Storybook, Lighthouse, and mutation checks belong to cloud CI. Use `node scripts/ci-prepush-lowend.mjs --full` for complete local admission on capable hardware. If branch switching or a lockfile/package-manifest change makes pnpm report dependency verification errors, run `node scripts/dependency-state.mjs reconcile` and rerun the complete pre-push gate.
Optional targeted smoke test: `pnpm exec vitest run <path>` **without** `--coverage`.
**Hard rule:** Never invoke `pnpm test`, `npm run test`, or a bare Vitest wrapper; always use an explicit `pnpm exec vitest run <path>` command to avoid watch-mode hangs on constrained hardware. Never start multiple heavyweight processes concurrently.
4. **Audit cloud CI logs, fix locally, then re-push** – If the cloud CI run fails, inspect the logs via GitHub web UI or `gh run watch`, reproduce the specific failing test or lint error in isolation, fix it locally (quick tier to verify), commit, and push again for another cloud CI run.
Expand Down Expand Up @@ -295,8 +295,12 @@ procedure.
### Philosophy

- **Cloud CI-first:** The canonical quality gate is GitHub Actions. Low-end local machines should run only the "Quick" tier.
- **Quick tier (local, before every push):** `pnpm run ci:prepush` runs the project typecheck with
one checker, i18n parity/quality/bundle/content checks, release/doc truth, and lightweight desktop guardrails sequentially;
- **Quick tier (local, before every push):** `pnpm run ci:prepush` performs change-aware admission with
bounded policy checks. It runs one-checker TypeScript validation only for TypeScript-impacting,
dependency, build, native-contract, mixed, ambiguous, or TypeScript test changes. For
`DOCS_ONLY`, `WORKFLOW_ONLY`, `NON_CODE_ONLY`, `RUST_TAURI`, `TOOLING`, and non-TypeScript
`TEST_ONLY` changes it reports `DEFERRED_TO_REQUIRED_CI` rather than launching a full project scan. The complete
local tier is `node scripts/ci-prepush-lowend.mjs --full` on capable hardware;
the pre-commit hook separately runs staged-file Biome checks. Run the gate again after every
correction before re-pushing; do not
push based only on a targeted test or a changed-file lint run. Optionally:
Expand Down
Loading
Loading