Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
a4ea181
Phase 5: live Bitcoin mempool monitor MVP (v0.5.0)
claude Oct 14, 2026
f7ddf80
WIP: always-on collector (edge API, remote mode, recovery, deploy kit)
claude Oct 14, 2026
da0dac3
install.sh: install curl (smoke test, diagnostics)
claude Oct 14, 2026
98bf3b9
Mocks: mempool sequence +1 per update (matches upstream); document se…
claude Oct 14, 2026
3e56d3c
v0.6.0: dashboard gap/outage view, cloud deployment guide, docs and c…
claude Oct 14, 2026
fc2edbf
tests: make the cloud config path check portable to Windows runners
claude Oct 14, 2026
42262cf
docs: measured collector/edge resource use; remote-mode dashboard check
claude Oct 14, 2026
55cffbb
Soak/fault-injection harness: mock fault control endpoint, bounded mo…
claude Oct 14, 2026
728ac2e
Collector: fix P1 stalls found in audit; regression tests
claude Oct 14, 2026
20bb33a
lint: shorten CLI docstring line
claude Oct 14, 2026
59943dd
Research docs: correct overstated or misquoted claims; real data prov…
claude Oct 14, 2026
93044bf
Security/API hardening from audit; regression tests
claude Oct 14, 2026
e224568
Dashboard: honest connection/source state, accessibility, races; fast…
claude Oct 14, 2026
30d07a6
Docs: v0.6.0 audit table, system boundaries, cloud runbook, measured …
claude Oct 14, 2026
db1d68b
Durable stats totals; browser end-to-end test of the whole live chain
claude Oct 14, 2026
06d59da
Config errors: one clear line, exit 78 (EX_CONFIG), no systemd restar…
claude Oct 14, 2026
845af8e
Retention: prune on clean stop; 110-minute soak results
claude Oct 14, 2026
1b337d8
README: test count (376 Python + 20 frontend)
claude Oct 14, 2026
438941b
Risk intelligence core: screening, anomaly detection, supervised gate…
claude Oct 14, 2026
11748d3
Indicator refresh timer with fallback; risk API tests
claude Oct 14, 2026
678860c
Stream the official SDN XML: 457 MB -> 12 MB peak on an 85 MB file
claude Oct 14, 2026
ab32794
OFAC parser verified on the real 122 MB sdn_advanced.xml (2026-01-30)
claude Oct 14, 2026
582ec4c
Keep the OFAC excerpt byte-identical (no line-ending normalisation)
claude Oct 14, 2026
0ed39ac
Offline anomaly study: robust-tail vs IsolationForest vs fixed rules
claude Oct 14, 2026
6b16109
Protocol (before any run): live-computable feature subset experiment
claude Oct 14, 2026
d917909
Docs: risk engine contracts and data feasibility (decision gate)
claude Oct 14, 2026
344aa40
Indicator XML: refuse DTDs anywhere in the file, not only in the firs…
claude Oct 14, 2026
460a735
Feature-subset experiment: results, leakage checks, Layer C rejection
claude Oct 14, 2026
b01b06b
Risk dashboard UI; atomic observation+assessment commit; clearer API
claude Oct 14, 2026
4fabc16
Browser e2e: risk intelligence end to end (test list -> matches -> UI)
claude Oct 14, 2026
ac6d4c8
Soak test: risk checks (TEST indicator list, refresh mid-run, every r…
claude Oct 14, 2026
57606ee
v0.7.0 docs: README risk section, changelog, risk audit, cloud and ar…
claude Oct 14, 2026
20fc2b3
Test: give the disconnect-outage test time for the watchdog on slow r…
claude Oct 14, 2026
f9f8765
Docs: 60-minute risk-enabled soak results (17/17 checks)
claude Oct 14, 2026
dc8d428
Validate live config ranges; CI timeouts, single run per PR, shellcheck
claude Oct 15, 2026
4cb20c1
Synthetic demo: no misleading 'published hashes' warning on generated…
claude Oct 15, 2026
a2d0802
Risk and collector hardening from the v0.8 independent audits
claude Oct 15, 2026
064612f
Edge/proxy hardening: dashboard polling cannot be starved; deploy fixes
claude Oct 16, 2026
62bf8bd
Research integrity corrections from the v0.8 independent ML re-audit
claude Oct 16, 2026
f1b552d
Dashboard fixes from the v0.8 frontend audit
claude Oct 16, 2026
53f6f65
risk_summary: one pass over covering indexes (0.48 s -> 0.10 s cold a…
claude Oct 16, 2026
d4194e4
Docs for v0.8: audit matrix, changelog, cloud capacity at the cap, ri…
claude Oct 16, 2026
bf8c5cf
Fixes from the second v0.8 review: ranked supersession, alert re-keyi…
claude Oct 16, 2026
4872b7b
Version 0.8.0
claude Oct 16, 2026
4501f4e
Soak: indicator refreshes behave like real list updates
claude Oct 16, 2026
69ec57d
Docs: v0.8 soak results (90 min 16/17 with a wrong scenario, 40 min 1…
claude Oct 16, 2026
32f5c07
Release blockers: bounded fetch retries, headers on 500s, locked CI, …
claude Oct 19, 2026
9065d7d
stats: binary-search fee bins, skip empty flag lists (24 h at the cap…
claude Oct 19, 2026
6bd4f52
Soak: report and bound fetch retries
claude Oct 19, 2026
29e70e2
Docs: release-blocker audit rows, retries, publish gate, final system…
claude Oct 19, 2026
f4e9dcb
Docs: Oracle install fetches install.sh at the pinned commit; realist…
claude Oct 19, 2026
d8fcb94
Docs: final 90-minute soak on 6bd4f52 (18/18)
claude Oct 19, 2026
1b12c2f
Dependencies: certifi 2026.10.19, pillow 13.0.0, vitest 4.1.12 (new a…
claude Oct 23, 2026
bf8b7f8
Screening: retro only on listings in force; ranked supersession compl…
claude Oct 23, 2026
b4e9236
Collector: retries never lost, resync gaps recorded, watchdog needs u…
claude Oct 23, 2026
bd7b900
Persistence: restore cannot race writers, failed assessments leave a …
claude Oct 23, 2026
42fbe1b
Anomaly robust-tail/3: 'strong' needs two evidence groups; exact expl…
claude Oct 23, 2026
4038332
API: bounded ids, edge validation envelope, no-store on /v1, GET only…
claude Oct 23, 2026
4d8a5e5
Deploy kit and CI: verify before checkout, re-exec new installer, tes…
claude Oct 23, 2026
b6acd8f
Dashboard: no misleading states from the v0.8.1 browser audit
claude Oct 23, 2026
62b42ad
Version 0.8.1
claude Oct 23, 2026
c2a266f
Docs for v0.8.1: audit matrix, runbooks (restore, upgrade, rollback),…
claude Oct 23, 2026
dba5a82
Fixes from the v0.8.1 second review
claude Oct 23, 2026
3cd8148
Docs: second-review findings (W25), test counts
claude Oct 23, 2026
a26b60d
Server-side pagination and filtering for findings and the alert queue
claude Oct 24, 2026
4f091cd
setuptools 84.1.0 (GHSA-xmj3-9gf7-h52w) in the dev, serve and live locks
claude Oct 24, 2026
1ee4a64
Docs: v0.8.1 systemd runs and a rehearsal of the 24-hour procedure
claude Oct 24, 2026
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.png binary
*.joblib binary
*.parquet binary
tests/fixtures/ofac/*.xml -text
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Dependency update automation. Updates arrive as pull requests and go through the full CI
# (tests, dependency audit, Docker smoke test); nothing is merged or published automatically.
# The hash locks (requirements/*.lock.txt) are regenerated with the commands in their
# headers; Dependabot keeps them hash-pinned when it bumps a version.
version: 2
updates:
- package-ecosystem: pip
directory: /requirements
schedule:
interval: weekly
open-pull-requests-limit: 5
# the serving image's ML stack must stay equal to the model registry's training
# environment (requirements/serve.in): bumped deliberately, with a retrain
ignore:
- dependency-name: numpy
- dependency-name: pandas
- dependency-name: pyarrow
- dependency-name: scikit-learn
- dependency-name: xgboost
- dependency-name: xgboost-cpu
- dependency-name: joblib
groups:
python-minor-and-patch:
update-types: [minor, patch]
- package-ecosystem: npm
directory: /frontend
schedule:
interval: weekly
open-pull-requests-limit: 5
groups:
npm-minor-and-patch:
update-types: [minor, patch]
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
72 changes: 69 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ name: CI

on:
push:
branches: [main] # pull requests run through pull_request; avoids running every check twice
pull_request:
workflow_dispatch:

# a newer push to the same branch or PR supersedes the running checks
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

# least privilege: CI only needs to read the repository
permissions:
Expand All @@ -12,6 +19,7 @@ jobs:
python:
name: python / ${{ matrix.os }} / py${{ matrix.python }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30 # the suite takes 2-4 min; a hung async test must not hold a runner for 6 h
strategy:
fail-fast: false
matrix:
Expand All @@ -23,17 +31,43 @@ jobs:
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install
run: python -m pip install -e ".[dev]"
cache-dependency-path: requirements/dev.lock.txt
- name: Install (hash-locked; nothing resolved or built from unpinned sources)
run: |
python -m pip install --require-hashes -r requirements/dev.lock.txt
python -m pip install --no-deps --no-build-isolation -e .
- name: Lint
run: |
ruff check .
ruff format --check .
- name: Test (synthetic fixtures only; the real dataset is never needed in CI)
run: python -m pytest -q

deployed-locks:
# the suite on the exact versions the serving image and the VM install (the dev lock
# resolves newer ones); Python 3.12 is what Ubuntu 24.04 ships on the VM
name: python / deployed locks / py3.12
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
requirements/serve.lock.txt
requirements/test.lock.txt
- name: Install (serving lock, a superset of the VM lock, plus pytest)
run: |
python -m pip install --require-hashes -r requirements/serve.lock.txt -r requirements/test.lock.txt
python -m pip install --no-deps --no-build-isolation -e .
- name: Test
run: python -m pytest -q

frontend:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: frontend
Expand All @@ -49,9 +83,41 @@ jobs:
- run: npm test
- run: npm run build

audit:
name: dependency audit
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.13"
- name: Known vulnerabilities in the locked Python dependencies (CI, serving image, VM)
run: |
python -m pip install --require-hashes -r requirements/audit.lock.txt
for lock in dev serve live; do
pip-audit --disable-pip --require-hashes --progress-spinner off \
-r "requirements/$lock.lock.txt"
done
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
- name: Known vulnerabilities in the dashboard's npm dependencies
working-directory: frontend
run: npm audit --audit-level=high

shell:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Shellcheck (installer, smoke tests)
run: shellcheck deploy/oracle/*.sh scripts/*.sh docker/entrypoint.sh

docker:
runs-on: ubuntu-latest
needs: [python, frontend]
timeout-minutes: 30
needs: [python, deployed-locks, frontend, audit]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Build images (hash-locked dependencies, digest-pinned bases)
Expand Down
65 changes: 53 additions & 12 deletions .github/workflows/publish-demo-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ name: Publish demo image
# models takes minutes), validates it, and publishes it to GHCR so that Render pulls a
# prebuilt image instead of training during its own build (which exceeded Render's limit).
# Only synthetic data and synthetic-trained models are in this image (scripts/check_demo_image.sh).
#
# Release gate: an image is only ever built from a commit whose full CI run (tests on Linux
# and Windows, frontend, dependency audit, shellcheck, Docker smoke test) succeeded.
# * Automatically: after CI completes successfully for a push to main (workflow_run), for
# exactly the commit CI tested (not whatever main points at by then).
# * Manually (workflow_dispatch on main): the same check is made through the API first.
# A failed, cancelled or still-running CI publishes nothing.
on:
push:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
workflow_dispatch:

Expand All @@ -20,12 +29,37 @@ concurrency:
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: >-
github.ref == 'refs/heads/main' && (
github.event_name == 'workflow_dispatch' || (
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.head_repository.full_name == github.repository))
permissions:
contents: read
packages: write
actions: read # to confirm the CI result for the commit
env:
# the commit CI tested (workflow_run), or main's head for a manual run
SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
steps:
- name: Require a successful CI run for this exact commit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ok=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/runs?head_sha=${SHA}&event=push&status=success" \
--jq '.total_count')
if [ "${ok:-0}" -lt 1 ]; then
echo "::error::CI has not succeeded for a push of ${SHA}; refusing to publish"
exit 1
fi
echo "CI succeeded for ${SHA} (${ok} run(s))"

- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: ${{ env.SHA }}
persist-credentials: false

- name: Image name and version
id: meta
Expand All @@ -36,11 +70,13 @@ jobs:
echo "version=${version}" >> "$GITHUB_OUTPUT"

- name: Build synthetic demo image (linux/amd64; hash-locked deps, digest-pinned bases)
env:
VERSION: ${{ steps.meta.outputs.version }}
run: |
docker build --platform linux/amd64 --target demo \
--label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
--label org.opencontainers.image.revision="${GITHUB_SHA}" \
--label org.opencontainers.image.version="${{ steps.meta.outputs.version }}" \
--label org.opencontainers.image.revision="${SHA}" \
--label org.opencontainers.image.version="$VERSION" \
--label org.opencontainers.image.licenses=MIT \
--label org.opencontainers.image.description="ChainWatch public demo: synthetic data and synthetic-trained models only" \
-t chainwatch-demo:candidate .
Expand All @@ -55,20 +91,25 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "$GH_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
docker tag chainwatch-demo:candidate "$IMAGE:sha-$GITHUB_SHA"
docker push "$IMAGE:sha-$GITHUB_SHA"
# version tags are never overwritten: bump the version in pyproject.toml to publish a new one
if docker manifest inspect "$IMAGE:$VERSION" > /dev/null 2>&1; then
echo "::notice::$IMAGE:$VERSION already exists; not overwritten (published sha-$GITHUB_SHA only)"
else
docker tag chainwatch-demo:candidate "$IMAGE:sha-$SHA"
docker push "$IMAGE:sha-$SHA"
# version tags are never overwritten: bump the version in pyproject.toml to publish a
# new one. Only an explicit "manifest unknown" means the tag is free; any other
# failure (network, rate limit, auth) stops the job rather than overwrite a release.
if out=$(docker manifest inspect "$IMAGE:$VERSION" 2>&1); then
echo "::notice::$IMAGE:$VERSION already exists; not overwritten (published sha-$SHA only)"
elif grep -qiE "manifest unknown|no such manifest|not found" <<<"$out"; then
docker tag chainwatch-demo:candidate "$IMAGE:$VERSION"
docker push "$IMAGE:$VERSION"
else
echo "::error::could not check whether $IMAGE:$VERSION exists: $out"
exit 1
fi
digest=$(docker inspect --format '{{index .RepoDigests 0}}' "$IMAGE:sha-$GITHUB_SHA")
digest=$(docker inspect --format '{{index .RepoDigests 0}}' "$IMAGE:sha-$SHA")
docker logout ghcr.io
{
echo "### Published synthetic demo image"
echo "- digest (immutable): \`$digest\`"
echo "- tags: \`sha-$GITHUB_SHA\`, \`$VERSION\` (if new)"
echo "- tags: \`sha-$SHA\`, \`$VERSION\` (if new)"
echo "- Render: image URL in render.yaml, then Manual Deploy (docs/DEPLOYMENT.md)"
} >> "$GITHUB_STEP_SUMMARY"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
data/raw/*
data/processed/*
data/demo/
data/live/
!data/raw/.gitkeep
!data/processed/.gitkeep

Expand Down
Loading
Loading