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
24 changes: 23 additions & 1 deletion .github/workflows/desktop-replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,29 @@ on:
# Drafts run nothing (each job checks `draft`); marking one ready runs it.
types: [opened, synchronize, reopened, ready_for_review]
paths:
- packages/flow/openadapt_flow/**
- packages/flow/openadapt_flow/backend.py
- packages/flow/openadapt_flow/backends/**
- packages/flow/openadapt_flow/runtime/**
- packages/flow/openadapt_flow/compiler/**
- packages/flow/openadapt_flow/desktop_record.py
- packages/flow/openadapt_flow/recorder.py
- packages/flow/openadapt_flow/approval_mode/**
- packages/flow/openadapt_flow/policy.py
- packages/flow/openadapt_flow/qualification/**
- packages/flow/openadapt_flow/ir.py
- packages/flow/openadapt_flow/contracts.py
- packages/flow/openadapt_flow/identity_signals.py
- packages/flow/openadapt_flow/record_check_identity.py
- packages/flow/openadapt_flow/submit_binding.py
- packages/flow/openadapt_flow/verify.py
- packages/flow/openadapt_flow/verify_run.py
- packages/flow/openadapt_flow/verifier.py
- packages/flow/openadapt_flow/action_evidence.py
- packages/flow/openadapt_flow/choice_capture.py
- packages/flow/openadapt_flow/_windows_directory.py
- packages/flow/openadapt_flow/crypto.py
- packages/flow/openadapt_flow/at_rest.py
- packages/flow/openadapt_flow/sealed_set.py
- packages/flow/scripts/desktop/pn_db.py
- packages/flow/scripts/desktop/patient_notes.ps1
- packages/flow/tests/e2e/test_windows_hosted_replay.py
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "**/*.md"
- "!**/CHANGELOG.md"
- "!.github/**/*.md"
- "!legacy/**/*.md"
- ".github/workflows/link-check.yml"
- "scripts/ci/install_checked_tool.py"
- "scripts/ci/run_lychee.py"
push:
branches: [main]
paths:
- "**/*.md"
- "!**/CHANGELOG.md"
- "!.github/**/*.md"
- "!legacy/**/*.md"
- ".github/workflows/link-check.yml"
- "scripts/ci/install_checked_tool.py"
- "scripts/ci/run_lychee.py"
Expand Down
263 changes: 102 additions & 161 deletions .github/workflows/packages.yml

Large diffs are not rendered by default.

64 changes: 21 additions & 43 deletions .github/workflows/platform-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,26 @@ jobs:
echo "run=$run" | tee -a "$GITHUB_OUTPUT"

- name: Set up Python
if: steps.scope.outputs.run == 'true'
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.12'

- name: Install uv
if: steps.scope.outputs.run == 'true'
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
enable-cache: true
cache-dependency-glob: .github/ci-tools/uv.lock

# Cheapest decisive check first: structure, signature honesty, and
# repo agreement need no network and cannot be flaky.
# Run the offline source-boundary check BEFORE networked manifest checks
# so remote manifest drift can never mask a source-boundary violation.
# The guard reads its rules from source-policy.public.json (rendered from
# the canonical private manifest) and fails closed when that file is
# missing or incomplete. Stdlib only: no dependency install.
- name: Check open-core source boundary
run: python scripts/check_source_boundary.py

# Cheapest decisive manifest check first: structure, signature honesty,
# and repo agreement need no network and cannot be flaky.
- name: Validate platform manifest structure (offline)
if: steps.scope.outputs.run == 'true'
run: python scripts/validate_platform_manifest.py --offline
Expand All @@ -118,16 +124,20 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: python scripts/validate_platform_manifest.py

- name: Prove the drift guard fails when it should
- name: Prove the manifest drift and source boundary guards fail when they should
# The daily/dispatched production check is intentionally stdlib-only.
# This characterization suite belongs on source changes, not every
# remote drift probe, so scheduled checks stay fast and network-light.
if: steps.scope.outputs.run == 'true' && (github.event_name == 'pull_request' || github.event_name == 'push')
# Characterization suites belong on PR/push source changes so scheduled
# checks stay fast and network-light, sharing one VM and one install.
if: github.event_name == 'pull_request' || github.event_name == 'push'
env:
RUN_MANIFEST_TESTS: ${{ steps.scope.outputs.run }}
run: |
python scripts/ci/locked_install.py --lock .github/ci-tools:test
python -m pytest \
tests/test_platform_manifest_drift.py \
tests/test_platform_version_display.py -q
test_files=(tests/test_source_boundary.py)
if [ "$RUN_MANIFEST_TESTS" = "true" ]; then
test_files+=(tests/test_platform_manifest_drift.py tests/test_platform_version_display.py)
fi
python -m pytest "${test_files[@]}" -q

report-manifest-drift:
# A red scheduled run in a repository nobody has open is not a signal.
Expand Down Expand Up @@ -161,35 +171,3 @@ jobs:
else
gh issue create --repo "${{ github.repository }}" --title "$TITLE" --body "$BODY"
fi

check-source-boundary:
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
enable-cache: true
cache-dependency-glob: .github/ci-tools/uv.lock

# The guard reads its rules from source-policy.public.json (rendered from
# the canonical private manifest) and fails closed when that file is
# missing or incomplete. Stdlib only: no dependency install.
- name: Check open-core source boundary
run: python scripts/check_source_boundary.py

# Prove the guard still blocks what it blocked before the rules moved out
# of the script, and that it fails closed without them.
- name: Prove the boundary guard fails when it should
if: github.event_name == 'pull_request' || github.event_name == 'push'
run: |
python scripts/ci/locked_install.py --lock .github/ci-tools:test
python -m pytest tests/test_source_boundary.py -q
4 changes: 2 additions & 2 deletions .github/workflows/protected-safety-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
branches: [main]

concurrency:
group: protected-safety-review-${{ github.event.issue.number || github.event.pull_request.number || github.event.merge_group.head_sha }}
cancel-in-progress: true
group: protected-safety-review-${{ github.event.pull_request.number || github.event.issue.number || github.event.merge_group.head_sha || github.ref }}
cancel-in-progress: false

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ perf: short description -> patch bump
### Releasing

A pull request with a `feat`, `fix` or `perf` commit must bump the version, or
the `desktop release intent` check fails. Run
the `Desktop release intent` step (in `fast-checks`) fails. Run
`python scripts/prepare_release.py` in `packages/desktop`, review the new
`CHANGELOG.md` section, and commit. After merge, once Packages passes on main,
`desktop-release.yml` builds the wheel, the sdist and every installer, and
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ launcher's.
`--version X.Y.Z`). It sets `pyproject.toml`, `openadapt_desktop/__init__.py`,
`uv.lock` and the five native installer version files, and writes a dated
`CHANGELOG.md` section from the conventional commits since the last version.
2. The `desktop release intent` check fails a pull request with a `feat`, `fix`
2. The `Desktop release intent` check (run inside `fast-checks`) fails a pull request with a `feat`, `fix`
or `perf` commit under `packages/desktop` that keeps the version, and prints
the command above. It also requires every version source, native included,
to carry the one version.
Expand Down
Loading
Loading