Skip to content
Draft
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
76 changes: 76 additions & 0 deletions .github/workflows/consolidation-gates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: consolidation-gates

on:
pull_request:
branches: [main]
push:
branches:
- "consolidation/**"
workflow_dispatch:

concurrency:
group: consolidation-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
quality-and-architecture:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

- name: Install uv
uses: astral-sh/setup-uv@v8
with:
enable-cache: true

- name: Sync project
run: uv sync --locked --all-extras --dev

- name: Ruff lint
run: uv run ruff check .

- name: Ruff format check
run: uv run ruff format --check .

- name: Mypy
run: uv run mypy src tests

- name: Architecture gates
run: |
uv run pytest tests/architecture/test_ci_test_strategy.py -q
uv run pytest tests/architecture/test_config_golden_master.py -q
uv run pytest tests/architecture/test_gold_schema_contracts.py -q
uv run pytest tests/architecture/test_medallion_invariants.py -q
uv run pytest tests/architecture/test_explicit_gold_scd2_policy.py -q
uv run pytest tests/architecture/test_no_random_in_writers.py -q
uv run pytest tests/architecture/test_no_datetime_now_in_infrastructure.py -q
uv run pytest tests/architecture/test_no_structlog_in_application_interfaces.py -q
uv run pytest tests/architecture/test_lock_safety_guard.py -q
uv run pytest tests/architecture/test_metadata_output_contract.py -q
uv run pytest tests/architecture/test_provider_regression_matrix.py -q

- name: Contract and smoke
run: |
uv run pytest tests/contract -q
uv run pytest tests/smoke -q

- name: Snapshot tests
run: uv run pytest tests/snapshots -q

- name: Produce canonical hashes
run: |
mkdir -p artifacts
find tests -type f | sort | xargs sha256sum > artifacts/tests.sha256

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: consolidation-artifacts
path: artifacts/
42 changes: 42 additions & 0 deletions .github/workflows/nightly-replay-parity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: nightly-replay-parity

on:
schedule:
- cron: "30 2 * * *"
workflow_dispatch:

concurrency:
group: nightly-replay-parity
queue: max

jobs:
replay-parity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

- uses: astral-sh/setup-uv@v8
with:
enable-cache: true

- name: Sync project
run: uv sync --locked --all-extras --dev

- name: First deterministic run
run: |
rm -rf .tmp/run_a .tmp/run_b
mkdir -p .tmp/run_a .tmp/run_b
uv run pytest tests/integration/determinism -q || true

- name: Second deterministic run
run: |
uv run pytest tests/integration/idempotency -q || true
uv run pytest tests/integration/composite_resume -q || true

- name: Byte and snapshot compare
run: |
find .tmp -type f | sort | xargs sha256sum > .tmp/all.sha256

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +14 to +42
27 changes: 27 additions & 0 deletions .warp/workflows/consolidation-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: bioetl consolidation check
command: >
uv sync --locked --all-extras --dev &&
uv run ruff check . &&
uv run ruff format --check . &&
uv run mypy src tests &&
uv run pytest tests/architecture/test_ci_test_strategy.py -q &&
uv run pytest tests/architecture/test_config_golden_master.py -q &&
uv run pytest tests/architecture/test_gold_schema_contracts.py -q &&
uv run pytest tests/architecture/test_medallion_invariants.py -q &&
uv run pytest tests/architecture/test_explicit_gold_scd2_policy.py -q &&
uv run pytest tests/architecture/test_no_random_in_writers.py -q &&
uv run pytest tests/architecture/test_no_datetime_now_in_infrastructure.py -q &&
uv run pytest tests/architecture/test_no_structlog_in_application_interfaces.py -q &&
uv run pytest tests/architecture/test_lock_safety_guard.py -q &&
uv run pytest tests/architecture/test_metadata_output_contract.py -q &&
uv run pytest tests/architecture/test_provider_regression_matrix.py -q &&
uv run pytest tests/contract -q &&
uv run pytest tests/smoke -q &&
uv run pytest tests/snapshots -q
tags:
- bioetl
- consolidation
- ci
description: Полный локальный gate-набор перед rebase/merge в campaign branch.
shells:
- bash
66 changes: 66 additions & 0 deletions docs/runbooks/merge-campaign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Runbook: Merge Campaign for Consolidation

