Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python/memory.python.org
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: python/memory.python.org
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: backend-tests
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 13 commits
  • 20 files changed
  • 2 contributors

Commits on Mar 16, 2026

  1. Add pytest config and test fixtures for the backend

    In-memory SQLite database, httpx AsyncClient, and factory fixtures
    for all core models (commits, binaries, environments, runs, benchmark
    results, auth tokens, admin sessions).
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    327aef1 View commit details
    Browse the repository at this point in the history
  2. Add tests for health, commits, binaries, and environments endpoints

    Covers listing, pagination, get-by-id, 404 responses, python version
    filters, and binary-environment-commit relationships.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    95c7277 View commit details
    Browse the repository at this point in the history
  3. Add tests for benchmarks, diff, trends, and flamegraph endpoints

    Covers benchmark name listing with filters, diff table with delta
    calculations, single and batch trend queries, and flamegraph retrieval.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    77a1361 View commit details
    Browse the repository at this point in the history
  4. Add tests for upload and memray failure reporting endpoints

    Covers authenticated uploads, missing commit SHA, invalid binary and
    environment, configure flag mismatch, and memray failure reporting.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    3ae11f1 View commit details
    Browse the repository at this point in the history
  5. Add tests for token authentication

    Covers Bearer and Token header formats, invalid tokens, missing
    tokens, and deactivated token rejection.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    cb94426 View commit details
    Browse the repository at this point in the history
  6. Add tests for public endpoints and logging utilities

    Public: maintainers listing, memray status (healthy and with failures).
    Logging: string/dict/list sanitization, token masking, safe log context.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    6aa20e6 View commit details
    Browse the repository at this point in the history
  7. Expand upload tests and fix coverage tracking

    Add pytest-cov to dev dependencies. Configure coverage to use
    greenlet concurrency, fixing async coverage tracking.
    
    New upload tests: duplicate upload rejection, multi-binary uploads,
    memray failure update/ignore lifecycle, and upload clearing failures.
    Upload.py coverage: 22% -> 76%.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    5a02cf0 View commit details
    Browse the repository at this point in the history
  8. Document how to run backend tests and describe the test architecture

    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    888bcdc View commit details
    Browse the repository at this point in the history
  9. Add backend tests to CI, triggered only on backend/ changes

    Compares changed files to detect backend modifications. On pushes
    to main, always runs if backend files changed. On PRs, compares
    against the base branch. Skips test setup entirely when only
    frontend or other files are modified.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    7d1142e View commit details
    Browse the repository at this point in the history
  10. Add tests using production data fixtures

    Real benchmark data from the production database covering a deltablue_base
    memory regression (~10.5% high watermark increase) between two consecutive
    nogil commits, while json_dumps_base and nbody_base remain unchanged.
    
    Tests verify diff regression detection, previous commit metadata,
    alternative metrics, trends, batch trends, filtered benchmark names,
    and binary/environment relationships.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    bf30fa5 View commit details
    Browse the repository at this point in the history
  11. Merge remote-tracking branch 'origin/main' into backend-tests

    # Conflicts:
    #	.github/workflows/ci.yml
    #	README.md
    ambv committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    78d2cce View commit details
    Browse the repository at this point in the history
  12. Address review feedback and fix missing commit in upload endpoint

    Review fixes:
    - Use StaticPool for in-memory SQLite so all sessions share one
      connection, avoiding potential "no such table" errors.
    - Fix test_valid_bearer_token to actually test a protected endpoint
      with and without auth headers.
    - Assert ordering in trends test instead of building a dict.
    - Make health test explicit about the expected unhealthy DB status.
    - Add memray status assertion to test_upload_clears_memray_failure.
    
    Bug fix found by the new assertion: the upload endpoint's delete of
    memray failures was missing an await db.commit(), so the deletion
    was never persisted.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    3490416 View commit details
    Browse the repository at this point in the history
  13. Use asyncpg constraint_name for duplicate upload detection

    Check e.orig.constraint_name first (available on asyncpg's
    UniqueViolationError), falling back to string matching for
    backends that don't expose it (e.g. SQLite in tests).
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    ambv and claude committed Mar 16, 2026
    Configuration menu
    Copy the full SHA
    2f212c7 View commit details
    Browse the repository at this point in the history
Loading