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
36 changes: 13 additions & 23 deletions .github/workflows/package-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,40 @@ on:
pull_request:
paths:
- ".github/workflows/package-smoke.yml"
- "packages/loopx-core/**"
- "packages/loopx-capability-agent-turn-recall/**"
- "loopx/**"
- "packages/**"
- "tests/test_core_distribution.py"
- "tests/test_core_recall_distribution.py"
- "tests/control_plane/test_installed_core_context.py"
- "packages/loopx-repo-health/**"
- "packages/loopx-obelisk/**"
- "packages/loopx-codex-provider-routing/**"
- "loopx/capabilities/decision_context/extension_provider.py"
- "loopx/extensions/runtime.py"
- "packages/loopx-capability-pull-request-review/**"
- "packages/loopx-capability-issue-fix/**"
- "tests/test_core_pr_review_distribution.py"
- "tests/test_core_issue_fix_distribution.py"
- "tests/test_core_standard_distribution.py"
- "tests/control_plane/test_installed_core_context.py"
- "loopx/extensions/runtime.py"
- "loopx/capabilities/decision_context/extension_provider.py"
- "pyproject.toml"
push:
branches:
- main
paths:
- ".github/workflows/package-smoke.yml"
- "packages/loopx-core/**"
- "packages/loopx-capability-agent-turn-recall/**"
- "packages/**"
- "loopx/**"
- "tests/test_core_distribution.py"
- "tests/test_core_recall_distribution.py"
- "tests/control_plane/test_installed_core_context.py"
- "packages/loopx-repo-health/**"
- "packages/loopx-obelisk/**"
- "packages/loopx-codex-provider-routing/**"
- "loopx/capabilities/decision_context/extension_provider.py"
- "loopx/extensions/runtime.py"
- "packages/loopx-capability-pull-request-review/**"
- "packages/loopx-capability-issue-fix/**"
- "tests/test_core_pr_review_distribution.py"
- "tests/test_core_issue_fix_distribution.py"
- "tests/test_core_standard_distribution.py"
- "tests/control_plane/test_installed_core_context.py"
- "pyproject.toml"
schedule:
- cron: "47 20 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: package-smoke-${{ github.ref }}
cancel-in-progress: true
group: package-smoke-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
core:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/postgresql-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- "package.json"
- "package-lock.json"
workflow_dispatch:
schedule:
- cron: "11 21 * * *"
push:
branches:
- main
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
outputs:
core_tests: ${{ steps.classify.outputs.core_tests }}
backend_tests: ${{ steps.classify.outputs.backend_tests }}
frontend_tests: ${{ steps.classify.outputs.frontend_tests }}
compat_tests: ${{ steps.classify.outputs.compat_tests }}
change_kind: ${{ steps.classify.outputs.change_kind }}
python_tests: ${{ steps.classify.outputs.python_tests }}
stage2c_tests: ${{ steps.classify.outputs.stage2c_tests }}
Expand Down Expand Up @@ -97,8 +99,15 @@ jobs:
summary.write("## CI job exemptions\n\n")
summary.write(f"Change kind: **{plan['change_kind']}**; Python shards: **{plan['python_shards']}**.\n\n")
summary.write(plan['reason'] + ".\n\n")
summary.write(f"Backend: {plan['backend_tests']}; Python: {plan['python_tests']}; Stage2c: {plan['stage2c_tests']}; frontend: {plan['core_tests']}; freshness: {plan['presentation_tests']}.\n\n")
summary.write(plan["coverage_scope"] + ". Unknown/mixed changes and main run full. Label ci:full forces full qualification.\n")
summary.write(
f"Backend: {plan['backend_tests']}; Frontend browser: {plan['frontend_tests']}; "
f"Compat: {plan['compat_tests']}; Python: {plan['python_tests']}; "
f"Stage2c: {plan['stage2c_tests']}; freshness: {plan['presentation_tests']}.\n\n"
)
summary.write(
plan["coverage_scope"]
+ ". Normal PRs run fast static/contract/TS checks; Nightly schedule, main, merge_group, CI-policy/manifest edits and ci:full run full.\n"
)
PY
- uses: actions/upload-artifact@v7
with:
Expand Down Expand Up @@ -147,7 +156,7 @@ jobs:

