Skip to content

release: 2.2.0 - #7

Merged
CtrlAltDevelop merged 15 commits into
mainfrom
develop
Nov 29, 2026
Merged

CtrlAltDevelop merged 15 commits into
mainfrom
develop

Conversation

@CtrlAltDevelop

Copy link
Copy Markdown
Owner

Summary

  • New apps, each over REST, GraphQL and gRPC and mirrored into the generator template:
    • apps.audit: append-only audit log; shop orders and wallet back-office changes write entries.
    • apps.files: owned file uploads via Django storage (local or S3), sniffed content types.
    • apps.webhooks: HMAC-signed outgoing webhooks with backoff retries and a send-time SSRF guard.
    • apps.flags: feature flags with overrides and stable percentage rollout.
  • License: MIT → AGPL-3.0-only.
  • Release workflow: build and trusted-publish jobs live in release.yml (the shared reusable workflow fails PyPI with invalid-publisher); still triggered by publishing a GitHub Release.
  • CI: tests run on pull requests to main only, via shared ci-workflows.
  • README badges, Contributing/Security section; version 2.2.0 with changelog.

Test plan

  • make check (ruff, mypy, makemigrations --check, protos --check)
  • make test: 3293 passed, 2 skipped, 95.2% coverage
  • CI green
  • Publishing the v2.2.0 GitHub Release uploads to PyPI

Tests-only gate (python-test.yml) on pull requests into main; nothing runs on
any other branch or event. Publishing uses the shared python-publish.yml.
PyPI trusted publishing rejects the shared reusable publish workflow
with invalid-publisher, so build and publish live in release.yml and
run on a v* tag, as in mdp-outbox.
Keeps the trigger the last successful publish (2.1.1) used, so creating
the release is the single step that ships it.
New optional feature app (DJANGO_WEBHOOKS_ENABLED). Accounts register https
endpoints with subscribed event types and a per-endpoint secret. Deliveries are
signed with HMAC-SHA256 over timestamp and body (X-Webhook-Signature), sent by
the cron-run `manage.py webhooks_deliver` with exponential backoff, and every
attempt is recorded. Private, loopback, link-local and reserved targets are
refused at registration and again before every send; redirects are not
followed. Published over REST, GraphQL and gRPC, and mirrored into the template.
New optional app apps.files (DJANGO_FILES_ENABLED): size limit checked
before reading, content type sniffed from magic bytes and matched against
the extension, random storage keys, owner-or-staff access (others get 404).
Storage via Django's storage API; DJANGO_STORAGE_BACKEND=s3 uses
django-storages (new [s3] extra).

Shared naming/size/sniff helpers extracted from apps/support/uploads.py
into infrastructure/common/uploads.py. Mirrored into the template.
Records actor, action, target model/id, JSON diff, timestamp and request IP.
Entries refuse update/delete; staff list them filtered by actor, target and
date range with pagination. Registered via api_registry.json, mirrored into
the generator template.
Shop: placing, settling, cancelling, payment rejection and every status
step. Wallet: adjust (not on replay), freeze/close, approve, reject,
expire, reverse and status transitions. Mirrored into the template.
Global switch, per-user overrides and a stable hashed rollout; cached
is_enabled(key, user) invalidated on save. Staff manage flags via admin,
REST, GraphQL and gRPC; users read their own evaluated flags. Gated by
DJANGO_FLAGS_ENABLED and mirrored into the generator template.
…ough

New section 13 covers staff-only refusals, a 50% rollout, a per-account
pin and its clearing, /flags/me, and deletion, then asserts every flags
route was visited. Later sections renumbered; example-project test checks
the coverage line.
protoc writes its own version into every stub and `protos --check`
compares bytes, so CI's unpinned grpcio-tools (1.85.4) failed against
stubs generated with 1.84.0. Pin 1.84.0 in both dev extras, and bring
the template's 1.83.1 stubs in line with the root tree.
@CtrlAltDevelop CtrlAltDevelop self-assigned this Nov 29, 2026
@CtrlAltDevelop
CtrlAltDevelop merged commit c06d58c into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant