Skip to content

Feat/pre release - #67

Merged
Iamsdt merged 16 commits into
mainfrom
feat/pre-release
Oct 30, 2026
Merged

Iamsdt merged 16 commits into
mainfrom
feat/pre-release

Conversation

@Iamsdt

@Iamsdt Iamsdt commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

10xgraph-api 1.0.0rc2

Second 1.0 release candidate. It is the 1.0.0rc1 code plus a round of fixes found in the pre-1.0 review and in live runs on a production stack built with 10xgraph build --docker-compose (gunicorn, JWT with scopes, ownership authorization, Postgres + Redis PgCheckpointer, Redis rate limit and token revocation, Qdrant memory). Requires 10xgraph>=1.0.0rc2,<2.0; aligned with 10xgraph-client 1.0.0-rc.2.

Full list: CHANGELOG.md section [1.0.0rc2]. Human-facing summary: RELEASE_NOTES.md.

Breaking (read before merging)

Request validation

  • Ids in paths and bodies must match ^[A-Za-z0-9._:@-]{1,128}$ (422 otherwise). Snowflake ids and UUIDs fit.
  • initial_state, config and resume nested deeper than 64 levels get 422.
  • Uploads over the new default limits get 413: images over 50,000,000 pixels, PDFs over 10 MB or 500 pages.

Status codes and responses

  • Resume errors answer 409 (wrong or stale interrupt id, thread not paused) or 422 (value fails response_schema). On /v1/graph/stream the 409 now comes before the stream starts.
  • Writes during a run return 409: state put/delete, message add/delete, thread delete and /v1/graph/fix.
  • DELETE /v1/threads/{id} can return success=false with data.cleanup_failed when file, trace or cache cleanup failed. The thread rows are still deleted.
  • A run that hits its recursion limit answers 422 GRAPH_RECURSION_LIMIT, not 500.
  • Graph validation errors use only VALIDATION_ERROR.
  • POST /v1/graph/stream is labelled application/x-ndjson and sends a keep-alive line every 15 s.

Auth and authorization

  • JWT_ALGORITHM must be on an allowlist, and startup fails without PyJWT when "auth": "jwt".
  • auth must be exactly "jwt".
  • The graph:setup scope is gone.
  • AG-UI and /v1/graph/live follow runs.thread_ids like REST: under "server", an id the server never issued is refused. Frontends that make their own ids (CopilotKit) must set "runs": {"thread_ids": "client"}.

CLI

  • 10xgraph build refuses --docker-compose together with --k8s.

Deploy notes

  • Postgres: core schema migrations v4 and v5 run on first use. Stop old pods, let one new pod migrate, then start the rest. /health/ready fails while the schema is behind.
  • Gunicorn: the generated command uses TenxGraphUvicornWorker. Regenerate Docker and Kubernetes files with 10xgraph build. Keep --graceful-timeout above the sum of the SHUTDOWN_*_SECONDS settings.
  • Dependency floors: python-multipart>=0.0.31, starlette>=1.3.1, PyJWT>=2.15.0, OpenTelemetry >=1.45.1.
  • Alerting: handled 4xx errors log one WARNING, not an ERROR with a traceback.

Highlights

Graceful shutdown

  • The lifespan calls graph.aclose() with SHUTDOWN_GRACE_SECONDS, SHUTDOWN_STOP_SECONDS and SHUTDOWN_TIMEOUT_SECONDS.
  • Cut runs are saved INTERRUPTED, and the thread resumes with the next request.
  • Runs refused while closing answer 503 with Retry-After.
  • HTTP streams end with a final terminal chunk on shutdown.
  • Stop and shutdown now reach a REST stream after its first chunk.
  • A disconnected stream frees its thread only after the run is saved.

Production setup

  • 10xgraph init --template production defaults to JWT, ownership authorization and Redis rate limiting.
  • 10xgraph build and 10xgraph config warn about a missing auth or authorization setup.
  • The 10xgraph config editor is redesigned.

New opt-ins

  • Idempotency keys.
  • JWT key rotation (JWT_SECRET_KEYS) and JWT_MAX_TOKEN_AGE_SECONDS.
  • 10xgraph revoke.
  • REDIS_KEY_PREFIX.
  • Media limits.
  • Run trace.

Other additions

  • Retry-After on 429 and 409.
  • Typed server errors.
  • A session_started event on /v1/graph/live.