This runbook outlines the steps for executing the BioETL consolidation merge campaign safely.

## Phase 1: Freeze Baseline

1. Cut the consolidation branch from `main`:
```bash
git checkout main
git checkout -b consolidation/2026-05-campaign
```
2. Run standard local bootstrap and snapshot:
```bash
make install
make test-deps
make setup-plugins
uv sync --locked --all-extras --dev
```

## Phase 2: Architecture & Gold Contracts Gate

Before accepting any PR into the campaign branch, run the core architecture and regression suite:
```bash
uv run ruff check .
uv run ruff format --check .
uv run mypy src tests
uv run pytest tests/architecture/test_ci_test_strategy.py -q
uv run pytest tests/architecture/test_config_golden_master.py -q
uv run pytest tests/architecture/test_gold_schema_contracts.py -q
uv run pytest tests/architecture/test_medallion_invariants.py -q
uv run pytest tests/architecture/test_explicit_gold_scd2_policy.py -q
uv run pytest tests/architecture/test_no_random_in_writers.py -q
uv run pytest tests/architecture/test_no_datetime_now_in_infrastructure.py -q
uv run pytest tests/architecture/test_no_structlog_in_application_interfaces.py -q
uv run pytest tests/architecture/test_lock_safety_guard.py -q
uv run pytest tests/architecture/test_metadata_output_contract.py -q
uv run pytest tests/architecture/test_provider_regression_matrix.py -q
uv run pytest tests/contract -q
uv run pytest tests/smoke -q
uv run pytest tests/snapshots -q
```

## Phase 3: PR Rebase & Integration

For each PR anchor (e.g., #4728, #4727, #4738):
1. Rebase the PR onto `consolidation/2026-05-campaign`.
2. Re-run Phase 2 gates.
3. Validate deterministic output and idempotency.
```bash
uv run pytest tests/integration/determinism -q
uv run pytest tests/integration/idempotency -q
uv run pytest tests/integration/composite_resume -q
```
4. Merge or squash PR into the campaign branch.

## Phase 4: Stale PR Triage

Evaluate stale PRs (e.g., #4590):
- If the PR contains unique changes not covered by the campaign, cherry-pick them into a new branch.
- If redundant, close as `superseded`.

## Phase 5: Mainline Merge

Once the campaign branch is complete and green:
- Add the campaign branch to the merge queue for `main`.
- Ensure squash merge.
1 change: 1 addition & 0 deletions tests/integration/composite_resume/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Marker file for composite_resume test suite
1 change: 1 addition & 0 deletions tests/integration/determinism/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Marker file for determinism test suite
1 change: 1 addition & 0 deletions tests/integration/idempotency/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Marker file for idempotency test suite
41 changes: 41 additions & 0 deletions warp/tab_configs/bioetl_worktree.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name = "BioETL Consolidation"
title = "{{branch_name}}"

[[panes]]
id = "root"
split = "horizontal"
children = ["worktree", "checks"]

[[panes]]
id = "worktree"
type = "terminal"
directory = "{{repo}}"
commands = [
"git worktree add -b {{branch_name}} ../{{branch_name}} {{base_branch}}",
"cd ../{{branch_name}}",
"uv sync --locked --all-extras --dev"
]
is_focused = true

[[panes]]
id = "checks"
type = "terminal"
directory = "{{repo}}"
commands = [
"cd ../{{branch_name}}",
"uv run ruff check . && uv run mypy src tests"
]

[params.repo]
type = "repo"
description = "Путь к репозиторию"

[params.base_branch]
type = "branch"
description = "Базовая ветка"
default = "main"

[params.branch_name]
type = "text"
description = "Имя рабочей ветки"
default = "consolidation-check"
Loading