server
Operate on Observal FastAPI backend routes, data services, auth, migrations, jobs, insights, and route-focused tests.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- server
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate on Observal FastAPI backend routes, data services, auth, migrations, jobs, insights, and route-focused tests.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-data-workflows.md12.1 KB
- 参考文档references/migrations-and-settings.md10.6 KB
- 参考文档references/server-architecture.md10.5 KB
- 参考文档references/troubleshooting.md13.5 KB
- 脚本scripts/check_server_routes.py4.6 KB
03 SKILL.md 正文
server
Use this sub-skill when a task touches the Observal FastAPI backend: REST or GraphQL route registration, PostgreSQL models and Pydantic schemas, service-layer behavior, auth/JWT/SSO/SCIM, registry and agent/component APIs, telemetry ingest storage, ClickHouse versus PostgreSQL migrations, dynamic settings, background jobs, insights, or route-focused tests.
Do not use this sub-skill for Typer CLI command hierarchy, frontend React/TanStack Router work, harness adapter/hook-spec/session-parser additions, or repo-wide release/compliance workflow except where they call into server APIs.
Start here
- Identify the backend surface:
- New or changed REST route: read
references/server-architecture.mdandreferences/api-data-workflows.md. - SQLAlchemy model, Alembic, ClickHouse, dynamic settings, or arq jobs: read
references/migrations-and-settings.md. - Auth, SSO, SCIM, route registration, ingest, insights, or failing backend tests: read
references/troubleshooting.mdfirst, then the focused reference above.
- New or changed REST route: read
- Verify the route graph before and after route registration changes with this sub-skill's bundled helper
scripts/check_server_routes.py. - Keep changes in the server-owned layers:
observal-server/api,models,schemas,services,jobs,alembic/versions, andclickhouse/migrations. - Add or update focused
tests/test_*routes*.py,tests/test_clickhouse_*.py,tests/test_migration*.py, ortests/test_insights*.pycoverage for the exact behavior.
Hard boundaries
- Server owns FastAPI, data models, migrations, settings, jobs, auth/admin routes, insights, and the ingest endpoint.
- Harness telemetry owns harness registry/adapters/hook specs/session parsers/session delivery. Server work may use ingest and ClickHouse storage patterns, but harness-specific parsing or hook installation belongs there.
- CLI owns Typer commands and bundled CLI skills.
- Web owns Vite/React/TanStack Router and Playwright/e2e guidance.
- Repo-development owns contributor policy, global lint/test/release workflow, and change-review process.
Non-negotiable backend invariants
- Register new top-level routers in
routes.py; package routers such asapi.routes.agentandapi.routes.adminmust import submodules so decorators attach to the shared router. - Authenticated HTTP APIs use
Authorization: Bearer <token>and dependencies fromapi.deps; do not add anX-API-Keybypass without confirming a deliberate auth design change. - PostgreSQL schema changes require Alembic migrations. ClickHouse schema changes require SQL files in
observal-server/clickhouse/migrations/. Do not add new ClickHouse DDL to startup code. - Runtime-tunable settings go through
services.dynamic_settings, not direct env-var reads. Boot-time infrastructure and crypto settings stay inconfig.py. - Use Loguru (
from loguru import logger as optic) with positional placeholders; never log secrets, JWTs, keys, or bearer tokens. - Outbound network from server services must pass the existing SSRF guard patterns.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).