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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Default code owner for all paths, matching Probato PR and Indizivo.
# Orquestivo has a single owner: they approve pull requests or merge through the ruleset bypass (see docs/RELEASE.md, "Ownership model").
* @Drako01
154 changes: 140 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
# The job name is a required status check in .github/rulesets/protect-main.json: do not rename.
# Preserve the Windows/macOS required check names from Protect main.
name: Verify (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest]
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -27,30 +27,150 @@ jobs:
with:
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- name: Verify (full enterprise gate)
if: runner.os == 'Linux'
run: npm run verify:enterprise
- name: Verify (OS-sensitive subset)
if: runner.os != 'Linux'
run: npm run verify:platform
- name: Upload verification reports
if: ${{ !cancelled() }}

verify-ubuntu-base:
name: Ubuntu enterprise verification (mutation runs separately)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- name: Verify all enterprise gates except separately sharded mutation
env:
GH_TOKEN: ${{ github.token }}
run: node scripts/verify-enterprise.mjs --profile enterprise-ci --strict
- name: Archive original enterprise reports
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: verify-reports-Linux-base
path: |
reports/verify-enterprise.json
reports/verify-enterprise.md
reports/sbom.cdx.json
reports/coverage/summary.json
reports/steps/
reports/logs/
if-no-files-found: error
retention-days: 14

mutation-rest:
name: Mutations (11 modules)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- name: Execute all critical mutation targets except write-plan
run: node scripts/mutation/run.mjs --exclude-target src/core/generation/write-plan.ts
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: mutation-rest
path: reports/mutation.json
if-no-files-found: error
retention-days: 14

mutation-write-plan:
name: Mutations (write-plan ${{ matrix.shard }}/4)
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- name: Execute 10 of the original 40 deterministic write-plan mutations
run: node scripts/mutation/run.mjs --target src/core/generation/write-plan.ts --slice-index ${{ matrix.shard }} --slice-count 4
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: mutation-write-plan-${{ matrix.shard }}
path: reports/mutation.json
if-no-files-found: error
retention-days: 14