chat-bundle-browser:
needs: [changes, chat-bundle]
if: needs.changes.outputs.core_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
if: needs.changes.outputs.frontend_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
runs-on: ubuntu-latest
# The packaged scenario catalog outgrew one 15-minute runner, so the
# catalog is partitioned like dashboard-browser and the companion smokes
Expand Down Expand Up @@ -255,6 +264,8 @@ jobs:
python -m pytest -q --no-cov
tests/test_stage2c_dependency_lock.py
tests/architecture/test_top_level_module_budget.py
tests/test_repository_instruction_delivery.py
tests/test_contributing_guide.py

- name: Lint test suite
run: >-
Expand Down Expand Up @@ -422,7 +433,7 @@ jobs:

dashboard-browser:
needs: [changes, chat-bundle]
if: needs.changes.outputs.core_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
if: needs.changes.outputs.frontend_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
Expand Down Expand Up @@ -508,7 +519,7 @@ jobs:

dashboard-acceptance:
needs: [changes, dashboard-browser]
if: needs.changes.outputs.core_tests == 'true' && !cancelled() && needs.dashboard-browser.result == 'success'
if: needs.changes.outputs.frontend_tests == 'true' && !cancelled() && needs.dashboard-browser.result == 'success'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down Expand Up @@ -550,7 +561,7 @@ jobs:

node-minimum-compatibility:
needs: [changes, chat-bundle]
if: needs.changes.outputs.backend_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
if: needs.changes.outputs.compat_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
runs-on: ubuntu-latest
# The full suite runs under this exact Node version in typescript-core.
timeout-minutes: 10
Expand All @@ -577,7 +588,7 @@ jobs:
needs: [changes, chat-bundle]
# Probe the future runtime once per night or on demand, outside the PR/main
# critical path. The supported runtime still runs on every full candidate.
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.changes.outputs.backend_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && needs.changes.outputs.compat_tests == 'true' && !cancelled() && needs.chat-bundle.result == 'success'
continue-on-error: true
runs-on: ubuntu-latest
# This runs the full core conformance suite. Allow forward-runtime/runner
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ on:
- "examples/release-artifacts-smoke.py"
- "examples/personal-workspace-browser/**"
- "examples/personal-workspace-browser-smoke.mjs"
- "loopx/**"
- "package.json"
- "package-lock.json"
- "pyproject.toml"
- "setup.py"
- "MANIFEST.in"
- "apps/presentation/dashboard/**"
- "scripts/chat_bundle.py"
- "scripts/verify_installed_chat.py"
- "README.md"
- "scripts/release_artifacts.py"
- "scripts/runtime_artifact.py"
- "scripts/qualify_runtime_artifact.py"
- "tsconfig.control-plane.json"
release:
types: [published]
schedule:
# Nightly release-artifact and packaged browser verification without publishing assets.
- cron: "41 21 * * *"
workflow_dispatch:
inputs:
tag:
Expand Down Expand Up @@ -692,7 +687,7 @@ jobs:
JS

- name: Attest release packages and checksum manifest
if: github.event_name != 'pull_request'
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
uses: actions/attest@v4
with:
subject-path: |
Expand All @@ -712,7 +707,7 @@ jobs:
upload-release:
if: >-
!cancelled() && github.repository == 'loopx-project/loopx' &&
github.event_name != 'pull_request' &&
(github.event_name == 'release' || github.event_name == 'workflow_dispatch') &&
(needs.build.result == 'success' ||
(inputs.validated_run_id != '' && needs.build.result == 'skipped'))
needs: build
Expand Down Expand Up @@ -774,7 +769,8 @@ jobs:

