b3-prosaic-harness 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- b3_prosaic_harness-0.7.1/.github/ci/bwrap.apparmor +8 -0
- b3_prosaic_harness-0.7.1/.github/workflows/publish.yml +418 -0
- b3_prosaic_harness-0.7.1/LICENSE +202 -0
- b3_prosaic_harness-0.7.1/MANIFEST.in +8 -0
- b3_prosaic_harness-0.7.1/NOTICE +5 -0
- b3_prosaic_harness-0.7.1/PKG-INFO +389 -0
- b3_prosaic_harness-0.7.1/README.md +367 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/LICENSE +202 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/MANIFEST.in +2 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/NOTICE +5 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/README.md +202 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/pyproject.toml +22 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/__init__.py +6 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/cli.py +81 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/leases.py +64 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/schema.py +135 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/store.py +277 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/src/prosaic_harness_postgres/transport.py +305 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/conftest.py +96 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/support/linux_wheel_smoke.py +75 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/support/local_cluster.py +277 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/support/model_server.py +47 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/support/tcp_proxy.py +91 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/support/workers.py +99 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_cli.py +104 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_durability.py +48 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_engine.py +60 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_examples.py +58 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_leases.py +96 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_local_cluster.py +25 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_native_factory.py +114 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_packaging.py +242 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_recovery.py +149 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_registration.py +390 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_routing.py +101 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_schema.py +96 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_store.py +78 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_transport.py +199 -0
- b3_prosaic_harness-0.7.1/adapters/postgres/tests/test_workers.py +19 -0
- b3_prosaic_harness-0.7.1/docs/accounting.md +44 -0
- b3_prosaic_harness-0.7.1/docs/decisions/2026-10-08-run-store-postgres-rulings.md +163 -0
- b3_prosaic_harness-0.7.1/docs/design.md +52 -0
- b3_prosaic_harness-0.7.1/docs/hardening.md +144 -0
- b3_prosaic_harness-0.7.1/docs/harness-production-verification.md +81 -0
- b3_prosaic_harness-0.7.1/docs/linux-sandbox-and-workflow-guide-verification.md +53 -0
- b3_prosaic_harness-0.7.1/docs/overnight-verification.md +149 -0
- b3_prosaic_harness-0.7.1/docs/package-index.md +165 -0
- b3_prosaic_harness-0.7.1/docs/package-migration.md +40 -0
- b3_prosaic_harness-0.7.1/docs/release-0.6.1.md +29 -0
- b3_prosaic_harness-0.7.1/docs/release-0.6.2.md +35 -0
- b3_prosaic_harness-0.7.1/docs/run-store-verification.md +84 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/plans/2026-10-08-run-store-postgres.md +780 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/plans/2026-10-09-workflow-factory-progress.md +50 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/plans/2026-10-09-workflow-factory.md +146 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/plans/2026-10-10-harness-production.md +425 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/plans/2026-10-10-linux-sandbox-and-workflow-guide.md +28 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/specs/2026-10-08-run-store-postgres-design.md +567 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/specs/2026-10-09-in-memory-workflow-design.md +462 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/specs/2026-10-09-workflow-mvp-design.md +129 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/specs/2026-10-09-workflow-mvp-production-review.md +311 -0
- b3_prosaic_harness-0.7.1/docs/superpowers/specs/2026-10-09-workflow-review-resolutions.md +332 -0
- b3_prosaic_harness-0.7.1/docs/verification.md +303 -0
- b3_prosaic_harness-0.7.1/docs/workflow-factory-admission-implementation.md +85 -0
- b3_prosaic_harness-0.7.1/docs/workflow-factory-construction-implementation.md +80 -0
- b3_prosaic_harness-0.7.1/docs/workflow-factory-database-verification.md +81 -0
- b3_prosaic_harness-0.7.1/docs/workflow-factory-verification.md +82 -0
- b3_prosaic_harness-0.7.1/docs/workflow-factory.md +625 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/author.md +36 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/briefer.md +25 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/catalog-reader.md +20 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/cli-spec-reviewer.md +18 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/decision.md +31 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/evidence-acquisition.md +13 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/evidence-analyst.md +28 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/evidence-reader.md +34 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-acquisition.md +13 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-analyst.md +29 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-fragment.md +29 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-metrics-acquisition.md +13 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-notes-acquisition.md +13 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/incident-reviewer.md +28 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/subagents/reviewer.md +42 -0
- b3_prosaic_harness-0.7.1/examples/.prosaic/tools/analyze-spec.yml +20 -0
- b3_prosaic_harness-0.7.1/examples/README.md +458 -0
- b3_prosaic_harness-0.7.1/examples/catalog-checks.py +19 -0
- b3_prosaic_harness-0.7.1/examples/catalog-tool.yml +27 -0
- b3_prosaic_harness-0.7.1/examples/catalog.json +1 -0
- b3_prosaic_harness-0.7.1/examples/catalog_tools.py +38 -0
- b3_prosaic_harness-0.7.1/examples/checks.py +62 -0
- b3_prosaic_harness-0.7.1/examples/cli-tool-input.json +1 -0
- b3_prosaic_harness-0.7.1/examples/cli-tool-sandboxed.yml +28 -0
- b3_prosaic_harness-0.7.1/examples/cli-tool.yml +27 -0
- b3_prosaic_harness-0.7.1/examples/cli-tools-runtime.yml +23 -0
- b3_prosaic_harness-0.7.1/examples/cli-tools-sandboxed-runtime.yml +18 -0
- b3_prosaic_harness-0.7.1/examples/custom-tools-runtime.yml +20 -0
- b3_prosaic_harness-0.7.1/examples/evaluate_evidence.py +68 -0
- b3_prosaic_harness-0.7.1/examples/evaluate_reviewer.py +54 -0
- b3_prosaic_harness-0.7.1/examples/evidence/incident/metrics.md +46 -0
- b3_prosaic_harness-0.7.1/examples/evidence/incident/notes.md +47 -0
- b3_prosaic_harness-0.7.1/examples/evidence/incident/timeline.md +45 -0
- b3_prosaic_harness-0.7.1/examples/evidence/pilot.md +9 -0
- b3_prosaic_harness-0.7.1/examples/evidence/requirements.md +7 -0
- b3_prosaic_harness-0.7.1/examples/incident-preloaded-review.yml +39 -0
- b3_prosaic_harness-0.7.1/examples/incident-staged-review.yml +70 -0
- b3_prosaic_harness-0.7.1/examples/postgres/README.md +42 -0
- b3_prosaic_harness-0.7.1/examples/postgres/pause.yml +12 -0
- b3_prosaic_harness-0.7.1/examples/postgres/run_workflow.py +50 -0
- b3_prosaic_harness-0.7.1/examples/postgres/runtime.yml +8 -0
- b3_prosaic_harness-0.7.1/examples/postgres/schemas/result.json +1 -0
- b3_prosaic_harness-0.7.1/examples/postgres/subagents/author.md +13 -0
- b3_prosaic_harness-0.7.1/examples/postgres/synthetic.yml +17 -0
- b3_prosaic_harness-0.7.1/examples/preloaded-evidence.yml +16 -0
- b3_prosaic_harness-0.7.1/examples/read-only.yml +20 -0
- b3_prosaic_harness-0.7.1/examples/read-request.json +1 -0
- b3_prosaic_harness-0.7.1/examples/request.json +17 -0
- b3_prosaic_harness-0.7.1/examples/review.yml +72 -0
- b3_prosaic_harness-0.7.1/examples/run_custom_tool.py +47 -0
- b3_prosaic_harness-0.7.1/examples/run_workflow.py +35 -0
- b3_prosaic_harness-0.7.1/examples/runtime.yml +19 -0
- b3_prosaic_harness-0.7.1/examples/schemas/brief.json +18 -0
- b3_prosaic_harness-0.7.1/examples/schemas/catalog-result.json +19 -0
- b3_prosaic_harness-0.7.1/examples/schemas/cli-analysis.json +10 -0
- b3_prosaic_harness-0.7.1/examples/schemas/decision.json +27 -0
- b3_prosaic_harness-0.7.1/examples/schemas/review.json +13 -0
- b3_prosaic_harness-0.7.1/examples/single.yml +16 -0
- b3_prosaic_harness-0.7.1/examples/staged-read.yml +21 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy-preloaded-evidence.yml +16 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy-read-only.yml +20 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy-review.yml +72 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy-single.yml +16 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy-staged-read.yml +21 -0
- b3_prosaic_harness-0.7.1/examples/tokenproxy.yml +33 -0
- b3_prosaic_harness-0.7.1/examples/tool-acquisition.md +122 -0
- b3_prosaic_harness-0.7.1/pyproject.toml +32 -0
- b3_prosaic_harness-0.7.1/scripts/release_artifacts.py +610 -0
- b3_prosaic_harness-0.7.1/scripts/workflow_factory_smoke.py +241 -0
- b3_prosaic_harness-0.7.1/setup.cfg +4 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/PKG-INFO +389 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/SOURCES.txt +194 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/dependency_links.txt +1 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/entry_points.txt +2 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/requires.txt +11 -0
- b3_prosaic_harness-0.7.1/src/b3_prosaic_harness.egg-info/top_level.txt +1 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/__init__.py +22 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/admission_data.py +207 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/bundles.py +138 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/cli.py +88 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/contracts.py +152 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/discovery.py +196 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/engine.py +864 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/errors.py +107 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/factory.py +722 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/file_store.py +158 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/graph_admission.py +193 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/interaction.py +94 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/observations.py +44 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/run_store.py +138 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/schema_validation.py +247 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/store.py +105 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/testing.py +32 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/validation.py +38 -0
- b3_prosaic_harness-0.7.1/src/prosaic_harness/workflow.py +289 -0
- b3_prosaic_harness-0.7.1/tests/test_accounting.py +260 -0
- b3_prosaic_harness-0.7.1/tests/test_admission_data.py +127 -0
- b3_prosaic_harness-0.7.1/tests/test_cli_sandbox.py +131 -0
- b3_prosaic_harness-0.7.1/tests/test_cli_tool_example.py +47 -0
- b3_prosaic_harness-0.7.1/tests/test_cli_tools.py +62 -0
- b3_prosaic_harness-0.7.1/tests/test_custom_tool_example.py +104 -0
- b3_prosaic_harness-0.7.1/tests/test_custom_tools.py +142 -0
- b3_prosaic_harness-0.7.1/tests/test_distribution_metadata.py +61 -0
- b3_prosaic_harness-0.7.1/tests/test_example_checks.py +56 -0
- b3_prosaic_harness-0.7.1/tests/test_hardening.py +179 -0
- b3_prosaic_harness-0.7.1/tests/test_harness.py +117 -0
- b3_prosaic_harness-0.7.1/tests/test_human_responses.py +114 -0
- b3_prosaic_harness-0.7.1/tests/test_incident_examples.py +80 -0
- b3_prosaic_harness-0.7.1/tests/test_legacy_loader_admission.py +135 -0
- b3_prosaic_harness-0.7.1/tests/test_native_composition.py +145 -0
- b3_prosaic_harness-0.7.1/tests/test_native_execution.py +237 -0
- b3_prosaic_harness-0.7.1/tests/test_native_workers.py +269 -0
- b3_prosaic_harness-0.7.1/tests/test_observers.py +260 -0
- b3_prosaic_harness-0.7.1/tests/test_prompt_injection.py +77 -0
- b3_prosaic_harness-0.7.1/tests/test_public_interactions.py +263 -0
- b3_prosaic_harness-0.7.1/tests/test_read_requirements.py +62 -0
- b3_prosaic_harness-0.7.1/tests/test_recovery_contracts.py +78 -0
- b3_prosaic_harness-0.7.1/tests/test_release_artifacts.py +492 -0
- b3_prosaic_harness-0.7.1/tests/test_reviewer_probe.py +25 -0
- b3_prosaic_harness-0.7.1/tests/test_run_store.py +180 -0
- b3_prosaic_harness-0.7.1/tests/test_runtime_boundaries.py +336 -0
- b3_prosaic_harness-0.7.1/tests/test_schema_profile.py +213 -0
- b3_prosaic_harness-0.7.1/tests/test_store_engine.py +148 -0
- b3_prosaic_harness-0.7.1/tests/test_tool_acquisition_example.py +60 -0
- b3_prosaic_harness-0.7.1/tests/test_transport.py +308 -0
- b3_prosaic_harness-0.7.1/tests/test_validation.py +115 -0
- b3_prosaic_harness-0.7.1/tests/test_workflow_bundles.py +264 -0
- b3_prosaic_harness-0.7.1/tests/test_workflow_discovery.py +272 -0
- b3_prosaic_harness-0.7.1/tests/test_workflow_factory.py +569 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Disposable Ubuntu CI runner setup only. Allow this specific namespace broker
|
|
2
|
+
# to create user namespaces; retain host-wide AppArmor restrictions.
|
|
3
|
+
abi <abi/4.0>,
|
|
4
|
+
include <tunables/global>
|
|
5
|
+
|
|
6
|
+
profile prosaic-ci-bwrap /usr/bin/bwrap flags=(unconfined) {
|
|
7
|
+
userns,
|
|
8
|
+
}
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
name: Publish SDK
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*']
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
candidate_run_id:
|
|
9
|
+
description: Successful build run at this exact commit; required for promotion
|
|
10
|
+
type: string
|
|
11
|
+
default: ''
|
|
12
|
+
core_run_id:
|
|
13
|
+
description: Successful exact-source Core qualified-release run
|
|
14
|
+
type: string
|
|
15
|
+
default: ''
|
|
16
|
+
core_commit:
|
|
17
|
+
description: Exact Core source commit
|
|
18
|
+
type: string
|
|
19
|
+
default: ''
|
|
20
|
+
runtime_run_id:
|
|
21
|
+
description: Successful final Runtime qualified-release run (required)
|
|
22
|
+
type: string
|
|
23
|
+
default: ''
|
|
24
|
+
runtime_commit:
|
|
25
|
+
description: Exact final Runtime source commit (required)
|
|
26
|
+
type: string
|
|
27
|
+
default: ''
|
|
28
|
+
publish:
|
|
29
|
+
description: Publish already qualified bytes (run on the version tag)
|
|
30
|
+
type: boolean
|
|
31
|
+
default: false
|
|
32
|
+
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
|
|
36
|
+
concurrency:
|
|
37
|
+
group: package-${{ github.ref }}
|
|
38
|
+
cancel-in-progress: false
|
|
39
|
+
|
|
40
|
+
jobs:
|
|
41
|
+
artifacts:
|
|
42
|
+
runs-on: ubuntu-24.04
|
|
43
|
+
timeout-minutes: 10
|
|
44
|
+
permissions:
|
|
45
|
+
contents: read
|
|
46
|
+
actions: read
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
49
|
+
with:
|
|
50
|
+
fetch-depth: 0
|
|
51
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
52
|
+
with:
|
|
53
|
+
python-version: '3.12'
|
|
54
|
+
- run: python -m pip install 'build>=1' 'setuptools>=77' wheel packaging
|
|
55
|
+
- name: Build or promote immutable candidate bytes
|
|
56
|
+
env:
|
|
57
|
+
GH_TOKEN: ${{ secrets.ECOSYSTEM_ARTIFACT_TOKEN || github.token }}
|
|
58
|
+
SOURCE_COMMIT: ${{ github.sha }}
|
|
59
|
+
SOURCE_REF: ${{ github.ref }}
|
|
60
|
+
SOURCE_TAG: ${{ github.ref_name }}
|
|
61
|
+
CANDIDATE_RUN: ${{ inputs.candidate_run_id }}
|
|
62
|
+
PUBLISH: ${{ inputs.publish }}
|
|
63
|
+
run: |
|
|
64
|
+
python - <<'PY'
|
|
65
|
+
import importlib.util, json, os, pathlib, subprocess, tempfile, tomllib
|
|
66
|
+
project = tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']
|
|
67
|
+
publishing = os.environ['PUBLISH'] == 'true'
|
|
68
|
+
candidate = os.environ['CANDIDATE_RUN']
|
|
69
|
+
if publishing:
|
|
70
|
+
assert os.environ['SOURCE_REF'].startswith('refs/tags/')
|
|
71
|
+
assert os.environ['SOURCE_TAG'] == 'v' + project['version']
|
|
72
|
+
assert candidate, 'Promotion requires a successful exact-source candidate run'
|
|
73
|
+
if candidate:
|
|
74
|
+
assert candidate.isdigit()
|
|
75
|
+
run = json.loads(subprocess.check_output([
|
|
76
|
+
'gh', 'api', 'repos/${{ github.repository }}/actions/runs/' + candidate]))
|
|
77
|
+
assert run['head_sha'] == os.environ['SOURCE_COMMIT']
|
|
78
|
+
assert run['conclusion'] == 'success' and run['name'] == 'Publish SDK'
|
|
79
|
+
assert run['path'] == '.github/workflows/publish.yml'
|
|
80
|
+
assert run['event'] in ('push', 'workflow_dispatch')
|
|
81
|
+
subprocess.run(['gh', 'run', 'download', candidate, '--name', 'qualified-release',
|
|
82
|
+
'--dir', 'release/artifacts'], check=True)
|
|
83
|
+
subprocess.run(['python', 'scripts/release_artifacts.py', 'verify', '--directory',
|
|
84
|
+
'release/artifacts', '--commit', os.environ['SOURCE_COMMIT']], check=True)
|
|
85
|
+
spec = importlib.util.spec_from_file_location('release', 'scripts/release_artifacts.py')
|
|
86
|
+
release = importlib.util.module_from_spec(spec); spec.loader.exec_module(release)
|
|
87
|
+
committed = release.tar_contents(subprocess.check_output([
|
|
88
|
+
'git', 'archive', '--format=tar', os.environ['SOURCE_COMMIT']]))
|
|
89
|
+
with tempfile.TemporaryDirectory() as temporary:
|
|
90
|
+
source = pathlib.Path(temporary)
|
|
91
|
+
for name, content in committed.items():
|
|
92
|
+
path = source.joinpath(*release.safe_path(name).parts)
|
|
93
|
+
path.parent.mkdir(parents=True, exist_ok=True); path.write_bytes(content)
|
|
94
|
+
release.audit_artifacts(source, pathlib.Path('release/artifacts'),
|
|
95
|
+
{project['name']: project['version'], 'b3-prosaic-harness-postgres': '0.2.1'},
|
|
96
|
+
('.', 'adapters/postgres'))
|
|
97
|
+
else:
|
|
98
|
+
subprocess.run(['python', 'scripts/release_artifacts.py', 'build', '--ref',
|
|
99
|
+
os.environ['SOURCE_COMMIT'], '--output', 'release', '--expect',
|
|
100
|
+
project['name'] + '=' + project['version'], '--expect',
|
|
101
|
+
'b3-prosaic-harness-postgres=0.2.1', '--project', '.',
|
|
102
|
+
'--project', 'adapters/postgres'], check=True)
|
|
103
|
+
PY
|
|
104
|
+
- name: Bind verified upstream candidates to the selected Harness bytes
|
|
105
|
+
env:
|
|
106
|
+
GH_TOKEN: ${{ secrets.ECOSYSTEM_ARTIFACT_TOKEN || github.token }}
|
|
107
|
+
CORE_RUN: ${{ inputs.core_run_id || vars.QUALIFIED_CORE_RUN_ID }}
|
|
108
|
+
CORE_COMMIT: ${{ inputs.core_commit || vars.QUALIFIED_CORE_COMMIT }}
|
|
109
|
+
RUNTIME_RUN: ${{ inputs.runtime_run_id || vars.QUALIFIED_RUNTIME_RUN_ID }}
|
|
110
|
+
RUNTIME_COMMIT: ${{ inputs.runtime_commit || vars.QUALIFIED_RUNTIME_COMMIT }}
|
|
111
|
+
run: |
|
|
112
|
+
python scripts/release_artifacts.py upstream --directory release/artifacts --wheelhouse release/upstream-wheels --core-run "$CORE_RUN" --core-commit "$CORE_COMMIT" --runtime-run "$RUNTIME_RUN" --runtime-commit "$RUNTIME_COMMIT"
|
|
113
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
114
|
+
with:
|
|
115
|
+
name: release-bytes
|
|
116
|
+
path: release/artifacts/
|
|
117
|
+
if-no-files-found: error
|
|
118
|
+
retention-days: 90
|
|
119
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
120
|
+
with:
|
|
121
|
+
name: curated-upstream
|
|
122
|
+
path: release/upstream-wheels/
|
|
123
|
+
if-no-files-found: error
|
|
124
|
+
retention-days: 90
|
|
125
|
+
|
|
126
|
+
linux:
|
|
127
|
+
needs: artifacts
|
|
128
|
+
runs-on: ${{ matrix.os }}
|
|
129
|
+
timeout-minutes: 20
|
|
130
|
+
strategy:
|
|
131
|
+
fail-fast: false
|
|
132
|
+
matrix:
|
|
133
|
+
os: [ubuntu-24.04, ubuntu-24.04-arm]
|
|
134
|
+
python: ['3.11', '3.12', '3.13']
|
|
135
|
+
steps:
|
|
136
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
137
|
+
with:
|
|
138
|
+
fetch-depth: 0
|
|
139
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
|
140
|
+
with:
|
|
141
|
+
python-version: ${{ matrix.python }}
|
|
142
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
143
|
+
with:
|
|
144
|
+
name: release-bytes
|
|
145
|
+
path: release/artifacts
|
|
146
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
147
|
+
with:
|
|
148
|
+
name: curated-upstream
|
|
149
|
+
path: release/upstream-wheels
|
|
150
|
+
- name: Verify the curated dependency payload
|
|
151
|
+
run: |
|
|
152
|
+
python -m pip install packaging
|
|
153
|
+
python - <<'PY'
|
|
154
|
+
import importlib.util
|
|
155
|
+
from pathlib import Path
|
|
156
|
+
spec = importlib.util.spec_from_file_location('release', 'scripts/release_artifacts.py')
|
|
157
|
+
release = importlib.util.module_from_spec(spec); spec.loader.exec_module(release)
|
|
158
|
+
release.verify_upstream(Path('release/artifacts'), Path('release/upstream-wheels'))
|
|
159
|
+
PY
|
|
160
|
+
- name: Install Linux CLI sandbox backend
|
|
161
|
+
run: |
|
|
162
|
+
sudo apt-get update
|
|
163
|
+
sudo apt-get install -y bubblewrap meson ninja-build pkg-config libcap-dev gcc
|
|
164
|
+
git clone https://github.com/containers/bubblewrap.git "$RUNNER_TEMP/bubblewrap"
|
|
165
|
+
git -C "$RUNNER_TEMP/bubblewrap" checkout --detach 2a76602a8c71f36c1527cf9fc3417d9149822e0c
|
|
166
|
+
meson setup "$RUNNER_TEMP/bubblewrap/_build" "$RUNNER_TEMP/bubblewrap" --prefix=/usr -Dman=disabled -Dtests=false
|
|
167
|
+
meson compile -C "$RUNNER_TEMP/bubblewrap/_build"
|
|
168
|
+
sudo meson install -C "$RUNNER_TEMP/bubblewrap/_build"
|
|
169
|
+
# Permit only the trusted namespace broker on this disposable runner.
|
|
170
|
+
# Retain host-wide AppArmor restrictions and kernel sandbox controls.
|
|
171
|
+
sudo install -m 0644 .github/ci/bwrap.apparmor /etc/apparmor.d/prosaic-ci-bwrap
|
|
172
|
+
sudo apparmor_parser -r /etc/apparmor.d/prosaic-ci-bwrap
|
|
173
|
+
- name: Require an operational Linux sandbox
|
|
174
|
+
run: |
|
|
175
|
+
python -m pip install release/upstream-wheels/b3_prosaic-0.4.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime-0.8.1-py3-none-any.whl
|
|
176
|
+
python - <<'PY'
|
|
177
|
+
import platform, subprocess, sys, tempfile
|
|
178
|
+
from pathlib import Path
|
|
179
|
+
from types import SimpleNamespace
|
|
180
|
+
from prosaic_runtime import CliSandboxConfig
|
|
181
|
+
from prosaic_runtime.sandbox import require_backend, _linux_command
|
|
182
|
+
print('Sandbox platform:', sys.platform, platform.machine())
|
|
183
|
+
try:
|
|
184
|
+
require_backend(CliSandboxConfig(mode='required'))
|
|
185
|
+
except Exception:
|
|
186
|
+
subprocess.run(['/usr/bin/bwrap', '--version'], check=False)
|
|
187
|
+
with tempfile.TemporaryDirectory() as temporary:
|
|
188
|
+
root = Path(temporary).resolve()
|
|
189
|
+
args = _linux_command([sys.executable, '-c', 'pass'], '/',
|
|
190
|
+
SimpleNamespace(read_roots=(), forbidden_roots=()),
|
|
191
|
+
SimpleNamespace(runtime_roots=()), root, root)
|
|
192
|
+
result = subprocess.run(args, capture_output=True, text=True,
|
|
193
|
+
env={'PATH': '/usr/bin:/bin', 'PYTHONDONTWRITEBYTECODE': '1', 'PYTHONNOUSERSITE': '1'})
|
|
194
|
+
print('Sandbox probe exit:', result.returncode)
|
|
195
|
+
print(result.stderr)
|
|
196
|
+
raise
|
|
197
|
+
PY
|
|
198
|
+
- name: Qualify source and the transported wheel
|
|
199
|
+
env:
|
|
200
|
+
SOURCE_COMMIT: ${{ github.sha }}
|
|
201
|
+
LANE: linux-${{ matrix.os }}-${{ matrix.python }}
|
|
202
|
+
PIP_FIND_LINKS: ${{ github.workspace }}/release/upstream-wheels
|
|
203
|
+
run: |
|
|
204
|
+
python -m venv .venv
|
|
205
|
+
.venv/bin/python -m pip install release/upstream-wheels/b3_prosaic-0.4.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime-0.8.1-py3-none-any.whl -e '.[test]'
|
|
206
|
+
.venv/bin/python scripts/release_artifacts.py qualify --directory release/artifacts --commit "$SOURCE_COMMIT" --label "${LANE}-source" --junit "$RUNNER_TEMP/harness-source.xml" -- .venv/bin/python -m pytest -q --junitxml="$RUNNER_TEMP/harness-source.xml"
|
|
207
|
+
python -m venv .wheel-test
|
|
208
|
+
.wheel-test/bin/python -m pip install release/upstream-wheels/b3_prosaic-0.4.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime-0.8.1-py3-none-any.whl release/artifacts/b3_prosaic_harness-0.7.1-py3-none-any.whl
|
|
209
|
+
.venv/bin/python scripts/release_artifacts.py qualify --directory release/artifacts --commit "$SOURCE_COMMIT" --label "${LANE}-wheel" -- .wheel-test/bin/python -I scripts/workflow_factory_smoke.py
|
|
210
|
+
- name: Reject skipped or incomplete Harness sandbox coverage
|
|
211
|
+
id: sandbox_report
|
|
212
|
+
run: |
|
|
213
|
+
python - <<'PY'
|
|
214
|
+
import os
|
|
215
|
+
from pathlib import Path
|
|
216
|
+
import xml.etree.ElementTree as ET
|
|
217
|
+
expected = {
|
|
218
|
+
'test_documented_sandboxed_blueprint_runs_tool_then_requires_human',
|
|
219
|
+
'test_default_off_sandbox_preserves_legacy_runtime_identity',
|
|
220
|
+
'test_changing_sandbox_policy_invalidates_pending_approval',
|
|
221
|
+
'test_harness_cli_sandbox_denies_outside_secret_and_preserves_pause',
|
|
222
|
+
'test_injected_adapter_cannot_downgrade_required_sandbox[off]',
|
|
223
|
+
'test_injected_adapter_cannot_downgrade_required_sandbox[missing_capability]',
|
|
224
|
+
'test_injected_adapter_cannot_downgrade_required_sandbox[after_construction]',
|
|
225
|
+
}
|
|
226
|
+
report = ET.parse(Path(os.environ['RUNNER_TEMP']) / 'harness-source.xml').getroot()
|
|
227
|
+
suites = list(report.iter('testsuite'))
|
|
228
|
+
cases = list(report.iter('testcase'))
|
|
229
|
+
if (not suites or {case.get('name') for case in cases if case.get('name') in expected} != expected
|
|
230
|
+
or len([case for case in cases if case.get('name') in expected]) != 7
|
|
231
|
+
or any(int(suite.get(key, '0')) for suite in suites for key in ('skipped', 'failures', 'errors'))
|
|
232
|
+
or any(case.find(tag) is not None for case in cases if case.get('name') in expected for tag in ('skipped', 'failure', 'error'))):
|
|
233
|
+
raise SystemExit('All seven Harness sandbox cases must pass with no skips, failures or errors')
|
|
234
|
+
print('All seven required Harness sandbox cases passed without skips')
|
|
235
|
+
PY
|
|
236
|
+
- name: Verify minimum supported dependencies on Python 3.11
|
|
237
|
+
if: matrix.python == '3.11'
|
|
238
|
+
env:
|
|
239
|
+
PIP_FIND_LINKS: ${{ github.workspace }}/release/upstream-wheels
|
|
240
|
+
run: |
|
|
241
|
+
python -m venv .floor-test
|
|
242
|
+
.floor-test/bin/python -m pip install 'PyYAML==6.0' 'pyuca==1.2' 'markdown-it-py==3.0.0' 'jsonschema==4.23.0' 'referencing==0.28.4' 'psycopg[binary]==3.2.3' 'psycopg-pool==3.2.0' release/upstream-wheels/b3_prosaic-0.4.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime-0.8.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime_postgres-0.2.1-py3-none-any.whl release/artifacts/b3_prosaic_harness-0.7.1-py3-none-any.whl release/artifacts/b3_prosaic_harness_postgres-0.2.1-py3-none-any.whl
|
|
243
|
+
python scripts/release_artifacts.py qualify --directory release/artifacts --commit "$GITHUB_SHA" --label floor-${{ matrix.os }} -- .floor-test/bin/python -I -c "from prosaic_harness_postgres import PostgresRunStore; store = PostgresRunStore('postgresql://invalid.invalid/unused', namespace='floor'); store.close(); import runpy; runpy.run_path('scripts/workflow_factory_smoke.py', run_name='__main__')"
|
|
244
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
245
|
+
with:
|
|
246
|
+
name: qualified-linux-${{ matrix.os }}-${{ matrix.python }}
|
|
247
|
+
path: release/artifacts/qualification-*.json
|
|
248
|
+
if-no-files-found: error
|
|
249
|
+
retention-days: 90
|
|
250
|
+
|
|
251
|
+
postgres:
|
|
252
|
+
needs: artifacts
|
|
253
|
+
runs-on: ${{ matrix.os }}
|
|
254
|
+
timeout-minutes: 25
|
|
255
|
+
strategy:
|
|
256
|
+
fail-fast: false
|
|
257
|
+
matrix:
|
|
258
|
+
os: [ubuntu-24.04, ubuntu-24.04-arm]
|
|
259
|
+
postgres: ['16', '18']
|
|
260
|
+
steps:
|
|
261
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
262
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
|
263
|
+
with:
|
|
264
|
+
python-version: '3.12'
|
|
265
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
266
|
+
with:
|
|
267
|
+
name: release-bytes
|
|
268
|
+
path: release/artifacts
|
|
269
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
270
|
+
with:
|
|
271
|
+
name: curated-upstream
|
|
272
|
+
path: release/upstream-wheels
|
|
273
|
+
- name: Install transported exact bytes and verify dependency evidence
|
|
274
|
+
env:
|
|
275
|
+
PIP_FIND_LINKS: ${{ github.workspace }}/release/upstream-wheels
|
|
276
|
+
run: |
|
|
277
|
+
python -m pip install packaging pytest PyYAML
|
|
278
|
+
python - <<'PY'
|
|
279
|
+
import importlib.util
|
|
280
|
+
from pathlib import Path
|
|
281
|
+
spec = importlib.util.spec_from_file_location('release', 'scripts/release_artifacts.py')
|
|
282
|
+
release = importlib.util.module_from_spec(spec); spec.loader.exec_module(release)
|
|
283
|
+
release.verify_receipt(Path('release/artifacts'), '${{ github.sha }}')
|
|
284
|
+
release.verify_upstream(Path('release/artifacts'), Path('release/upstream-wheels'))
|
|
285
|
+
PY
|
|
286
|
+
mkdir -p dist adapters/postgres/dist
|
|
287
|
+
cp release/artifacts/b3_prosaic_harness-0.7.1-py3-none-any.whl dist/
|
|
288
|
+
cp release/artifacts/b3_prosaic_harness_postgres-0.2.1-py3-none-any.whl adapters/postgres/dist/
|
|
289
|
+
python -m pip install release/upstream-wheels/b3_prosaic-0.4.1-py3-none-any.whl release/upstream-wheels/b3_prosaic_runtime-0.8.1-py3-none-any.whl dist/b3_prosaic_harness-0.7.1-py3-none-any.whl adapters/postgres/dist/b3_prosaic_harness_postgres-0.2.1-py3-none-any.whl
|
|
290
|
+
prosaic --version
|
|
291
|
+
- name: Required real database source, installed wheel, crash and standby gates
|
|
292
|
+
env:
|
|
293
|
+
POSTGRES_VERSION: ${{ matrix.postgres }}
|
|
294
|
+
PIP_FIND_LINKS: ${{ github.workspace }}/release/upstream-wheels
|
|
295
|
+
HARNESS_TEST_WHEELHOUSE: ${{ github.workspace }}/release/upstream-wheels
|
|
296
|
+
HARNESS_TEST_RELEASE_DIRECTORY: ${{ github.workspace }}/release/artifacts
|
|
297
|
+
HARNESS_TEST_JUNIT_XML: ${{ runner.temp }}/harness-postgres.xml
|
|
298
|
+
run: |
|
|
299
|
+
fixture_manifest="$(python adapters/postgres/tests/support/local_cluster.py start --engine docker --version "$POSTGRES_VERSION")"
|
|
300
|
+
trap 'python adapters/postgres/tests/support/local_cluster.py stop --manifest "$fixture_manifest"' EXIT
|
|
301
|
+
python scripts/release_artifacts.py qualify --directory release/artifacts --commit "$GITHUB_SHA" --label postgres-${{ matrix.os }}-${{ matrix.postgres }} --junit "$HARNESS_TEST_JUNIT_XML" -- python adapters/postgres/tests/support/local_cluster.py test --manifest "$fixture_manifest"
|
|
302
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
303
|
+
with:
|
|
304
|
+
name: qualified-postgres-${{ matrix.os }}-${{ matrix.postgres }}
|
|
305
|
+
path: release/artifacts/qualification-*.json
|
|
306
|
+
if-no-files-found: error
|
|
307
|
+
retention-days: 90
|
|
308
|
+
|
|
309
|
+
gate:
|
|
310
|
+
needs: [linux, postgres]
|
|
311
|
+
runs-on: ubuntu-24.04
|
|
312
|
+
timeout-minutes: 5
|
|
313
|
+
steps:
|
|
314
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
315
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
|
316
|
+
with:
|
|
317
|
+
python-version: '3.12'
|
|
318
|
+
- run: python -m pip install packaging
|
|
319
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
320
|
+
with:
|
|
321
|
+
name: release-bytes
|
|
322
|
+
path: release/artifacts
|
|
323
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
324
|
+
with:
|
|
325
|
+
pattern: qualified-*
|
|
326
|
+
merge-multiple: true
|
|
327
|
+
path: release/artifacts
|
|
328
|
+
- name: Require every exact-byte qualification record
|
|
329
|
+
run: |
|
|
330
|
+
python - <<'PY'
|
|
331
|
+
import importlib.util, json, os
|
|
332
|
+
spec = importlib.util.spec_from_file_location('release', 'scripts/release_artifacts.py')
|
|
333
|
+
release = importlib.util.module_from_spec(spec); spec.loader.exec_module(release)
|
|
334
|
+
from pathlib import Path
|
|
335
|
+
labels = [f'linux-{os_name}-{version}-{kind}'
|
|
336
|
+
for os_name in ('ubuntu-24.04', 'ubuntu-24.04-arm')
|
|
337
|
+
for version in ('3.11', '3.12', '3.13') for kind in ('source', 'wheel')]
|
|
338
|
+
labels += [f'postgres-{os_name}-{version}' for os_name in ('ubuntu-24.04', 'ubuntu-24.04-arm') for version in ('16', '18')]
|
|
339
|
+
labels += [f'floor-{os_name}' for os_name in ('ubuntu-24.04', 'ubuntu-24.04-arm')]
|
|
340
|
+
assert Path('release/artifacts/upstream-receipt.json').is_file()
|
|
341
|
+
release.require_qualification(Path('release/artifacts'), os.environ['GITHUB_SHA'], labels)
|
|
342
|
+
for label in labels:
|
|
343
|
+
record = json.loads(Path('release/artifacts', 'qualification-' + label + '.json').read_text())
|
|
344
|
+
expected_machine = 'aarch64' if 'ubuntu-24.04-arm' in label else 'x86_64'
|
|
345
|
+
assert record['platform'] == 'linux' and record['machine'] == expected_machine
|
|
346
|
+
if label.endswith('-source') or label.startswith('postgres-'):
|
|
347
|
+
counts = record['result_counts']
|
|
348
|
+
assert counts['tests'] > 0 and all(counts[key] == 0 for key in ('failures', 'errors', 'skipped'))
|
|
349
|
+
PY
|
|
350
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
351
|
+
with:
|
|
352
|
+
name: qualified-release
|
|
353
|
+
path: release/artifacts/
|
|
354
|
+
if-no-files-found: error
|
|
355
|
+
retention-days: 90
|
|
356
|
+
|
|
357
|
+
pypi:
|
|
358
|
+
if: github.event_name == 'workflow_dispatch' && inputs.publish && startsWith(github.ref, 'refs/tags/')
|
|
359
|
+
needs: gate
|
|
360
|
+
runs-on: ubuntu-24.04
|
|
361
|
+
timeout-minutes: 10
|
|
362
|
+
environment: pypi
|
|
363
|
+
permissions:
|
|
364
|
+
contents: read
|
|
365
|
+
id-token: write
|
|
366
|
+
steps:
|
|
367
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
368
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
|
369
|
+
with:
|
|
370
|
+
python-version: '3.12'
|
|
371
|
+
- run: python -m pip install packaging
|
|
372
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
373
|
+
with:
|
|
374
|
+
name: qualified-release
|
|
375
|
+
path: release/artifacts
|
|
376
|
+
- name: Refuse conflicting existing index bytes
|
|
377
|
+
run: python scripts/release_artifacts.py index-check --directory release/artifacts --commit ${{ github.sha }} --allow-missing
|
|
378
|
+
- name: Prepare only distribution files for upload
|
|
379
|
+
run: |
|
|
380
|
+
mkdir upload
|
|
381
|
+
cp release/artifacts/*.whl release/artifacts/*.tar.gz upload/
|
|
382
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
383
|
+
with:
|
|
384
|
+
packages-dir: upload/
|
|
385
|
+
skip-existing: true # Safe only with the mandatory pre/post digest checks.
|
|
386
|
+
- name: Verify actual downloaded public bytes
|
|
387
|
+
run: python scripts/release_artifacts.py index-check --directory release/artifacts --commit ${{ github.sha }}
|
|
388
|
+
|
|
389
|
+
github-release:
|
|
390
|
+
needs: [gate, pypi]
|
|
391
|
+
runs-on: ubuntu-24.04
|
|
392
|
+
timeout-minutes: 10
|
|
393
|
+
permissions:
|
|
394
|
+
contents: write
|
|
395
|
+
steps:
|
|
396
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
397
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
|
|
398
|
+
with:
|
|
399
|
+
python-version: '3.12'
|
|
400
|
+
- run: python -m pip install packaging
|
|
401
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
|
|
402
|
+
with:
|
|
403
|
+
name: qualified-release
|
|
404
|
+
path: release/artifacts
|
|
405
|
+
- name: Publish the same bytes and evidence without replacing assets
|
|
406
|
+
env:
|
|
407
|
+
GH_TOKEN: ${{ github.token }}
|
|
408
|
+
RELEASE_TAG: ${{ github.ref_name }}
|
|
409
|
+
run: |
|
|
410
|
+
python scripts/release_artifacts.py verify --directory release/artifacts --commit "$GITHUB_SHA"
|
|
411
|
+
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
|
|
412
|
+
gh release download "$RELEASE_TAG" --dir existing
|
|
413
|
+
python scripts/release_artifacts.py verify --directory existing --commit "$GITHUB_SHA"
|
|
414
|
+
cmp existing/release-receipt.json release/artifacts/release-receipt.json
|
|
415
|
+
cmp existing/upstream-receipt.json release/artifacts/upstream-receipt.json
|
|
416
|
+
else
|
|
417
|
+
gh release create "$RELEASE_TAG" --verify-tag --title "$RELEASE_TAG" --notes "Qualified package-index release. Exact byte hashes and platform receipts are attached." release/artifacts/*
|
|
418
|
+
fi
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
recursive-include examples *.md *.yml *.json *.py
|
|
2
|
+
recursive-include docs *.md
|
|
3
|
+
include scripts/workflow_factory_smoke.py
|
|
4
|
+
include scripts/release_artifacts.py
|
|
5
|
+
include .github/workflows/publish.yml .github/ci/bwrap.apparmor
|
|
6
|
+
include LICENSE NOTICE
|
|
7
|
+
recursive-include adapters/postgres *.toml *.md *.py LICENSE NOTICE MANIFEST.in
|
|
8
|
+
global-exclude *.local.yml *.local.yaml
|