verify-ubuntu:
# This is the ORIGINAL required status check name. It only passes once all 12 mutation floors
# and the complete remaining enterprise gate have succeeded on the SAME PR SHA.
name: Verify (ubuntu-latest)
needs: [verify-ubuntu-base, mutation-rest, mutation-write-plan]
if: ${{ always() }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
actions: read
steps:
- name: Require all prerequisite verification jobs
env:
BASE: ${{ needs.verify-ubuntu-base.result }}
OTHER: ${{ needs.mutation-rest.result }}
WRITE_PLAN: ${{ needs.mutation-write-plan.result }}
run: |
test "$BASE" = success
test "$OTHER" = success
test "$WRITE_PLAN" = success
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- name: Download all mutation shard reports
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: mutation-*
path: mutation-artifacts
merge-multiple: false
- name: Restore verified enterprise reports
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: verify-reports-Linux-base
path: reports
- name: Aggregate all 12 modules and enforce unchanged score thresholds
run: node scripts/mutation/aggregate-ci.mjs mutation-artifacts
- name: Archive full verified enterprise evidence
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: verify-reports-${{ runner.os }}
name: verify-reports-Linux
path: |
reports/verify-enterprise.json
reports/verify-enterprise.md
reports/mutation.json
reports/sbom.cdx.json
reports/coverage/summary.json
reports/steps/
reports/logs/
if-no-files-found: warn
if-no-files-found: error
retention-days: 14

package-preview:
name: Package installable preview VSIX
needs: verify
needs: [verify, verify-ubuntu]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down Expand Up @@ -80,12 +200,18 @@ jobs:
run: |
node scripts/vsix-checksum.mjs write orquestivo.vsix
node scripts/vsix-checksum.mjs check orquestivo.vsix
- name: Stamp PR CI source and artifact digest
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: node scripts/release-provenance.mjs stamp
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: orquestivo-preview-vsix
path: |
orquestivo.vsix
orquestivo.vsix.sha256
reports/pr-preview-provenance.json
reports/steps/vsix-audit.json
if-no-files-found: error
retention-days: 14
92 changes: 46 additions & 46 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release pipeline. Triggers: a push to main (only publishes when package.json holds a version that has no
# GitHub Release yet) or a manual dispatch (recovery / explicit confirmation). Every registry job still waits
# for approval on its protected Environment. No PR, tag or scheduled triggers.
# See docs/RELEASE.md for the approval checklist, environment setup and partial-publish recovery.
# GitHub Release yet) or a manual dispatch (recovery / explicit confirmation). Merging the release to main is the
# approval: publication reuses the exact successful pre-merge CI artifact and reports; no tests/rebuild on main.
# Registry Environments accept deployments from main only. No PR, tag or scheduled triggers.
# See docs/RELEASE.md for the release checklist, environment setup and partial-publish recovery.
name: publish
on:
push:
Expand Down Expand Up @@ -70,35 +71,13 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "publish=true" >> "$GITHUB_OUTPUT"

verify-platforms:
name: Verify (${{ matrix.os }})
needs: authorize
if: needs.authorize.outputs.publish == 'true'
runs-on: ${{ matrix.os }}
timeout-minutes: 25
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run verify:platform

package:
# Builds, fully verifies (strict, no cache) and packages the ONE VSIX that both marketplaces receive.
name: Verify and package VSIX
# Reuse the already tested PR VSIX. Never re-run quality checks or rebuild after merge.
name: Reuse verified PR VSIX
needs: authorize
if: needs.authorize.outputs.publish == 'true'
runs-on: ubuntu-latest
timeout-minutes: 40
timeout-minutes: 15
permissions:
contents: read
actions: read
Expand All @@ -111,52 +90,73 @@ jobs:
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: npm ci --no-audit --no-fund
- name: Full release gate (strict, no cache)
- name: Locate successful PR checks for this exact merge
id: approved
if: inputs.vsix_run_id == ''
run: npm run verify:release
- name: Reuse the verified VSIX of an earlier run (recovery)
env:
GH_TOKEN: ${{ github.token }}
run: node scripts/release-provenance.mjs resolve
- name: Download PR-tested VSIX without rebuilding
if: inputs.vsix_run_id == ''
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: orquestivo-preview-vsix
run-id: ${{ steps.approved.outputs.run_id }}
github-token: ${{ github.token }}
- name: Download original release VSIX for manual recovery
if: inputs.vsix_run_id != ''
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: vsix
run-id: ${{ inputs.vsix_run_id }}
github-token: ${{ github.token }}
- name: Audit VSIX and verify checksum
- name: Validate successful CI, merged tree, version and VSIX SHA-256
id: checksum
env:
GH_TOKEN: ${{ github.token }}
run: |
npm run audit:vsix
node scripts/release-provenance.mjs verify
node scripts/vsix-checksum.mjs check orquestivo.vsix
echo "sha256=$(cut -d' ' -f1 orquestivo.vsix.sha256)" >> "$GITHUB_OUTPUT"
- name: Generate SBOM
run: npm run sbom
- name: Download original Ubuntu pre-merge verification reports
if: inputs.vsix_run_id == ''
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: verify-reports-Linux
run-id: ${{ steps.approved.outputs.run_id }}
path: evidence
github-token: ${{ github.token }}
- name: Restore release evidence during manual recovery
if: inputs.vsix_run_id != ''
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: release-evidence
run-id: ${{ inputs.vsix_run_id }}
path: evidence
github-token: ${{ github.token }}
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: vsix
path: |
orquestivo.vsix
orquestivo.vsix.sha256
reports/pr-preview-provenance.json
if-no-files-found: error
retention-days: 90
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: release-evidence
path: |
reports/verify-enterprise.json
reports/verify-enterprise.md
reports/sbom.cdx.json
reports/mutation.json
reports/coverage/summary.json
if-no-files-found: warn
path: evidence/
if-no-files-found: error
retention-days: 90

marketplace:
name: Publish to Visual Studio Marketplace
needs: [authorize, verify-platforms, package]
needs: [authorize, package]
if: needs.authorize.outputs.publish == 'true' && (github.event_name == 'push' || inputs.registries == 'both' || inputs.registries == 'marketplace')
runs-on: ubuntu-latest
timeout-minutes: 30
# Protected environment: required reviewers, deployment branch limited to main, OIDC trust registered
# Environment: deployment branch limited to main (no reviewer gate), OIDC trust registered
# for this repository and workflow. Never fall back to a long-lived token silently.
environment: marketplace
permissions:
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

open-vsx:
name: Publish to Open VSX
needs: [authorize, verify-platforms, package]
needs: [authorize, package]
if: needs.authorize.outputs.publish == 'true' && (github.event_name == 'push' || inputs.registries == 'both' || inputs.registries == 'open-vsx')
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Dependencies point inward: the VS Code layer depends on the core, never the reve
| Path | Responsibility |
| --- | --- |
| `src/core/` | Provider-neutral contracts and pure logic: `CiProvider` (`provider.ts`), `PipelineModel` (`model.ts`), findings (`findings.ts`), job graph (`analysis/`), generator (`generation/`, façade `generator.ts`), evidence and intent evaluation (`evidence/`) |
| `src/core/github/` | GitHub Actions provider: rule modules under `rules/` and the registry `GITHUB_RULES` (68 codes, see [docs/ANALYSIS.md](docs/ANALYSIS.md)) |
| `src/core/github/` | GitHub Actions provider: rule modules under `rules/` and the registry `GITHUB_RULES` (69 codes, see [docs/ANALYSIS.md](docs/ANALYSIS.md)) |
| `src/providers/` | GitLab CI, Azure Pipelines and Jenkins providers, `registry.ts` (`providerRegistry`, `detectProvider`) and `shared/` building blocks (rule catalog, bounded YAML analysis, cycle detection, text heuristics) |
| `src/security/` | `redact.ts`, `safe-path.ts` (symlink-aware containment), `limits.ts` (bounded reads) |
| `src/ai/` | Consent, disclosure, success-claim guard and provider contract. No network code and no SDK |
Expand Down
Loading
Loading