publish-pypi:
if: >-
!cancelled() && github.event_name != 'pull_request' &&
!cancelled() &&
(github.event_name == 'release' || github.event_name == 'workflow_dispatch') &&
needs.upload-release.result == 'success' &&
vars.PYPI_PUBLISH_ENABLED == 'true'
needs: upload-release
Expand Down
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ and unchanged head, and refresh the review packet (Drafts are excluded from the
review queue). A reviewer must obey the packet's action authority and may not
mark another author's Draft ready without authorization. Keep exact-head review,
required validation, first-screen evidence and merge authorization separate.
Agents/subagents must not wait on or poll remote CI during development, review or
readiness when local gates pass (`wait_for_ci=false`); see
[local-first CI](docs/development/testing-and-quality.md#local-first-premerge-gate-vs-asynchronous-ci--本地优先门禁与异步-ci)
and [two-tier CI](docs/development/ci-impact-selection.md).

### DCO Sign-Off

Expand Down
27 changes: 18 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,24 +178,33 @@ the CI, local/manual, and release-only boundaries.
Only two checks block a merge:

- `Sign-off`, the DCO check;
- `merge-gate`, which aggregates the Python Tests workflow.
- `merge-gate`, which aggregates the Python Tests workflow under a two-tier
lightweight-PR / heavy-nightly plan (agents and subagents do not wait on or
poll remote CI once local deterministic verification and `wait_for_ci=false`
exact-head review pass; see
[testing and quality](docs/development/testing-and-quality.md#local-first-premerge-gate-vs-asynchronous-ci--本地优先门禁与异步-ci)).

`merge-gate` stays green only when these Python Tests jobs succeed or were
correctly skipped for your paths: `checks`, `pytest`,
correctly skipped for your tier/paths: `checks`, `pytest`,
`node-minimum-compatibility`, `stage2c-correctness-e2e`, `windows-powershell`,
and `presentation`. The other workflows are path-filtered, advisory, or do not
run on pull requests. If an advisory workflow fails on a path you did not
touch, mention it in the PR instead of fixing it there.
and `presentation`. Normal backend PRs run fast static, contract, and TypeScript
checks while deferring unrelated browser suites and heavy matrices (6-shard
`pytest`, `node-minimum-compatibility`, `stage2c-correctness-e2e`,
`windows-powershell`) to Nightly `schedule`, `main` pushes, `merge_group`,
`ci:full` PRs, and CI-policy/manifest changes. The other workflows are
narrowly path-filtered, scheduled nightly, advisory, or manual. If an advisory
workflow fails on a path you did not touch, mention it in the PR instead of
fixing it there.

| Workflow file | Runs on a PR | Blocks merge | What it checks |
| --- | --- | --- | --- |
| `python-tests.yml` | every PR | yes (`merge-gate`) | lint, mypy, sharded pytest, TypeScript core and coverage, minimum Node.js, Windows PowerShell, dashboard presentation |
| `python-tests.yml` | every PR (tiered: lightweight PR vs full nightly/`main`/`merge_group`/`ci:full`) | yes (`merge-gate`) | fast lint, mypy, kernel contracts, TypeScript core/coverage on PRs; browser lanes on UI changes; full 6-shard pytest, minimum Node.js, Windows PowerShell, Stage 2C on full runs |
| `dco.yml` | every PR | yes (`Sign-off`) | `Signed-off-by` on contribution commits; verified GitHub-generated two-parent merges are exempt |
| `ci-maintenance.yml` | opened, reopened, edited, updated or closed PR (`pull_request_target`, trusted base code only) | no | inspects potential stale PR comparisons without mutating the head or target; cancels obsolete Python qualification runs after rechecking the PR and source branch |
| `dependency-review.yml` | every PR | no | dependency changes introduced by the PR |
| `postgresql-integration.yml` | control-plane or npm lockfile paths | no | PostgreSQL authority store and service on a temporary instance |
| `package-smoke.yml` | `loopx-core` and extension package paths | no | `loopx-core` and extension packages install, entrypoints, and example schemas |
| `release-artifacts.yml` | `loopx/`, packaging, and lockfile paths | no | release identity and a release build from this source |
| `postgresql-integration.yml` | control-plane or npm lockfile paths (plus nightly schedule) | no | PostgreSQL authority store and service on a temporary instance |
| `package-smoke.yml` | `packages/**`, distribution tests, extension entrypoints, and `pyproject.toml` (plus `main` push and nightly schedule) | no | `loopx-core` and extension packages install, entrypoints, and example schemas |
| `release-artifacts.yml` | release, installer, packaging metadata, and browser recovery paths (plus `release` and read-only nightly schedule) | no | release identity and a release build from this source |
| `runtime-snapshots.yml` | runtime artifact, installer, and updater paths | no | qualified, revision-addressed runtime archives and the main channel pointer |
| `ark-turn.yml` | Turn driver and collaboration paths | no | optional Ark Turn package, stdio MCP, and DSH parity |
| `memt-turn.yml` | optional MemT package, Turn driver, lock, and packaging paths | no | explicit optional dependency installation, complete adapter workflow, stdio MCP, and driver binding |
Expand Down
Loading
Loading