From b1f8af83179510eda1acb28cd020e97f989492f0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 04:21:12 +0000 Subject: [PATCH 1/3] feat: define build artifacts, release workflow, and seed metadata Co-authored-by: 4444J99 <24796448+4444J99@users.noreply.github.com> --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ Makefile | 6 ++++- README.md | 8 +++++++ seed.yaml | 14 ++++++++++-- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..169bf5d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release Build and Publish Artifacts + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + release: + name: Build and Publish Release Artifacts + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package distribution artifacts + run: python -m build + + - name: Create Release and Upload Artifacts + uses: softprops/action-gh-release@v2 + with: + files: | + dist/*.whl + dist/*.tar.gz + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index c8c582d..0c16799 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for Architecture Governance Toolkit -.PHONY: help build-analysis-image run-analysis adr-new artifacts-dir +.PHONY: help build build-analysis-image run-analysis adr-new artifacts-dir sbom hotspots ownership drift risk full-analysis clean ANALYSIS_IMAGE=analysis:local ARTIFACTS_DIR=artifacts @@ -8,6 +8,7 @@ ARTIFACTS_DIR=artifacts help: @echo "Architecture Governance Toolkit - Available Commands:" @echo "" + @echo " make build - Build Python wheel and sdist package artifacts" @echo " make artifacts-dir - Create artifacts directory" @echo " make build-analysis-image - Build Docker analysis image" @echo " make run-analysis - Run analysis in Docker" @@ -15,6 +16,9 @@ help: @echo " make clean - Remove artifacts directory" @echo "" +build: + python3 -m build + artifacts-dir: mkdir -p $(ARTIFACTS_DIR)/sbom $(ARTIFACTS_DIR)/timeseries diff --git a/README.md b/README.md index f60c16b..02cf596 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,14 @@ Optional for extended features: - Trivy and/or Semgrep for security scanning - Syft for SBOM generation +### One-Command Validation + +To validate the repository, execute the unit test suite and run the full governance analysis pipeline in a single command: + +```bash +python3 -m pytest && make full-analysis +``` + ### Option 1: Run Directly ```bash diff --git a/seed.yaml b/seed.yaml index e7ff98b..049ac8d 100644 --- a/seed.yaml +++ b/seed.yaml @@ -12,20 +12,30 @@ metadata: implementation_status: ACTIVE tier: standard promotion_status: CANDIDATE - last_validated: "2026-02-12" + last_validated: "2026-04-14" generated: "2026-02-17" sprint: "SENSORIA" language: python + validation_command: "python3 -m pytest && make full-analysis" + publication_target: "github_release" + release_url: "https://github.com/organvm-iv-taxis/reverse-engine-recursive-run/releases" + build_artifact: "dist/reverse_engine_recursive_run-0.1.0-py3-none-any.whl" agents: - name: ci trigger: on_push - workflow: .github/workflows/ci-python.yml + workflow: .github/workflows/ci.yml description: "Continuous integration pipeline" + - name: release + trigger: on_tag + workflow: .github/workflows/release.yml + description: "Release build and artifact publication pipeline" produces: - type: theory description: "Epistemological frameworks, recursive engines, ontological systems" + - type: release_artifact + description: "Python wheel and sdist package distributions attached to GitHub releases" consumes: [] From f18bf7db40ac68c836b58f6debf006877b1e6093 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 05:08:56 +0000 Subject: [PATCH 2/3] feat: define build artifacts, release workflow, and seed metadata Co-authored-by: 4444J99 <24796448+4444J99@users.noreply.github.com> From 38869682e45ffb38941dada798b27f85ae8e8d6b Mon Sep 17 00:00:00 2001 From: 4444jPPP Date: Sat, 14 Nov 2026 22:29:24 -0500 Subject: [PATCH 3/3] fix(packaging): scope PR to bounded source/CI preparation Remove release workflow and publication metadata, fix empty-wheel setuptools discovery, verify built artifacts in the existing CI path (contents inspection, clean-install smoke, dist as CI artifact only). Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++ .github/workflows/release.yml | 41 ----------------------------------- README.md | 12 ++++++++-- pyproject.toml | 13 ++++++++--- seed.yaml | 14 ++---------- 5 files changed, 53 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b26bd5..fa77f81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,3 +35,34 @@ jobs: - name: Test with pytest run: pytest tests/ -v + + - name: Build wheel and sdist + run: | + pip install build + python -m build + + - name: Verify wheel contents + run: | + python - <<'PY' + import glob, zipfile + wheel = glob.glob("dist/*.whl")[0] + names = zipfile.ZipFile(wheel).namelist() + expected = ["hotspot_merge", "ownership_diff", "parse_semgrep", "parse_trivy", "risk_update", "scan_drift"] + missing = [m for m in expected if f"{m}.py" not in names] + assert not missing, f"wheel missing modules: {missing}; contents: {names}" + PY + + - name: Smoke test built wheel in clean environment + run: | + python -m venv "$RUNNER_TEMP/smoke" + "$RUNNER_TEMP/smoke/bin/pip" install dist/*.whl + cd "$RUNNER_TEMP" + "$RUNNER_TEMP/smoke/bin/python" -c "import hotspot_merge, ownership_diff, parse_semgrep, parse_trivy, risk_update, scan_drift" + "$RUNNER_TEMP/smoke/bin/python" -m hotspot_merge --help + + - name: Upload dist artifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: dist + path: dist/ + if-no-files-found: error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 169bf5d..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Release Build and Publish Artifacts - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -jobs: - release: - name: Build and Publish Release Artifacts - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python 3.12 - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip - pip install build - - - name: Build package distribution artifacts - run: python -m build - - - name: Create Release and Upload Artifacts - uses: softprops/action-gh-release@v2 - with: - files: | - dist/*.whl - dist/*.tar.gz - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 02cf596..2d0fdcb 100644 --- a/README.md +++ b/README.md @@ -356,14 +356,22 @@ Optional for extended features: - Trivy and/or Semgrep for security scanning - Syft for SBOM generation -### One-Command Validation +### Local Build and Validation -To validate the repository, execute the unit test suite and run the full governance analysis pipeline in a single command: +Run the unit tests and the full governance analysis pipeline: ```bash python3 -m pytest && make full-analysis ``` +Build the wheel and sdist locally (written to `dist/`; requires `pip install build`): + +```bash +make build +``` + +CI builds these artifacts, inspects the wheel contents, smoke-tests it in a clean environment and uploads `dist/` as a CI artifact only. No release or publication has occurred. + ### Option 1: Run Directly ```bash diff --git a/pyproject.toml b/pyproject.toml index 3829da8..62d5e3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,9 +19,16 @@ dev = [ "ruff>=0.4.0", ] -[tool.setuptools.packages.find] -where = ["scripts"] -include = [] +[tool.setuptools] +package-dir = {"" = "scripts"} +py-modules = [ + "hotspot_merge", + "ownership_diff", + "parse_semgrep", + "parse_trivy", + "risk_update", + "scan_drift", +] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/seed.yaml b/seed.yaml index 049ac8d..e7ff98b 100644 --- a/seed.yaml +++ b/seed.yaml @@ -12,30 +12,20 @@ metadata: implementation_status: ACTIVE tier: standard promotion_status: CANDIDATE - last_validated: "2026-04-14" + last_validated: "2026-02-12" generated: "2026-02-17" sprint: "SENSORIA" language: python - validation_command: "python3 -m pytest && make full-analysis" - publication_target: "github_release" - release_url: "https://github.com/organvm-iv-taxis/reverse-engine-recursive-run/releases" - build_artifact: "dist/reverse_engine_recursive_run-0.1.0-py3-none-any.whl" agents: - name: ci trigger: on_push - workflow: .github/workflows/ci.yml + workflow: .github/workflows/ci-python.yml description: "Continuous integration pipeline" - - name: release - trigger: on_tag - workflow: .github/workflows/release.yml - description: "Release build and artifact publication pipeline" produces: - type: theory description: "Epistemological frameworks, recursive engines, ontological systems" - - type: release_artifact - description: "Python wheel and sdist package distributions attached to GitHub releases" consumes: []