Evals

  • 10xgraph eval writes an HTML report and opens it, shows live progress lines, and records the pass-rate gate in the report.
  • Reports carry each case's expectations.
  • The init eval templates can pass, and the template weather tool answers per city.

Reliability

  • Concurrency leases and revocation use the Redis clock.
  • The Redis client has timeouts and a bounded pool.
  • Readiness checks the schema version.
  • Realtime sessions get their own state per connection.
  • The default and template Live model is now gemini-3.8-live.

Security

  • Message add and state put check file_id media ownership like invoke.
  • Redis keys are built from percent-encoded parts, so ids cannot collide.
  • Uploads are authenticated before the body is parsed.
  • Client dicts and lists are size-capped.
  • Secrets and request text stay out of validation errors, the access log and log lines.
  • Extracted document text is deleted with its file.
  • IS_DEBUG is removed.

Testing

  • Unit suite: 2517 passed, 1 skipped.
  • Live on the production stack (2026-10-30):
    • JWT with scopes ("Missing required scope" without them);
    • two users see only their own threads and memories;
    • Stop, docker compose stop and docker kill mid-run each leave a usable thread;
    • Redis stopped mid-run, with the run finishing and the thread working after Redis returned;
    • message and thread delete on Postgres;
    • one user in two tabs and a second browser on Gemini Live, each session with its own transcript and thread;
    • OpenAI, Gemini and Anthropic agents served through the API.
  • Lint and mypy: run before merge.

Iamsdt added 13 commits October 28, 2026 15:41
…endpoints

- Run trace: move trace reconstruction to utils/run_trace.py and build a span
  tree (run > node visits > llm and tool calls) with inputs, outputs, status,
  tokens and timings; observability returns enabled/reason and notes.
  Still dev only: the store is not created with MODE=production.
- Streams: rebuild a missing pause chunk from the checkpoint for every pause
  kind; continue interrupt_before/after pauses with an empty resume.
- Threads and messages: has_more with limit/offset.
- Media: GET /v1/files lists the caller's files.
- Graph details: realtime_options for /v1/graph/live clients.
- Remove /v1/evals/runs endpoints; `10xgraph eval` writes a JSON report only
  (no HTML, --open removed) for the playground to open.
- Updated `10xgraph init --template production` to scaffold a production-ready setup with JWT auth and Redis rate limiting.
- Introduced production-readiness warnings in `10xgraph config` and `10xgraph build` to alert users about potential misconfigurations.
- Redesigned `10xgraph config` editor for improved user experience and added validation for production readiness.
- Modified `10xgraph build` command to include warnings for non-production-ready configurations.
- Updated templates and example configurations to reflect new production requirements, including PostgreSQL and Redis integration.
- Added comprehensive tests for production readiness checks and configuration validation.
…adiness

- Implement tests for resume functionality requiring user_id in `test_resume_needs_user_id.py`.
- Add tests for run entry guards and WebSocket lifecycle in `test_run_entry_guards.py`.
- Create tests to ensure proper closure of run traces in `test_run_trace_close.py`.
- Introduce tests for shutdown grace periods and readiness checks in `test_shutdown_readiness.py`.
- Add tests for stream protocol behavior including keep-alive and terminal chunk handling in `test_stream_protocol.py`.
- Implement tests for thread naming on the stream path in `test_stream_thread_naming.py`.
…esource ID rules, and shutdown wiring

- Implement tests to ensure that user B cannot access user A's media files through various routes and methods.
- Create a validator test to confirm that ordinary text passes through the production template validator without issues.
- Add tests for client-named IDs to validate proper formatting and error handling for thread, message, and memory IDs.
- Introduce tests to verify that the shutdown process correctly calls the graph's close method and handles errors gracefully.
…d browser opening

- Updated `10xgraph eval` command to generate both JSON and HTML reports.
- Added `--open` option to open the HTML report in the browser by default.
- Introduced configuration option `open_report` in `10xgraph.json` to control HTML report opening.
- Enhanced progress reporting during evaluations to include detailed step messages.
- Updated evaluation templates to ensure compatibility with new reporting features.
- Added tests to verify the new functionality and ensure expected behavior during evaluations.
@Iamsdt
Iamsdt requested a review from Mothilal-M October 30, 2026 09:51

@Mothilal-M Mothilal-M left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Everything looks solid. Approving.

@Iamsdt
Iamsdt merged commit 6f4134c into main Oct 30, 2026
9 checks passed
@Iamsdt
Iamsdt deleted the feat/pre-release branch October 30, 2026 10:10
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.

2 participants