-
Notifications
You must be signed in to change notification settings - Fork 0
Productize neural-mesh as a Samsarix release candidate #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7031b4c
0fd04e5
2e8c31a
d904255
39c934d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: pip | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| quality: | ||
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| python-version: "3.10" | ||
| - os: ubuntu-latest | ||
| python-version: "3.11" | ||
| - os: ubuntu-latest | ||
| python-version: "3.12" | ||
| - os: ubuntu-latest | ||
| python-version: "3.13" | ||
| - os: windows-latest | ||
| python-version: "3.11" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| cache: pip | ||
| cache-dependency-path: requirements-dev.txt | ||
| - name: Install package and development tools | ||
| run: python -m pip install -e . -r requirements-dev.txt | ||
| - name: Check formatting | ||
| run: python -m ruff format --check neural_mesh tests examples | ||
| - name: Lint | ||
| run: python -m ruff check neural_mesh tests examples | ||
| - name: Type check | ||
| run: python -m mypy neural_mesh tests examples | ||
| - name: Test | ||
| run: python -m pytest | ||
|
|
||
| distribution: | ||
| name: Distribution smoke test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: pip | ||
| cache-dependency-path: requirements-dev.txt | ||
| - name: Install build tools | ||
| run: python -m pip install -r requirements-dev.txt | ||
| - name: Build and validate metadata | ||
| run: | | ||
| python -m build | ||
| python -m twine check dist/* | ||
| - name: Inspect wheel contents | ||
| run: python -m zipfile -l dist/neural_mesh-0.2.0-py3-none-any.whl | ||
| - name: Install wheel outside the checkout | ||
| run: | | ||
| python -m venv "${RUNNER_TEMP}/neural-mesh-smoke" | ||
| "${RUNNER_TEMP}/neural-mesh-smoke/bin/python" -m pip install --no-deps dist/neural_mesh-0.2.0-py3-none-any.whl | ||
| cd "${RUNNER_TEMP}" | ||
| "${RUNNER_TEMP}/neural-mesh-smoke/bin/python" -c "import neural_mesh; print(neural_mesh.__version__)" | ||
| "${RUNNER_TEMP}/neural-mesh-smoke/bin/neural-mesh" --version | ||
| "${RUNNER_TEMP}/neural-mesh-smoke/bin/python" -m neural_mesh --version | ||
| - name: Run installed offline demo | ||
| run: | | ||
| cd "${RUNNER_TEMP}" | ||
| "${RUNNER_TEMP}/neural-mesh-smoke/bin/neural-mesh" demo | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.event.release.tag_name }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Verify and build distributions | ||
| if: ${{ !github.event.release.prerelease && !github.event.release.draft }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| ref: ${{ github.event.release.tag_name }} | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.11" | ||
| cache: pip | ||
| cache-dependency-path: requirements-dev.txt | ||
|
Comment on lines
+26
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== workflow excerpt =="
if [ -f .github/workflows/release.yml ]; then
nl -ba .github/workflows/release.yml | sed -n '1,220p'
else
echo ".github/workflows/release.yml not found"
fi
echo
echo "== all release workflow references =="
rg -n "setup-python|cache=|pip|build|attest|publish|permissions:" .github/workflows/release.yml || true
echo
echo "== zizmor references if any =="
rg -n "zizmor|cache|poison|pip cache" -S . || true
echo
echo "== git status/stat =="
git status --short
git diff --statRepository: Deathcharge/neural-mesh Length of output: 1932 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== repo availability =="
pwd
git rev-parse --show-toplevel || true
git status --short 2>/dev/null || true
git ls-files 2>/dev/null | head -50 || true
echo
echo "== workflow excerpt =="
if [ -f .github/workflows/release.yml ]; then
nl -ba .github/workflows/release.yml | sed -n '1,220p'
else
echo ".github/workflows/release.yml not found"
fi
echo
echo "== setup/cache/build references in release workflow =="
rg -n "setup-python|cache=|pip|build|attest|publish|permissions:" .github/workflows/release.yml || true
echo
echo "== zizmor references in repo =="
rg -n "zizmor|cache poisoning|cache-poisoning|pip cache|cache-dependency-path" -S . || trueRepository: Deathcharge/neural-mesh Length of output: 1932 🌐 Web query:
💡 Result: GitHub Actions cache poisoning occurs when an untrusted workflow (such as one triggered by a Pull Request) writes malicious or corrupted dependencies into the shared action cache [1][2]. Subsequent, more privileged workflows (like those on the main branch) may then restore this poisoned cache, potentially leading to unauthorized code execution [1][2]. For Citations:
🌐 Web query:
💡 Result: The Citations:
🌐 Web query:
💡 Result: zizmor is a static analysis tool for GitHub Actions that includes a specific audit rule called Citations:
Remove pip caching from the release artifact build.
🧰 Tools🪛 zizmor (1.28.0)[error] 26-26: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): this step (cache-poisoning) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| - name: Verify release tag matches package version | ||
| run: >- | ||
| python -c "import os, pathlib, tomllib; | ||
| version=tomllib.loads(pathlib.Path('pyproject.toml').read_text(encoding='utf-8'))['project']['version']; | ||
| actual=os.environ['GITHUB_REF_NAME']; expected=f'v{version}'; | ||
| assert actual == expected, f'release tag {actual!r} must equal {expected!r}'" | ||
| - name: Install package and pinned development tools | ||
| run: python -m pip install -e . -r requirements-dev.txt | ||
| - name: Verify source | ||
| run: | | ||
| python -m ruff format --check neural_mesh tests examples | ||
| python -m ruff check neural_mesh tests examples | ||
| python -m mypy neural_mesh tests examples | ||
| python -m pytest | ||
| - name: Build and validate distributions | ||
| run: | | ||
| python -m build | ||
| python -m twine check dist/* | ||
| - name: Upload distributions | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: python-distributions | ||
| path: dist/* | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
|
|
||
| attest: | ||
| name: Attest distributions | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| attestations: write | ||
|
Comment on lines
+61
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win Document the sensitive release permissions. Add inline rationale for As per static analysis, zizmor reported undocumented permissions at these locations. Also applies to: 83-85 🧰 Tools🪛 zizmor (1.28.0)[warning] 62-62: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment (undocumented-permissions) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| steps: | ||
| - name: Download distributions | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: python-distributions | ||
| path: dist | ||
| - name: Generate build provenance | ||
| uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1 | ||
| with: | ||
| subject-path: "dist/*" | ||
|
|
||
| publish: | ||
| name: Publish distributions to PyPI | ||
| needs: [build, attest] | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/project/neural-mesh/ | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: Download distributions | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: python-distributions | ||
| path: dist | ||
| - name: Publish distributions | ||
| uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,9 @@ venv.bak/ | |
| *.swo | ||
| *~ | ||
| .DS_Store | ||
| .coverage | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
| coverage.xml | ||
| htmlcov/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes are recorded here. This project follows semantic versioning after the first | ||
| independently installable release. | ||
|
|
||
| ## 0.2.0 - 2026-07-28 | ||
|
|
||
| ### Added | ||
|
|
||
| - Provider-agnostic async consensus engine with explicit request bounds. | ||
| - Deterministic normalized-token agreement clustering and quorum handling. | ||
| - Structured success, error, invalid-response, and timeout outcomes. | ||
| - Optional privacy-minimized bounded JSONL usage persistence. | ||
| - Typed public package, runnable offline example, tests, and CI/release verification. | ||
| - Installed `neural-mesh` CLI with version reporting and a credential-free demo. | ||
| - Security policy and trusted-publishing release workflow. | ||
|
|
||
| ### Changed | ||
|
|
||
| - Replaced the private `helix-unified` provider dependency with an injectable provider protocol. | ||
| - Corrected consensus semantics: successful calls no longer count as agreement. | ||
| - Consolidated package metadata in `pyproject.toml` and removed unrelated runtime dependencies. | ||
| - Set the supported Python range to 3.10 through 3.13. | ||
| - Updated current company, support, package, and license identity to Samsarix LLC. | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Classify `asyncio.wait_for` timeouts correctly on Python 3.10 as well as newer Python versions. | ||
|
|
||
| ### Removed | ||
|
|
||
| - Nonfunctional provider-specific compatibility clients whose API keys were ignored. | ||
| - Undocumented writes to `Helix/state/consensus_usage.jsonl`. | ||
|
|
||
| ## 0.1.0 - 2026-06-16 | ||
|
|
||
| - Initial source extraction from `helix-unified`; not independently installable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Derive the wheel path instead of hardcoding
0.2.0.The job builds the version declared by package metadata but inspects and installs only
neural_mesh-0.2.0-py3-none-any.whl. The next version bump will make CI fail before validating the newly built artifact.Use a metadata- or glob-derived wheel path for both inspection and installation.
As per the release workflow contract, package versions are read from
pyproject.tomlrather than fixed in automation.🤖 Prompt for AI Agents