Merge pull request #1 from TakuyaYagam1/dev

release mvp
This commit is contained in:
TakuyaYagam1 authored and GitHub committed 2026-10-11 23:04:29 +03:00
commit ac887dcda6
2639 files changed
+645293 -1857

No files matched your search

+4 -3
View File
@@ -3,12 +3,13 @@
Use the source that owns the fact being discussed. Read the relevant source before changing a dependent document or generated artifact.
- The user's request sets the authorized task scope and product choices for that task.
- When present, the root PRD.md defines product requirements, delivery stages, and acceptance criteria. It is a self-contained specification, not an implementation status report.
- Source code shows behavior that exists in this checkout. A passing test gives evidence only for the behavior it exercises.
- api/core/openapi.yml and api/ml/openapi.yml, with their referenced source files, define the public and internal HTTP contracts. Bundles and generated clients are derived output.
- api/core/openapi.yml, api/ml/openapi.yml, api/runner/openapi.yml, and api/labd/openapi.yml, with their referenced source files, define the public and internal HTTP contracts. Bundles and generated clients are derived output.
- Backend migrations define the database schema. sqlc query files define queries that sqlc generates.
- Makefiles and checked-in tool configuration define supported project commands and options. Lockfiles preserve selected application dependency versions. Toolchain declarations define runtime versions; the Go backend uses exact version 1.26.8. Compose and Dockerfiles define image references, including intentionally moving `latest` or `alpine` tags.
- Makefiles and checked-in tool configuration define supported project commands and options. Lockfiles preserve selected application dependency versions. Toolchain declarations define runtime versions; the Go backend uses exact version 1.26.9. Compose and Dockerfiles define image references, including intentionally moving `latest` or `alpine` tags.
- Compose, Nginx, and observability configuration define the local deployment scaffold. They do not prove that a remote deployment or production security review occurred.
- docs/ru/ARCHITECTURE.md records product and architecture decisions. docs/en/ARCHITECTURE.md is its maintained English counterpart. These documents include planned behavior and must label it as planned.
- docs/ru/ARCHITECTURE.md explains the architecture and current service boundaries. docs/en/ARCHITECTURE.md is its maintained English counterpart. Any planned behavior must be labeled as planned.
- README.md is the primary Russian entry point; README.en.md is its maintained English counterpart. Neither replaces service guides or contracts.
When sources disagree, do not resolve the conflict by file age alone. State what the code currently does, what the design asks for, and which source needs correction. Ask for a decision only when the conflict blocks work within the authorized scope.
+2 -2
View File
@@ -27,8 +27,8 @@ Use PostgreSQL through the repository's pgx and sqlc boundary. Schema changes ar
Prefer the selected wahrwelt-kit packages only where they provide a useful technical boundary and have a pinned, verified version. Libraries such as logging, HTTP, metrics, and PostgreSQL helpers do not own product behavior. Do not add unused JWT, WebSocket, or other framework dependencies.
Redis belongs behind the outbound cache port and its secondary adapter. Bootstrap owns its client lifecycle. Redis, PostgreSQL, and the SeaweedFS bucket are required for readiness. Set cache entries with a positive TTL; future product consumers must tolerate misses, eviction, and restart. Do not treat cache entries as authoritative product records or add product caching without defining ownership and invalidation.
Redis belongs behind the outbound cache port and its secondary adapter. Bootstrap owns its client lifecycle. Redis, PostgreSQL, and the SeaweedFS bucket are required for readiness. Set cache entries with a positive TTL; consumers must tolerate misses, eviction, and restart. Do not treat cache entries as authoritative product records or add product caching without defining ownership and invalidation.
SeaweedFS belongs behind the outbound ObjectStorage port and the seaweedfs secondary adapter. Keep AWS SDK and S3 types inside that adapter. Bootstrap owns client resources; HeadBucket checks readiness without creating the bucket. Stream object content and close Get response bodies. Product upload/download authorization, content limits, and retention rules must be defined before exposing file operations.
Current code is an operational scaffold. Do not describe the health handler, database ping, or wiring as account, assessment, matching, or invitation behavior.
Describe implemented behavior from the current usecases, routes, and tests. Health checks and dependency wiring alone do not establish a working product flow.
+4 -2
View File
@@ -4,10 +4,12 @@ The repository has separate public and internal OpenAPI contracts:
- api/core/openapi.yml describes browser-to-Go operations.
- api/ml/openapi.yml describes internal Go-to-ML operations.
- api/runner/openapi.yml describes internal operations between Go and the code runner.
- api/labd/openapi.yml describes internal lab provisioner operations.
Edit the split source files referenced by these roots. Use the API Makefile to merge schemas, bundle, and lint both specifications. Do not hand-edit bundled files.
Edit the split source files referenced by these roots. Use the API Makefile to merge schemas, bundle, and lint every specification. Do not hand-edit bundled files.
The selected Go server generator is ogen. The generated Go handler is mounted under chi. Orval generates the TypeScript client and related frontend artifacts. The Go ML client is configured in backend/codegen/ogen-ml.yml and generated into backend/internal/adapter/secondary/ml/api/. datamodel-code-generator uses ml/codegen/pyproject.toml to generate Pydantic v2 models in ml/src/lincodex_ml/api/models.py from the ML bundle. There are three code generation unit directories: backend/codegen/, frontend/codegen/, and ml/codegen/. Each consumer owns the configuration for its generated code; contract sources remain shared under api/.
ogen generates Go servers and clients; chi mounts the backend HTTP handler. Orval generates frontend clients, hooks, schemas, and mocks. datamodel-code-generator generates ML Pydantic v2 models. Each consumer keeps configuration in its own codegen/ directory: backend, frontend, ml, runner, or labd. Backend client settings are ogen-ml.yml, ogen-code-runner.yml, and ogen-labd.yml; their output stays in the corresponding secondary adapter's api/ directory. Contract sources remain shared under api/.
OpenAPI 3.2.0 is the target contract version. Verify only the feature subset used by this repository through the pinned bundler, linter, ogen, Go runtime path, Orval, Python Pydantic models, and documentation pipeline. A passing fixture does not establish full support for every OpenAPI 3.2 feature. Record the exact checks run.
+1 -1
View File
@@ -1,6 +1,6 @@
# Database standard
PostgreSQL is the planned system of record for product data and future background jobs. The current schema contains only what the technical scaffold needs.
PostgreSQL is the system of record for product data and durable jobs. Use the migrations and queries to establish the current schema.
Put schema changes in ordered backend/db/migrations/ files and queries in backend/db/queries/. sqlc output is derived. Never edit generated SQL models or query code by hand.
+4 -2
View File
@@ -4,12 +4,14 @@ The frontend is a React single-page application built with Vite, TypeScript, and
When changing the frontend toolchain or dependencies, select current stable releases and commit the matching runtime declarations, package manifest, and lockfile updates. Do not add prereleases unless the task explicitly calls for them. Keep the lockfile so installs remain repeatable after selecting the stable release.
Use FSD boundaries when product features are added: app composes pages, widgets, features, entities, and shared code. Higher layers can import lower layers; shared code must not depend on product entities. Keep transport DTOs separate from UI models.
Use FSD boundaries: app composes pages, widgets, features, entities, and shared code. Higher layers can import lower layers; shared code must not depend on product entities. Keep transport DTOs separate from UI models.
Use the generated Orval client as the contract-derived transport surface. Put shared fetch behavior in the existing API client. Do not hand-edit generated files. Keep the API prefix in one layer so it is not duplicated.
Model server data in the selected query library and form drafts in form state. Avoid adding a second store for data already owned by the server cache. Show loading, empty, error, retry, and forbidden states as product flows are implemented.
MSW fixtures are test inputs. They do not prove that a backend workflow exists. The current page is a minimal status view; do not document full candidate or employer interfaces as implemented.
MSW fixtures are test inputs, not evidence of a backend workflow. Check current route and feature implementations before describing a screen as available. Protected cabinet routes restore the server session through SessionGate. /status checks API liveness, not product readiness.
Vitest runs in the Node environment without a DOM. Component and route tests check rendered markup and query behavior. Use the existing Playwright suite through make -C deploy test-e2e for browser interactions against an isolated local stack; inspect its selected scenarios and skips before claiming coverage.
All source comments are in English. User-facing interface copy can be localized.
+6 -4
View File
@@ -1,17 +1,19 @@
# Infrastructure standard
The local scaffold uses three independent Compose projects: core application, ML, and monitoring. Starting the core project does not start monitoring or ML.
Core application, ML, and monitoring use separate Compose projects. Start core first: ML and monitoring join its network. Starting core does not start either project. The code runner and LXD lab provisioner have separate host setup under deploy/labs/. The runner development container uses deploy/docker/docker-compose.runner.dev.yml.
Upstream container images use the requested moving `latest` or `alpine` tags where the image publishes them. These tags can change; read the current Compose and Dockerfile references instead of recording an old component version. Keep Go at exact version 1.26.8 in `go.mod`, toolchain declarations, and the backend build image. Application dependency lockfiles remain checked in and should not be removed when image tags float.
Upstream container images use the requested moving `latest` or `alpine` tags where the image publishes them. These tags can change; read the current Compose and Dockerfile references instead of recording an old component version. Keep Go at exact version 1.26.9 in `go.mod`, toolchain declarations, and the backend build image. Application dependency lockfiles remain checked in and should not be removed when image tags float.
The core frontend container serves static assets with Nginx and proxies /api to Go. The default host binding is loopback at port 8080. This scaffold does not terminate production TLS. Grafana is also bound to loopback at port 3000.
The ML Compose file binds to 127.0.0.1:8000 by default. A remote ML host needs an explicit private bind address, restricted firewall rules, and a deliberate scrape target. Leave ML_METRICS_TARGET empty when Prometheus must not scrape a remote ML host.
The ML Compose file binds to 127.0.0.1:8000 by default and requires a shared ML_SERVICE_TOKEN. A remote ML host needs an explicit private bind address and restricted firewall rules. Leave ML_METRICS_TARGET empty when no ML scrape is configured; a nonempty target also needs bearer authentication in Prometheus because ML protects /metrics.
Start the core project before monitoring because monitoring joins its Docker network. The monitoring Compose project collects only the explicitly configured core services. Do not expose PostgreSQL, Redis, SeaweedFS, backend metrics, Prometheus, Loki, exporters, or the Docker socket proxy publicly.
Start the core project before monitoring because monitoring joins its Docker network. The monitoring Compose project collects only the explicitly configured core services. Do not expose PostgreSQL, Redis, SeaweedFS, Kafka, backend metrics, Prometheus, Loki, exporters, or the Docker socket proxy publicly.
Redis runs in the core project with password authentication, bounded memory, allkeys-lru eviction, and persistence disabled. Keep it private to the Compose network. The separate monitoring project supplies redis-exporter; ML does not use Redis in the current scaffold.
Kafka runs in the core project as one internal KRaft broker and controller with a bounded JVM heap, a memory limit, and a named volume. Keep its listener private to the Compose network and create topics explicitly; it carries events only through the transactional outbox.
SeaweedFS runs as a single-node S3-compatible server in the core project. Persist both data and metadata in its named volume. Keep every storage port private; require credentials for S3 access. Nginx does not proxy private objects directly. Ordinary shutdown preserves the volume; this local setup does not provide HA or off-host backups.
Use the repository's Compose and observability Make targets to render and validate configuration. Keep secrets in a local .env or deployment secret store, not in committed examples. Do not claim TLS, public availability, multi-node reliability, or a successful deploy based on Compose syntax checks.
+2 -2
View File
@@ -1,6 +1,6 @@
# ML service standard
The ML service is a separate Python HTTP service. Its current role is an operational scaffold with health and readiness routes; there is no model-backed product endpoint yet.
The ML service is a separate Python HTTP service. It serves health and readiness routes and one model-backed endpoint, `POST /v1/embeddings`, with pinned embedding models whose files are verified against the lock files in ml/model/ (baked into the image, or local files on a GPU host). Every route except health and readiness requires the shared bearer token. Ordinary tests use the deterministic fake encoder; the real models run only in the marked slow tests.
Keep the service contract in api/ml/. The Go client uses backend/codegen/ogen-ml.yml and is consumed under backend/internal/adapter/secondary/ml/api/. Python model generation belongs to ml/codegen/pyproject.toml: datamodel-code-generator produces Pydantic v2 models from api/ml/openapi.bundle.yml in ml/src/lincodex_ml/api/models.py. Keep generator dependencies in ml/pyproject.toml and uv.lock; the codegen pyproject contains tool settings only. Health/readiness handlers import generated models instead of maintaining duplicate transport schemas.
@@ -8,7 +8,7 @@ Use make -C ml generate to bundle the contract and generate models. The root gen
Readiness must describe whether the required model or inference runtime is available. Return not-ready while it is unavailable. Do not invent a successful result or label a fixture as a model response.
When inference is added, validate structured output, bound input and output size, apply timeouts, and preserve model and schema versions. Avoid logging resume text, contact details, credentials, or full prompts. Treat document contents and model output as untrusted data.
Validate inference output, bound input and output size, apply timeouts, and preserve model and schema versions. Avoid logging resume text, contact details, credentials, or full prompts. Treat document contents and model output as untrusted data.
Use uv with the checked-in lockfile. Keep ordinary lint, type checks, and tests independent of external model downloads and GPU access. Model quality evaluation is a separate, reproducible task with documented data and limits.
+1 -1
View File
@@ -10,6 +10,6 @@ Treat resumes, API payloads, model output, repository documents, dependencies, t
Keep health routes minimal. Keep /metrics and infrastructure administration surfaces on internal interfaces. Review bind addresses and network access whenever a Compose or Nginx change affects reachability.
Architecture notes about privacy controls are requirements for future product behavior. They are not proof of legal compliance, completed authorization, or a security audit.
Verify privacy controls in the current code and access tests. Architecture notes alone are not proof of enforcement, legal compliance, or a security audit.
Run configured security checks through `security/Makefile`. Trivy HIGH/CRITICAL findings, including unfixed vulnerabilities, block validation; Gitleaks, govulncheck, configured Semgrep findings, and scanner errors also fail their checks. Scan both repository inputs and built images, and require complete Git history for secret scanning. Keep reports local and redact secret values. Any exception must be specific, reviewed, and record a reason, owner, and expiry; review expiry explicitly where the tool does not enforce it. Do not add broad exclusions to make a scan pass. These checks complement gosec and do not replace authorization tests or a security audit.
+1 -1
View File
@@ -6,7 +6,7 @@ Use unit tests for domain and application behavior, component tests for frontend
Contract changes need bundle and lint checks, regeneration of affected consumers, and generated drift checks. Infrastructure changes need rendered Compose configuration and the validator for each changed monitoring or deployment file.
The technical deployment smoke checks service routes and infrastructure readiness. It does not validate a candidate or employer workflow. The deploy test-e2e target is reserved and currently fails with a deferred message until the business-flow suite exists.
The technical deployment smoke checks service routes and infrastructure readiness. The deploy test-e2e target runs Playwright against an isolated throwaway stack, including candidate and employer scenarios in frontend/e2e/. Report which scenarios ran, failed, or were skipped; a smoke pass alone does not validate a business workflow.
Do not report ranking accuracy, assessment validity, production latency, load capacity, privacy correctness, or model quality without the corresponding measured test and its dataset, environment, and limits. Planned targets and synthetic examples are not results.
+4
View File
@@ -8,4 +8,8 @@ Preserve concurrent edits. If ownership is unclear or a collision appears, stop
Use Make targets instead of maintaining duplicate shell command lists. Generate derived output from its source. Validate the affected boundary, then hand off the exact files changed and evidence collected.
Keep planning identifiers and progress reports inside the local PRD directory. Describe behavior and rationale in code comments, documentation, and commit messages without referring to numbered backlog items. Never stage or commit PRD. Use the configured human Git identity and do not add assistant authorship or coauthor trailers.
Keep READMEs short: purpose, essential commands, and links to the relevant guide. Document current behavior from code and configuration. Update existing sections instead of appending implementation diaries, old test results, or copies of API schemas. Preserve required setup steps and operational limits in both languages.
Keep ignore rules in the component that owns the artifacts. Each service has its own .gitignore; the root .gitignore covers only files at the repository root. Do not collect service caches and build outputs in one root ignore file.
+4
View File
@@ -6,6 +6,10 @@
Thumbs.db
.env
.env.example
**/.env
**/.env.*
# Release manifests, build records, and evidence stay out of build contexts.
deploy/release
**/node_modules
**/dist
**/coverage
+121
View File
@@ -2,6 +2,10 @@
APP_PROJECT=app
APP_NETWORK=app_default
APP_HTTP_PORT=8080
# Address the frontend port is published on. Keep the loopback default for a
# local stack. On a host that sits behind the edge proxy, set the address of
# its tunnel interface (for example 10.79.0.2); never 0.0.0.0.
APP_HTTP_BIND=127.0.0.1
POSTGRES_DB=lincodex
POSTGRES_USER=lincodex
@@ -13,6 +17,119 @@ SEAWEEDFS_ACCESS_KEY=lincodex-local
SEAWEEDFS_SECRET_KEY=replace-this-storage-secret
SEAWEEDFS_BUCKET=lincodex
# Kafka KRaft cluster identifier. It is not a secret and grants no access; it
# ties the formatted log directory to one cluster. Generate your own value with
# `docker run --rm apache/kafka:latest /opt/kafka/bin/kafka-storage.sh random-uuid`
# before the first start; changing it later stops Kafka from using the existing volume.
KAFKA_CLUSTER_ID=SJv4PXUUSJGbK3eSPC57qA
# Mail. EMAIL_PROVIDER is required and selects exactly one transport:
# resend, smtp, or disabled; there is no default. resend sends through the
# Resend HTTP API and the working stand sets it explicitly. This example sets
# disabled so that local runs need no key. This build has no SMTP transport
# yet, so smtp fails startup after its settings are validated. disabled sends
# nothing and reports the mail channel as unavailable; it never confirms an
# address or skips an account check.
EMAIL_PROVIDER=disabled
EMAIL_FROM=no-reply@example.com
# Label of the provider account (lowercase letters, digits, ".", "_", "-"),
# never the key. Every new delivery is pinned to EMAIL_PROVIDER and this
# label, and the mail quota is counted under it. Change it whenever the key
# belongs to another provider account, and only then: renaming the label of
# the same account resets the local quota count.
EMAIL_ACCOUNT=default
EMAIL_TIMEOUT=10s
# Recipients the configured provider account may be sent per UTC day and per
# UTC calendar month. Empty means the Resend Free plan limits, 100 and 3000,
# for resend and disabled; smtp requires both values. A used-up quota makes
# mail wait for the reset; nothing buys a plan or switches the transport.
EMAIL_QUOTA_DAILY=
EMAIL_QUOTA_MONTHLY=
# Recipients per UTC day and per UTC month that product notifications leave
# free for service mail (verification and password reset). Empty means a fifth
# of the matching quota limit, 20 and 600 on the Resend Free plan. Notifications
# are admitted only while the window stays at or above the reserve after them.
EMAIL_SERVICE_RESERVE_DAILY=
EMAIL_SERVICE_RESERVE_MONTHLY=
# Public origin for links in mail. Email confirmation requires the browser's
# Origin header to match this scheme, host, and port. Use HTTPS except on
# localhost, 127.0.0.1, or [::1]. Do not add a path, query, or fragment.
APP_PUBLIC_URL=http://localhost:8080
# Read only when EMAIL_PROVIDER=resend, where it is required. Keep the real
# key in the server environment only; it is never logged.
RESEND_API_KEY=
# Read only when EMAIL_PROVIDER=smtp. SMTP_TLS_MODE is starttls or tls;
# plaintext SMTP is not supported.
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_TLS_MODE=
# Password hashing: Argon2id derivations that may run at once, from 1 to 4.
# Each takes 64 MiB; the backend container has 1 CPU and 768 MB of memory, so
# more than 1 only adds memory while the derivations share the CPU.
PASSWORD_HASH_CONCURRENCY=1
# The app Docker network has a pinned subnet and the frontend container a fixed
# address on it, so the backend can trust exactly that one proxy. Change the
# two together if the range collides with another network or route.
APP_SUBNET=172.29.79.0/24
APP_FRONTEND_IP=172.29.79.10
# Registration and email confirmation. IDENTITY_KEY_SECRET is required. It
# keys idempotency records, rate-limit counters, session CSRF tokens, and
# organization-scoped candidate aliases across restarts and instances.
# Use at least 32 bytes. There is no usable example value: leave it empty here
# and generate one for every deployment (Compose refuses an empty value):
# openssl rand -base64 48
# A value that starts with replace-this is refused. Without it the backend refuses to start, unless a development stand sets
# IDENTITY_ALLOW_EPHEMERAL_KEY=true (a random secret per process; candidate
# aliases also change after restart).
IDENTITY_KEY_SECRET=
# Registration and every verification resend count toward both per-address limits.
VERIFICATION_MAIL_MIN_INTERVAL=1m
VERIFICATION_MAIL_DAILY_LIMIT=5
# Confirmation attempts are limited to 5 per token per hour by the service.
# This token limit is fixed; it has no environment setting.
# IDENTITY_CLIENT_HOURLY_LIMIT applies to registration, confirmation, resends,
# and login per resolved client address per hour, when available.
IDENTITY_CLIENT_HOURLY_LIMIT=30
# Login attempts are limited by the resolved client address and normalized
# email address. The email limit applies whether or not the account exists.
IDENTITY_LOGIN_EMAIL_HOURLY_LIMIT=10
# Sessions expire after this much inactivity or at the absolute lifetime,
# whichever comes first. Idle must not exceed absolute; idle is capped at 30d
# and absolute at 365d.
IDENTITY_SESSION_IDLE_TIMEOUT=24h
IDENTITY_SESSION_ABSOLUTE_LIFETIME=168h
# Off by default. Allow demo_basic category assignment only for a reviewed
# synthetic opening with an exactly pinned manifest and product policy.
# demo_express never assigns a category. Leave false outside a synthetic stand.
ASSESSMENT_DEMO_CATEGORIES_ENABLED=false
# Own code runner for code practice. Empty CODE_RUNNER_URL keeps it off: the
# backend then reports the runner as unavailable and runs nothing. To enable
# it, set the https URL of the runner VM, its service token, a separate random
# run key, and the CA that signed the runner certificate (a file path inside
# the container, or the PEM text with \n for line breaks). Generate both
# secrets with `openssl rand -hex 32`; keep them in the server environment only.
# CODE_RUNNER_SERVER_NAME is the certificate name when the URL is an IP the
# certificate does not list; CODE_RUNNER_REQUEST_TIMEOUT defaults to 10s.
CODE_RUNNER_URL=
CODE_RUNNER_TOKEN=
CODE_RUNNER_RUN_KEY=
CODE_RUNNER_CA_FILE=
CODE_RUNNER_CA_PEM=
CODE_RUNNER_SERVER_NAME=
CODE_RUNNER_REQUEST_TIMEOUT=
# Reverse proxies the backend trusts to report the client address in
# X-Forwarded-For. Leave it unset: the default is the frontend container's
# APP_FRONTEND_IP as a single address. A wider list lets other containers (or a
# client behind them) choose their own address; empty trusts nobody.
# TRUSTED_PROXY_CIDRS=
# Optional PostgreSQL metrics login, created when the database volume is initialized.
POSTGRES_EXPORTER_USER=metrics_reader
POSTGRES_EXPORTER_PASSWORD=replace-this-metrics-password
@@ -25,5 +142,9 @@ GRAFANA_ADMIN_PASSWORD=replace-this-grafana-password
ML_BIND_ADDRESS=127.0.0.1
ML_HTTP_PORT=8000
ML_METRICS_TARGET=
# Shared bearer token of the ML service and the backend (a secret of at least
# 32 characters, for example openssl rand -hex 32); required by the ML
# container and by the backend while SEMANTIC_MATCHING_ENABLED is true.
ML_SERVICE_TOKEN=
# For rootless Docker, use the Unix socket from `docker context inspect`.
DOCKER_SOCKET_PATH=/var/run/docker.sock
+93 -29
View File
@@ -21,7 +21,7 @@ jobs:
api:
name: API contracts
runs-on: ubuntu-24.04
timeout-minutes: 20
timeout-minutes: 30
steps:
- name: Check out source
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -46,8 +46,30 @@ jobs:
python-version-file: ml/.python-version
cache: pip
cache-dependency-path: scripts/requirements-codegen.txt
# make -C api verify runs check-toolchain, which generates the OpenAPI 3.2
# fixture with ogen, Orval, and datamodel-code-generator, so the job also
# needs the frontend and ML toolchains.
- name: Install declared pnpm
run: npm install --global "$(node -p "require('./frontend/package.json').packageManager")"
- name: Cache pnpm store
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.local/share/pnpm/store
key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
version: 0.12.22
enable-cache: true
cache-dependency-glob: ml/uv.lock
- name: Install API tooling
run: make -C api install
- name: Install frontend dependencies
run: make -C frontend install
- name: Install ML dependencies
run: make -C ml install
- name: Check API formatting and compatibility
run: make -C api fmt-check verify
- name: Check compatibility with the pull request base
@@ -79,7 +101,7 @@ jobs:
run: make -C backend test-race
integration:
name: Integration tests (${{ matrix.shard }}/2)
name: Integration tests (${{ matrix.shard }}/${{ strategy.job-total }})
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
@@ -99,10 +121,12 @@ jobs:
cache-dependency-path: backend/go.sum
- name: Install Go dependencies
run: make -C backend deps
- name: Run PostgreSQL, Redis, and SeaweedFS integration shard
# The shard total comes from the matrix size, so adding a shard cannot
# leave TEST_SHARD_TOTAL stale; an index outside the total fails the run.
- name: Run PostgreSQL, Redis, SeaweedFS, and Kafka integration shard
env:
TEST_SHARD_INDEX: ${{ matrix.shard }}
TEST_SHARD_TOTAL: "2"
TEST_SHARD_TOTAL: ${{ strategy.job-total }}
GOFLAGS: -race
run: make -C backend test-int
@@ -208,6 +232,8 @@ jobs:
persist-credentials: false
- name: Check Compose files
run: make -C deploy check
- name: Test the public Nginx perimeter on throwaway containers
run: make -C deploy perimeter-test
- name: Check observability files
run: make -C observability check
- name: Build the separate ML image
@@ -294,6 +320,55 @@ jobs:
- name: Build and check technical health routes
run: make -C deploy smoke
e2e:
name: Browser E2E
needs:
- backend
- frontend
- infrastructure
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: frontend/.node-version
- name: Install declared pnpm
run: npm install --global "$(node -p "require('./frontend/package.json').packageManager")"
- name: Cache pnpm store
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.local/share/pnpm/store
key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
# The runner mounts the installed @playwright/test into the browser image.
- name: Install frontend dependencies
run: make -C frontend install
# deploy/scripts/e2e.sh generates its own throwaway env file with random
# secrets outside the workspace and starts a fresh, uniquely named stand,
# so the job needs no repository secrets and no root .env.
- name: Run the Playwright suite on an isolated stand
run: make -C deploy test-e2e
# Only the Playwright report, failed-test traces and screenshots, and the
# stand logs are uploaded; the generated env file never enters this tree.
- name: Upload E2E diagnostics
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: e2e-diagnostics-attempt-${{ github.run_attempt }}
path: |
frontend/test-results/e2e/report/
frontend/test-results/e2e/results/
frontend/test-results/e2e/stand.log
if-no-files-found: warn
include-hidden-files: false
retention-days: 14
aggregate:
name: Required CI result
if: always()
@@ -306,35 +381,24 @@ jobs:
- codegen
- infrastructure
- smoke
- e2e
- security
- security-images
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
# Every job in needs must report success. failure, cancelled, and
# skipped (for example after a failed dependency) all fail this result,
# and a job added to needs is checked without a separate line here.
- name: Require every CI job to pass
env:
API_RESULT: ${{ needs.api.result }}
BACKEND_RESULT: ${{ needs.backend.result }}
INTEGRATION_RESULT: ${{ needs.integration.result }}
FRONTEND_RESULT: ${{ needs.frontend.result }}
ML_RESULT: ${{ needs.ml.result }}
CODEGEN_RESULT: ${{ needs.codegen.result }}
INFRASTRUCTURE_RESULT: ${{ needs.infrastructure.result }}
SMOKE_RESULT: ${{ needs.smoke.result }}
SECURITY_RESULT: ${{ needs.security.result }}
SECURITY_IMAGES_RESULT: ${{ needs.security-images.result }}
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
printf 'api=%s backend=%s frontend=%s ml=%s codegen=%s infrastructure=%s smoke=%s\n' \
"$API_RESULT" "$BACKEND_RESULT" "$FRONTEND_RESULT" "$ML_RESULT" \
"$CODEGEN_RESULT" "$INFRASTRUCTURE_RESULT" "$SMOKE_RESULT"
test "$API_RESULT" = success
test "$BACKEND_RESULT" = success
printf 'integration=%s\n' "$INTEGRATION_RESULT"
test "$INTEGRATION_RESULT" = success
test "$FRONTEND_RESULT" = success
test "$ML_RESULT" = success
test "$CODEGEN_RESULT" = success
test "$INFRASTRUCTURE_RESULT" = success
test "$SMOKE_RESULT" = success
printf 'security=%s security-images=%s\n' "$SECURITY_RESULT" "$SECURITY_IMAGES_RESULT"
test "$SECURITY_RESULT" = success
test "$SECURITY_IMAGES_RESULT" = success
set -euo pipefail
jq -r 'to_entries[] | "\(.key)=\(.value.result)"' <<<"$NEEDS_JSON"
test "$(jq 'length' <<<"$NEEDS_JSON")" -gt 0
failed=$(jq -r '[to_entries[] | select(.value.result != "success") | .key] | join(" ")' <<<"$NEEDS_JSON")
if [ -n "$failed" ]; then
printf 'Required jobs did not succeed: %s\n' "$failed" >&2
exit 1
fi
+1
View File
@@ -40,6 +40,7 @@ jobs:
needs:
- docs
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require documentation checks to pass
env:
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+11 -7
View File
@@ -13,44 +13,48 @@ install: ## Install project dependencies
printf '\n==> %s install\n' "$$part"; \
$(MAKE) -C "$$part" install || status=1; \
done; \
printf '\n==> backend deps\n'; \
$(MAKE) -C backend deps || status=1; \
for part in backend runner labd; do \
printf '\n==> %s deps\n' "$$part"; \
$(MAKE) -C "$$part" deps || status=1; \
done; \
exit "$$status"
generate: ## Generate shared contracts, Go and TypeScript code, and Python models
$(MAKE) -C api bundle
API_PREPARED=1 $(MAKE) -C backend generate
API_PREPARED=1 $(MAKE) -C runner generate
API_PREPARED=1 $(MAKE) -C labd generate
API_PREPARED=1 $(MAKE) -C frontend generate
API_PREPARED=1 $(MAKE) -C ml generate
gen: generate ## Alias for generate
fmt: ## Format all project parts
@status=0; for part in api backend frontend ml; do \
@status=0; for part in api backend runner labd frontend ml; do \
printf '\n==> %s fmt\n' "$$part"; \
$(MAKE) -C "$$part" fmt || status=1; \
done; exit "$$status"
fmt-check: ## Check formatting without changing files
@status=0; for part in api backend frontend ml; do \
@status=0; for part in api backend runner labd frontend ml; do \
printf '\n==> %s fmt-check\n' "$$part"; \
$(MAKE) -C "$$part" fmt-check || status=1; \
done; exit "$$status"
lint: ## Run configured linters
@status=0; for part in api backend frontend ml; do \
@status=0; for part in api backend runner labd frontend ml; do \
printf '\n==> %s lint\n' "$$part"; \
$(MAKE) -C "$$part" lint || status=1; \
done; exit "$$status"
test: ## Run unit and component tests
@status=0; for part in backend frontend ml; do \
@status=0; for part in backend runner labd frontend ml; do \
printf '\n==> %s test\n' "$$part"; \
$(MAKE) -C "$$part" test || status=1; \
done; exit "$$status"
check: ## Run local checks for code, docs, deployment, and observability
@status=0; for part in api backend frontend ml deploy observability; do \
@status=0; for part in api backend runner labd frontend ml deploy observability; do \
printf '\n==> %s check\n' "$$part"; \
$(MAKE) -C "$$part" check || status=1; \
done; \
+37 -26
View File
@@ -2,50 +2,61 @@
[Русский](README.md) | English
Lincodex is a technical scaffold for a platform that helps employers find IT specialists. The current checkout provides service health routes, PostgreSQL, Redis, and SeaweedFS readiness checks, cache and S3 storage adapters, a minimal status page, Docker Compose files, OpenAPI contracts, and optional monitoring. Product workflows such as accounts, assessments, candidate search, invitations, and resume processing are planned and are not implemented.
Lincodex helps employers find IT specialists by verified skills. Candidates complete a profile, take assessments, and control their card's visibility. Employers describe hiring needs, search for candidates, and send invitations; contact details become available after the candidate consents.
## Start locally
The core stack is Go + chi, React + TypeScript, PostgreSQL, Redis, SeaweedFS, and Kafka. ML, code execution, lab environments, and monitoring run separately. Demonstration categories do not establish assessment validity for real candidates.
Copy .env.example to .env, replace every placeholder password, then run:
## Quick start
make -C deploy config
make -C deploy up
Install Docker with the Compose plugin, GNU make, Python 3, and openssl.
Open http://127.0.0.1:8080. The local Nginx listener is bound to loopback and does not provide production TLS.
1. Copy `.env.example` to `.env` and replace the `replace-this-...` values.
2. Generate `IDENTITY_KEY_SECRET` with `openssl rand -base64 48`.
3. Build and start the core stack:
To start the separate monitoring stack after the core services:
```sh
make -C deploy config
make -C deploy build
make -C deploy up
```
make -C deploy monitoring-up
Open http://localhost:8080. The address must match `APP_PUBLIC_URL`. The `config` check uses the example environment; it does not validate your `.env` values.
Grafana is available at http://127.0.0.1:3000 on the local machine. See the deployment guide before exposing any service to another host.
Mail defaults to `EMAIL_PROVIDER=disabled`, so new accounts cannot verify their email. Configure Resend for real delivery using the [deployment guide](docs/en/DEPLOYMENT.md). `make -C deploy down` stops the services and keeps their data.
## Development
## Demonstration
The root Makefile provides install, generate, fmt, fmt-check, lint, test, check, verify, and docs-check targets. Run make help for the current command list. The development and testing guides describe the service-specific commands and what the current checks cover.
A separate stand provides synthetic data and prepared accounts:
## Documentation
```sh
make -C deploy demo-seed DEMO_MODE=isolated
```
Short directory guides:
Open http://localhost:8090 and follow `/demo`. The command prints account names; `DEMO_ACCOUNT_PASSWORD` in the demo settings supplies their password. These accounts do not require email delivery. See [DEPLOYMENT.md](docs/en/DEPLOYMENT.md) for details and cleanup.
Start monitoring separately with `make -C deploy monitoring-up`. Grafana defaults to http://127.0.0.1:3000.
## Directories
| Directory | Purpose |
| --- | --- |
| [api/](api/README.en.md) | Shared OpenAPI contracts |
| [backend/](backend/README.en.md) | Main Go service |
| [backend/](backend/README.en.md) | Core Go service |
| [frontend/](frontend/README.en.md) | React and TypeScript interface |
| [ml/](ml/README.en.md) | Separate Python service for ML |
| [deploy/](deploy/README.en.md) | Docker Compose, Nginx, and service startup |
| [ml/](ml/README.en.md) | ML API and models |
| [runner/](runner/README.en.md) | Isolated code execution |
| [labd/](labd/README.en.md) | Lab environment provisioning |
| [deploy/](deploy/README.en.md) | Compose, Nginx, and deployment |
| [observability/](observability/README.en.md) | Metrics, logs, and dashboards |
| [security/](security/README.en.md) | Security scanners and rules |
| [docs/](docs/README.en.md) | Detailed Russian and English guides |
| [requirements/](requirements/README.en.md) | Original specification and brand assets |
| [scripts/](scripts/README.en.md) | Shared code generation and validation scripts |
| [.github/](.github/workflows/) | GitHub Actions workflows |
| [.agents/](.agents/README.en.md) | Agent rules |
| [security/](security/README.en.md) | Security checks |
| [docs/](docs/README.en.md) | Russian and English guides |
| [requirements/](requirements/README.en.md) | Specification and brand assets |
| [scripts/](scripts/README.en.md) | Shared scripts and checks |
| [.github/](.github/workflows/) | GitHub Actions |
| [.agents/](.agents/README.en.md) | Repository working rules |
- Source materials: [specification](requirements/specification.pdf), [brandbook](requirements/brandbook/).
- Russian: [architecture](docs/ru/ARCHITECTURE.md), [development](docs/ru/DEVELOPMENT.md), [deployment](docs/ru/DEPLOY.md), [testing](docs/ru/TESTING.md), [security](docs/ru/SECURITY.md)
- English: [architecture](docs/en/ARCHITECTURE.md), [development](docs/en/DEVELOPMENT.md), [deployment](docs/en/DEPLOY.md), [testing](docs/en/TESTING.md), [security](docs/en/SECURITY.md)
Development commands: `make help`. Start with [DEVELOPMENT.md](docs/en/DEVELOPMENT.md); see [TESTING.md](docs/en/TESTING.md) for checks and [ARCHITECTURE.md](docs/en/ARCHITECTURE.md) for the design.
## License
No project-wide license has been assigned in this repository. Check the license terms of each dependency and container image before redistribution.
Project code is distributed under [GPL-3.0-only](LICENSE). Dependencies and source materials may have their own terms of use.
+34 -27
View File
@@ -2,54 +2,61 @@
Русский | [English](README.en.md)
Lincodex - технический каркас платформы, на которой работодатели находят IT-специалистов. Сейчас в проекте есть маршруты проверки состояния сервисов, проверка готовности PostgreSQL, Redis и SeaweedFS, адаптеры кеша и S3-хранилища, минимальная страница состояния, файлы Docker Compose, контракты OpenAPI и отдельно запускаемый мониторинг. Учетные записи, оценка кандидатов, поиск сотрудников, приглашения и обработка резюме запланированы, но пока не реализованы.
Lincodex помогает работодателям находить IT-специалистов по подтвержденным навыкам. Кандидат заполняет профиль, проходит оценку и управляет видимостью карточки. Работодатель описывает потребность, ищет кандидатов и отправляет приглашения; контакты открываются после согласия кандидата.
## Локальный запуск
Основной стек: Go + chi, React + TypeScript, PostgreSQL, Redis, SeaweedFS и Kafka. ML, исполнитель кода, лабораторные окружения и мониторинг подключаются отдельно. Демонстрационные категории не означают, что оценка уже откалибрована на реальных кандидатах.
Скопируйте `.env.example` в `.env`, замените все пароли-заглушки и выполните:
## Быстрый старт
Нужны Docker с Compose plugin, GNU make, Python 3 и openssl.
1. Скопируйте `.env.example` в `.env` и замените значения `replace-this-...`.
2. Для `IDENTITY_KEY_SECRET` создайте секрет: `openssl rand -base64 48`.
3. Соберите и запустите основной стек:
```sh
make -C deploy config
make -C deploy build
make -C deploy up
```
Откройте http://127.0.0.1:8080. Локальный Nginx слушает только loopback-интерфейс; TLS для продакшена не настроен.
Откройте http://localhost:8080. Адрес должен совпадать с `APP_PUBLIC_URL`. Проверка `config` использует пример окружения; она не подтверждает правильность вашего `.env`.
Мониторинг запускается отдельно, после основных сервисов:
По умолчанию `EMAIL_PROVIDER=disabled`: новый аккаунт нельзя подтвердить без почты. Для реальной отправки настройте Resend по [руководству развертывания](docs/ru/DEPLOYMENT.md). Команда `make -C deploy down` останавливает сервисы, сохраняя данные.
## Демонстрация
Отдельный стенд содержит синтетические данные и готовые аккаунты:
```sh
make -C deploy monitoring-up
make -C deploy demo-seed DEMO_MODE=isolated
```
Grafana доступна на локальной машине по адресу http://127.0.0.1:3000. Перед открытием доступа с других хостов прочитайте руководство по развертыванию.
Адрес стенда: http://localhost:8090, маршрут демонстрации: `/demo`. Команда выводит логины; пароль задает `DEMO_ACCOUNT_PASSWORD` в настройках демонстрации. Эти аккаунты не требуют отправки писем. Подробности и очистка стенда описаны в [DEPLOYMENT.md](docs/ru/DEPLOYMENT.md).
## Разработка
Мониторинг запускается отдельно командой `make -C deploy monitoring-up`. Grafana по умолчанию доступна на http://127.0.0.1:3000.
Корневой Makefile содержит цели `install`, `generate`, `fmt`, `fmt-check`, `lint`, `test`, `check`, `verify` и `docs-check`. Актуальный список команд доступен через `make help`. Команды отдельных сервисов и границы текущих проверок описаны в руководствах по разработке и тестированию.
## Документация
Краткие описания каталогов:
## Каталоги
| Каталог | Назначение |
| --- | --- |
| [api/](api/README.md) | Общие OpenAPI-контракты |
| [backend/](backend/README.md) | Основной сервис на Go |
| [frontend/](frontend/README.md) | Интерфейс на React и TypeScript |
| [ml/](ml/README.md) | Отдельный Python-сервис для ML |
| [deploy/](deploy/README.md) | Docker Compose, Nginx и запуск сервисов |
| [backend/](backend/README.md) | Основной Go-сервис |
| [frontend/](frontend/README.md) | Интерфейс React и TypeScript |
| [ml/](ml/README.md) | ML API и модели |
| [runner/](runner/README.md) | Изолированное выполнение кода |
| [labd/](labd/README.md) | Подготовка лабораторных окружений |
| [deploy/](deploy/README.md) | Compose, Nginx и развертывание |
| [observability/](observability/README.md) | Метрики, логи и дашборды |
| [security/](security/README.md) | Сканеры и правила безопасности |
| [docs/](docs/README.md) | Подробные руководства на русском и английском |
| [requirements/](requirements/README.md) | Исходное ТЗ и брендбук |
| [scripts/](scripts/README.md) | Общие скрипты кодогенерации и проверок |
| [.github/](.github/workflows/) | Workflow GitHub Actions |
| [.agents/](.agents/README.md) | Правила работы агентов |
| [security/](security/README.md) | Проверки безопасности |
| [docs/](docs/README.md) | Руководства на русском и английском |
| [requirements/](requirements/README.md) | ТЗ и брендбук |
| [scripts/](scripts/README.md) | Общие скрипты и проверки |
| [.github/](.github/workflows/) | GitHub Actions |
| [.agents/](.agents/README.md) | Правила работы с репозиторием |
- Исходные материалы: [ТЗ](requirements/specification.pdf), [брендбук](requirements/brandbook/).
- На русском: [архитектура](docs/ru/ARCHITECTURE.md), [разработка](docs/ru/DEVELOPMENT.md), [развертывание](docs/ru/DEPLOY.md), [тестирование](docs/ru/TESTING.md), [безопасность](docs/ru/SECURITY.md).
- На английском: [архитектура](docs/en/ARCHITECTURE.md), [разработка](docs/en/DEVELOPMENT.md), [развертывание](docs/en/DEPLOY.md), [тестирование](docs/en/TESTING.md), [безопасность](docs/en/SECURITY.md).
Команды разработки: `make help`. Начните с [DEVELOPMENT.md](docs/ru/DEVELOPMENT.md); проверки описаны в [TESTING.md](docs/ru/TESTING.md), архитектура - в [ARCHITECTURE.md](docs/ru/ARCHITECTURE.md).
## Лицензия
Общая лицензия проекта пока не определена. Перед распространением проверьте условия лицензий каждой зависимости и образа контейнера.
Код проекта распространяется на условиях [GPL-3.0-only](LICENSE). Зависимости и исходные материалы могут иметь собственные условия использования.
+17 -4
View File
@@ -16,29 +16,42 @@ install: ## Install pinned OpenAPI tooling
npm ci --prefix "$(API_DIR)" --ignore-scripts --no-audit --no-fund
.PHONY: bundle
bundle: ## Merge split schemas and create public and ML bundles
bundle: ## Merge split schemas and create public, ML, code runner, and lab provisioner bundles
"$(CODEGEN_PYTHON)" "$(ROOT_DIR)/scripts/merge-schemas.py" "$(API_DIR)/core"
"$(CODEGEN_PYTHON)" "$(ROOT_DIR)/scripts/merge-schemas.py" "$(API_DIR)/ml"
"$(CODEGEN_PYTHON)" "$(ROOT_DIR)/scripts/merge-schemas.py" "$(API_DIR)/runner"
"$(CODEGEN_PYTHON)" "$(ROOT_DIR)/scripts/merge-schemas.py" "$(API_DIR)/labd"
"$(REDOCLY)" bundle "$(API_DIR)/core/openapi.yml" --output "$(API_DIR)/core/openapi.bundle.yml"
"$(REDOCLY)" bundle "$(API_DIR)/ml/openapi.yml" --output "$(API_DIR)/ml/openapi.bundle.yml"
"$(REDOCLY)" bundle "$(API_DIR)/runner/openapi.yml" --output "$(API_DIR)/runner/openapi.bundle.yml"
"$(REDOCLY)" bundle "$(API_DIR)/labd/openapi.yml" --output "$(API_DIR)/labd/openapi.bundle.yml"
.PHONY: lint
lint: bundle ## Lint both bundled contracts
lint: bundle ## Lint every bundled contract
"$(REDOCLY)" lint --config "$(API_DIR)/redocly.yaml" "$(API_DIR)/core/openapi.bundle.yml"
"$(REDOCLY)" lint --config "$(API_DIR)/redocly.yaml" "$(API_DIR)/ml/openapi.bundle.yml"
"$(REDOCLY)" lint --config "$(API_DIR)/redocly.yaml" "$(API_DIR)/runner/openapi.bundle.yml"
"$(REDOCLY)" lint --config "$(API_DIR)/redocly.yaml" "$(API_DIR)/labd/openapi.bundle.yml"
.PHONY: check
check: lint ## Build and lint both contract bundles
check: lint ## Build and lint every contract bundle and run the contract tests
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_merge_schemas.py'
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_contract_copies.py'
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_assessment_contract.py'
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_match_contract.py'
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_runner_contract.py'
PYTHONDONTWRITEBYTECODE=1 "$(CODEGEN_PYTHON)" -m unittest discover -s "$(ROOT_DIR)/scripts" -p 'test_lab_contract.py'
.PHONY: check-compat
check-compat: bundle ## Compare the public contract with API_BASE_REF
API_BASE_REF="$(API_BASE_REF)" REDOCLY="$(REDOCLY)" CODEGEN_PYTHON="$(CODEGEN_PYTHON)" bash "$(ROOT_DIR)/scripts/check-api-compat.sh"
.PHONY: check-toolchain
check-toolchain: ## Check OpenAPI 3.2.0 support and generated validation behavior
check-toolchain: ## Check OpenAPI 3.2.0 support with ogen, Orval, and Pydantic on the compatibility fixture
"$(REDOCLY)" lint --config "$(API_DIR)/redocly.yaml" "$(API_DIR)/testdata/openapi-3.2.0.yml"
$(MAKE) -C "$(ROOT_DIR)/backend" check-ogen-compat
$(MAKE) -C "$(ROOT_DIR)/frontend" check-orval-compat
$(MAKE) -C "$(ROOT_DIR)/ml" check-pydantic-compat
.PHONY: fmt
fmt: ## Format handwritten OpenAPI YAML files
+50 -7
View File
@@ -2,14 +2,57 @@
[Русский](README.md) | English
Shared OpenAPI contracts for Go, the frontend, and ML. Contract changes come first; consumers then generate their types, server code, and clients from them.
OpenAPI 3.2.0 is the shared source for HTTP contracts. Change the specification first, then generate server adapters, clients, and models.
- `core/` defines the main backend's public API.
- `ml/` defines the ML service's internal HTTP API.
- `testdata/` contains a specification for checking tool compatibility with OpenAPI 3.2.0.
## Structure
Routes live in `routes/` and schemas in `components/`. The `openapi.bundle.yml` files are built automatically. Generator configuration lives in `backend/codegen/`, `frontend/codegen/`, and `ml/codegen/`.
| Directory | API |
| --- | --- |
| [core/](core/openapi.yml) | Public Go API under `/api/v1` |
| [ml/](ml/openapi.yml) | Internal ML API |
| [runner/](runner/openapi.yml) | Code execution |
| [labd/](labd/openapi.yml) | Lab environment provisioning |
| [testdata/](testdata/openapi-3.2.0.yml) | Generator compatibility fixture |
From the repository root, `make -C api check` checks contracts and `make generate` updates all generated code.
Each contract's `openapi.yml` references `routes/` and `components/`. [merge-schemas.py](../scripts/merge-schemas.py) merges schemas grouped by subject, then Redocly builds `openapi.bundle.yml`. Do not edit derived files by hand.
See the [development guide](../docs/en/DEVELOPMENT.md).
## Generation
Run these commands from the repository root:
```sh
make -C api install
make -C api check
make generate
make check-generated
```
`check` builds and validates contracts. `generate` updates every consumer. `check-generated` detects differences from committed output; it does not run generation itself.
| Consumer | Generator and configuration |
| --- | --- |
| Go backend | ogen, [backend/codegen/](../backend/codegen/) |
| Go runner and labd | ogen, each service's `codegen/` directory |
| React | Orval: client, query hooks, Zod schemas, and MSW; [frontend/codegen/](../frontend/codegen/) |
| Python ML | datamodel-code-generator: Pydantic; [ml/codegen/](../ml/codegen/) |
`make -C api check-toolchain` checks the OpenAPI 3.2 features in a dedicated fixture. It verifies the current toolchain, not every feature of the standard.
Compare the public contract with an existing Git ref using `make -C api check-compat API_BASE_REF=<ref>`.
## Contract conventions
- Errors: RFC 9457, `application/problem+json`, stable `code`, and safe messages. The `Problem` schema defines the response fields.
- Sessions: an HttpOnly cookie; mutating session requests also send `X-CSRF-Token`. The origin must match the application configuration.
- Send `Idempotency-Key` where the operation requires it. Reuse the key when retrying the same action; use a new key for different content.
- Concurrent updates use `If-Match` or `expected_version` as specified by the operation. On conflict, reload server state and preserve the user's draft.
- Lists use bounded cursor pagination. Identifiers are UUIDs and timestamps are UTC date-times. An absent field may differ from `null`.
- Read exact codes, limits, required headers, and examples from each operation and its shared components.
## Boundaries
An operation in the specification does not prove its handler is complete. Check `backend/internal/adapter/primary/http/v1/` and its tests. An unimplemented operation can return `501 not_implemented`.
Internal ML, runner, and labd APIs are not browser entry points. The public health route is `/api/v1/healthz`; service guides cover operational `/healthz`, `/readyz`, and metrics.
See [DEVELOPMENT.md](../docs/en/DEVELOPMENT.md) for contract changes and [TESTING.md](../docs/en/TESTING.md) for checks.
+50 -7
View File
@@ -2,14 +2,57 @@
Русский | [English](README.en.md)
Общие OpenAPI-контракты для Go, frontend и ML. Сначала изменяется контракт, затем из него генерируются типы, серверный код и клиенты нужных сервисов.
OpenAPI 3.2.0 - общий источник HTTP-контрактов. Сначала меняется спецификация, затем генерируются серверные адаптеры, клиенты и модели.
- `core/` - публичный API основного backend.
- `ml/` - внутренний HTTP API ML-сервиса.
- `testdata/` - спецификация для проверки совместимости инструментов с OpenAPI 3.2.0.
## Структура
Маршруты лежат в `routes/`, схемы - в `components/`. Файлы `openapi.bundle.yml` собираются автоматически. Конфигурации генераторов находятся в `backend/codegen/`, `frontend/codegen/` и `ml/codegen/`.
| Каталог | API |
| --- | --- |
| [core/](core/openapi.yml) | Публичный Go API под `/api/v1` |
| [ml/](ml/openapi.yml) | Внутренний ML API |
| [runner/](runner/openapi.yml) | Исполнитель кода |
| [labd/](labd/openapi.yml) | Подготовка лабораторных окружений |
| [testdata/](testdata/openapi-3.2.0.yml) | Проверка совместимости генераторов |
Из корня: `make -C api check` проверяет контракты, `make generate` обновляет весь сгенерированный код.
В каждом контракте `openapi.yml` подключает `routes/` и `components/`. Тематические схемы объединяет [merge-schemas.py](../scripts/merge-schemas.py), после чего Redocly создает `openapi.bundle.yml`. Производные файлы вручную не редактируются.
Подробнее: [разработка](../docs/ru/DEVELOPMENT.md).
## Генерация
Команды выполняются из корня репозитория:
```sh
make -C api install
make -C api check
make generate
make check-generated
```
`check` собирает и проверяет контракты. `generate` обновляет всех потребителей. `check-generated` ищет отличия от закоммиченного результата и сам генерацию не запускает.
| Потребитель | Генератор и настройки |
| --- | --- |
| Go backend | ogen, [backend/codegen/](../backend/codegen/) |
| Go runner и labd | ogen, настройки в `codegen/` каждого сервиса |
| React | Orval: клиент, query hooks, Zod-схемы и MSW; [frontend/codegen/](../frontend/codegen/) |
| Python ML | datamodel-code-generator: Pydantic; [ml/codegen/](../ml/codegen/) |
`make -C api check-toolchain` проверяет используемые возможности OpenAPI 3.2 на отдельной спецификации. Это проверка текущего набора инструментов, а не обещание поддержки всех возможностей стандарта.
Для сравнения публичного контракта с существующим Git ref: `make -C api check-compat API_BASE_REF=<ref>`.
## Соглашения контракта
- Ошибки: RFC 9457, `application/problem+json`, стабильный `code` и безопасные сообщения. Поля ответа задает схема `Problem`.
- Сессия: HttpOnly cookie; изменяющие запросы с сессией также передают `X-CSRF-Token`. Origin должен соответствовать настройке приложения.
- `Idempotency-Key` передается для операций, где он требуется контрактом. Повтор того же действия использует прежний ключ; другое содержимое требует нового.
- Конкурентные изменения используют `If-Match` или `expected_version` согласно операции. При конфликте клиент перечитывает состояние и сохраняет пользовательский черновик.
- Списки используют ограниченную cursor pagination. Идентификаторы - UUID, время - UTC date-time. Отсутствующее поле и `null` могут иметь разный смысл.
- Коды, лимиты, обязательные заголовки и примеры берутся из конкретной операции и общих компонентов.
## Границы
Наличие операции в спецификации не доказывает готовность ее обработчика. Проверяйте реализацию в `backend/internal/adapter/primary/http/v1/` и ее тесты. Нереализованная операция может вернуть `501 not_implemented`.
Внутренние API ML, runner и labd не предназначены для прямого доступа из браузера. Публичный health-маршрут - `/api/v1/healthz`; служебные `/healthz`, `/readyz` и метрики описаны в руководствах сервисов.
Процесс изменения контрактов: [DEVELOPMENT.md](../docs/ru/DEVELOPMENT.md). Проверки: [TESTING.md](../docs/ru/TESTING.md).
File diff suppressed because it is too large. Load diff
+402
View File
@@ -0,0 +1,402 @@
SearchByNeed:
summary: Search against one confirmed requirements snapshot.
description: The reference is Need.requirements_version, not Need.version.
value:
need_id: 4d3a4a1b-4f60-44c1-9dc2-6c8e6c9d4c11
requirements_version: 3
filters:
specialization: backend
SearchByBank:
summary: Search the organization-visible bank with separate confirmed and declared filters.
value:
filters:
specialization: backend
confirmed_grade: middle
confirmed_category:
specialization: backend
grade: middle
confirmation_status: confirmed
declared_grade: junior
stack:
- go
- postgresql
conditions:
work_formats:
- remote
salary_compatibility: compatible
ThreeGroups:
summary: Synthetic example of main, near, and unconfirmed entries.
description: >-
Illustrative contract values only; these are not measurements from real
candidates. The same organization-scoped handle has independent Backend
and Networks states.
value:
source:
kind: bank
filters:
specialization: null
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
specialization: backend
confirmation_status: confirmed
declared_grade: middle
category:
specialization: backend
grade: middle
basis: synthetic_demo
strength: standard
public_context:
stack:
- go
- postgresql
experience_band: "3_6"
work_formats:
- remote
salary_compatibility: compatible
evidence_summary:
- code: confirmed_category
state: supports
- code: required_skill_evidence
state: supports
- code: work_conditions_match
state: supports
semantic_evidence: []
components:
fit: 0.78
coverage: 0.72
domain: 0.75
semantics: 0.5
percentile: 0.61
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.65
unknown_flags: []
near:
- candidate_handle: cv1_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
specialization: frontend
confirmation_status: confirmed
declared_grade: junior
category:
specialization: frontend
grade: junior
basis: synthetic_demo
strength: standard
public_context:
stack:
- docker
experience_band: null
work_formats:
- hybrid
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
- code: required_skill_evidence
state: gap
semantic_evidence: []
components:
fit: 0.48
coverage: 0.18
domain: 0.5
semantics: 0.5
percentile: 0.42
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.43
unknown_flags:
- component: experience_band
reason: not_in_public_card
- component: salary_compatibility
reason: not_in_public_card
unconfirmed:
- candidate_handle: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
specialization: network_engineer
confirmation_status: unconfirmed
declared_grade: junior
category: null
strength: null
public_context:
stack: null
experience_band: "1_3"
work_formats:
- remote
salary_compatibility: compatible
evidence_summary:
- code: declared_grade
state: declared_only
- code: required_skill_evidence
state: partial
semantic_evidence: []
components:
fit: 0.51
coverage: 0.38
unknown_flags:
- component: assessment
reason: no_confirmation_for_specialization
truncated: false
Empty:
summary: A valid search with no eligible visible candidates.
value:
source:
kind: bank
filters:
specialization: null
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main: []
near: []
unconfirmed: []
truncated: false
MLUnavailable:
summary: Semantic similarity uses the documented neutral value while ML is unavailable.
description: Synthetic example; 0.5 is the FR09 neutral value, not an inference.
value:
source:
kind: bank
filters:
specialization: backend
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
specialization: backend
confirmation_status: confirmed
declared_grade: null
category:
specialization: backend
grade: middle
basis: synthetic_demo
strength: strong
public_context:
stack:
- go
experience_band: 3_plus
work_formats:
- remote
salary_compatibility: compatible
evidence_summary:
- code: confirmed_category
state: supports
semantic_evidence: []
components:
fit: 0.7
coverage: 0.6
domain: 0.5
semantics: 0.5
percentile: 0.6
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.61
unknown_flags:
- component: semantics
reason: ml_unavailable
near: []
unconfirmed: []
truncated: false
CohortBelow30:
summary: A small comparison cohort has no published percentile.
description: Synthetic example; the exact cohort size is not disclosed.
value:
source:
kind: bank
filters:
specialization: backend
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
specialization: backend
confirmation_status: confirmed
declared_grade: middle
category:
specialization: backend
grade: middle
basis: synthetic_demo
strength: standard
public_context:
stack:
- postgresql
experience_band: "3_6"
work_formats:
- office
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
semantic_evidence: []
components:
fit: 0.62
coverage: 0.55
domain: 0.5
semantics: 0.7
percentile: null
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.56
unknown_flags:
- component: percentile
reason: cohort_below_30
near: []
unconfirmed: []
truncated: false
Truncated:
summary: The group limit or the card-view allowance cut the output.
description: >-
Synthetic example. The entries returned are in rank order and already
counted as card views; the flag carries no total.
value:
source:
kind: bank
filters:
specialization: backend
confirmed_grade: null
confirmed_category: null
confirmation_status: null
declared_grade: null
stack: null
conditions: null
groups:
main:
- candidate_handle: cv1_EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
specialization: backend
confirmation_status: confirmed
declared_grade: null
category:
specialization: backend
grade: junior
basis: synthetic_demo
strength: standard
public_context:
stack: null
experience_band: null
work_formats: null
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
semantic_evidence: []
components:
fit: 0.5
coverage: 0.5
domain: 0.5
semantics: 0.5
percentile: null
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.45125
unknown_flags:
- component: semantics
reason: ml_unavailable
- component: percentile
reason: cohort_below_30
near: []
unconfirmed: []
truncated: true
SemanticEvidence:
summary: A need search explains an entry with semantic evidence from published card items.
description: >-
Synthetic example. `semantics` is the calibrated cosine of the stored
vectors; each evidence item pairs one confirmed requirement of the need
with the closest published card item. The project is named only by the
title that the candidate published; the repository address never appears.
value:
source:
kind: need
need_id: 4d3a4a1b-4f60-44c1-9dc2-6c8e6c9d4c11
requirements_version: 3
groups:
main:
- candidate_handle: cv1_FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
specialization: backend
confirmation_status: confirmed
declared_grade: middle
category:
specialization: backend
grade: middle
basis: synthetic_demo
strength: standard
public_context:
stack:
- kafka
- postgresql
experience_band: "3_6"
work_formats: null
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
- code: required_skill_evidence
state: declared_only
semantic_evidence:
- requirement_kind: task
requirement_text: Make payment callbacks idempotent
item_kind: project
project_title: Payment webhook deduplication service
repository_verified: true
similarity: high
- requirement_kind: required_skill
requirement_text: Kafka
item_kind: stack
project_title: null
repository_verified: false
similarity: medium
components:
fit: 0.69
coverage: 0.25
domain: 0.5
semantics: 0.92
percentile: null
competition: 0.0
freshness: 0.5
responsiveness: 0.5
rank_score: 0.59
unknown_flags:
- component: percentile
reason: cohort_below_30
- component: freshness
reason: no_freshness_history
- component: responsiveness
reason: no_response_history
- component: work_formats
reason: not_in_public_card
- component: salary_compatibility
reason: not_in_public_card
- component: domain
reason: not_in_public_card
near: []
unconfirmed: []
truncated: false
+55
View File
@@ -0,0 +1,55 @@
ETag:
description: >-
Strong entity tag of the returned resource version. Send it back in
If-Match to change this version.
required: true
schema:
type: string
minLength: 3
maxLength: 130
pattern: '^"[A-Za-z0-9._~-]{1,128}"$'
example: '"v7"'
RetryAfter:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
minimum: 0
maximum: 86400
example: 30
SessionCookieSet:
description: >-
Sets the session cookie `__Host-lincodex_session` with an opaque random
value and the attributes `Path=/; Secure; HttpOnly; SameSite=Strict` and
no Domain. The `__Host-` prefix makes the browser reject the cookie
without Secure and Path=/ or with a Domain. Max-Age equals the remaining
absolute session lifetime. The value is never readable by scripts or present in a
body.
required: true
schema:
type: string
minLength: 1
maxLength: 4096
pattern: "^__Host-lincodex_session="
example: __Host-lincodex_session=opaque-session-value; Path=/; Max-Age=604800; Secure; HttpOnly; SameSite=Strict
SessionCookieCleared:
description: >-
Removes the session cookie with an empty value, `Max-Age=0`, and the
same attributes it was set with.
required: true
schema:
type: string
minLength: 1
maxLength: 4096
pattern: "^__Host-lincodex_session="
example: __Host-lincodex_session=; Path=/; Max-Age=0; Secure; HttpOnly; SameSite=Strict
CacheControlNoStore:
description: >-
`no-store`: the response carries account or session data that browsers
and intermediaries must not keep.
required: true
schema:
type: string
enum:
- no-store
example: no-store
+201
View File
@@ -0,0 +1,201 @@
IdempotencyKey:
name: Idempotency-Key
in: header
required: true
description: |-
Client-generated key that makes a retried mutating command safe; a UUID v4 is recommended. The value is sent without quotes. The server scopes the key by caller and operation and fingerprints the request by method, path, and body.
Stored for 24 hours after the first request and replayed with the same status, headers, and body: the final 2xx outcome and final deterministic 4xx business outcomes of the command, such as 404 not_found or 409 state_conflict. A replay does not repeat the side effect.
Not stored, so a retry with the same key is evaluated again: 400 validation_failed, 413, and 415 for the request itself, 401 and 403, 409 idempotency_in_progress, 412 version_conflict and 428 precondition_required (nothing changed; read the resource again and retry), 422 idempotency_key_reused, 429, and every 5xx.
Order of checks: authentication (401), request validation (400, 413, 415), authorization (403), then the key. A stored or running request with a different fingerprint returns 422 idempotency_key_reused before any other key check; a running request with the same fingerprint returns 409 idempotency_in_progress; a stored outcome with the same fingerprint is replayed. Only after that does the server check If-Match, so a retry of a completed change replays its outcome instead of failing on the version it has just changed. After 24 hours the key may be accepted as new.
schema:
type: string
minLength: 1
maxLength: 255
pattern: "^[A-Za-z0-9._:-]+$"
example: 5f0c6a8e-3b0e-4c47-9f4c-2a8f9e5d7c11
IfMatch:
name: If-Match
in: header
required: false
description: |-
Strong entity tag of the resource version the client last read, copied from the ETag response header. An operation that changes a versioned resource says in its own description that it requires If-Match.
On such an operation, a missing If-Match returns 428 precondition_required. An If-Match that does not equal the current ETag returns 412 version_conflict and changes nothing; read the resource again before retrying. Only one strong entity tag is accepted; weak tags, lists, and `*` fail validation with 400. The parameter is optional in the schema so that a missing header reaches the application, which answers 428.
schema:
type: string
minLength: 3
maxLength: 130
pattern: '^"[A-Za-z0-9._~-]{1,128}"$'
example: '"v7"'
PageLimit:
name: limit
in: query
required: false
description: >-
Maximum number of items in the page. The server may return fewer items
even when more remain; use `page.has_more` to detect the end.
schema:
type: integer
format: int32
minimum: 1
maximum: 100
default: 20
PageCursor:
name: cursor
in: query
required: false
description: >-
Opaque `page.next_cursor` value from the previous page of the same listing.
Omit it to read the first page. A malformed or foreign cursor returns 400
with code validation_failed.
schema:
type: string
minLength: 1
maxLength: 512
pattern: "^[A-Za-z0-9_-]+$"
AssessmentAttemptId:
name: attempt_id
in: path
required: true
description: >-
Identifier of an assessment attempt of the current candidate. An attempt
of another candidate and an unknown identifier both answer 404
not_found, so identifiers cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-3c4d-7e5f-8a9b-0c1d2e3f4a5b
AttemptClient:
name: X-Attempt-Client
in: header
required: false
description: |-
Random identifier that one open page of the assessment attempt generates when it loads and keeps until it closes, 16 to 64 characters of `A-Za-z0-9_-`. It names the page that holds the single active work session of the attempt (see HoldMyAssessmentWorkSession). The server keeps only a one-way keyed digest bound to the attempt, never the value.
A request that omits the header counts as one anonymous client. It is refused with 409 `state_conflict` while another page holds the work session, and it is accepted while nobody does, so a client that predates the header keeps working until a page holds the session.
schema:
type: string
minLength: 16
maxLength: 64
pattern: "^[A-Za-z0-9_-]+$"
example: 7mK2pQx9Rt4vWc1Zb8NfYd3Ha6Js0LeG
AttemptClientRequired:
name: X-Attempt-Client
in: header
required: true
description: >-
The page identifier described at AttemptClient. It is required here
because the operation exists to hold or release the work session of one
page.
schema:
type: string
minLength: 16
maxLength: 64
pattern: "^[A-Za-z0-9_-]+$"
example: 7mK2pQx9Rt4vWc1Zb8NfYd3Ha6Js0LeG
OrganizationId:
name: org_id
in: path
required: true
description: >-
Identifier of an organization. Access comes only from an active
membership of the session account in this organization, checked by the
server on every request; the identifier itself grants nothing. An
organization without such a membership and an unknown identifier both
answer 404 not_found, so organizations cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
CandidateHandle:
name: candidate_handle
in: path
required: true
description: >-
Organization-scoped opaque candidate alias issued by the current visible
card projection. The server resolves it only for the organization in the
path and rechecks current membership, publication consent, and hiding on
every read. Unknown, hidden, unpublished, and suppressed candidates all
answer the same 404.
schema:
$ref: ./schemas.yml#/CandidateHandle
example: cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
NeedId:
name: need_id
in: path
required: true
description: >-
Identifier of a need of the organization in the path. A need of another
organization and an unknown identifier both answer 404 not_found.
schema:
type: string
format: uuid
example: 01928f7a-2b3c-7d4e-9f5a-6b7c8d9e0f12
SupportCaseId:
name: case_id
in: path
required: true
description: >-
Identifier of a case of the current account. A case of another account
and an unknown identifier both answer 404 not_found, so identifiers
cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-6e7f-7a8b-9c0d-1e2f3a4b5c6d
InvitationId:
name: invitation_id
in: path
required: true
description: >-
Identifier of an invitation of the organization in the path. An
invitation of another organization and an unknown identifier both answer
404 not_found.
schema:
type: string
format: uuid
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
MyInvitationId:
name: invitation_id
in: path
required: true
description: >-
Identifier of an invitation addressed to the current candidate. A draft,
an invitation addressed to another candidate, and an unknown identifier
all answer 404 not_found, so identifiers cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-7a8b-7c9d-8e0f-1a2b3c4d5e6f
HiddenOrganizationId:
name: org_id
in: path
required: true
description: >-
Identifier of the organization that the current candidate hides or stops
hiding the profile from. It names the target of a candidate's own
setting and grants the candidate nothing about the organization. Hiding
answers the same 404 not_found for an organization that does not exist
and for one that the candidate cannot see, so organizations cannot be
enumerated; lifting the hiding answers 204 for any well-formed
identifier.
schema:
type: string
format: uuid
example: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
NotificationId:
name: notification_id
in: path
required: true
description: >-
Identifier of an item of the inbox of the current account in the cabinet
that the path names. An item of another account, an item of another
organization context, and an unknown identifier all answer 404 not_found,
so identifiers cannot be enumerated.
schema:
type: string
format: uuid
example: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
+717
View File
@@ -0,0 +1,717 @@
ValidationFailed:
description: >-
Parameters, headers, or the body do not match the contract, or the body
violates a domain rule such as salary_from <= salary_to. The body has code
validation_failed and lists the failing fields in `errors` with body or
parameter pointers.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
validation_failed:
$ref: ./examples.yml#/ValidationFailed
domain_rule:
$ref: ./examples.yml#/DomainValidationFailed
Unauthenticated:
description: No valid session or credentials; code unauthenticated.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
unauthenticated:
$ref: ./examples.yml#/Unauthenticated
Forbidden:
description: >-
The caller is authenticated but may not perform the operation; code
forbidden.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
forbidden:
$ref: ./examples.yml#/Forbidden
NotFound:
description: >-
The object does not exist or is not visible to the caller; code
not_found. Missing and inaccessible objects are not distinguished.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
not_found:
$ref: ./examples.yml#/NotFound
IdempotencyInProgress:
description: >-
A request with the same Idempotency-Key and the same fingerprint is still
being processed; code idempotency_in_progress. Retry after the original
request completes.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
StateConflict:
description: >-
The operation conflicts with the current state of the resource, for
example a transition that is not allowed from its current status; code
state_conflict.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/StateConflict
PreconditionFailed:
description: >-
If-Match does not match the current resource version; code
version_conflict. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/VersionConflict
PayloadTooLarge:
description: The request body exceeds the operation limit; code payload_too_large.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
payload_too_large:
$ref: ./examples.yml#/PayloadTooLarge
UnprocessableContent:
description: >-
The Idempotency-Key was already used with a different request within 24
hours; code idempotency_key_reused. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
idempotency_key_reused:
$ref: ./examples.yml#/IdempotencyKeyReused
PreconditionRequired:
description: The operation requires If-Match; code precondition_required.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
precondition_required:
$ref: ./examples.yml#/PreconditionRequired
TooManyRequests:
description: Too many requests; code rate_limited.
headers:
Retry-After:
$ref: ./headers.yml#/RetryAfter
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
rate_limited:
$ref: ./examples.yml#/RateLimited
Internal:
description: Unexpected server error; code internal.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
internal:
$ref: ./examples.yml#/Internal
NotImplemented:
description: >-
The operation is declared in the contract but not implemented yet; code
not_implemented.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
not_implemented:
$ref: ./examples.yml#/NotImplemented
ServiceUnavailable:
description: >-
The service cannot serve the request now; code service_unavailable.
Retry-After is sent when a retry after that wait can succeed, for example
when a queue is full, and omitted when a retry cannot help soon, for
example when the feature is not enabled on this server.
headers:
Retry-After:
$ref: ./headers.yml#/RetryAfter
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
service_unavailable:
summary: A queue is full.
value:
type: urn:lincodex:problem:service_unavailable
title: Service unavailable
status: 503
code: service_unavailable
Problem:
description: >-
Any error response. The body is a Problem whose `status` equals the HTTP
status and whose `code` is one of ProblemCode.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
validation_failed:
$ref: ./examples.yml#/ValidationFailed
not_found:
$ref: ./examples.yml#/NotFound
internal:
$ref: ./examples.yml#/Internal
not_implemented:
$ref: ./examples.yml#/NotImplemented
RegistrationValidationFailed:
description: >-
The body does not match the contract or violates a registration rule:
a password outside 15-128 characters or on the blocklist, or a consent
text version that is not the current one; code validation_failed with
body pointers. An email that already belongs to an account is never a
validation error.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
validation_failed:
$ref: ./examples.yml#/RegistrationValidationFailed
EmailVerificationFailed:
description: >-
The token cannot verify an email. Code verification_token_expired means
the token is past its lifetime; verification_token_invalid means it is
unknown, already used, or replaced by a newer link; validation_failed
with the pointer `/token` means the token is malformed. Nothing was
changed in any case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
verification_token_expired:
$ref: ./examples.yml#/VerificationTokenExpired
verification_token_invalid:
$ref: ./examples.yml#/VerificationTokenInvalid
validation_failed:
$ref: ./examples.yml#/VerificationTokenMalformed
EmailVerificationCodeFailed:
description: >-
The code does not verify the email. Code verification_token_invalid covers
every refusal in the same shape: an unknown address, an address without an
open code, a wrong code, an expired code, a wrong password, and a code that
was burned after five failed attempts. Code validation_failed means the
body does not match the contract, such as a code that is not six digits,
and carries the pointer `/code`, `/email`, or `/password`. Nothing was
changed in any case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
verification_code_invalid:
$ref: ./examples.yml#/VerificationCodeInvalid
validation_failed:
$ref: ./examples.yml#/VerificationCodeMalformed
InvalidCredentials:
description: >-
The email and password do not match an account; code
invalid_credentials. An unknown email and a wrong password get the same
response.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
invalid_credentials:
$ref: ./examples.yml#/InvalidCredentials
CsrfCheckFailed:
description: >-
The request failed cross-site request protection: the X-CSRF-Token
header is missing or does not belong to the session, or the Origin is
not allowed; code csrf_check_failed. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
csrf_check_failed:
$ref: ./examples.yml#/CsrfCheckFailed
CsrfCheckFailedOrForbidden:
description: >-
The request failed cross-site request protection, code
csrf_check_failed: the X-CSRF-Token header is missing or does not belong
to the session, or the Origin is not allowed. Or the account may not
perform the operation, code forbidden. Nothing was changed in either
case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
csrf_check_failed:
$ref: ./examples.yml#/CsrfCheckFailed
forbidden:
$ref: ./examples.yml#/Forbidden
QuestionnaireValidationFailed:
description: >-
The body does not match the contract or violates a questionnaire rule:
more than two specializations, an unknown specialization, grade, or task
language, an unknown field such as confirmed_grade, a repeated
specialization, or a task language that the specialization's published
bank does not offer; code validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
too_many_specializations:
$ref: ./examples.yml#/QuestionnaireTooManySpecializations
unknown_grade:
$ref: ./examples.yml#/QuestionnaireUnknownGrade
repeated_specialization:
$ref: ./examples.yml#/QuestionnaireRepeatedSpecialization
QuestionnaireVersionConflict:
description: >-
`expected_version` is not the current questionnaire version; code
version_conflict. Nothing was changed; read the questionnaire again
before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/VersionConflict
AssessmentAttemptCreateValidationFailed:
description: >-
The body does not match the contract or violates an assessment rule: an
unknown specialization, grade, or task language, an unknown field such
as mode or seed, a specialization that is not in the questionnaire, or
a task language that the published bank does not offer; code
validation_failed with body pointers. Nothing was created, and the
outcome is not stored under the Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
specialization_not_in_questionnaire:
$ref: ./examples.yml#/AssessmentSpecializationNotInQuestionnaire
AssessmentAnswerValidationFailed:
description: >-
The body does not match the contract or the answer does not fit the
item: a format other than the item format, an option, element, or line
that the item does not have, an order that is not a permutation of every
element, more selections than the item allows, a text longer than the
item allows, a language that the practice does not offer, or an unknown
field such as score or duration; code validation_failed with body
pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was stored, and the outcome is
not stored under the Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
unknown_option:
$ref: ./examples.yml#/AssessmentAnswerUnknownOption
score_sent_by_client:
$ref: ./examples.yml#/AssessmentAnswerUnknownField
AssessmentCommandConflict:
description: >-
The attempt state does not allow the answer at the current version, code
state_conflict: the attempt is terminal or past its limits, the item is
not the current item, the item already has a different answer, or the
practice has a pending or finished verdict and the submission differs.
Or a request with the same Idempotency-Key is still running, code
idempotency_in_progress. Nothing was changed in either case; read the
attempt to see its state.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/AssessmentItemNotCurrent
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
AssessmentFinalizeConflict:
description: >-
The attempt state does not allow finalize at the current version, code
state_conflict: items or the main practice are unfinished, a practice
verdict is pending, or the attempt ended as expired or insufficient_bank.
If required questions are unfinished, the response includes their frozen
IDs in `pending_item_ids`; other state conflicts omit that field. Or a
request with the same Idempotency-Key is still running, code
idempotency_in_progress. Nothing was changed in either case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/AssessmentFinalizeConflictProblem
examples:
state_conflict:
$ref: ./examples.yml#/AssessmentFinalizeNotReady
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
AssessmentCreateConflict:
description: >-
No attempt can start for the category now, code state_conflict: the
specialization already has an active attempt, a retry or promotion
interval or the attempt limit blocks the grade, or the bank is
insufficient. GetMyAssessmentAvailability tells which, with the date
when a blocked attempt opens. Or a request with the same Idempotency-Key
is still running, code idempotency_in_progress. Nothing was created in
either case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/AssessmentAttemptNotAvailable
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
AssessmentResultNotReady:
description: >-
The attempt is still active, so it has no result yet; code
state_conflict. The attempt state tells what remains to be done.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/AssessmentResultNotReady
AssessmentVersionConflict:
description: >-
`expected_version` is not the current attempt version; code
version_conflict. Nothing was changed, and the outcome is not stored
under the Idempotency-Key; read the attempt again before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/AssessmentStaleVersion
NeedValidationFailed:
description: >-
The body does not match the contract or violates a need rule: an unknown
field such as rec_score, members, or candidate_minimum, a field sent as a
bare value instead of `{value, status}`, a list sent as null, an unknown
specialization, grade, work format, currency, period, or tax basis, a
salary bound that is not a positive multiple of 1000, a lower bound that
is not below the upper one, a range width outside 10-40% of its midpoint,
a repeated skill or task, status `extracted` with a value that is not the
stored suggestion, a vacancy that is not a vacancy of the organization,
or a missing or invalid expected_version; code validation_failed with
body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed, and the
outcome is not stored under an Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
reversed_salary_range:
$ref: ./examples.yml#/NeedSalaryRangeReversed
equal_salary_bounds:
$ref: ./examples.yml#/NeedSalaryEqualBounds
salary_range_too_wide:
$ref: ./examples.yml#/NeedSalaryRangeTooWide
salary_without_tax_basis:
$ref: ./examples.yml#/NeedSalaryWithoutTaxBasis
extracted_value_mismatch:
$ref: ./examples.yml#/NeedExtractedValueMismatch
recommendation_score_sent_by_client:
$ref: ./examples.yml#/NeedUnknownField
missing_expected_version:
$ref: ./examples.yml#/NeedMissingExpectedVersion
NeedVersionConflict:
description: >-
`expected_version` is not the current need version; code
version_conflict. Nothing was changed; read the need again before
retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/NeedStaleVersion
SupportCaseValidationFailed:
description: >-
The body does not match the contract or violates a case rule: an empty
or blank description, including one made only of Unicode spaces, an
unknown case type, an object identifier that is not a UUID, an object
type that the
case type does not accept, a missing required field of the type, an
unknown field such as status, decision, moderator, or priority, or a
complaint reason that requires an invitation reference; code
validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was
created, and the outcome is not stored under the Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
blank_description:
$ref: ./examples.yml#/SupportCaseBlankDescription
unknown_type:
$ref: ./examples.yml#/SupportCaseUnknownType
decision_sent_by_client:
$ref: ./examples.yml#/SupportCaseUnknownField
malformed_object_id:
$ref: ./examples.yml#/SupportCaseMalformedReference
complaint_reason_needs_invitation:
$ref: ./examples.yml#/SupportCaseComplaintNeedsInvitation
SupportCaseCreateConflict:
description: >-
The referenced object does not allow this case now, code
state_conflict: the attempt of a grade appeal has no result yet, the
case referenced by a grade appeal is not a manual assessment resolved
with the outcome assessed, the attempt of an anti-cheat appeal has no
anti-cheat review decision, the attempt or the manual assessment
already has an appeal of the same type, or an open case of the same
type already exists for the category or the object. Or a request
with the same Idempotency-Key is still running, code
idempotency_in_progress. Nothing was created in either case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/SupportCaseAppealExists
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
InvitationValidationFailed:
description: >-
The body does not match the contract or violates an invitation rule: a
missing term or package condition, a package condition left out instead
of `not_provided`, a salary range without its tax basis, a salary bound
that is not a positive multiple of 1000, a lower bound that is not below
the upper one, a range width outside 10-40% of its midpoint, the
`office` or `hybrid` format without a place of work, a repeated
technology, a candidate handle that the organization cannot use, a need
or requirements version that the organization does not have, a response
period other than 3, 7, or 14 days, an unknown field such as a
candidate's email address or salary minimum, or a missing or invalid
expected_version; code validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed, and the outcome is not stored under an
Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
without_tax_basis:
$ref: ./examples.yml#/InvitationWithoutTaxBasis
without_communication_method:
$ref: ./examples.yml#/InvitationWithoutCommunicationMethod
package_condition_left_out:
$ref: ./examples.yml#/InvitationPackageItemMissing
salary_range_too_wide:
$ref: ./examples.yml#/InvitationSalaryRangeTooWide
location_required:
$ref: ./examples.yml#/InvitationLocationRequired
unknown_candidate:
$ref: ./examples.yml#/InvitationUnknownCandidate
candidate_data_in_body:
$ref: ./examples.yml#/InvitationCandidateDataInBody
InvitationAcceptValidationFailed:
description: >-
The body does not match the contract or violates a rule of the consent
C4: a missing `terms_version` or `expected_version`, `accepted` other
than true, an empty or repeated choice of contact fields, an unknown
field kind, a field that the candidate's profile does not hold, a
consent text version that is not the published one, or an unknown field
such as a contact value; code validation_failed with body pointers.
Nothing was changed, no consent or grant was recorded, and the outcome
is not stored under the Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
empty_field_choice:
$ref: ./examples.yml#/InvitationConsentWithoutFields
outdated_consent_text:
$ref: ./examples.yml#/InvitationConsentTextOutdated
missing_terms_version:
$ref: ./examples.yml#/InvitationMissingTermsVersion
InvitationVersionConflict:
description: >-
`expected_version` is not the current invitation version, or, for an
acceptance, `terms_version` is not the current terms version; code
version_conflict. Nothing was changed, no consent or grant was
recorded, and the outcome is not stored under an Idempotency-Key; read
the invitation again before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
stale_terms:
$ref: ./examples.yml#/InvitationStaleTerms
stale_version:
$ref: ./examples.yml#/InvitationStaleVersion
InvitationCommandConflict:
description: >-
The state of the invitation does not allow the command, code
state_conflict: for example an acceptance of a withdrawn or expired
invitation or one past its deadline, a send of an invitation that is no
longer a draft, a send blocked by the pending limit of the need or by
the pause after a decline, or a second raise of the upper salary bound.
The invitation tells the client its state. Or a request with the same
Idempotency-Key is still running, code idempotency_in_progress. Nothing
was changed in either case.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
not_answerable:
$ref: ./examples.yml#/InvitationNotAnswerable
salary_raise_used:
$ref: ./examples.yml#/InvitationSalaryRaiseUsed
send_blocked:
$ref: ./examples.yml#/InvitationSendBlocked
idempotency_in_progress:
$ref: ./examples.yml#/IdempotencyInProgress
OrganizationValidationFailed:
description: >-
The body does not match the contract or violates an organization rule:
a missing name, an unknown field such as role, verification_level,
verification, members, owner, or version, a name or sphere with
surrounding whitespace or a line break, a website that is not an https
URL of a host name, a phone number outside E.164, a Telegram username
without the leading @, a contact that has no valid form, more than ten
representatives, or a missing or invalid expected_version; code
validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed, and the
outcome is not stored under an Idempotency-Key.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
role_sent_by_client:
$ref: ./examples.yml#/OrganizationUnknownField
website_not_https:
$ref: ./examples.yml#/OrganizationWebsiteNotHttps
name_with_surrounding_whitespace:
$ref: ./examples.yml#/OrganizationNameWithWhitespace
missing_expected_version:
$ref: ./examples.yml#/OrganizationMissingExpectedVersion
OrganizationVersionConflict:
description: >-
`expected_version` is not the current version of the organization; code
version_conflict. Nothing was changed; read the organization again
before retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/OrganizationStaleVersion
ProfileValidationFailed:
description: >-
The body does not match the contract or violates a profile rule: an
unknown field such as confirmed_grade, category, trust_level, or source,
a phone number outside E.164, a Telegram username without the leading @,
an email that is not an address, a month outside the YYYY-MM format, a
salary that is not a positive multiple of 1000, more items than a list
allows, a repeated tag, skill, or role specialization, a period that
ends before it starts or lies in the future, a decision extracted for a
value that is not a stored suggestion, an overlapping experience period
without an explicit date-pair acknowledgement, or a missing or invalid
expected_version; code validation_failed with body pointers. A missing nested field has its own pointer with the code required; an unknown field points at the object that contains it, a failure inside an array element points at the array, and only a malformed document, an unknown top-level field, or an unknown top-level variant points at the whole body. Nothing was changed. The problem never repeats a submitted value, because the body is personal data.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
phone_not_e164:
$ref: ./examples.yml#/ProfilePhoneNotE164
extracted_value_changed:
$ref: ./examples.yml#/ProfileExtractedValueChanged
repeated_role:
$ref: ./examples.yml#/ProfileRepeatedRole
ProfileVersionConflict:
description: >-
`expected_version` is not the current profile version; code
version_conflict. Nothing was changed; read the profile again before
retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/ProfileStaleVersion
PrivacyValidationFailed:
description: >-
The body does not match the contract or breaks a visibility rule: an
unknown field, a repeated or unknown card field, a published state with
no field, a closed state with a field, a search status other than
looking and not_looking, or a missing or invalid expected_version; code
validation_failed with body pointers. Nothing was changed. The problem
never repeats a submitted value.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
published_without_fields:
$ref: ./examples.yml#/PrivacyPublishedWithoutFields
PrivacyVersionConflict:
description: >-
`expected_version` is not the current version of the setting; code
version_conflict. Nothing was changed; read the settings again before
retrying.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
version_conflict:
$ref: ./examples.yml#/PrivacyStaleVersion
PublicationConsentRequired:
description: >-
The profile cannot be published because the account has no active,
unrevoked C2 consent; code state_conflict. Nothing was changed. The
candidate gives C2 in the consent settings first. `errors` holds the entry
`{in: body, pointer: /state, code: consent_required}`.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
state_conflict:
$ref: ./examples.yml#/PublicationConsentRequiredConflict
HiddenOrganizationLimit:
description: >-
The candidate already hides the maximum number of organizations (1000);
code state_conflict with the entry `{in: path, pointer: /org_id, code:
limit_reached}` in `errors`. Nothing was changed.
content:
application/problem+json:
schema:
$ref: ./schemas.yml#/Problem
examples:
limit_reached:
$ref: ./examples.yml#/HiddenOrganizationLimitReached
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,208 @@
schemas:
AssessmentSignalEvent:
description: >-
One client-reported event bound to an item instance of the attempt. The
timestamp is untrusted input and is used only as event metadata; server
receipt time is authoritative for limits and retention.
oneOf:
- $ref: "#/schemas/AssessmentFocusLossSignal"
- $ref: "#/schemas/AssessmentClipboardSignal"
- $ref: "#/schemas/AssessmentFullscreenExitSignal"
- $ref: "#/schemas/AssessmentCaptureSignal"
discriminator:
propertyName: kind
mapping:
focus_loss: "#/schemas/AssessmentFocusLossSignal"
copy: "#/schemas/AssessmentClipboardSignal"
paste: "#/schemas/AssessmentClipboardSignal"
cut: "#/schemas/AssessmentClipboardSignal"
fullscreen_exit: "#/schemas/AssessmentFullscreenExitSignal"
screenshot_key: "#/schemas/AssessmentCaptureSignal"
devtools_open: "#/schemas/AssessmentCaptureSignal"
AssessmentFocusLossSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
- duration_ms
properties:
kind:
type: string
enum:
- focus_loss
item_instance_id:
$ref: "#/schemas/AssessmentItemId"
occurred_at:
$ref: "#/schemas/Timestamp"
duration_ms:
type: integer
format: int32
minimum: 1
maximum: 259200000
description: Client-measured duration away from the assessment tab or window, in milliseconds.
AssessmentClipboardSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
- size_bytes
properties:
kind:
type: string
enum:
- copy
- paste
- cut
item_instance_id:
$ref: "#/schemas/AssessmentItemId"
occurred_at:
$ref: "#/schemas/Timestamp"
size_bytes:
type: integer
format: int32
minimum: 0
maximum: 2147483647
description: >-
Size only; clipboard and selection contents are never transmitted or
retained. For `paste` it is the UTF-8 byte count of the pasted plain
text plus the byte size of pasted files, counted on the device from
the paste event. For `copy` and `cut` it is the selection length in
UTF-16 code units taken from the selection offsets of a form field,
or zero when the field offsets are unavailable; it is an approximate
size and the selected text is not read. The server applies no
conversion and treats the value as an order-of-magnitude indicator.
AssessmentFullscreenExitSignal:
type: object
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
properties:
kind:
type: string
enum:
- fullscreen_exit
item_instance_id:
$ref: "#/schemas/AssessmentItemId"
occurred_at:
$ref: "#/schemas/Timestamp"
AssessmentCaptureSignal:
type: object
description: >-
A hint that the screen may be captured or inspected. `screenshot_key`
is a key or key combination that the browser saw and that usually takes
a screenshot (PrintScreen, Cmd+Shift+3, 4, or 5 on macOS, Win+Shift+S);
`devtools_open` is the result of a heuristic that guesses that the
developer tools are open (a docked panel changes the window size, or the
console reads an object). Both are weak: a browser does not see every
screenshot, an operating system can take one without a key the page
sees, a phone photo is invisible to the page, and the heuristic gives
false positives. They lead to attention in a manual review at most,
never to a score change, and they carry no measurement.
additionalProperties: false
required:
- kind
- item_instance_id
- occurred_at
properties:
kind:
type: string
enum:
- screenshot_key
- devtools_open
item_instance_id:
$ref: "#/schemas/AssessmentItemId"
occurred_at:
$ref: "#/schemas/Timestamp"
AssessmentSignalBatch:
type: object
description: >-
A bounded batch of client event metadata. The raw request body is limited
to 32 KiB before decoding and the batch contains at most 50 events.
additionalProperties: false
required:
- events
properties:
events:
type: array
minItems: 1
maxItems: 50
items:
$ref: "#/schemas/AssessmentSignalEvent"
AssessmentSignalReceipt:
type: object
description: >-
Receipt for the submitted batch. It contains no signal details, score,
review decision, threshold, or result band.
additionalProperties: false
required:
- status
- accepted_events
- received_at
properties:
status:
type: string
enum:
- accepted
- saturated
description: >-
`saturated` means no event from this batch was stored because the
attempt's bounded evidence storage is full.
accepted_events:
type: integer
format: int32
minimum: 0
maximum: 50
description: Number of events stored from this batch; zero when saturated.
received_at:
$ref: "#/schemas/Timestamp"
AssessmentSignalNoticeVersion:
type: integer
format: int32
minimum: 1
maximum: 2147483647
description: >-
Version of the notice text about the collected signals. The client
shows the text of the version it knows and sends that version back when
the candidate confirms; a changed text gets a new version and needs a
new confirmation.
AssessmentSignalNotice:
type: object
description: >-
State of the notice about the signals that are collected during a real
assessment attempt. The acknowledgement is a record that the candidate
was informed. It is not a consent, grants no purpose, and neither
enables nor blocks signal storage; C3 remains the only consent that
the signal operation checks.
additionalProperties: false
required:
- notice_version
- acknowledged
- acknowledged_at
properties:
notice_version:
allOf:
- $ref: "#/schemas/AssessmentSignalNoticeVersion"
description: The version the server currently requires the candidate to acknowledge.
acknowledged:
type: boolean
description: True when the candidate acknowledged `notice_version`.
acknowledged_at:
description: Server time of the first acknowledgement of this version, or null.
oneOf:
- $ref: "#/schemas/Timestamp"
- type: "null"
AssessmentSignalNoticeAcknowledgement:
type: object
description: The notice version the candidate was shown and acknowledged.
additionalProperties: false
required:
- notice_version
properties:
notice_version:
$ref: "#/schemas/AssessmentSignalNoticeVersion"
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,212 @@
schemas:
DirectionCode:
type: string
description: |-
Stable code of a professional direction, the group that a specialization belongs to.
- development: Development.
- infrastructure: Infrastructure.
- data: Data.
- security: Security.
- quality: Quality.
Adding a value is a contract change.
enum:
- development
- infrastructure
- data
- security
- quality
SpecializationCode:
type: string
description: |-
Stable code of a specialization. A category is a specialization together with a confirmed grade; programming languages and the technology stack are separate attributes and never form a category of their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment module, not a specialization, and has no code here.
- backend: Backend (development).
- frontend: Frontend (development).
- mobile: Mobile (development).
- network_engineer: Network Engineer (infrastructure).
- devops_sre: DevOps/SRE (infrastructure).
- data_analyst: Data Analyst (data).
- ds_ml: DS/ML (data).
- information_security: Information security (security).
- qa: QA (quality).
Adding a value is a contract change; renaming or removing one is a breaking change.
enum:
- backend
- frontend
- mobile
- network_engineer
- devops_sre
- data_analyst
- ds_ml
- information_security
- qa
GradeCode:
type: string
description: |-
Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a contract change.
enum:
- intern
- junior
- middle
- senior
TaskLanguage:
type: string
description: >-
Programming language in which assessment tasks of a specialization are
offered and solved. It is the language of the task bank, not the
candidate's platform stack, and it never forms a separate category.
Only banks that offer a choice of language define task languages; the
first Backend bank offers Python and Go. Adding a value is a contract
change.
enum:
- python
- go
TestAvailabilityStatus:
type: string
description: >-
Whether an assessment can start for the specialization. `available`
means that a published task bank exists for at least one grade, listed
in `TestAvailability.grades`. `in_development` means that no grade of
the specialization has a published bank yet; the specialization can
still be chosen in the questionnaire, but no assessment starts and no
category can be confirmed for it. Presence in the catalog or in demo
data never means that a test is ready.
enum:
- available
- in_development
TestAvailability:
type: object
description: >-
Assessment availability of a specialization, derived by the server from
the published task banks at the time of the request. The MVP opens an
assessment only for a category, a specialization and a grade, that has
a published bank. `status` is `available` exactly when `grades` is not
empty; for `in_development` both `grades` and `task_languages` are
empty.
additionalProperties: false
required:
- status
- grades
- task_languages
- note
properties:
status:
$ref: "#/schemas/TestAvailabilityStatus"
grades:
type: array
maxItems: 10
uniqueItems: true
description: >-
Grades of the specialization with a published task bank, in
ascending order. Only these categories can be assessed and
confirmed.
items:
$ref: "#/schemas/GradeCode"
task_languages:
type: array
maxItems: 2
uniqueItems: true
description: >-
Task languages that the published bank offers for this
specialization. Empty when the bank does not offer a choice of
language, as for Network Engineer, or when no bank is published.
The questionnaire accepts only these languages for the
specialization.
items:
$ref: "#/schemas/TaskLanguage"
note:
type:
- string
- "null"
minLength: 1
maxLength: 300
description: >-
Short Russian note for the candidate, for example why the test is
not available yet, or null. Plain text; the client shows it as
text, never as HTML.
CatalogSpecialization:
type: object
description: Specialization in the catalog with its assessment availability.
additionalProperties: false
required:
- code
- title
- test_availability
properties:
code:
$ref: "#/schemas/SpecializationCode"
title:
type: string
minLength: 1
maxLength: 100
description: Display name in Russian. Plain text.
test_availability:
$ref: "#/schemas/TestAvailability"
CatalogDirection:
type: object
description: >-
Professional direction with its specializations. Each specialization
belongs to exactly one direction.
additionalProperties: false
required:
- code
- title
- specializations
properties:
code:
$ref: "#/schemas/DirectionCode"
title:
type: string
minLength: 1
maxLength: 100
description: Display name in Russian. Plain text.
specializations:
type: array
minItems: 1
maxItems: 20
description: Specializations of the direction in display order.
items:
$ref: "#/schemas/CatalogSpecialization"
CatalogGrade:
type: object
description: Grade of the scale with its display name.
additionalProperties: false
required:
- code
- title
properties:
code:
$ref: "#/schemas/GradeCode"
title:
type: string
minLength: 1
maxLength: 100
description: Display name in Russian. Plain text.
SpecializationCatalog:
type: object
description: >-
Catalog of directions, specializations, and the grade scale that the
questionnaire and the assessment use. The catalog is reference data and
identical for every caller; it contains no personal data.
additionalProperties: false
required:
- directions
- grades
properties:
directions:
type: array
minItems: 1
maxItems: 20
description: Directions in display order.
items:
$ref: "#/schemas/CatalogDirection"
grades:
type: array
minItems: 1
maxItems: 10
description: Grade scale in ascending order.
items:
$ref: "#/schemas/CatalogGrade"
@@ -0,0 +1,49 @@
schemas:
Timestamp:
type: string
format: date-time
description: >-
UTC instant in RFC 3339 format with the Z suffix, for example
2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in
this contract uses this schema.
examples:
- "2026-10-05T09:30:00Z"
PageInfo:
type: object
description: >-
Cursor pagination state of a list response. Lists are ordered by a
stable server-defined key. To read the next page, repeat the request
with the same filters and `cursor` set to `next_cursor`.
additionalProperties: false
required:
- has_more
- next_cursor
properties:
has_more:
type: boolean
description: Whether another page follows this one.
next_cursor:
type:
- string
- "null"
minLength: 1
maxLength: 512
pattern: "^[A-Za-z0-9_-]+$"
description: >-
Opaque cursor of the next page, or null on the last page. Clients
must not parse, build, or store it beyond the current listing.
CandidateHandle:
type: string
minLength: 47
maxLength: 47
pattern: "^cv1_[A-Za-z0-9_-]{43}$"
description: >-
Opaque reference to a candidate as one organization sees it, taken
from the organization-scoped anonymous card. It is a versioned HMAC
alias, not a candidate account or profile identifier; it contains no
contact information and is meaningless to another organization. The
server resolves it only against the current visible cohort of the
organization in the path. Clients never parse or construct it. It is
shared by the candidate-card read and invitations.
examples:
- cv1_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -0,0 +1,244 @@
schemas:
ConsentPurposeCode:
type: string
description: |-
One of the independent consents of PRD FR01. A grant or a revocation of one purpose never changes another.
- c1: processing of personal data, given at registration.
- c2: publication of the candidate card. The record proves the consent to the published text; which fields were published and when is evidence of the publication history, not of this record. Adding a field scope to c2 records later is an additive change.
- c3: automatic categorization. Without it the candidate can request a manual assessment by the same rubric.
- c4: transfer of the selected contact data to one organization, currently given only in an invitation acceptance.
- c5: import of FSP results.
ConsentPurpose lists the subset whose text the client may read before an account exists.
enum:
- c1
- c2
- c3
- c4
- c5
ConsentSettingsPurpose:
type: string
description: >-
Consent text that an authenticated account can read and accept in
settings. C4 is scoped to an invitation and organization, so it is not
available through the general settings flow.
enum:
- c1
- c2
- c3
- c5
ConsentSettingsRevokePurpose:
type: string
description: >-
Consent that can be revoked through the general settings flow. C1 uses
the account deletion request, and C4 must be revoked for one
organization.
enum:
- c2
- c3
- c5
ConsentState:
type: string
description: |-
State of a consent record, computed from the ledger.
- active: the consent holds. For c1, c2, c3, and c5 it is the newest unrevoked record of its purpose; every unrevoked c4 record is active, one per accepted invitation.
- superseded: the subject later accepted another text version of the same purpose and has not revoked either. The record stays as evidence for its own time; it never applies to c4.
- revoked: the consent was revoked. The record keeps its grant and its one revocation time; a later grant is a new record and never reopens it.
enum:
- active
- superseded
- revoked
ConsentSource:
type: string
description: |-
Where the subject gave the consent.
- registration: the c1 acceptance of RegisterAccount.
- consent_settings: the consent settings of the account, for c1, c2, c3, and c5 (planned).
- invitation_acceptance: the c4 acceptance of AcceptMyInvitation.
A c4 given when sending an application (PRD Q9) is planned as an additional value.
enum:
- registration
- consent_settings
- invitation_acceptance
ConsentRevocationSource:
type: string
description: |-
Who recorded a revocation.
- consent_settings: the subject revoked the consent in the product.
- support_request: an operator recorded a revocation that the subject requested through support.
enum:
- consent_settings
- support_request
ConsentOrganization:
type: object
description: >-
Organization of a c4 consent as the consent recorded it. `name` is a
snapshot of the name that the shown consent text carried at the time
of the consent, and the stored text hash proves that text with this
name; a later rename of the organization does not change it, so it
can differ from the current name.
additionalProperties: false
required:
- id
- name
properties:
id:
type: string
format: uuid
description: Identifier of the organization.
name:
type: string
minLength: 1
maxLength: 200
description: >-
Name of the organization in the consent text at the time of the
consent. Plain text; clients show it as text, never as HTML.
ConsentRecord:
type: object
description: >-
One record of the consent ledger as its subject reads it: the purpose,
the text version the subject accepted, where and when the consent was
given, its state, and the revocation. A c4 record also names the
organization, the contact fields, and the invitation with its terms
version; these fields are null for every other purpose. The server
also stores the SHA-256 hash of exactly the text the subject saw,
which a client never sends or receives.
additionalProperties: false
required:
- id
- purpose
- state
- text_version
- source
- granted_at
- revoked_at
- revocation_source
- organization
- fields
- invitation_id
- invitation_terms_version
properties:
id:
type: string
format: uuid
description: Identifier of the record.
purpose:
$ref: "#/schemas/ConsentPurposeCode"
state:
$ref: "#/schemas/ConsentState"
text_version:
description: Version of the consent text that the subject accepted.
allOf:
- $ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
source:
$ref: "#/schemas/ConsentSource"
granted_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
revoked_at:
description: Moment of the revocation, or null unless `state` is `revoked`.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
revocation_source:
description: Who recorded the revocation, or null unless `state` is `revoked`.
oneOf:
- $ref: "#/schemas/ConsentRevocationSource"
- type: "null"
organization:
description: >-
Organization that a c4 consent allows to read the fields, with the
name the consent text showed, or null for every other purpose.
oneOf:
- $ref: "#/schemas/ConsentOrganization"
- type: "null"
fields:
type:
- array
- "null"
minItems: 1
maxItems: 4
uniqueItems: true
description: >-
Contact fields that a c4 consent covers, or null for every other
purpose. One kind never implies another.
items:
$ref: "./contact_grant_schemas.yml#/schemas/ContactFieldKind"
invitation_id:
type:
- string
- "null"
format: uuid
description: >-
Invitation whose acceptance gave a c4 consent, or null for every
other purpose.
invitation_terms_version:
description: >-
Terms version that the acceptance accepted, or null for every
other purpose.
oneOf:
- $ref: "./invitation_schemas.yml#/schemas/InvitationTermsVersion"
- type: "null"
ConsentRecordList:
type: object
description: >-
One page of the consent ledger of the current account, newest grant
first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Records of the page.
items:
$ref: "#/schemas/ConsentRecord"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
ConsentSettingsGrantRequest:
type: object
description: >-
Accept the current published text shown by GetMyConsentText. The server
checks its version again before recording the grant.
additionalProperties: false
required:
- text_version
- accepted
properties:
text_version:
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
accepted:
type: boolean
enum:
- true
description: Must be true to record an explicit acceptance.
ConsentDeletionRequest:
type: object
description: >-
Durable request to delete the account and its personal data. The request
is recorded before asynchronous processing starts; it does not mean
deletion has completed.
additionalProperties: false
required:
- id
- status
- requested_at
properties:
id:
type: string
format: uuid
description: Identifier of the durable deletion request.
status:
type: string
enum:
- requested
- processing
description: Current state of the deletion request.
requested_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
@@ -0,0 +1,279 @@
schemas:
ContactFieldKind:
type: string
description: |-
Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.
- full_name: the full name from the profile.
- email: the contact email address from the profile.
- phone: the contact phone number from the profile.
- telegram: the Telegram username from the profile.
The value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.
enum:
- full_name
- email
- phone
- telegram
ContactConsentText:
type: object
description: >-
Currently published text of the consent C4 for this invitation. The
server stores an acceptance with `text_version` and the hash of
exactly this text, together with the organization, the selected
fields, the invitation, and its terms version (the consent ledger).
additionalProperties: false
required:
- text_version
- text
properties:
text_version:
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
text:
type: string
minLength: 1
maxLength: 100000
description: >-
Full consent text in plain UTF-8 with the name of the
organization; paragraphs are separated by an empty line. The
client shows it as text, never as HTML, next to the field choice.
ContactConsentOffer:
type: object
description: >-
What the candidate can consent to in an acceptance: the consent text
and the kinds of contact that the candidate's profile holds now. It
holds kinds only, never contact values, and nothing is preselected.
additionalProperties: false
required:
- text
- available_fields
properties:
text:
$ref: "#/schemas/ContactConsentText"
available_fields:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
description: >-
Kinds of contact that the profile holds and that an acceptance may
select. A kind outside this list answers 400 in an acceptance.
items:
$ref: "#/schemas/ContactFieldKind"
ContactConsentAcceptance:
type: object
description: >-
Consent C4 given in an acceptance: the text version the candidate saw,
an explicit `accepted`, and the contact fields the candidate selected.
At least one field is required, so a hidden default or an empty choice
never creates a grant. A text version that is not the currently
published one answers 400 validation_failed with the pointer
`/consent_c4/text_version`, and a field that the profile does not hold
answers 400 with the pointer of that item, such as
`/consent_c4/fields/1`. C4 is given only here, never at registration.
The permission to pass the selected data on to the organization's ATS
(PRD C4 and FR19) is planned as an additive optional flag that
defaults to no transfer.
additionalProperties: false
required:
- text_version
- accepted
- fields
properties:
text_version:
$ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
accepted:
type: boolean
enum:
- true
description: Explicit consent. Only true is valid.
fields:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
description: >-
Contact fields the organization may read after the acceptance.
The grant covers exactly these fields and no other.
items:
$ref: "#/schemas/ContactFieldKind"
ContactGrantState:
type: string
description: |-
State of a contact grant.
- active: the grant exists. Each read by the organization still checks the consent C4, the grant, and the current visibility of the profile.
- revoked: the grant is closed for good; the organization reads no contact through it. A later publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a new grant.
enum:
- active
- revoked
ContactRevocationReason:
type: string
description: |-
Why a contact grant was revoked, shown only to the candidate.
- consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it is closed.
- participation_cancelled: the candidate cancelled the participation in this invitation; only the grant of this invitation is closed.
- visibility_closed: the candidate revoked the publication C2 or hid the profile from the organization after the grant existed. A grant created while the visibility already did not allow a read stays active with `blocked_by` `visibility` instead.
The withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never revoke a grant.
enum:
- consent_revoked
- participation_cancelled
- visibility_closed
ContactAccessBlock:
type: string
description: |-
Why an active grant does not allow a read now, shown only to the candidate.
- visibility: the profile was not published (C2) or was hidden from the organization when the candidate accepted, and it still is. The acceptance never publishes the profile or lifts the hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile or unhides it for the organization.
enum:
- visibility
ContactGrant:
type: object
description: >-
Contact grant as the candidate reads it: which fields one organization
may read, from which invitation and terms version, and whether it is
still active. It holds kinds only, never contact values. A grant is
stored apart from the invitation state, so a later change of the
state does not change it unless the state is a cancellation by the
candidate.
additionalProperties: false
required:
- id
- fields
- status
- readable
- blocked_by
- terms_version
- consent_text_version
- granted_at
- revoked_at
- revocation_reason
properties:
id:
type: string
format: uuid
description: Identifier of the grant.
fields:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
description: Contact fields that the grant covers.
items:
$ref: "#/schemas/ContactFieldKind"
status:
$ref: "#/schemas/ContactGrantState"
readable:
type: boolean
description: >-
Whether the organization can read the covered fields now: true
only for an active grant whose current consent and visibility
allow the read. The organization sees the same fact as
`contact_access.status` `available`, without the reason.
blocked_by:
description: >-
Why an active grant is not readable now, or null when it is
readable or revoked; a revoked grant has `revocation_reason`
instead.
oneOf:
- $ref: "#/schemas/ContactAccessBlock"
- type: "null"
terms_version:
description: Terms version of the invitation that the acceptance accepted.
allOf:
- $ref: "./invitation_schemas.yml#/schemas/InvitationTermsVersion"
consent_text_version:
description: Version of the consent C4 text that the candidate accepted.
allOf:
- $ref: "./identity_schemas.yml#/schemas/ConsentTextVersion"
granted_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
revoked_at:
description: Moment of the revocation, or null while the grant is active.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
revocation_reason:
description: Reason of the revocation, or null while the grant is active.
oneOf:
- $ref: "#/schemas/ContactRevocationReason"
- type: "null"
ContactPhoneNumber:
type: string
minLength: 8
maxLength: 16
pattern: '^\+[1-9][0-9]{6,14}$'
description: Phone number in the E.164 format, for example +70000000000.
ContactTelegramUsername:
type: string
minLength: 6
maxLength: 33
pattern: "^@[A-Za-z0-9_]{5,32}$"
description: Telegram username with the leading @.
ContactFullName:
type: string
minLength: 1
maxLength: 200
pattern: '^\S(?:.*\S)?$'
description: >-
Full name as the candidate wrote it in the profile. Plain text without
line breaks; clients show it as text, never as HTML.
ContactDisclosure:
type: object
description: >-
Contacts of the candidate that the organization may read through an
active grant of this invitation. This is the only response that
carries contact values, and it is separate from the terms and from
the invitation. Each field the grant does not cover is null, and so
is a covered field that the profile no longer holds. The response is
never cached or stored by the server for later reads, so a
revocation closes the next read at once. The value formats depend on
the profile contract (FR02), which must store the same
formats; see ContactFieldKind.
additionalProperties: false
required:
- invitation_id
- grant_id
- fields
- granted_at
- full_name
- email
- phone
- telegram
properties:
invitation_id:
type: string
format: uuid
description: Invitation whose acceptance created the grant.
grant_id:
type: string
format: uuid
description: Grant that allows the read.
fields:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
description: Contact fields that the grant covers.
items:
$ref: "#/schemas/ContactFieldKind"
granted_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
full_name:
oneOf:
- $ref: "#/schemas/ContactFullName"
- type: "null"
email:
oneOf:
- $ref: "./identity_schemas.yml#/schemas/EmailAddress"
- type: "null"
phone:
oneOf:
- $ref: "#/schemas/ContactPhoneNumber"
- type: "null"
telegram:
oneOf:
- $ref: "#/schemas/ContactTelegramUsername"
- type: "null"
@@ -0,0 +1,258 @@
schemas:
EvidenceKind:
type: string
description: |-
Whether a fact is a statement or an observation.
- claim: something the candidate stated that nothing confirmed separately. Its trust is 0.
- measurement: a result that a system observed, such as a confirmed assessment. Its trust is 1 to 3.
Assessments produce measurements only. A claim never becomes a measurement by repetition, and the two kinds are stored apart.
enum:
- claim
- measurement
EvidenceSourceType:
type: string
description: |-
Where the fact comes from.
- assessment_result: a real (root or corrective) assessment result of this platform that confirmed a grade. An express training run (`demo_express`), a failed attempt, and a result without a reviewed category source are never a source.
Adding a value is a contract change.
enum:
- assessment_result
EvidenceAttribution:
type: string
description: |-
Whose contribution the fact is.
- personal: the candidate's own result. Every assessment fact is personal.
- team_role: a team result with a confirmed role of the candidate.
- team_unattributed: a team result without a confirmed role; it is not a personal skill.
Only `personal` is produced today.
enum:
- personal
- team_role
- team_unattributed
EvidenceTrustLevel:
type: integer
format: int32
minimum: 0
maximum: 3
description: |-
Strength of the confirmation.
- 0: stated by the person, not confirmed separately.
- 1: an observable online result without a reliable confirmation of the identity or the authorship. Every assessment fact has this level today, because the assessment is unproctored and the identity is not confirmed.
- 2: a result tied to a confirmed identity or confirmed by an independent party.
- 3: an in-person check with a matching confirmation.
A repeated statement, a sign-in, or a repeated tag of the same event never raises the level.
examples:
- 1
EvidenceVisibility:
type: string
description: |-
Whether the fact may take part in what an organization reads.
- visible: the fact is eligible for the organization projection. It does not publish the fact: the projection also needs the published card with the `categories` field and an active C2.
- hidden: the candidate hid the fact. No organization reads it. Hiding never edits or deletes the confirmed result.
enum:
- visible
- hidden
EvidenceSkillCode:
type: string
description: A skill tag from a closed set - the specialization codes of the catalog and the technology codes of the anonymous card. An assessment tags its fact with the specialization of the category.
enum:
- backend
- frontend
- mobile
- network_engineer
- devops_sre
- data_analyst
- ds_ml
- information_security
- qa
- go
- postgresql
- kafka
- docker
EvidenceBasis:
type: string
description: |-
What the measurement rests on.
- synthetic_demo: a demonstration category from a synthetic reviewed bank. It shows the mechanics and is not a validated measurement.
enum:
- synthetic_demo
EvidenceCalibrationStatus:
type: string
description: |-
Calibration of the method behind the result.
- uncalibrated: the thresholds are initial values that no measurement has validated.
enum:
- uncalibrated
EvidenceResult:
type: object
description: >-
What the fact says: the grade that was passed and how reliable the method
is. It carries no score, answer, item, failure, or anti-cheat data.
additionalProperties: false
required:
- grade
- basis
- calibration_status
properties:
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
basis:
$ref: "#/schemas/EvidenceBasis"
calibration_status:
$ref: "#/schemas/EvidenceCalibrationStatus"
EvidenceSource:
type: object
description: >-
Where the fact comes from. For an assessment the event is the attempt
and the result is the immutable result of that attempt, which the
candidate reads at `GetMyAssessmentResult`; the two identifiers are
equal because a result is keyed by its attempt.
additionalProperties: false
required:
- type
- event_id
- result_id
properties:
type:
$ref: "#/schemas/EvidenceSourceType"
event_id:
type: string
format: uuid
description: Identifier of the source event. One event is one fact, however many skills it is tagged with.
result_id:
type: string
format: uuid
description: Identifier of the immutable result that produced the fact.
EvidenceFact:
type: object
description: >-
One independent fact of the current candidate. `occurred_at` is when
the source event ended; for an assessment it is the time of the
decision. A fact is one source event; the skills of that event are tags of the fact, so a second tag
never makes a second fact. Hidden facts are listed here with their
visibility, because the candidate owns them.
additionalProperties: false
required:
- id
- kind
- source
- skills
- result
- attribution
- trust
- occurred_at
- visibility
properties:
id:
type: string
format: uuid
description: Identifier of the fact.
kind:
$ref: "#/schemas/EvidenceKind"
source:
$ref: "#/schemas/EvidenceSource"
skills:
type: array
minItems: 1
maxItems: 13
uniqueItems: true
description: Skill tags of the event in ascending order.
items:
$ref: "#/schemas/EvidenceSkillCode"
result:
$ref: "#/schemas/EvidenceResult"
attribution:
$ref: "#/schemas/EvidenceAttribution"
trust:
$ref: "#/schemas/EvidenceTrustLevel"
occurred_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
visibility:
$ref: "#/schemas/EvidenceVisibility"
EvidenceFactList:
type: object
description: One page of the facts of the current candidate, newest event first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Facts of the page.
items:
$ref: "#/schemas/EvidenceFact"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
OrganizationEvidenceFact:
type: object
description: >-
The one assessment fact that supports a category of the card as an
organization reads it: the earliest visible measurement that passed
exactly the confirmed grade of that category. A lower grade, a retake,
the other tags of the event, the source, the basis, the exact time, and
every identifier stay with the candidate. The fact carries no
identifier of the fact, the event, the result, or the candidate, so it
cannot be joined to a person by a key. It is not unlinkable: the skill,
the grade, the trust level, and the year, together with the other
values of the card, can narrow a small pool of candidates, and the
minimum cohort of the card does not cover the year. `basis` and
`calibration_status` are the same for every candidate: they say that
the fact comes from a synthetic demonstration and is not calibrated,
so a demonstration is never read as a validated measurement. The fact
never carries an answer, score, item, failure, signal, or review band.
additionalProperties: false
required:
- skill
- grade
- trust
- basis
- calibration_status
- observed_year
properties:
skill:
$ref: "#/schemas/EvidenceSkillCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
trust:
$ref: "#/schemas/EvidenceTrustLevel"
basis:
$ref: "#/schemas/EvidenceBasis"
calibration_status:
$ref: "#/schemas/EvidenceCalibrationStatus"
observed_year:
type: integer
format: int32
minimum: 2000
maximum: 9999
description: Year (UTC) when the assessment ended. The month, day, and time stay with the candidate.
examples:
- 2026
OrganizationEvidence:
type: object
description: >-
The permitted evidence of one candidate card, ordered by skill: at most
one fact for each category of the card (at most nine). The list is empty
when no visible fact supports a category of the card.
additionalProperties: false
required:
- items
properties:
items:
type: array
maxItems: 9
description: Permitted facts, one for each supported category.
items:
$ref: "#/schemas/OrganizationEvidenceFact"
@@ -0,0 +1,328 @@
schemas:
EmailAddress:
type: string
format: email
minLength: 3
maxLength: 254
description: >-
Account email address. The server compares addresses without regard to
letter case and never reveals in a response whether an address belongs
to an account.
examples:
- candidate@example.com
NewPassword:
type: string
minLength: 15
maxLength: 128
description: >-
Password chosen at registration. The server normalizes it to Unicode
NFKC, as NIST SP 800-63B-4 recommends, and then requires 15 to 128 Unicode
code points; a value that the schema accepts can still fail this check
after normalization. The 15-character minimum follows NIST SP
800-63B-4 for a password used as the only authentication factor; there
are no composition rules. The upper bound limits the cost of password
hashing. Generated client validators count UTF-16 code units, so a
password with characters outside the Basic Multilingual Plane can pass
the client check and fail on the server; a later client check should
count code points. A password on the server blocklist of common or
breached passwords answers 400 validation_failed with the pointer
`/password`. The value is never returned, logged, or echoed in a
problem.
LoginPassword:
type: string
minLength: 1
maxLength: 128
description: >-
Password entered at login. The server applies the same NFKC
normalization as at registration before it verifies the hash. Only the
hashing bound applies, so a later change of the registration policy
does not lock out existing accounts and a login error does not reveal
the policy. The value is never returned, logged, or echoed in a
problem.
AccountScenario:
type: string
description: >-
Scenario chosen at registration: `candidate` looks for an offer and
passes the assessment, `employer` represents a company that searches
for candidates. The scenario selects the onboarding steps.
enum:
- candidate
- employer
OnboardingStep:
type: string
description: |-
Saved onboarding step that the account returns to after login. The server stores it and advances it as each step completes; clients route by it and never set it directly.
- candidate_consents: candidate consents beyond C1, which was given at registration.
- candidate_profile: candidate profile.
- candidate_questionnaire: candidate questionnaire.
- candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in the questionnaire, and this step offers it first; only an assessment result confirms a grade. A successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step and leaves every other saved step unchanged.
- employer_company: company profile of the employer.
- completed: onboarding is finished; the client opens the scenario home.
Candidate steps follow the order above and end with completed; the employer has employer_company and then completed. New steps may be added as onboarding grows; adding a value is a contract change.
enum:
- candidate_consents
- candidate_profile
- candidate_questionnaire
- candidate_assessment
- employer_company
- completed
ConsentPurpose:
type: string
description: >-
Consent whose text the client may read before an account exists. Only
the consents given at registration are listed: `c1` is the consent to
the processing of personal data.
enum:
- c1
ConsentText:
type: object
description: >-
Currently published consent text. The server stores an acceptance with
`text_version` and the hash of exactly this text.
additionalProperties: false
required:
- purpose
- text_version
- text
- published_at
properties:
purpose:
$ref: "./consent_schemas.yml#/schemas/ConsentPurposeCode"
text_version:
$ref: "#/schemas/ConsentTextVersion"
text:
type: string
minLength: 1
maxLength: 100000
description: >-
Full consent text in plain UTF-8; paragraphs are separated by an
empty line. The client shows it as text, never as HTML.
published_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
ConsentTextVersion:
type: string
minLength: 1
maxLength: 64
pattern: "^[A-Za-z0-9._-]+$"
description: >-
Identifier of the published consent text that the user saw and
accepted. The server stores the acceptance with this version and the
hash of its text; the client never sends or receives the hash.
examples:
- c1-2026-10-01
PersonalDataConsentAcceptance:
type: object
description: >-
Consent C1 to the processing of personal data, given at registration.
The client reads the current text and its version with
GetConsentText(c1) and sends that version here. A version that is not
the currently published one answers 400 validation_failed with the
pointer `/consent_c1/text_version`; the client then reads the text
again and asks the user to accept the new version. Unknown fields are
rejected, so registration cannot carry any other consent; in
particular, C4 is never part of registration.
additionalProperties: false
required:
- text_version
- accepted
properties:
text_version:
$ref: "#/schemas/ConsentTextVersion"
accepted:
type: boolean
enum:
- true
description: Explicit acceptance. Only true is valid.
RegistrationRequest:
type: object
description: New account with its scenario and consent C1.
additionalProperties: false
required:
- email
- password
- scenario
- consent_c1
properties:
email:
$ref: "#/schemas/EmailAddress"
password:
$ref: "#/schemas/NewPassword"
scenario:
$ref: "#/schemas/AccountScenario"
consent_c1:
$ref: "#/schemas/PersonalDataConsentAcceptance"
EmailVerificationResendRequest:
type: object
description: Address that should receive a new verification link.
additionalProperties: false
required:
- email
properties:
email:
$ref: "#/schemas/EmailAddress"
IdentityRequestAccepted:
type: object
description: >-
Neutral acknowledgement. Its content is identical whether or not the
address belongs to an account or is already verified, so the response
does not enumerate accounts. The client tells the user to check the
mailbox.
additionalProperties: false
required:
- status
properties:
status:
type: string
enum:
- accepted
VerificationToken:
type: string
minLength: 32
maxLength: 128
pattern: "^[A-Za-z0-9_-]+$"
description: >-
One-time raw token copied from the verification link. It is request
input only: the server stores only its hash and never returns a token.
EmailVerificationRequest:
type: object
description: >-
One-time token copied from the verification link and the password chosen
for the registration that issued it. The password is never included in
the link.
additionalProperties: false
required:
- token
- password
properties:
token:
$ref: "#/schemas/VerificationToken"
password:
type: string
minLength: 1
maxLength: 128
description: >-
Password chosen for the registration that issued this token. It is
sent in the request body and never appears in the verification link.
The server applies NFKC normalization and the login length bounds,
without reapplying the current new-registration blocklist.
VerificationCode:
type: string
minLength: 6
maxLength: 6
pattern: "^[0-9]{6}$"
description: >-
Six-digit code from the verification message, with leading zeros. It is
request input only; the server keeps a keyed digest of it, never the code.
EmailVerificationCodeRequest:
type: object
description: >-
Address, the six-digit code from its verification message, and the
password chosen for the registration that issued the code. The password
is checked the same way as in EmailVerificationRequest.
additionalProperties: false
required:
- email
- code
- password
properties:
email:
$ref: "#/schemas/EmailAddress"
code:
$ref: "#/schemas/VerificationCode"
password:
type: string
minLength: 1
maxLength: 128
description: >-
Password chosen for the registration that issued the code. The server
applies NFKC normalization and the login length bounds, without
reapplying the current new-registration blocklist.
EmailVerificationResult:
type: object
description: >-
Result of a successful email verification. It does not start a
session; the user signs in next and continues from `onboarding_step`.
additionalProperties: false
required:
- email_verified
- scenario
- onboarding_step
properties:
email_verified:
type: boolean
enum:
- true
description: Always true in a successful response.
scenario:
$ref: "#/schemas/AccountScenario"
onboarding_step:
$ref: "#/schemas/OnboardingStep"
LoginRequest:
type: object
description: Email and password of the account.
additionalProperties: false
required:
- email
- password
properties:
email:
$ref: "#/schemas/EmailAddress"
password:
$ref: "#/schemas/LoginPassword"
CsrfToken:
type: string
minLength: 32
maxLength: 128
pattern: "^[A-Za-z0-9_-]+$"
description: >-
CSRF token bound to the current session. The client keeps it in memory
only and sends it in the X-CSRF-Token header of every mutating request
that requires a session. It changes when a new session starts.
Account:
type: object
description: >-
Current account view. It never contains password hashes, token hashes,
session identifiers, or other storage secrets.
additionalProperties: false
required:
- id
- email
- email_verified
- scenario
- onboarding_step
- created_at
properties:
id:
type: string
format: uuid
description: Account identifier.
email:
$ref: "#/schemas/EmailAddress"
email_verified:
type: boolean
description: >-
Whether the address is verified. A session exists only for a
verified account, so this is true in every current response.
scenario:
$ref: "#/schemas/AccountScenario"
onboarding_step:
$ref: "#/schemas/OnboardingStep"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
Session:
type: object
description: >-
Current session as the client may see it: the account and the CSRF
token. The session identifier itself travels only in the HttpOnly
session cookie and never appears in a body.
additionalProperties: false
required:
- account
- csrf_token
properties:
account:
$ref: "#/schemas/Account"
csrf_token:
$ref: "#/schemas/CsrfToken"
@@ -0,0 +1,945 @@
schemas:
InvitationVersion:
type: integer
format: int64
minimum: 1
description: >-
Version of an invitation. Creation makes version 1, and every committed
change advances it by exactly one: a change of the draft, a send, the
first view, an answer, a salary raise, a withdrawal, a cancellation,
and an expiry made by the server. Every command carries the version
the client read as `expected_version`; a stale value answers 412
version_conflict and changes nothing.
examples:
- 3
InvitationTermsVersion:
type: integer
format: int64
minimum: 1
description: >-
Version of the terms of an invitation. The terms of a version are an
immutable snapshot: every committed change of the terms, in the draft
or by the one raise of the upper salary bound after sending, creates
the next terms version, and a change of anything else keeps it. An
acceptance names the terms version it accepts, and the consent C4 and
the contact grant record it.
examples:
- 2
InvitationState:
type: string
description: |-
State of an invitation (PRD FR12). The internal sending step is never visible: a successful send already answers with `delivered`.
- draft: the organization prepares the terms. The candidate does not see the invitation.
- delivered: the invitation is in the candidate's inbox and the response deadline runs.
- viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.
- counter: planned; the candidate sent the one counter offer. No MVP operation produces it.
- accepted: the candidate accepted the current terms version and gave the consent C4; the contact grant exists.
- interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an acceptance (interview and the sealed final of FR13). No MVP operation produces them.
- declined: terminal; the candidate declined with a structured reason. No access arises.
- expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.
- withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not revoked by it.
- cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this invitation is revoked.
Planned states are listed now so that generated clients accept them when their operations arrive. Adding another value is a contract change.
enum:
- draft
- delivered
- viewed
- counter
- accepted
- interview_scheduled
- interviewed
- negotiation
- terms_agreed
- no_deal
- declined
- expired
- withdrawn
- cancelled_by_candidate
InvitationExpiryReason:
type: string
description: |-
Why an invitation expired. Set exactly when the state is `expired`, null otherwise.
- invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.
- negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation produces it.
enum:
- invitation_timeout
- negotiation_timeout
InvitationResponsePeriod:
type: integer
format: int32
enum:
- 3
- 7
- 14
description: >-
Days the candidate has to answer, chosen by the organization in the
draft from the product policy: 3, 7, or 14. The deadline starts at the
first delivery and is never reset by an email, a view, or a counter
offer.
examples:
- 7
InvitationRoleTitle:
type: string
minLength: 1
maxLength: 200
pattern: '^\S(?:.*\S)?$'
description: >-
Name of the offered role, for example "Middle Go developer in the
payments team". It has no leading or trailing whitespace and no line
breaks. Plain text; clients show it as text, never as HTML.
InvitationTeamDescription:
type: string
minLength: 1
maxLength: 1000
pattern: '\S'
description: >-
Description of the team the candidate would join, such as its size,
roles, and way of working. It may contain line breaks and has at least
one character that is not white space. Plain text; clients show it as
text, never as HTML. It describes the job and must not contain
personal data of employees or candidates.
InvitationOfferType:
type: string
description: |-
Type of the offer.
- full_time: employment with a full working week.
- part_time: employment with a part-time working week.
- contract: a fixed-term or project contract outside employment.
- internship: an internship.
Adding a value is a contract change.
enum:
- full_time
- part_time
- contract
- internship
InvitationCommunicationChannel:
type: string
description: |-
Channel through which the organization will contact the candidate after an acceptance.
- email: a letter to the email address the candidate disclosed.
- phone: a call or a text to the phone number the candidate disclosed.
- telegram: a message to the Telegram username the candidate disclosed.
- video_call: an invitation to a video call, sent through one of the disclosed contacts.
The channel describes the organization's plan; the candidate decides which contacts to disclose, and the server never requires that the disclosed fields include the channel.
enum:
- email
- phone
- telegram
- video_call
InvitationCommunicationMethod:
type: object
description: >-
How the organization will contact the candidate after an acceptance.
It is part of the terms, so the candidate sees it before choosing
which contacts to disclose. An invitation without it cannot exist,
because the terms require it.
additionalProperties: false
required:
- channel
- details
properties:
channel:
$ref: "#/schemas/InvitationCommunicationChannel"
details:
description: >-
Optional short note, for example the first step or the expected
time of the first contact, or null. Plain text without line
breaks; it never contains a link or a contact of an employee.
oneOf:
- $ref: "#/schemas/InvitationCommunicationNote"
- type: "null"
InvitationCommunicationNote:
type: string
minLength: 1
maxLength: 300
pattern: '^\S(?:.*\S)?$'
description: >-
Short note on the communication method, for example "A 30-minute call
with the team lead within three working days". It has no leading or
trailing whitespace and no line breaks. Plain text; clients show it as
text, never as HTML.
InvitationPackageItemText:
type: string
minLength: 1
maxLength: 300
pattern: '^\S(?:.*\S)?$'
description: >-
Short description of a condition, for example "Quarterly bonus up to
20% of the salary". It has no leading or trailing whitespace and no
line breaks. Plain text; clients show it as text, never as HTML.
InvitationPackageItemProvided:
type: object
description: The condition is part of the offer, with its description.
additionalProperties: false
required:
- status
- description
properties:
status:
type: string
enum:
- provided
description:
$ref: "#/schemas/InvitationPackageItemText"
InvitationPackageItemNotProvided:
type: object
description: >-
The organization states explicitly that the offer does not include the
condition ("Не предусмотрено" in the interface). It has no
description.
additionalProperties: false
required:
- status
properties:
status:
type: string
enum:
- not_provided
InvitationPackageItem:
description: >-
One required condition of the package, selected by `status`:
`provided` with a description, or `not_provided` without one. Not
providing a condition is an explicit choice: the field is required in
the package, so an absent field fails validation instead of meaning
"not provided": it answers 400 `required` with its pointer, such as
`/terms/package/training`. A `provided` item without a description
answers `required` with the pointer of the description, and a
`not_provided` item with a description answers `invalid` with the
pointer of the item. ogen selects the variant by the value of
`status`.
oneOf:
- $ref: "#/schemas/InvitationPackageItemProvided"
- $ref: "#/schemas/InvitationPackageItemNotProvided"
InvitationPackage:
type: object
description: >-
Required section of the package (PRD FR12): the bonus, the equipment,
the training, and the voluntary health insurance (ДМС). Every field is
required and is either provided with a description or explicitly not
provided. The work format of the package is the required
`work_formats` term, which has no "not provided" variant. Adding a
required condition is a breaking change; an optional one is additive.
additionalProperties: false
required:
- bonus
- equipment
- training
- health_insurance
properties:
bonus:
$ref: "#/schemas/InvitationPackageItem"
equipment:
$ref: "#/schemas/InvitationPackageItem"
training:
$ref: "#/schemas/InvitationPackageItem"
health_insurance:
$ref: "#/schemas/InvitationPackageItem"
InvitationTerms:
type: object
description: >-
Terms of an invitation: everything the candidate sees before deciding
and before any contact is disclosed. The same schema is the request
field of a draft and the stored snapshot of a terms version, so a
response can be sent back unchanged. Every field is required; a field
that may have no value says so with an explicit variant (`location`
null for a remote role, a package item `not_provided`). The terms never
contain data of the candidate: no contact, no salary minimum, and no
indicator derived from it. The server checks the cross-field rules
after the schema and answers 400 validation_failed with the pointer of
the field: the salary rules of SalaryRange with `/terms/salary/salary_to`,
a missing place of work for the `office` or `hybrid` format with
`/terms/location`, and a repeated technology in `tech_stack` with the
pointer of the later item.
additionalProperties: false
required:
- role_title
- specialization
- grade
- offer_type
- tasks
- team
- tech_stack
- work_formats
- location
- communication_method
- salary
- package
properties:
role_title:
$ref: "#/schemas/InvitationRoleTitle"
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
offer_type:
$ref: "#/schemas/InvitationOfferType"
tasks:
type: array
minItems: 1
maxItems: 20
description: Work tasks of the role in the order given.
items:
$ref: "./need_schemas.yml#/schemas/NeedTaskText"
team:
$ref: "#/schemas/InvitationTeamDescription"
tech_stack:
type: array
minItems: 1
maxItems: 30
uniqueItems: true
description: >-
Technologies of the role. The server compares names without regard
to letter case.
items:
$ref: "./need_schemas.yml#/schemas/SkillName"
work_formats:
type: array
minItems: 1
maxItems: 3
uniqueItems: true
description: >-
Work formats the organization offers; the candidate may choose any
of them.
items:
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
location:
description: >-
Place of work for the `office` or `hybrid` format, or null when
the only format is `remote`. It is required with either of those
formats.
oneOf:
- $ref: "./need_schemas.yml#/schemas/NeedLocationName"
- type: "null"
communication_method:
$ref: "#/schemas/InvitationCommunicationMethod"
salary:
$ref: "./need_schemas.yml#/schemas/SalaryRange"
package:
$ref: "#/schemas/InvitationPackage"
InvitationNeedReference:
type: object
description: >-
Need of the same organization that the invitation was built from, with
the requirements version used. A direct invitation has no need. The
link is informational: the invitation keeps its own terms, which may
differ from the need, and a later change of the need never changes
them.
additionalProperties: false
required:
- need_id
- requirements_version
properties:
need_id:
type: string
format: uuid
description: Identifier of a need of the organization in the path.
requirements_version:
description: >-
`requirements_version` of the need that the invitation refers to;
it must be a version that the need has had.
allOf:
- $ref: "./need_schemas.yml#/schemas/NeedVersion"
InvitationSalaryFit:
type: string
description: |-
Coarse indicator for the organization of how the salary range relates to the candidate's hidden minimum (PRD FR13). It is the only information about the minimum that the organization receives; the exact minimum never appears in any response, log, or problem. The server compares the upper bound `B` with the lowest minimum the candidate set for the offered work formats, in integer arithmetic and only in the same tax basis.
- within_range: the minimum is not above `B`.
- up_to_10_percent_above: the minimum is above `B` by at most 10%, that is `10 * minimum <= 11 * B`.
- above: the minimum is more than 10% above `B`.
- withheld: the organization made five indicator-relevant settings within seven days, so the indicator is off for seven days from the fifth. The response to the fifth setting already carries `withheld`, and so does every draft and invitation of the organization, existing ones included, until the period ends.
- not_available: the candidate set no minimum for the offered formats, or set it in the other tax basis.
Every change that can move this indicator is an indicator-relevant setting: the range set on creation, and in a draft a change of either bound, of the tax basis, or of `work_formats`, since the minimum depends on the format. Each counts against the organization-wide limit of three settings a day (429) and against the withheld counter of five settings within seven days, together with the ranges of needs. The one raise of the upper bound of a sent invitation counts against the withheld counter but not against the daily limit, because FR13 gives it its own once-only rule. Switching the tax basis turns `not_available` into a band or back and so tells the organization the basis of the minimum; this is accepted, and the switch counts against the limit like any other setting.
The server never rejects or changes a range because of the minimum: a rejection would itself reveal it.
enum:
- within_range
- up_to_10_percent_above
- above
- withheld
- not_available
InvitationContactAccessState:
type: string
description: |-
Whether the organization may read the candidate's contacts through GetOrganizationInvitationContacts now.
- not_granted: the candidate has not accepted this invitation, so no grant exists.
- available: a grant from this invitation is active and the current consent and visibility allow the read.
- closed: a grant from this invitation exists but does not allow the read now: it was revoked (the candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the profile after the acceptance), or it was created while the visibility already did not allow the read. The organization is not told which. A revoked grant never becomes `available` again; a grant blocked from the start becomes `available` once the candidate's visibility allows the read, which only follows the candidate's own choice to publish the profile or unhide it for the organization. Since every visibility change after a grant exists revokes the grant, a later toggle is never visible to the organization.
enum:
- not_granted
- available
- closed
InvitationContactAccess:
type: object
description: >-
Contact access of the organization through this invitation, without
any contact value. The values come only from
GetOrganizationInvitationContacts.
additionalProperties: false
required:
- status
- fields
properties:
status:
$ref: "#/schemas/InvitationContactAccessState"
fields:
type: array
maxItems: 4
uniqueItems: true
description: >-
Kinds of contact that the read returns while `status` is
`available`; empty otherwise.
items:
$ref: "./contact_grant_schemas.yml#/schemas/ContactFieldKind"
InvitationOrganization:
type: object
description: >-
Organization that sent the invitation, as the candidate sees it before
deciding. The card that a candidate sees is `CandidateOrganizationCard` of
the organization contract; returning it with the invitation is planned
as an additive field, and this object only names the organization.
additionalProperties: false
required:
- id
- name
properties:
id:
type: string
format: uuid
description: Identifier of the organization.
name:
type: string
minLength: 1
maxLength: 200
description: >-
Public name of the organization. Plain text; clients show it as
text, never as HTML.
InvitationDeclineReason:
type: string
description: |-
Structured reason of a decline. Every reason is neutral and none requires a comment.
- salary: the salary range does not fit.
- tasks: the role or the tasks do not fit.
- stack: the technologies do not fit.
- work_format: the work format or the place of work does not fit.
- package: the package does not fit.
- company: the company or its domain does not fit.
- not_looking: the candidate is not looking for a job now.
- other_offer: the candidate accepted another offer.
- other: another reason ("Другое"); a comment stays optional.
The organization never sees the reason of an individual decline: a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a minimum group size (planned). Adding a value is a contract change.
enum:
- salary
- tasks
- stack
- work_format
- package
- company
- not_looking
- other_offer
- other
InvitationDeclineComment:
type: string
minLength: 1
maxLength: 500
pattern: '\S'
description: >-
Optional comment of the candidate on the offer. It may contain line
breaks and has at least one character that is not white space. It is
never shown to the organization, never published, and never written to
logs or notifications; only the candidate reads it back. Plain text;
clients show it as text, never as HTML.
InvitationDeclineRecord:
type: object
description: The candidate's own decline, as the candidate reads it back.
additionalProperties: false
required:
- reason
- comment
- declined_at
properties:
reason:
$ref: "#/schemas/InvitationDeclineReason"
comment:
oneOf:
- $ref: "#/schemas/InvitationDeclineComment"
- type: "null"
declined_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
OrganizationInvitation:
type: object
description: >-
Invitation as the organization reads it: the candidate handle, the
current terms version, the state, the coarse salary indicator, and the
contact access without contact values. It never contains the
candidate's name, email address, phone number, or other contact, the
exact salary minimum, or the reason and comment of a decline.
additionalProperties: false
required:
- id
- organization_id
- candidate_handle
- need
- state
- expiry_reason
- version
- terms_version
- terms
- response_period_days
- response_deadline_at
- salary_raise_used
- salary_fit
- contact_access
- created_at
- updated_at
- delivered_at
- viewed_at
- responded_at
properties:
id:
type: string
format: uuid
description: Identifier of the invitation.
organization_id:
type: string
format: uuid
description: >-
Organization that owns the invitation, equal to `org_id` of the
path. It never changes.
candidate_handle:
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
need:
description: Need the invitation was built from, or null for a direct invitation.
oneOf:
- $ref: "#/schemas/InvitationNeedReference"
- type: "null"
state:
$ref: "#/schemas/InvitationState"
expiry_reason:
description: Reason of an expiry, or null unless `state` is `expired`.
oneOf:
- $ref: "#/schemas/InvitationExpiryReason"
- type: "null"
version:
$ref: "#/schemas/InvitationVersion"
terms_version:
$ref: "#/schemas/InvitationTermsVersion"
terms:
$ref: "#/schemas/InvitationTerms"
response_period_days:
$ref: "#/schemas/InvitationResponsePeriod"
response_deadline_at:
description: >-
Moment when the candidate's time to answer ends, set at the first
delivery to `delivered_at` plus `response_period_days`, or null for
a draft. A command received at this moment or later is late. After
an acceptance the deadline no longer applies.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
salary_raise_used:
type: boolean
description: >-
Whether the one raise of the upper salary bound after sending
(PRD FR13) has been used. It counts the whole history of the
invitation.
salary_fit:
$ref: "#/schemas/InvitationSalaryFit"
contact_access:
$ref: "#/schemas/InvitationContactAccess"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
delivered_at:
description: Moment of delivery to the candidate's inbox, or null for a draft.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
viewed_at:
description: Moment when the candidate first opened the terms, or null.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
responded_at:
description: Moment of the candidate's acceptance or decline, or null.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
OrganizationInvitationSummary:
type: object
description: >-
Invitation in the organization's list: its identity, state, versions,
role, salary range, deadline, and contact access. Read the invitation
for the full terms and the salary indicator.
additionalProperties: false
required:
- id
- candidate_handle
- need
- state
- expiry_reason
- version
- terms_version
- role_title
- salary
- response_deadline_at
- contact_access
- created_at
- updated_at
properties:
id:
type: string
format: uuid
description: Identifier of the invitation.
candidate_handle:
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
need:
oneOf:
- $ref: "#/schemas/InvitationNeedReference"
- type: "null"
state:
$ref: "#/schemas/InvitationState"
expiry_reason:
oneOf:
- $ref: "#/schemas/InvitationExpiryReason"
- type: "null"
version:
$ref: "#/schemas/InvitationVersion"
terms_version:
$ref: "#/schemas/InvitationTermsVersion"
role_title:
$ref: "#/schemas/InvitationRoleTitle"
salary:
$ref: "./need_schemas.yml#/schemas/SalaryRange"
response_deadline_at:
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
contact_access:
$ref: "#/schemas/InvitationContactAccess"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
OrganizationInvitationList:
type: object
description: >-
One page of the invitations of an organization, newest first by
creation time.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Invitations of the page.
items:
$ref: "#/schemas/OrganizationInvitationSummary"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
OrganizationInvitationCreate:
type: object
description: >-
New draft for one candidate. The candidate is named only by the
handle from a search result of this organization, never by an email
address, a phone number, or an account identifier. The terms are
complete from the start, so a draft without the tax basis or the
communication method cannot exist. Unknown fields are rejected, so a
request cannot set the state, a version, a deadline, the salary
indicator, contact access, or a candidate's minimum or contact.
additionalProperties: false
required:
- candidate_handle
- terms
properties:
candidate_handle:
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
need:
description: >-
Need of the organization the invitation is built from, or null or
absent for a direct invitation.
oneOf:
- $ref: "#/schemas/InvitationNeedReference"
- type: "null"
response_period_days:
description: Days to answer; absent means 7, the default of the product policy.
allOf:
- $ref: "#/schemas/InvitationResponsePeriod"
terms:
$ref: "#/schemas/InvitationTerms"
OrganizationInvitationUpdate:
type: object
description: >-
Change of a draft over the version the client read. Each field present
replaces that field as a whole and an absent field stays unchanged;
`terms` is always replaced completely, never merged, and a change of
the terms creates the next terms version. `need` sent as null unlinks
the need. The candidate cannot change: a draft for another candidate
is a new draft. Unknown fields are rejected.
additionalProperties: false
required:
- expected_version
properties:
expected_version:
$ref: "#/schemas/InvitationVersion"
need:
oneOf:
- $ref: "#/schemas/InvitationNeedReference"
- type: "null"
response_period_days:
$ref: "#/schemas/InvitationResponsePeriod"
terms:
$ref: "#/schemas/InvitationTerms"
InvitationCommand:
type: object
description: >-
Command without parameters over the invitation version the client
read: send, withdraw, or cancel. Unknown fields are rejected.
additionalProperties: false
required:
- expected_version
properties:
expected_version:
$ref: "#/schemas/InvitationVersion"
InvitationSalaryRaise:
type: object
description: >-
The one raise of the upper salary bound of a sent invitation (PRD
FR13). Only `salary_to` changes; the lower bound, the currency, the
period, and the tax basis stay fixed. Unknown fields are rejected, so
the request cannot lower the lower bound or change the basis.
additionalProperties: false
required:
- expected_version
- salary_to
properties:
expected_version:
$ref: "#/schemas/InvitationVersion"
salary_to:
description: >-
New upper bound, above the current one, with a width of the range
from 10% to 40% of its midpoint.
allOf:
- $ref: "./need_schemas.yml#/schemas/RubAmount"
CandidateInvitation:
type: object
description: >-
Invitation as the addressed candidate reads it: the organization, the
current terms with their version, the state and the deadline, the
text and the choice of the consent C4 while an acceptance is
possible, the candidate's own decline, and the contact grant that the
acceptance created. It has no candidate handle, no need, no salary
indicator, and no contact value: the candidate's own contacts and
salary minimum stay in the profile.
additionalProperties: false
required:
- id
- organization
- state
- expiry_reason
- version
- terms_version
- terms
- response_deadline_at
- delivered_at
- viewed_at
- responded_at
- updated_at
- contact_consent
- decline
- contact_grant
properties:
id:
type: string
format: uuid
description: Identifier of the invitation.
organization:
$ref: "#/schemas/InvitationOrganization"
state:
$ref: "#/schemas/InvitationState"
expiry_reason:
oneOf:
- $ref: "#/schemas/InvitationExpiryReason"
- type: "null"
version:
$ref: "#/schemas/InvitationVersion"
terms_version:
$ref: "#/schemas/InvitationTermsVersion"
terms:
$ref: "#/schemas/InvitationTerms"
response_deadline_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
delivered_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
viewed_at:
description: >-
Moment of the first view recorded by ViewMyInvitation, or null
when the candidate has not opened the terms.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
responded_at:
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
contact_consent:
description: >-
Text and choice of the consent C4 for an acceptance, or null when
an acceptance is impossible now: the state does not allow it, the
deadline has passed, or the profile holds no contact to disclose.
In the last case the client tells the candidate to add a contact
to the profile first, because a grant must cover at least one
field.
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactConsentOffer"
- type: "null"
decline:
description: The candidate's decline, or null unless `state` is `declined`.
oneOf:
- $ref: "#/schemas/InvitationDeclineRecord"
- type: "null"
contact_grant:
description: >-
Contact grant that the acceptance of this invitation created, or
null when the invitation was never accepted. It stays after a
revocation, with its status and reason.
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactGrant"
- type: "null"
CandidateInvitationSummary:
type: object
description: >-
Invitation in the candidate's inbox: the organization, the state, the
versions, the role, the salary range, and the deadline. Listing never
records a view; GetMyInvitation returns the full terms, and
ViewMyInvitation records the view.
additionalProperties: false
required:
- id
- organization
- state
- expiry_reason
- version
- terms_version
- role_title
- salary
- work_formats
- response_deadline_at
- delivered_at
- viewed_at
- updated_at
properties:
id:
type: string
format: uuid
description: Identifier of the invitation.
organization:
$ref: "#/schemas/InvitationOrganization"
state:
$ref: "#/schemas/InvitationState"
expiry_reason:
oneOf:
- $ref: "#/schemas/InvitationExpiryReason"
- type: "null"
version:
$ref: "#/schemas/InvitationVersion"
terms_version:
$ref: "#/schemas/InvitationTermsVersion"
role_title:
$ref: "#/schemas/InvitationRoleTitle"
salary:
$ref: "./need_schemas.yml#/schemas/SalaryRange"
work_formats:
type: array
minItems: 1
maxItems: 3
uniqueItems: true
items:
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
response_deadline_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
delivered_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
viewed_at:
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
CandidateInvitationList:
type: object
description: >-
One page of the candidate's invitations, newest first by delivery
time.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Invitations of the page.
items:
$ref: "#/schemas/CandidateInvitationSummary"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
InvitationAcceptance:
type: object
description: >-
Acceptance of the current terms with the consent C4. The client sends
the `version` and the `terms_version` it read and the contact fields
the candidate selected; nothing is preselected or defaulted. Unknown
fields are rejected, so a request cannot carry contact values, a
grant, or another consent.
additionalProperties: false
required:
- expected_version
- terms_version
- consent_c4
properties:
expected_version:
$ref: "#/schemas/InvitationVersion"
terms_version:
description: >-
Terms version that the candidate read and accepts. A version that
is not the current one answers 412 version_conflict.
allOf:
- $ref: "#/schemas/InvitationTermsVersion"
consent_c4:
$ref: "./contact_grant_schemas.yml#/schemas/ContactConsentAcceptance"
InvitationDeclineRequest:
type: object
description: >-
Structured decline: a reason and an optional comment. Unknown fields
are rejected.
additionalProperties: false
required:
- expected_version
- reason
properties:
expected_version:
$ref: "#/schemas/InvitationVersion"
reason:
$ref: "#/schemas/InvitationDeclineReason"
comment:
description: Optional comment for any reason, including `other`; absent or null means none.
oneOf:
- $ref: "#/schemas/InvitationDeclineComment"
- type: "null"
+236
View File
@@ -0,0 +1,236 @@
schemas:
AssessmentLabNodeName:
type: string
minLength: 1
maxLength: 15
pattern: "^[a-z][a-z0-9-]{0,14}$"
description: >-
Name of a lab node as the task statement uses it, such as `r1` or
`srv`. It is a label of the task, not a host name or an address.
AssessmentLabNodeKind:
type: string
description: |-
What the console of a node shows.
- mikrotik: a MikroTik router with the RouterOS console.
- ubuntu: a small Ubuntu server with a Linux login.
Adding a value is a contract change.
enum:
- mikrotik
- ubuntu
AssessmentLabNode:
type: object
description: >-
A node of a lab by its task name and kind. It never carries an address,
a MAC address, a port, a password, a key, or an infrastructure name.
additionalProperties: false
required:
- name
- kind
properties:
name:
$ref: "#/schemas/AssessmentLabNodeName"
kind:
$ref: "#/schemas/AssessmentLabNodeKind"
LabItemContent:
type: object
description: >-
Practical lab: configure or repair a small network of virtual nodes
through their consoles. The candidate starts the lab of the item with
CreateMyAssessmentLab, works in the node consoles, and submits with
SubmitMyAssessmentLab; the server then checks the state of the nodes.
The content lists only the nodes the statement names and the lifetime
of the lab, never the checker, its criteria, the seed, or an address.
SubmitMyAssessmentAnswer takes no answer to a lab item; its result is
submitted only with SubmitMyAssessmentLab.
additionalProperties: false
required:
- format
- nodes
- time_limit_seconds
properties:
format:
type: string
enum:
- lab
nodes:
type: array
minItems: 1
maxItems: 8
description: Nodes of the lab in the order of the statement.
items:
$ref: "#/schemas/AssessmentLabNode"
time_limit_seconds:
type: integer
format: int32
minimum: 300
maximum: 14400
description: >-
Lifetime of a lab of this item from its creation. The lab also ends
no later than the attempt deadline.
LabAnswer:
type: object
description: >-
Answer of a lab item: the state of the nodes of the named lab at the
moment of submission. The server reads that state with the checker of
the task; the body carries no configuration text, score, or
correctness flag. Two answers are equal when they name the same lab.
It is the answer of SubmitMyAssessmentLab only and is not a member of
AssessmentAnswer.
additionalProperties: false
required:
- format
- lab_id
properties:
format:
type: string
enum:
- lab
lab_id:
type: string
format: uuid
description: The lab of this item that the candidate worked in.
AssessmentLabState:
type: string
description: |-
State of a lab of an attempt item.
- provisioning: the nodes are being prepared; poll GetMyAssessmentLab.
- ready: the consoles can be opened until `expires_at`.
- checking: the answer was accepted; the consoles are closed and the server checks the nodes.
- submitted: the check finished and the answer is recorded; the lab is deleted. The state never says whether the answer was correct.
- expired: the lifetime or the attempt deadline ended before a submission; the lab is deleted and the item cannot start another lab.
- failed: the lab infrastructure failed, independently of the candidate; `failure_reason` is `lab_error`. Nothing was recorded or consumed, and the candidate may start a new lab of the same item while the item is current.
Adding a value is a contract change.
enum:
- provisioning
- ready
- checking
- submitted
- expired
- failed
AssessmentLabFailureReason:
type: string
description: >-
Why a lab failed: `lab_error` for an infrastructure failure, such as a
node that did not boot or a check that could not reach a node. It never
depends on the candidate and is never a failed check.
enum:
- lab_error
AssessmentLab:
type: object
description: >-
Candidate view of the lab of one attempt item. It contains no node
address, MAC address, port, password, key, token, seed, checker state,
criteria, score, or infrastructure name.
additionalProperties: false
required:
- id
- item_id
- state
- nodes
- created_at
- ready_at
- expires_at
- finished_at
- failure_reason
properties:
id:
type: string
format: uuid
description: Identifier of the lab.
item_id:
$ref: "./assessment_schemas.yml#/schemas/AssessmentItemId"
state:
$ref: "#/schemas/AssessmentLabState"
nodes:
type: array
minItems: 1
maxItems: 8
items:
$ref: "#/schemas/AssessmentLabNode"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
ready_at:
description: Time the lab became `ready`, or null before.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
expires_at:
description: >-
Time the lab ends unless it was submitted before: the earlier of the
lifetime of the item and the attempt deadline. It never moves.
$ref: "./common_schemas.yml#/schemas/Timestamp"
finished_at:
description: Time the lab reached `submitted`, `expired`, or `failed`, or null.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
failure_reason:
description: "`lab_error` when `state` is `failed`, otherwise null."
oneOf:
- $ref: "#/schemas/AssessmentLabFailureReason"
- type: "null"
AssessmentLabCreate:
type: object
description: Start the lab of the current lab item. Unknown fields are rejected.
additionalProperties: false
required:
- item_id
properties:
item_id:
$ref: "./assessment_schemas.yml#/schemas/AssessmentItemId"
AssessmentLabConsoleSessionCreate:
type: object
description: Open a console of one node of a ready lab. Unknown fields are rejected.
additionalProperties: false
required:
- node
properties:
node:
$ref: "#/schemas/AssessmentLabNodeName"
AssessmentLabConsoleSession:
type: object
description: >-
A console session of one node. The client opens a WebSocket to
`websocket_path` on the same origin before `expires_at`; the session
cookie and the Origin check authorize the upgrade, so no secret travels
in the path, the body, or a query string. A session can be attached
once and ends with the lab.
additionalProperties: false
required:
- id
- node
- websocket_path
- expires_at
properties:
id:
type: string
format: uuid
description: Identifier of the console session; it is not a secret.
node:
$ref: "#/schemas/AssessmentLabNodeName"
websocket_path:
type: string
maxLength: 128
pattern: "^/api/v1/me/assessment-lab-consoles/[0-9a-f-]{36}$"
description: Same-origin path of the console WebSocket.
expires_at:
description: Time by which the WebSocket must be opened.
$ref: "./common_schemas.yml#/schemas/Timestamp"
AssessmentLabSubmission:
type: object
description: >-
Submit the lab of the current lab item as its answer. Unknown fields
are rejected, so a request cannot send a score or a correctness flag.
additionalProperties: false
required:
- expected_version
- answer
properties:
expected_version:
$ref: "./assessment_schemas.yml#/schemas/AssessmentAttemptVersion"
answer:
$ref: "#/schemas/LabAnswer"
@@ -0,0 +1,685 @@
schemas:
MatchConfirmationStatus:
type: string
description: >-
Confirmation state for this specialization only. A result for one
specialization never changes the state of another specialization.
enum:
- confirmed
- unconfirmed
MatchGradeFilter:
type: object
description: A confirmed category filter, never a candidate declaration.
additionalProperties: false
required:
- specialization
- grade
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
MatchSearchStackTag:
type: string
description: >-
A stack code that the anonymous card may expose. Search filters do not
accept arbitrary profile text or candidate-provided evidence.
enum:
- go
- postgresql
- kafka
- docker
MatchSearchConditions:
type: object
description: >-
Filters against safe, coarse card conditions. No candidate location,
salary amount, salary minimum, or salary range is accepted.
additionalProperties: false
properties:
work_formats:
type: array
minItems: 1
maxItems: 3
uniqueItems: true
items:
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
salary_compatibility:
$ref: "./privacy_schemas.yml#/schemas/CandidateSalaryCompatibility"
MatchSearchFilters:
type: object
description: >-
Optional filters over the current organization-visible bank. An empty
object means no additional filter. Confirmed and declared grades are
separate fields; a declaration never satisfies a confirmed-grade or
category filter. Conditions use only the safe, coarse card fields.
additionalProperties: false
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
confirmed_grade:
description: >-
Match only candidates with this currently confirmed grade in the
selected specialization. It never matches a declared grade.
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
confirmed_category:
$ref: "#/schemas/MatchGradeFilter"
confirmation_status:
$ref: "#/schemas/MatchConfirmationStatus"
declared_grade:
description: >-
Candidate-declared grade filter. This is a separate claim and
cannot satisfy `confirmed_grade` or `confirmed_category`.
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
stack:
type: array
minItems: 1
maxItems: 4
uniqueItems: true
items:
$ref: "#/schemas/MatchSearchStackTag"
conditions:
$ref: "#/schemas/MatchSearchConditions"
MatchSearchByNeed:
type: object
description: >-
Search one immutable set of confirmed requirements. `requirements_version`
is the Need.requirements_version, not the general Need.version; text-only
or suggestion-only edits do not change this search basis.
additionalProperties: false
required:
- need_id
- requirements_version
properties:
need_id:
type: string
format: uuid
description: Need owned by the organization in the path.
requirements_version:
$ref: "./need_schemas.yml#/schemas/NeedVersion"
filters:
$ref: "#/schemas/MatchSearchFilters"
MatchSearchByBank:
type: object
description: >-
Search the current organization-visible bank. An empty `filters` object
includes all otherwise eligible specializations as separate entries.
additionalProperties: false
required:
- filters
properties:
filters:
$ref: "#/schemas/MatchSearchFilters"
MatchSearchRequest:
oneOf:
- $ref: "#/schemas/MatchSearchByNeed"
- $ref: "#/schemas/MatchSearchByBank"
description: >-
Search either a Need.requirements_version snapshot or the whole
organization-visible bank with explicit filters. Unknown fields are
rejected by both closed request variants.
MatchSearchNeedSource:
type: object
description: The immutable need requirements snapshot used by this result.
additionalProperties: false
required:
- kind
- need_id
- requirements_version
properties:
kind:
type: string
enum:
- need
need_id:
type: string
format: uuid
requirements_version:
$ref: "./need_schemas.yml#/schemas/NeedVersion"
MatchAppliedConditions:
type: object
description: Conditions echoed as a complete snapshot; null means no filter.
additionalProperties: false
required:
- work_formats
- salary_compatibility
properties:
work_formats:
oneOf:
- type: array
minItems: 1
maxItems: 3
uniqueItems: true
items:
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
- type: "null"
salary_compatibility:
oneOf:
- $ref: "./privacy_schemas.yml#/schemas/CandidateSalaryCompatibility"
- type: "null"
MatchAppliedFilters:
type: object
description: >-
A normalized response snapshot of the bank filters. Each key is present;
null means the corresponding request filter was omitted. This keeps a
search result tied to its exact filter basis.
additionalProperties: false
required:
- specialization
- confirmed_grade
- confirmed_category
- confirmation_status
- declared_grade
- stack
- conditions
properties:
specialization:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
- type: "null"
confirmed_grade:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
confirmed_category:
oneOf:
- $ref: "#/schemas/MatchGradeFilter"
- type: "null"
confirmation_status:
oneOf:
- $ref: "#/schemas/MatchConfirmationStatus"
- type: "null"
declared_grade:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
stack:
oneOf:
- type: array
minItems: 1
maxItems: 4
uniqueItems: true
items:
$ref: "#/schemas/MatchSearchStackTag"
- type: "null"
conditions:
oneOf:
- $ref: "#/schemas/MatchAppliedConditions"
- type: "null"
MatchSearchBankSource:
type: object
description: The normalized filters used for a bank search.
additionalProperties: false
required:
- kind
- filters
properties:
kind:
type: string
enum:
- bank
filters:
$ref: "#/schemas/MatchAppliedFilters"
MatchSearchSource:
oneOf:
- $ref: "#/schemas/MatchSearchNeedSource"
- $ref: "#/schemas/MatchSearchBankSource"
description: >-
Search basis echoed with the response so the displayed result remains
tied to its need requirements version or bank filters.
MatchStrength:
type: string
description: Coarse strength of a confirmed assessment for this specialization.
enum:
- standard
- strong
MatchCategory:
type: object
description: >-
A confirmed category. Its specialization must equal the enclosing
match entry's specialization. `basis` says what the grade rests on;
`synthetic_demo` marks a demonstration category, which an organization
must read as one and never as a standard confirmation.
additionalProperties: false
required:
- specialization
- grade
- basis
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
basis:
$ref: "./evidence_schemas.yml#/schemas/EvidenceBasis"
MatchScore:
type: number
format: double
minimum: 0
maximum: 1
description: A normalized FR09 ranking component from 0 to 1.
MatchNullableScore:
description: >-
A score from a versioned ranking component, or null when it is not
available. Any null component has a matching bounded entry in
`unknown_flags`.
oneOf:
- type: number
format: double
minimum: 0
maximum: 1
- type: "null"
MatchUnknownComponent:
type: string
description: Ranking or public-card component whose value is unknown.
enum:
- semantics
- percentile
- assessment
- freshness
- responsiveness
- experience_band
- work_formats
- salary_compatibility
- domain
MatchUnknownReason:
type: string
description: >-
Bounded explanation for an unknown component, not a hiding reason.
`cohort_below_30` is reported only while the comparable real cohort of
the category is smaller than the versioned minimum; once the cohort
reaches the minimum but the percentile is still not computed, the reason
is `percentile_not_computed`. In both cases T is the neutral 0.5.
enum:
- ml_unavailable
- cohort_below_30
- no_confirmation_for_specialization
- not_in_public_card
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
additionalProperties: false
required:
- component
- reason
properties:
component:
$ref: "#/schemas/MatchUnknownComponent"
reason:
$ref: "#/schemas/MatchUnknownReason"
MatchUnknownFlags:
type: array
maxItems: 9
items:
$ref: "#/schemas/MatchUnknownFlag"
MatchEvidenceCode:
type: string
description: >-
Template code for an explanation derived from allowed evidence. It
carries no free text, raw answer, or reason for withheld FSP data.
enum:
- confirmed_category
- required_skill_evidence
- desired_skill_evidence
- domain_alignment
- task_alignment
- work_conditions_match
- salary_compatibility
- declared_grade
MatchEvidenceState:
type: string
enum:
- supports
- partial
- gap
- declared_only
MatchEvidenceSummaryItem:
type: object
description: A templated, non-text evidence explanation.
additionalProperties: false
required:
- code
- state
properties:
code:
$ref: "#/schemas/MatchEvidenceCode"
state:
$ref: "#/schemas/MatchEvidenceState"
MatchEvidenceSummary:
type: array
maxItems: 12
items:
$ref: "#/schemas/MatchEvidenceSummaryItem"
MatchRequirementKind:
type: string
description: Kind of the need requirement that an explanation item answers.
enum:
- required_skill
- desired_skill
- task
MatchSemanticItemKind:
type: string
description: |-
Kind of the published card item that matched a requirement.
- project: one published project; `project_title` names it.
- stack: the recognized technology codes of the card.
- roles: the specializations and grades that the card shows.
enum:
- project
- stack
- roles
MatchSimilarityBand:
type: string
description: >-
Coarse band of the cosine similarity between the requirement and the
matched item under the versioned policy thresholds. `high` and `medium`
are the only values; a weaker similarity produces no item. The band is
a computed similarity of two texts, not a judgement of the candidate.
enum:
- high
- medium
MatchSemanticEvidence:
type: object
description: >-
Why the entry is in the result: one confirmed requirement of the need
and the published card item with the highest semantic similarity to it.
The server computes it from stored vectors and the versioned
thresholds; no model writes text into it. `requirement_text` is the
confirmed text of the organization's own need. `project_title` is the
title the candidate published with the `projects` card field and is
null for other kinds. No repository address, owner, or fetched
repository text is ever part of it.
additionalProperties: false
required:
- requirement_kind
- requirement_text
- item_kind
- project_title
- repository_verified
- similarity
properties:
requirement_kind:
$ref: "#/schemas/MatchRequirementKind"
requirement_text:
type: string
minLength: 1
maxLength: 300
description: Confirmed skill name or task text of the need. Plain text; show it as text, never as HTML.
item_kind:
$ref: "#/schemas/MatchSemanticItemKind"
project_title:
description: Published project title for `project`, otherwise null. Plain text; show it as text, never as HTML.
oneOf:
- type: string
minLength: 1
maxLength: 100
- type: "null"
repository_verified:
type: boolean
description: >-
True only for a project whose linked repository the latest server
check found public on GitHub ("backed by a public repository"). It
does not prove authorship.
similarity:
$ref: "#/schemas/MatchSimilarityBand"
MatchSemanticEvidenceList:
type: array
description: >-
Semantic explanation items in a stable order: `high` before `medium`,
then by similarity, then by the order of the requirements in the need.
At most the versioned per-entry limit is returned. It is empty for a
bank search, while vectors are not ready, when ML is unavailable, and
when no requirement reaches a band; `unknown_flags` names
`ml_unavailable` when the semantic component itself is unknown.
maxItems: 12
items:
$ref: "#/schemas/MatchSemanticEvidence"
MatchPublicStack:
type: array
maxItems: 4
uniqueItems: true
items:
$ref: "#/schemas/MatchSearchStackTag"
MatchPublicContext:
type: object
description: >-
Safe anonymous-card context only. A null value means that the value is
not in the public card or is not present; the response does not reveal
which. It contains no contact, candidate location, or salary amount.
additionalProperties: false
required:
- stack
- experience_band
- work_formats
- salary_compatibility
properties:
stack:
oneOf:
- $ref: "#/schemas/MatchPublicStack"
- type: "null"
experience_band:
oneOf:
- $ref: "./privacy_schemas.yml#/schemas/CandidateExperienceBand"
- type: "null"
work_formats:
oneOf:
- type: array
maxItems: 3
uniqueItems: true
items:
$ref: "./questionnaire_schemas.yml#/schemas/WorkFormat"
- type: "null"
salary_compatibility:
oneOf:
- $ref: "./privacy_schemas.yml#/schemas/CandidateSalaryCompatibility"
- type: "null"
MatchConfirmedComponents:
type: object
description: >-
Components from the FR09 ranking model for a confirmed category.
`percentile` is null when fewer than 30 comparable real candidates are
available; the ranking uses neutral T = 0.5 and does not publish a
percentile. If ML is unavailable, `semantics` uses neutral 0.5 and the
reason appears in `unknown_flags`.
additionalProperties: false
required:
- fit
- coverage
- domain
- semantics
- percentile
- competition
- freshness
- responsiveness
- rank_score
properties:
fit:
$ref: "#/schemas/MatchScore"
coverage:
$ref: "#/schemas/MatchScore"
domain:
$ref: "#/schemas/MatchScore"
semantics:
$ref: "#/schemas/MatchScore"
percentile:
$ref: "#/schemas/MatchNullableScore"
competition:
$ref: "#/schemas/MatchScore"
freshness:
$ref: "#/schemas/MatchScore"
responsiveness:
$ref: "#/schemas/MatchScore"
rank_score:
$ref: "#/schemas/MatchScore"
MatchUnconfirmedComponents:
type: object
description: >-
Unconfirmed entries are ordered only by Fit and coverage. This strict
component object has no theta, T, P, test percentile, or confirmed
assessment score.
additionalProperties: false
required:
- fit
- coverage
properties:
fit:
type: number
format: double
minimum: 0
maximum: 1
description: Job fit for this specialization, never an assessment score.
coverage:
type: number
format: double
minimum: 0
maximum: 1
description: Coverage of confirmed need skills by allowed public evidence.
MatchConfirmedCandidate:
type: object
description: >-
One confirmed specialization entry in the `main` or `near` group. The
group containing it supplies the group label. A candidate may have a
separate entry for another specialization.
additionalProperties: false
required:
- candidate_handle
- specialization
- confirmation_status
- declared_grade
- category
- strength
- public_context
- evidence_summary
- semantic_evidence
- components
- unknown_flags
properties:
candidate_handle:
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
confirmation_status:
type: string
enum:
- confirmed
declared_grade:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
description: Candidate-declared grade for this specialization, never a confirmation.
category:
$ref: "#/schemas/MatchCategory"
strength:
$ref: "#/schemas/MatchStrength"
public_context:
$ref: "#/schemas/MatchPublicContext"
evidence_summary:
$ref: "#/schemas/MatchEvidenceSummary"
semantic_evidence:
$ref: "#/schemas/MatchSemanticEvidenceList"
components:
$ref: "#/schemas/MatchConfirmedComponents"
unknown_flags:
$ref: "#/schemas/MatchUnknownFlags"
MatchUnconfirmedCandidate:
type: object
description: >-
One specialization with no confirmed category. `category` and
`strength` remain present and null. A confirmation in another
specialization never changes this entry. The schema intentionally has
no assessment measurement fields.
additionalProperties: false
required:
- candidate_handle
- specialization
- confirmation_status
- declared_grade
- category
- strength
- public_context
- evidence_summary
- semantic_evidence
- components
- unknown_flags
properties:
candidate_handle:
$ref: "./common_schemas.yml#/schemas/CandidateHandle"
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
confirmation_status:
type: string
enum:
- unconfirmed
declared_grade:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
description: Candidate-declared grade, separate from assessment confirmation.
category:
type: "null"
description: There is no confirmed category for this specialization.
strength:
type: "null"
description: Assessment strength is not measured for this specialization.
public_context:
$ref: "#/schemas/MatchPublicContext"
evidence_summary:
$ref: "#/schemas/MatchEvidenceSummary"
semantic_evidence:
$ref: "#/schemas/MatchSemanticEvidenceList"
components:
$ref: "#/schemas/MatchUnconfirmedComponents"
unknown_flags:
$ref: "#/schemas/MatchUnknownFlags"
MatchSearchGroups:
type: object
description: >-
Separate ranking groups. Confirmed categories appear in main and near;
unconfirmed specializations appear only in the lower unconfirmed group.
additionalProperties: false
required:
- main
- near
- unconfirmed
properties:
main:
type: array
items:
$ref: "#/schemas/MatchConfirmedCandidate"
near:
type: array
items:
$ref: "#/schemas/MatchConfirmedCandidate"
unconfirmed:
type: array
items:
$ref: "#/schemas/MatchUnconfirmedCandidate"
MatchSearchResponse:
type: object
description: >-
Anonymous search result grouped by specialization state. Repeated
organization-scoped handles are allowed when the same candidate has
different specialization entries; entries never transfer confirmation
between specializations.
additionalProperties: false
required:
- source
- groups
- truncated
properties:
source:
$ref: "#/schemas/MatchSearchSource"
groups:
$ref: "#/schemas/MatchSearchGroups"
truncated:
type: boolean
description: >-
True when the groups are not the whole ranked result: a group exceeded
the versioned per-group limit, or the organization's card-view
allowance ended while the entries were being revealed. The entries
returned are in rank order and already counted as card views. It
carries no total, so it does not reveal how many candidates match.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,131 @@
schemas:
NotificationKind:
type: string
description: |-
Which event put the notification into the inbox. The inbox stores a reference to the event, never its text.
- invitation_delivered: an invitation reached the candidate's inbox. It does not depend on any email, and a failed or missing email never blocks it. The send of an invitation produces it through the outbox, so the notice appears shortly after the commit of the send, while the invitation itself is in ListMyInvitations from that commit.
- synthetic: a synthetic notice that exercises the inbox path (the event, the read-time visibility check, the list, and the read state). It has no product meaning, needs no action, and is never produced by a user action.
Adding a value is a contract change; a client shows an unknown kind with the generic text of an item without content.
enum:
- invitation_delivered
- synthetic
NotificationContent:
type: object
description: >-
The text of a notification as the current source shows it to the
recipient now. It is computed on every read and never stored, so a
hiding, a revoked membership, or a withdrawn source removes it from the
next read. It holds no contact, no score, and no result of an
assessment.
additionalProperties: false
required:
- title
- summary
- link_path
properties:
title:
type: string
minLength: 1
maxLength: 120
description: Short heading in Russian.
summary:
type: string
minLength: 1
maxLength: 500
description: One or two sentences in Russian. Plain text, never markup.
link_path:
type:
- string
- "null"
maxLength: 256
pattern: "^/[A-Za-z0-9/_-]{0,255}$"
description: >-
Same-origin absolute path of the screen that the notification
opens, or null when there is none. It has no origin, query,
fragment, or escape; a client opens it only as a path of its own
router.
examples:
- /candidate/invitations
Notification:
type: object
description: >-
One item of the inbox of the current account. Its identity, kind,
organization, delivery time, and read state are stored; its content is
resolved from the current source on every read.
additionalProperties: false
required:
- id
- kind
- organization_id
- delivered_at
- read_at
- content
properties:
id:
type: string
format: uuid
description: >-
Identifier of the item. It equals the identifier of the event that
produced it, so a repeated delivery of the same event is the same
item.
kind:
$ref: "#/schemas/NotificationKind"
organization_id:
type: string
format: uuid
description: >-
The organization context of the item: the organization that sent it
to a candidate, or the organization whose cabinet holds it for an
employer. The identifier is not a right to read the organization.
delivered_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
read_at:
description: >-
When the recipient first marked the item read, or null while it is
unread. A repeated mark keeps the first time.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
content:
description: >-
The current content, or null when the source is gone or the
recipient may not see it now. A client then shows a generic line
such as "The content is no longer available" and never an old
copy. The item stays in the list and can be marked read.
oneOf:
- $ref: "#/schemas/NotificationContent"
- type: "null"
NotificationList:
type: object
description: One page of the inbox, newest delivery first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Items of the page.
items:
$ref: "#/schemas/Notification"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
NotificationReadReceipt:
type: object
description: >-
The read state of one item after a mark. It carries no content, so
marking never reads the source.
additionalProperties: false
required:
- id
- read_at
properties:
id:
type: string
format: uuid
description: Identifier of the marked item.
read_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
@@ -0,0 +1,503 @@
schemas:
OrganizationVersion:
type: integer
format: int64
minimum: 1
description: >-
Version of the profile of an organization. Creation makes version 1,
and every committed change of the profile advances it by exactly one.
A change carries the version the client read as `expected_version`.
Only the profile has a version: the memberships and the verification
level of the organization do not advance it.
examples:
- 2
OrganizationName:
type: string
minLength: 1
maxLength: 200
pattern: '^\S(?:[^\n\r]*\S)?$'
description: >-
Public name of the organization, for example the legal name that a
candidate knows. It has no leading or trailing whitespace and no line
breaks, and it is at most 200 characters because consent records keep
a copy of it. Plain text; clients show it as text, never as HTML. A
later rename never changes the copy that a consent record holds.
examples:
- ООО Пример Платежи
OrganizationDescription:
type: string
minLength: 1
maxLength: 2000
description: >-
What the organization does, written for candidates. It may contain
line breaks; the server stores CRLF as LF, and it refuses leading and
trailing whitespace and any other control character. Plain text;
clients show it as text, never as HTML.
examples:
- Платежный сервис для малого бизнеса. Разрабатываем собственное ядро проведения платежей и интеграции с банками.
OrganizationSphere:
type: string
minLength: 1
maxLength: 100
pattern: '^\S(?:.*\S)?$'
description: >-
Field of business of the organization as free text, for example
"Платежи и финансовые сервисы". It has no leading or trailing
whitespace and no line breaks. The product has no sphere taxonomy
yet; a taxonomy code would be an additive field. Plain text; clients
show it as text, never as HTML.
examples:
- Платежи и финансовые сервисы
OrganizationWebsite:
type: string
minLength: 9
maxLength: 300
pattern: '^https://[^\s/?#@]+(?:[/?#][^\s]*)?$'
description: >-
Public website of the organization: an https URL with a host name,
without credentials. The server also refuses a port, an IP address, a
host name without a dot, and `localhost`. It never fetches the
address.
examples:
- https://payments.example.com
OrganizationContactChannels:
type: object
description: >-
Public contacts of the organization, the ones a candidate sees on its
card. They are company channels, such as a careers mailbox, the
website, a company phone, or a company Telegram account, and never the
personal email address, phone, or messenger of an employee; personal
contacts of the people of the organization stay out of this object.
The server cannot tell a company address from a personal one, so the
owner answers for the content, and a candidate can complain about an
organization through a support case. The object is the request field
and the stored value alike, so a response can be sent back unchanged;
every field is required and null means not set. A change replaces the
whole object, never a single field of it.
additionalProperties: false
required:
- website
- email
- phone
- telegram
properties:
website:
oneOf:
- $ref: "#/schemas/OrganizationWebsite"
- type: "null"
email:
description: >-
Public mailbox of the organization, such as a careers address, or
null. It is stored in the form it was given.
oneOf:
- $ref: "./identity_schemas.yml#/schemas/EmailAddress"
- type: "null"
phone:
description: Public phone number of the organization, or null.
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactPhoneNumber"
- type: "null"
telegram:
description: Public Telegram account of the organization, or null.
oneOf:
- $ref: "./contact_grant_schemas.yml#/schemas/ContactTelegramUsername"
- type: "null"
OrganizationRepresentative:
type: object
description: >-
A person that speaks for the organization to candidates, as the
owner presents them on the card. It is presentation only: a
representative is not a member of the organization, has no account
link, and gains no right from being listed, and a member does not
become a representative by joining. It holds no contact of the
person; reaching the organization goes through its public contacts.
The name is personal data of an employee that the owner publishes, so
the owner must have the right to do it; see the open questions in the
organization section of the API guide.
additionalProperties: false
required:
- name
- job_title
properties:
name:
type: string
minLength: 1
maxLength: 100
pattern: '^\S(?:.*\S)?$'
description: >-
Name of the person as the card shows it. It has no leading or
trailing whitespace and no line breaks. Plain text; clients show
it as text, never as HTML.
job_title:
type: string
minLength: 1
maxLength: 100
pattern: '^\S(?:.*\S)?$'
description: >-
Position of the person in the organization, for example "Руководитель
по подбору". It has no leading or trailing whitespace and no line
breaks. Plain text; clients show it as text, never as HTML.
OrganizationVerificationLevel:
type: string
description: |-
Trust level of an organization (PRD FR07). It limits the quotas of the organization and, in a planned mode, the access of candidates under 18; it never replaces the consent of a candidate.
- e0: the confirmed email of the account that created the organization. Every new organization starts here.
- e1: a corporate email, a verified domain, and a link with the organization.
- e2: a check of the requisites and of the authority of the person.
- e3: a manual check or a partner status.
The server reports e1, e2, or e3 only after a verification process has recorded it for the organization. No request of this contract sets or raises a level, and neither does an edit of the profile, the size of the profile, the number of members, or the domain of an email address. The first slice of the product uses e0 and e1; the processes for e1, e2, and e3 do not exist yet, so a client treats every level other than e0 as unavailable until they do. Adding a level is a contract change.
enum:
- e0
- e1
- e2
- e3
OrganizationVerificationBasis:
type: string
description: |-
Ground of the current verification level, the reason a cabinet can show next to it.
- confirmed_email: the confirmed email of the creating account (e0).
- corporate_domain: a corporate email and a verified domain (e1).
- requisites_and_authority: a check of the requisites and of the authority (e2).
- manual_review: a manual check by the platform (e3).
- partner_status: a partner status (e3).
Each level has its own bases, so a level and a basis that do not belong together never occur. Adding a value is a contract change.
enum:
- confirmed_email
- corporate_domain
- requisites_and_authority
- manual_review
- partner_status
OrganizationVerification:
type: object
description: >-
Verification level of an organization with its ground and the time it
was set. It is read-only everywhere in this contract: the server sets
it, and no request carries it. The scope of the check and the history
of changes (PRD FR07) are planned as additive fields and a separate
history with the first verification process.
additionalProperties: false
required:
- level
- basis
- changed_at
properties:
level:
$ref: "#/schemas/OrganizationVerificationLevel"
basis:
$ref: "#/schemas/OrganizationVerificationBasis"
changed_at:
description: >-
Moment the level was set to its current value; for a new
organization, the creation time.
allOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
CandidateOrganizationCard:
type: object
description: >-
The card of an organization as a candidate sees it: what an invitation
shows before the candidate decides. The server builds it from the
profile and the verification level and returns it to the owner as the
preview of PRD FR07 ("through the eyes of the candidate"); a client
never sends it. It holds no membership, no role, no account, no
version, and no ground of the verification: a member's email address,
the number of members, and the history of the organization stay out of
it. The card is the same object that the candidate side will return
(planned in the invitation contract). Only a candidate who received an
invitation from the organization sees it; it is not a public page, and
no operation shows it to anyone else until the open question about
publishing the names of representatives is decided (152-FZ). The
server may leave `representatives` out, and a card without them means
that the representatives are not published, not that the organization
has none.
additionalProperties: false
required:
- id
- name
- description
- sphere
- contacts
- verification_level
properties:
id:
type: string
format: uuid
description: Identifier of the organization.
name:
$ref: "#/schemas/OrganizationName"
description:
description: Description of the organization, or null.
oneOf:
- $ref: "#/schemas/OrganizationDescription"
- type: "null"
sphere:
description: Field of business of the organization, or null.
oneOf:
- $ref: "#/schemas/OrganizationSphere"
- type: "null"
contacts:
$ref: "#/schemas/OrganizationContactChannels"
representatives:
type:
- array
- "null"
maxItems: 10
description: >-
Representatives in the order the owner gave them. Absent or null
means that they are not published on this card, which says nothing
about whether the organization has any.
items:
$ref: "#/schemas/OrganizationRepresentative"
verification_level:
$ref: "#/schemas/OrganizationVerificationLevel"
Organization:
type: object
description: >-
Organization as its members read it: the profile that the owner edits,
the verification level that only the server sets, and the card that a
candidate sees. It never contains a role, a membership, the members
of the organization, or an account identifier, so no field of it can
raise a right: the role of the caller is in `OrganizationMembership`
and comes only from the membership held by the server. The profile
fields repeat in `candidate_card`, which is the candidate's view of
them; the client reads the profile fields for the form and
`candidate_card` for the preview.
additionalProperties: false
required:
- id
- version
- name
- description
- sphere
- contacts
- representatives
- verification
- candidate_card
- created_at
- updated_at
properties:
id:
type: string
format: uuid
description: >-
Identifier of the organization, the `org_id` of every
organization-scoped path. It never changes.
version:
$ref: "#/schemas/OrganizationVersion"
name:
$ref: "#/schemas/OrganizationName"
description:
description: Description of the organization, or null.
oneOf:
- $ref: "#/schemas/OrganizationDescription"
- type: "null"
sphere:
description: Field of business of the organization, or null.
oneOf:
- $ref: "#/schemas/OrganizationSphere"
- type: "null"
contacts:
$ref: "#/schemas/OrganizationContactChannels"
representatives:
type: array
maxItems: 10
description: Representatives in the order the owner gave them.
items:
$ref: "#/schemas/OrganizationRepresentative"
verification:
$ref: "#/schemas/OrganizationVerification"
candidate_card:
$ref: "#/schemas/CandidateOrganizationCard"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
OrganizationCreate:
type: object
description: >-
New organization. Only `name` is required, so a company can start with
its name and complete the card later. The creating account becomes the
owner of the organization; the body has no field for a role, a
membership, an owner, a verification level, or a version, and unknown
fields are rejected, so a request cannot set any of them. An absent
`description` or `sphere`, and one sent as null, stay unset; an absent
`contacts` has every contact unset; an absent `representatives` is an
empty list.
additionalProperties: false
required:
- name
properties:
name:
$ref: "#/schemas/OrganizationName"
description:
oneOf:
- $ref: "#/schemas/OrganizationDescription"
- type: "null"
sphere:
oneOf:
- $ref: "#/schemas/OrganizationSphere"
- type: "null"
contacts:
$ref: "#/schemas/OrganizationContactChannels"
representatives:
type: array
maxItems: 10
items:
$ref: "#/schemas/OrganizationRepresentative"
OrganizationUpdate:
type: object
description: >-
Change of the profile of an organization over the version the client
read. Each field present replaces that field as a whole and an absent
field stays unchanged; `contacts` and `representatives` are replaced
entirely and never merged, and a representative left out of a sent
list is removed. `description` and `sphere` sent as null become unset;
`name`, `contacts`, and `representatives` cannot be null. The body can
change the profile only. It has no field for a role, a membership, an
owner, a verification level, a basis, or a card, and unknown fields
are rejected, so editing the profile can neither raise a right nor
raise the trust level of the organization; both change only through
processes of the server.
additionalProperties: false
required:
- expected_version
properties:
expected_version:
$ref: "#/schemas/OrganizationVersion"
name:
$ref: "#/schemas/OrganizationName"
description:
oneOf:
- $ref: "#/schemas/OrganizationDescription"
- type: "null"
sphere:
oneOf:
- $ref: "#/schemas/OrganizationSphere"
- type: "null"
contacts:
$ref: "#/schemas/OrganizationContactChannels"
representatives:
type: array
maxItems: 10
items:
$ref: "#/schemas/OrganizationRepresentative"
OrganizationRole:
type: string
description: |-
Role of a member in an organization (PRD 2.2 and the FR07 matrix). The role belongs to the membership, never to the organization or to any editable profile.
- owner: manages the organization and its members, and acts on behalf of the company.
- recruiter: leads the selection of candidates for all needs.
- hiring_manager: acts on the needs assigned to the member.
- technical_expert: refines the requirements of the assigned needs; reads no contacts and sends no invitations.
In the MVP only the owner acts, so the other roles grant nothing yet: an operation that is not open to a role answers 403 `forbidden`. The full matrix is planned, and applying it changes no field of this contract. Adding a role is a contract change.
enum:
- owner
- recruiter
- hiring_manager
- technical_expert
MembershipState:
type: string
description: |-
State of a membership. Only `active` gives access: every other state answers as if the account were no member.
- active: the member works in the organization with the role.
- suspended: access is stopped, and the owner or the platform may restore it.
- removed: the owner or the platform ended the membership. A removal by the platform is not undone by the owner or by an invitation: the acceptance of an employee invitation and the member management must not reactivate it on their own. Who removed the member and why become additive fields of the member management.
- left: the member ended the membership.
One account has at most one membership per organization, so a former member who returns gets the same membership back in `active`, and the history of the pair is the history of its audit events (planned). The listing of this contract returns only `active` memberships; the other states are listed now so that generated clients accept them when the member management reads them. Adding a state is a contract change.
enum:
- active
- suspended
- removed
- left
OrganizationMembership:
type: object
description: >-
The membership of the caller in one organization. The caller is the
account of the session, so the object holds no account identifier.
Only the server sets the role and the state, through the operations
that manage members, which are planned; no operation of this contract
changes them.
additionalProperties: false
required:
- organization_id
- role
- state
- joined_at
properties:
organization_id:
type: string
format: uuid
description: Identifier of the organization.
role:
$ref: "#/schemas/OrganizationRole"
state:
$ref: "#/schemas/MembershipState"
joined_at:
description: >-
Moment the membership was first created. A member who left and
returns keeps the same value, because the pair has one membership;
the moment of the latest activation is a planned additive field
(`activated_at`).
allOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
OrganizationSummary:
type: object
description: >-
An organization in the list of the caller's organizations: what a
switcher needs to name it. The profile, the contacts, and the
representatives are in `Organization`.
additionalProperties: false
required:
- id
- name
- verification_level
properties:
id:
type: string
format: uuid
description: Identifier of the organization, the `org_id` of its paths.
name:
$ref: "#/schemas/OrganizationName"
verification_level:
$ref: "#/schemas/OrganizationVerificationLevel"
MyOrganization:
type: object
description: >-
An organization available to the caller together with the caller's
membership in it.
additionalProperties: false
required:
- organization
- membership
properties:
organization:
$ref: "#/schemas/OrganizationSummary"
membership:
$ref: "#/schemas/OrganizationMembership"
MyOrganizationList:
type: object
description: >-
One page of the organizations available to the caller, newest
membership first. It holds only organizations where the caller has an
`active` membership, so it is also the list of contexts the caller can
work in; it never names an organization the caller cannot enter.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Organizations of the page.
items:
$ref: "#/schemas/MyOrganization"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
@@ -0,0 +1,189 @@
schemas:
PracticeRunTest:
type: object
description: >-
One test of the candidate for a debug run: an input and the output the
candidate expects. It is compared with the checker of the task.
additionalProperties: false
required:
- input
- expected_output
properties:
input:
type: string
maxLength: 10000
expected_output:
type: string
maxLength: 10000
PracticeRunCreate:
type: object
description: >-
Debug run of a practice solution against the public examples of the task
and up to ten tests of the candidate. It never runs a hidden check and
never changes the practice state, the verdict, or the attempt version.
Unknown fields are rejected.
additionalProperties: false
required:
- item_id
- language
- source_code
properties:
item_id:
$ref: "./assessment_schemas.yml#/schemas/AssessmentItemId"
language:
description: One of the `languages` of the practice item, or null when the item offers none.
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
- type: "null"
source_code:
type: string
minLength: 1
maxLength: 65536
tests:
type: array
maxItems: 10
description: Tests of the candidate, run after the public examples.
items:
$ref: "#/schemas/PracticeRunTest"
PracticeRunState:
type: string
description: |-
State of a debug run.
- queued: the run waits in the sandbox queue.
- running: the sandbox runs it.
- finished: `result` holds the outcome of the public examples and the tests of the candidate.
- failed: the sandbox infrastructure could not run it, independently of the solution; `failure_reason` is `sandbox_error`. Start a new run.
Adding a value is a contract change.
enum:
- queued
- running
- finished
- failed
PracticeRunOutcome:
type: string
description: >-
Outcome of a run or one of its tests. Every outcome caused by the
solution, such as a compilation error, a crash, or a limit, is a
finished run with this outcome; an infrastructure failure is a failed
run instead.
enum:
- accepted
- wrong_answer
- compile_error
- time_limit_exceeded
- memory_limit_exceeded
- output_limit_exceeded
- runtime_error
PracticeRunTestSource:
type: string
description: >-
Where a test of a debug run comes from: a public example of the task or
a test of the candidate.
enum:
- example
- candidate
PracticeRunTestResult:
type: object
description: >-
Outcome of one evaluated test. The tests of a source stop at the first
failed one, so later tests of that source are not listed.
additionalProperties: false
required:
- source
- index
- outcome
- time_ms
- memory_kb
- diagnostic
properties:
source:
$ref: "#/schemas/PracticeRunTestSource"
index:
type: integer
format: int32
minimum: 1
maximum: 10
description: Position of the test in its source, from 1.
outcome:
$ref: "#/schemas/PracticeRunOutcome"
time_ms:
type: integer
format: int64
minimum: 0
memory_kb:
type: integer
format: int64
minimum: 0
diagnostic:
description: Truncated error output of a failed test, or null.
oneOf:
- type: string
maxLength: 2048
- type: "null"
PracticeRunResult:
type: object
description: >-
Result of a debug run on the public examples and the tests of the
candidate. It never contains a hidden check, its outcome, or the score.
additionalProperties: false
required:
- outcome
- compile_diagnostic
- tests
properties:
outcome:
$ref: "#/schemas/PracticeRunOutcome"
compile_diagnostic:
description: The compiler message when `outcome` is `compile_error`, otherwise null.
oneOf:
- type: string
maxLength: 4096
- type: "null"
tests:
type: array
maxItems: 20
items:
$ref: "#/schemas/PracticeRunTestResult"
PracticeRun:
type: object
description: >-
Debug run of a practice solution. It shows only the public examples and
the tests of the candidate; hidden checks are never run, listed, or
scored by a debug run.
additionalProperties: false
required:
- id
- item_id
- state
- created_at
- finished_at
- failure_reason
- result
properties:
id:
type: string
format: uuid
description: Identifier of the run.
item_id:
$ref: "./assessment_schemas.yml#/schemas/AssessmentItemId"
state:
$ref: "#/schemas/PracticeRunState"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
finished_at:
description: Time the run reached `finished` or `failed`, or null.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
failure_reason:
description: "`sandbox_error` when `state` is `failed`, otherwise null."
oneOf:
- $ref: "./assessment_schemas.yml#/schemas/PracticeFailureReason"
- type: "null"
result:
description: The result when `state` is `finished`, otherwise null.
oneOf:
- $ref: "#/schemas/PracticeRunResult"
- type: "null"
@@ -0,0 +1,705 @@
schemas:
PublicationVersion:
type: integer
format: int64
minimum: 0
description: >-
Version of the publication setting of the candidate. A candidate who
has never published has version 0 and the profile is closed; every
change that alters the setting advances it by one. The client sends
the version it read as `expected_version`. It is independent of the
versions of the profile and of the search status, so a change of one
never makes another stale.
examples:
- 2
SearchStatusVersion:
type: integer
format: int64
minimum: 0
description: >-
Version of the search status of the candidate. A candidate who never
set the status has version 0 and the status `not_looking`; every
confirmation or change advances it by one. The client sends the
version it read as `expected_version`.
examples:
- 3
CardField:
type: string
description: |-
A group of values of the anonymous candidate card that the candidate chooses to publish. The set is closed and has no value for the full name, a contact, or the lowest salary: the card never carries them, so no choice and no later contract change in this list can publish them by accident. Contacts leave only through the contact grant of an accepted invitation (C4), and the lowest salary never leaves.
- categories: specialization and grade confirmed by an authoritative assessment result. With it an organization receives the confirmed category and, with each category of the card, one supporting assessment fact: its skill, the passed grade, the trust level, the year of the assessment, and the basis and calibration that mark a synthetic, uncalibrated demonstration (`GetOrganizationCandidateEvidence`). The candidate sees the same on `GetMyCardPreview`.
- self_assessment: the candidate's declared specialization and grade, separate from confirmed categories.
- stack: only recognized technology codes from the server's closed taxonomy.
- experience: a coarse total-experience band, without employers, periods, or descriptions.
- work_formats: explicitly selected work formats from the private questionnaire.
- salary_compatibility: a nullable compatibility outcome with no salary amounts or bounds.
- projects: the projects of the profile with their title, description, stack tags, and whether a linked repository is a public GitHub repository. The titles and descriptions are text that the candidate writes and may identify them; the repository address and its owner never reach an organization through the card. Published projects are also the text that semantic ranking reads and that match explanations name.
- soft_skills, location, and relocation: retained only for compatibility in existing saved sets; they are not returned by the anonymous card.
Only values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status `extracted`) and an unknown value never do, whatever the field set says.
Adding a value is a contract change that lets a candidate publish more, and it is also a migration (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and event tables list the codes). A client treats an unknown value as a reason to ask for an update, and the server never adds a new value to a published set on its own.
enum:
- categories
- salary_compatibility
- self_assessment
- stack
- experience
- soft_skills
- location
- relocation
- work_formats
- projects
CardFieldSet:
type: array
minItems: 0
maxItems: 10
uniqueItems: true
description: >-
Distinct card fields. The server stores them in ascending order of
the codes and answers them in that order, whatever order the client
sent, so equal sets are equal arrays.
items:
$ref: "#/schemas/CardField"
PublicationState:
type: string
description: |-
Whether the candidate card can be read by organizations at all. It is computed from the stored publication and the consent ledger: a profile is closed unless the candidate published it and the C2 consent that backs the publication is still unrevoked.
- closed: no organization reads the card. This is the state of every new profile and of a profile whose publication was closed or whose C2 was revoked.
- published: organizations may read exactly the fields in `fields`, except for the organizations the candidate hid.
enum:
- closed
- published
PublicationClosedReason:
type: string
description: |-
Why a closed profile is closed, shown only to the candidate.
- never_published: the candidate has never published the profile.
- closed_by_candidate: the candidate closed the publication.
- consent_revoked: the C2 consent that backed the publication was revoked. A later C2 grant never reopens the publication; the candidate publishes again explicitly and the new publication refers to the new consent record.
enum:
- never_published
- closed_by_candidate
- consent_revoked
Publication:
type: object
description: >-
Publication setting of the candidate card. It is separate from the
consent: the C2 consent in the ledger proves that the candidate
accepted the publication text, and this setting records whether and
which fields are published. `state` is `published` only while the
referenced C2 record is unrevoked, whatever the stored setting says,
so a revocation closes the card at once. The state, the fields, and
the times belong to the history that the C2 consent record does not
carry.
additionalProperties: false
required:
- state
- closed_reason
- fields
- consent_id
- published_at
- version
properties:
state:
$ref: "#/schemas/PublicationState"
closed_reason:
description: Why the profile is closed, or null while it is published.
oneOf:
- $ref: "#/schemas/PublicationClosedReason"
- type: "null"
fields:
description: >-
Card fields that organizations may read. Empty exactly when `state`
is `closed`.
allOf:
- $ref: "#/schemas/CardFieldSet"
consent_id:
description: >-
Identifier of the C2 record of the consent ledger that backs the
current or the last publication, the `id` of a `ConsentRecord` of
this account, or null when the profile was never published.
oneOf:
- type: string
format: uuid
- type: "null"
published_at:
description: >-
Moment of the latest change that published or republished the
card, or null while the profile was never published. It stays
after a closing, as the time of the last publication.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
version:
$ref: "#/schemas/PublicationVersion"
PublicationUpdate:
type: object
description: >-
The complete new publication setting. `published` needs a non-empty
set of fields and an active C2 consent of the account; `closed` needs
an empty set and never fails for a missing consent. The body names no
consent: the server binds the publication to the account's current
unrevoked C2 record, and a client can neither supply nor forge one.
additionalProperties: false
required:
- expected_version
- state
- fields
properties:
expected_version:
$ref: "#/schemas/PublicationVersion"
state:
$ref: "#/schemas/PublicationState"
fields:
$ref: "#/schemas/CardFieldSet"
SearchStatusValue:
type: string
description: |-
Whether the candidate says they are searching for work. The status is a statement, never a consent: it publishes nothing, hides nothing, and grants nothing, and no value of it changes the C2 consent, the publication, or the hidden organizations.
- looking: the candidate is searching ("Ищу"). It holds only while it is confirmed in time; see `SearchStatus.lapsed`.
- not_looking: the candidate is not announcing a search. It is the state of every new account and the state to which a lapsed status falls.
enum:
- looking
- not_looking
SearchStatus:
type: object
description: >-
Search status of the candidate as it holds now. The status `looking`
stores the moment of its confirmation and lapses when the
confirmation interval of the product policy passes without a new
confirmation. A lapse only ever narrows: the status falls to
`not_looking`, which is the non-public state, and a lapse never
changes the publication or the hidden organizations. It needs no
stored change, so no process can make a candidate more visible by
expiry, and a lapsed candidate confirms again explicitly.
additionalProperties: false
required:
- value
- lapsed
- confirmed_at
- lapses_at
- version
properties:
value:
description: >-
The status that holds now: `looking` only while the confirmation
has not lapsed.
allOf:
- $ref: "#/schemas/SearchStatusValue"
lapsed:
type: boolean
description: >-
True when the candidate set `looking`, did not confirm it again,
and the interval ended, so `value` is `not_looking`. False
otherwise, including a status the candidate cleared.
confirmed_at:
description: >-
Moment of the latest confirmation of `looking`, or null when the
candidate never set it or cleared it.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
lapses_at:
description: >-
Moment at which the confirmed status lapses, fixed when it was
confirmed from the `search_status` section of the product policy
version in force then, or null when `confirmed_at` is null. A
later policy change does not move it; it stays in the past for a
lapsed status.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
version:
$ref: "#/schemas/SearchStatusVersion"
SearchStatusUpdate:
type: object
description: >-
The complete new search status. `looking` is also the confirmation of
a status that still holds or has lapsed: it sets the confirmation time
to now. The body carries no time, interval, or policy version; the
server takes them from the effective product policy.
additionalProperties: false
required:
- expected_version
- value
properties:
expected_version:
$ref: "#/schemas/SearchStatusVersion"
value:
$ref: "#/schemas/SearchStatusValue"
PrivacyOrganization:
type: object
description: >-
Organization as the candidate who hid it reads it. The name is the
current name of the organization. The candidate must already have been
able to see the organization to hide it, so the reference tells them
nothing that they could not read before.
additionalProperties: false
required:
- id
- name
properties:
id:
type: string
format: uuid
description: Identifier of the organization.
name:
type: string
minLength: 1
maxLength: 200
description: >-
Current name of the organization. Plain text; clients show it as
text, never as HTML.
HiddenOrganization:
type: object
description: >-
One organization that the candidate hides the profile from. The record
belongs to the candidate: no organization reads it, learns that it was
hidden, or can tell a hidden candidate from one who is not published.
additionalProperties: false
required:
- organization
- hidden_at
properties:
organization:
$ref: "#/schemas/PrivacyOrganization"
hidden_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
HiddenOrganizationList:
type: object
description: >-
One page of the organizations that the candidate hides the profile
from, newest first with the organization identifier as the
tie-breaker.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Hidden organizations of the page.
items:
$ref: "#/schemas/HiddenOrganization"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
PrivacySettings:
type: object
description: >-
The visibility settings of the current candidate in one read: the
publication, the search status, and the number of hidden
organizations. The three are independent: each has its own version and
its own operation, and a change of one leaves the others as they were.
A new account reads a closed profile, `not_looking`, and no hidden
organization.
additionalProperties: false
required:
- publication
- search_status
- hidden_organizations_total
properties:
publication:
$ref: "#/schemas/Publication"
search_status:
$ref: "#/schemas/SearchStatus"
hidden_organizations_total:
type: integer
minimum: 0
maximum: 1000
description: >-
Number of organizations that the candidate hides the profile from.
The list is read with `ListMyHiddenOrganizations`.
CardCategory:
type: object
description: >-
A category confirmed by assessment results, as the card shows it.
`basis` says what the grade rests on; `synthetic_demo` marks a
demonstration category, which is never a standard confirmation.
additionalProperties: false
required:
- specialization
- grade
- strength
- basis
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
strength:
type: string
enum:
- standard
- strong
description: Coarse strength of the authoritative confirmation.
basis:
$ref: "./evidence_schemas.yml#/schemas/EvidenceBasis"
CardSelfAssessment:
type: object
description: Candidate-declared specialization and optional grade. This is never an assessment result.
additionalProperties: false
required:
- specialization
- confirmation_status
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
confirmation_status:
type: string
enum:
- confirmed
- unconfirmed
declared_grade:
oneOf:
- $ref: "./catalog_schemas.yml#/schemas/GradeCode"
- type: "null"
CandidateExperienceBand:
type: string
description: >-
Coarse total experience bucket. Rare combinations may be generalized to
0_3 or 3_plus before they are returned.
enum:
- "0_1"
- "1_3"
- "3_6"
- "6_plus"
- "0_3"
- "3_plus"
CandidateWorkFormat:
type: string
enum:
- remote
- office
- hybrid
CandidateSalaryCompatibility:
type: string
description: >-
A coarse compatibility result only. No salary amount, minimum, range,
or threshold is part of the anonymous card.
enum:
- compatible
- not_compatible
CardProject:
type: object
description: >-
One published project as the card shows it. It never carries the
repository address, the repository owner, or any text fetched from the
repository.
additionalProperties: false
required:
- title
- description
- stack
- repository_verified
properties:
title:
type: string
minLength: 1
maxLength: 100
description: >-
Project title as the candidate published it. Plain text; show it as
text, never as HTML.
description:
description: >-
Published project description, or null. Plain text; show it as text,
never as HTML.
oneOf:
- type: string
minLength: 1
maxLength: 500
- type: "null"
stack:
type: array
maxItems: 10
description: Published technology tags of the project.
items:
$ref: "./questionnaire_schemas.yml#/schemas/StackTag"
repository_verified:
type: boolean
description: >-
True when the latest server check found the linked repository on
GitHub and it is public. It does not prove that the candidate wrote
the code.
AnonymousCardContent:
type: object
description: >-
The anonymous candidate card as an organization reads it. Only explicitly
published values reach it; unconfirmed stack suggestions and unknown
values never do. Stack output uses a closed taxonomy. It carries no name,
contact, resume text, employer, salary figure, account or
profile identifier, and no schema of the private profile or of a
contact disclosure is reachable from it; a contact reaches an
organization only through the contact grant of an accepted
invitation. Each property is null when its field is not published or
the candidate has no value for it, so the card does not tell the two
apart. The set of properties is closed, and an organization-visible
card must never gain a property that identifies the candidate. The one
free-text exception is `projects`: the candidate writes it and
publishes it by a separate explicit choice, the card never adds the
repository address or owner to it, and the client warns that a project
title can identify its author. The search ranking and the full card of an organization's search result
are defined by the search contract, which reuses this
content.
additionalProperties: false
required:
- pseudonym
- categories
- stack
- self_assessment
- experience_band
- work_formats
- salary_compatibility
- projects
properties:
pseudonym:
type: string
minLength: 47
maxLength: 47
pattern: "^cv1_[A-Za-z0-9_-]{43}$"
description: >-
Stable opaque alias scoped to the reading organization. It is not an
account or profile identifier and changes across organizations.
categories:
type:
- array
- "null"
maxItems: 9
description: Categories confirmed by assessment results, or null.
items:
$ref: "#/schemas/CardCategory"
stack:
type:
- array
- "null"
maxItems: 4
description: Recognized confirmed technology codes only, or null.
items:
type: string
enum:
- go
- postgresql
- kafka
- docker
self_assessment:
type:
- array
- "null"
maxItems: 9
description: Candidate-declared specialization and grade, separate from categories.
items:
$ref: "#/schemas/CardSelfAssessment"
experience_band:
oneOf:
- $ref: "#/schemas/CandidateExperienceBand"
- type: "null"
description: Coarse total work-experience bucket, or null.
work_formats:
type:
- array
- "null"
maxItems: 3
description: Explicitly opted-in work formats, or null.
items:
$ref: "#/schemas/CandidateWorkFormat"
salary_compatibility:
oneOf:
- $ref: "#/schemas/CandidateSalaryCompatibility"
- type: "null"
description: Nullable compatibility result with no salary values.
projects:
type:
- array
- "null"
maxItems: 10
description: >-
Published projects in the candidate's order, or null. Cohort
generalization never changes them: they are text the candidate
chose to publish, so publishing them can make the card unique.
items:
$ref: "#/schemas/CardProject"
CardPreview:
type: object
description: >-
A private candidate preview computed from the current profile,
publication, and consent ledger. Its pseudonym uses a separate preview
context and is not an organization's alias. Organization-specific
visibility filters and cohort checks can further generalize or suppress
the organization-facing card. This read creates no view or history
record and never reaches an organization. `card` is null while the
profile is closed. `evidence` is what an organization would read in the
evidence section of the card, one supporting assessment fact for each
category of the card, and is null exactly when `card` is null; the
organization-facing section can still be generalized or suppressed.
additionalProperties: false
required:
- state
- fields
- card
- evidence
- generated_at
properties:
state:
$ref: "#/schemas/PublicationState"
fields:
$ref: "#/schemas/CardFieldSet"
card:
oneOf:
- $ref: "#/schemas/AnonymousCardContent"
- type: "null"
evidence:
oneOf:
- $ref: "./evidence_schemas.yml#/schemas/OrganizationEvidence"
- type: "null"
generated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
PrivacyEventKind:
type: string
description: |-
Kind of a change of the visibility settings that the history records.
- publication_opened: the candidate published a closed profile.
- publication_changed: the candidate changed the published fields of a published profile, or published it again under a new C2 record.
- publication_closed: the candidate closed the publication. A revocation of C2 closes the card by the ledger and is read from the consent history, not recorded here.
- search_status_confirmed: the candidate set or confirmed `looking`.
- search_status_cleared: the candidate set `not_looking`. A lapse is not an event: it is computed.
- organization_hidden: the candidate hid the profile from an organization.
- organization_unhidden: the candidate lifted the hiding for an organization.
enum:
- publication_opened
- publication_changed
- publication_closed
- search_status_confirmed
- search_status_cleared
- organization_hidden
- organization_unhidden
PrivacyEvent:
type: object
description: >-
One recorded change of the visibility settings of the current
candidate, as evidence of what was published, hidden, or announced and
when. The history is append-only and returns only the caller's own
records. A publication event carries the published fields and the C2
record behind them; an organization event names the organization; the
other properties are null.
additionalProperties: false
required:
- id
- kind
- occurred_at
- fields
- consent_id
- organization
properties:
id:
type: string
format: uuid
description: Identifier of the event.
kind:
$ref: "#/schemas/PrivacyEventKind"
occurred_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
fields:
description: >-
Published fields after the change for `publication_opened` and
`publication_changed`, an empty set for `publication_closed`, and
null for every other kind.
oneOf:
- $ref: "#/schemas/CardFieldSet"
- type: "null"
consent_id:
description: >-
C2 record that backs the publication, for `publication_opened` and
`publication_changed`, or null.
oneOf:
- type: string
format: uuid
- type: "null"
organization:
description: >-
Organization of `organization_hidden` and `organization_unhidden`
with its current name, resolved when the history is read (the event
stores only the identifier), or null.
oneOf:
- $ref: "#/schemas/PrivacyOrganization"
- type: "null"
PrivacyEventList:
type: object
description: >-
One page of the settings history of the current candidate, newest
first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Events of the page.
items:
$ref: "#/schemas/PrivacyEvent"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
CardAccessKind:
type: string
description: |-
How an organization reached the candidate.
- card_viewed: an organization read the permitted anonymous card.
- contact_read: an organization read the contacts through the contact grant of an accepted invitation.
enum:
- card_viewed
- contact_read
CardAccess:
type: object
description: >-
One access of an organization to the card or the contacts of the
current candidate. A retained access permits the candidate to see the
organization's identifier and current name and to hide their profile
from it. `organization` is null when the organization cannot be
presented. Earlier permitted accesses remain after hiding. The record
carries no employee identity, query, ranking, or search filter of the
organization.
additionalProperties: false
required:
- id
- kind
- occurred_at
- organization
properties:
id:
type: string
format: uuid
description: Identifier of the access record.
kind:
$ref: "#/schemas/CardAccessKind"
occurred_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
organization:
oneOf:
- $ref: "#/schemas/PrivacyOrganization"
- type: "null"
CardAccessList:
type: object
description: >-
One page of the accesses to the card of the current candidate, newest
first.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Accesses of the page.
items:
$ref: "#/schemas/CardAccess"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
@@ -0,0 +1,160 @@
schemas:
Problem:
type: object
description: >-
Problem details (RFC 9457) returned with the application/problem+json
media type for every error response. `code` is the stable,
machine-readable reason; clients branch on it rather than on `title`,
`detail`, or the HTTP status alone. The body never contains internal
error text, stack traces, SQL, file paths, credentials, contact data, or
echoed request values.
additionalProperties: false
required:
- type
- title
- status
- code
properties:
type:
type: string
format: uri-reference
maxLength: 256
description: >-
URI that identifies the problem type. It has the form
`urn:lincodex:problem:<code>` and is an identifier, not a link to
dereference.
title:
type: string
minLength: 1
maxLength: 200
description: >-
Short, fixed English summary of the problem type. It does not change
between occurrences.
status:
type: integer
format: int32
minimum: 400
maximum: 599
description: HTTP status code generated by the origin server.
code:
$ref: "#/schemas/ProblemCode"
detail:
type: string
maxLength: 1000
description: >-
Safe English explanation of this occurrence. It never contains
internal error text or request values.
instance:
type: string
format: uri-reference
maxLength: 2048
description: URI reference that identifies this occurrence, when one exists.
trace_id:
type: string
minLength: 1
maxLength: 128
pattern: "^[A-Za-z0-9._-]+$"
description: >-
Request identifier, equal to the X-Request-ID response header. Quote
it when reporting the problem; it is not a secret.
errors:
type: array
maxItems: 100
description: >-
Field-level reasons. validation_failed always carries them; state_conflict may carry one as a disambiguator when one code covers several conflicts (for example consent_required and limit_reached). Other codes omit it. A problem writer must not strip errors from a non-validation response.
items:
$ref: "#/schemas/ProblemFieldError"
ProblemCode:
type: string
description: |-
Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.
- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.
- verification_token_invalid (400): the email verification token is unknown, already used, or replaced by a newer one; request a new link or sign in.
- verification_token_expired (400): the email verification token is past its lifetime; request a new link.
- unauthenticated (401): no valid session or credentials.
- invalid_credentials (401): the email and password do not match an account; an unknown email and a wrong password are not distinguished.
- forbidden (403): the caller is authenticated but not allowed.
- email_not_verified (403): the credentials are correct but the email is not verified yet.
- csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong X-CSRF-Token or a disallowed Origin.
- not_found (404): the route or object does not exist or is not visible.
- method_not_allowed (405): the route does not support the method.
- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.
- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.
- version_conflict (412): If-Match, or an `expected_version` field in the request body, does not match the current version; nothing was changed.
- payload_too_large (413): the request body exceeds the limit.
- unsupported_media_type (415): the request Content-Type is not accepted.
- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.
- precondition_required (428): the operation requires If-Match.
- rate_limited (429): too many requests; see Retry-After.
- internal (500): unexpected server error.
- not_implemented (501): the operation is in the contract but not implemented yet.
- service_unavailable (503): the service cannot serve the request now, for example while a model loads; retry later.
enum:
- validation_failed
- verification_token_invalid
- verification_token_expired
- unauthenticated
- invalid_credentials
- forbidden
- email_not_verified
- csrf_check_failed
- not_found
- method_not_allowed
- idempotency_in_progress
- state_conflict
- version_conflict
- payload_too_large
- unsupported_media_type
- idempotency_key_reused
- precondition_required
- rate_limited
- internal
- not_implemented
- service_unavailable
ProblemFieldError:
type: object
description: One reason why a request field or parameter is invalid.
additionalProperties: false
required:
- in
- pointer
- code
- message
properties:
in:
$ref: "#/schemas/ProblemFieldLocation"
pointer:
type: string
maxLength: 1024
pattern: "^(/([^~/]|~[01])*)*$"
description: >-
JSON Pointer (RFC 6901). For `body` it points into the request body
document, for example `/salary_from`; an empty string means the whole
body. For a parameter it is `/` followed by the parameter name, for
example `/limit` or `/Idempotency-Key`.
code:
type: string
minLength: 1
maxLength: 64
pattern: "^[a-z][a-z0-9_]*$"
description: >-
Stable field reason. Current values are `required` (missing value)
and `invalid` (malformed value or a value outside the schema), and,
on a state_conflict, `consent_required` (the operation needs a
consent that is not active) and `limit_reached` (a per-account
bound is reached). Clients must tolerate new values.
message:
type: string
minLength: 1
maxLength: 500
description: Fixed English message that never echoes the submitted value.
ProblemFieldLocation:
type: string
description: Part of the request that contains the invalid field.
enum:
- body
- query
- path
- header
- cookie
@@ -0,0 +1,197 @@
schemas:
QuestionnaireVersion:
type: integer
format: int64
minimum: 0
description: >-
Version of the candidate questionnaire. A candidate without a saved
questionnaire has version 0; every save that changes the questionnaire
advances it by one.
examples:
- 3
StackTag:
type: string
minLength: 1
maxLength: 50
pattern: '^\S(?:.*\S)?$'
description: >-
Free technology tag of the candidate's stack, for example PostgreSQL,
Kubernetes, or Django. A tag is a descriptive attribute: it never
forms a category, never selects the task language, and never changes
a grade, so a tag such as "Senior" has no effect on any category. It
has no leading or trailing whitespace and no line breaks. The server
compares tags without regard to letter case. Clients show tags as
text, never as HTML.
WorkFormat:
type: string
description: "Acceptable work format: `remote`, `office`, or `hybrid`."
enum:
- remote
- office
- hybrid
WorkContext:
type: object
description: >-
Working context of the candidate's search. It holds no personal data
such as an address or a city; location, relocation, and salary
expectations belong to the candidate profile (`ProfileTerms`). The
acceptable work formats live only here: the profile does not repeat
them.
additionalProperties: false
required:
- work_formats
properties:
work_formats:
type: array
minItems: 1
maxItems: 3
uniqueItems: true
description: Acceptable work formats.
items:
$ref: "#/schemas/WorkFormat"
CandidateExperience:
type: object
description: >-
Experience that the candidate states for one specialization, in whole
months. It is self-reported context: it never adds assessment points
and never confirms a grade. The work history entries of the candidate
profile (`ProfileExperienceItem`) are a different, detailed claim: the
two are saved separately and the server neither adds the entries up
nor fills them from these totals.
additionalProperties: false
required:
- commercial_months
- academic_months
properties:
commercial_months:
type: integer
format: int32
minimum: 0
maximum: 600
description: Months of commercial work in the specialization.
academic_months:
type: integer
format: int32
minimum: 0
maximum: 600
description: >-
Months of study, internships, or academic projects in the
specialization.
QuestionnaireSpecialization:
type: object
description: >-
One specialization chosen by the candidate with the candidate's
self-assessment. `self_assessed_grade` is a claim: it influences where
the assessment starts and which grade the assessment step offers
first, but it adds no points and never becomes a confirmed grade. A
confirmed grade, and with it a category, comes only from an assessment
result and is never part of the questionnaire; unknown fields such as
`confirmed_grade` or `category` are rejected. Task languages and the
stack are attributes of the chosen specialization, not categories. The
candidate profile states the same kind of claim in the `roles` of
`CandidateProfile` (`ProfileRoleItem.self_assessed_grade`): the
questionnaire value starts the assessment and the profile value is what
the profile shows, the two are saved separately, and neither is ever a
confirmed grade.
additionalProperties: false
required:
- specialization
- self_assessed_grade
- task_languages
- stack
- experience
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
self_assessed_grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
task_languages:
type: array
maxItems: 2
uniqueItems: true
description: >-
Task languages in which the candidate wants to solve assessment
tasks of this specialization. Each value must be one of
`test_availability.task_languages` of the specialization in the
current catalog; any other value answers 400 validation_failed
with a pointer to it. Empty when the bank offers no choice of
language.
items:
$ref: "./catalog_schemas.yml#/schemas/TaskLanguage"
stack:
type: array
maxItems: 20
uniqueItems: true
description: Technology tags of the candidate in this specialization.
items:
$ref: "#/schemas/StackTag"
experience:
description: >-
Stated experience, or null when the candidate did not state it.
oneOf:
- $ref: "#/schemas/CandidateExperience"
- type: "null"
CandidateQuestionnaire:
type: object
description: >-
Questionnaire of the current candidate: the chosen specializations with
self-assessed grades and the working context. It never contains a
confirmed grade or a category; those come only from assessment
results. A candidate who has not saved the questionnaire yet gets
version 0, no specializations, and null `work_context` and
`updated_at`.
additionalProperties: false
required:
- version
- specializations
- work_context
- updated_at
properties:
version:
$ref: "#/schemas/QuestionnaireVersion"
specializations:
type: array
maxItems: 2
description: >-
Chosen specializations in the order the candidate gave them, each
specialization at most once. Each one is assessed independently.
items:
$ref: "#/schemas/QuestionnaireSpecialization"
work_context:
description: Working context, or null before the first save.
oneOf:
- $ref: "#/schemas/WorkContext"
- type: "null"
updated_at:
description: Time of the last change, or null before the first save.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
CandidateQuestionnaireUpdate:
type: object
description: >-
Complete new state of the questionnaire. It replaces the stored
specializations and working context as a whole. Unknown fields are
rejected, so a request cannot set a confirmed grade or a category.
additionalProperties: false
required:
- expected_version
- specializations
- work_context
properties:
expected_version:
$ref: "#/schemas/QuestionnaireVersion"
specializations:
type: array
minItems: 1
maxItems: 2
description: >-
One or two chosen specializations. The schema limits the count; the
server also requires each specialization to appear at most once and
answers a repeated one with 400 validation_failed and the pointer
of the repeated item's `specialization`, for example
`/specializations/1/specialization`.
items:
$ref: "#/schemas/QuestionnaireSpecialization"
work_context:
$ref: "#/schemas/WorkContext"
@@ -0,0 +1,630 @@
schemas:
SupportCaseNumber:
type: string
minLength: 14
maxLength: 18
pattern: "^SC-[0-9]{4}-[0-9]{6,10}$"
description: >-
Human-readable case number that the server assigns on creation, for
example `SC-2026-000123`: the prefix `SC`, the UTC year of creation,
and a sequence number of at least six digits with leading zeros. The
sequence is global and never reused, so the number is unique across
every case and year and never changes. The user quotes it in letters
and calls; the API addresses a case only by its `id`. Clients show the
number as text and never parse it.
examples:
- SC-2026-000123
SupportCaseType:
type: string
description: |-
Kind of the case. It fixes the allowed object reference, the type-specific fields, the response target, and the queue that handles the case.
- support: a question or a problem, for example an assessment that is not available or a failed sandbox run. Candidate and employer accounts.
- complaint: a complaint about an organization or an offer, including a breach of the salary terms or a disclosure of personal data (PRD FR18). Candidate accounts.
- grade_appeal: an appeal of a category the caller received: the result of one own assessment attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the original result stays in the history. Candidate accounts.
- anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt. Candidate accounts.
- manual_assessment: a request for a manual assessment of a category by a subject expert with the same rubric, the alternative to automated categorization (consent C3). Candidate accounts.
enum:
- support
- complaint
- grade_appeal
- anticheat_appeal
- manual_assessment
SupportCaseStatus:
type: string
description: |-
Processing status of a case. Only the server changes it; no request field sets it. Adding a value is a contract change: generated clients reject an unknown value.
- submitted: the case was accepted and waits in its queue.
- in_review: support or a moderator works on it.
- waiting_for_user: support asked the author for more detail. Not set yet: it starts with the planned operation that lets the author reply, and until then no case has this status.
- waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject expert. The server sets it in the same transaction as the creation of such a case. The case stays here until a person decides; it is never resolved by the passing of time.
- resolved: terminal; a decision was made and `decision` holds its outcome and public reason.
- closed: terminal; the case ended without a decision on the merits, for example as a duplicate of another case. The last history event says why.
enum:
- submitted
- in_review
- waiting_for_user
- waiting_expert
- resolved
- closed
SupportCaseObjectType:
type: string
description: |-
Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a contract change: generated clients reject an unknown value. Planned values: `vacancy` and `application` with the vacancies and protected applications of PRD FR16, and a profile finding with profile analysis.
- assessment_attempt: an assessment attempt of the caller.
- organization: an organization that the caller can see.
- invitation: an invitation addressed to the caller. Invitations are in the contract but not implemented yet; until they are, every invitation reference answers 404 not_found.
- support_case: another case of the caller, for example the resolved manual assessment that a grade appeal disputes.
enum:
- assessment_attempt
- organization
- invitation
- support_case
SupportCaseObjectReference:
type: object
description: >-
Typed reference to an object that the case is about. The server checks
on creation that the caller may see the object; an unknown object and
an object of someone else both answer 404 not_found, so a reference
never reveals whether another person's object exists. The case keeps
only the type and the identifier, never a copy of the object.
additionalProperties: false
required:
- type
- id
properties:
type:
$ref: "#/schemas/SupportCaseObjectType"
id:
type: string
format: uuid
description: Identifier of the object.
SupportCaseAttemptReference:
type: object
description: >-
Reference to an assessment attempt of the caller. Any other object
type fails validation.
additionalProperties: false
required:
- type
- id
properties:
type:
type: string
enum:
- assessment_attempt
id:
type: string
format: uuid
description: Identifier of an assessment attempt of the caller.
SupportCaseGradeAppealReference:
type: object
description: >-
Reference to the category that a grade appeal disputes: an assessment
attempt of the caller in a terminal state, or a `manual_assessment`
case of the caller that is `resolved` with the outcome `assessed`, for
a category that an expert assigned without an attempt. Any other object
type fails validation.
additionalProperties: false
required:
- type
- id
properties:
type:
type: string
enum:
- assessment_attempt
- support_case
id:
type: string
format: uuid
description: Identifier of the attempt or the case.
SupportCaseComplaintReference:
type: object
description: >-
Reference to the object of a complaint: an organization that the caller
can see or an invitation addressed to the caller. Any other object type
fails validation.
additionalProperties: false
required:
- type
- id
properties:
type:
type: string
enum:
- organization
- invitation
id:
type: string
format: uuid
description: Identifier of the organization or the invitation.
SupportCaseAssessmentTarget:
type: object
description: >-
Category that the case is about: a specialization and a grade of the
MVP scale. For a manual assessment it is the category to assess; for a
support case it is optional context, for example the category whose
test is not available.
additionalProperties: false
required:
- specialization
- grade
properties:
specialization:
$ref: "./catalog_schemas.yml#/schemas/SpecializationCode"
grade:
$ref: "./catalog_schemas.yml#/schemas/GradeCode"
SupportCaseComplaintReason:
type: string
description: |-
Ground of a complaint (PRD FR18).
- organization_conduct: conduct of the organization, for example fraudulent or abusive messages.
- offer_content: misleading or discriminatory content of an offer. Requires an invitation reference.
- salary_terms_violation: a breach of the salary terms of an offer. Requires an invitation reference.
- data_disclosure: a disclosure of the caller's personal data beyond what the caller granted.
- other: another ground, explained in the description.
enum:
- organization_conduct
- offer_content
- salary_terms_violation
- data_disclosure
- other
SupportCaseDescription:
type: string
minLength: 1
maxLength: 4000
pattern: \S
description: >-
What the user asks or reports, as the user wrote it. It must contain at
least one character that is not whitespace, so an empty or blank text
fails validation with the pointer `/description`; it may contain line
breaks. The pattern `\S` uses the ECMAScript white space set in both
generated validators: ogen converts it to that set for Go, so a text
made only of spaces such as U+00A0, U+2003, or U+3000 fails in the
server schema and in Zod alike. ECMAScript white space omits U+0085
(NEL), which Go `unicode.IsSpace` includes; the server therefore also
rejects a text whose every character is `unicode.IsSpace` or U+FEFF,
with the same 400 and the pointer `/description`, while generated Zod
accepts a text of NEL. Plain text; clients show it as text, never as HTML. The server
stores it as written, shows it only to the author and to the staff of
the queue, and never writes it to logs or notifications. Users should
not put passwords or other people's contact data into it. Generated
Zod validators count UTF-16 code units, so the server stays
authoritative for the length.
examples:
- Тест на Senior пока недоступен, хотя я сдал Middle полгода назад.
SupportCasePublicText:
type: string
minLength: 1
maxLength: 4000
description: >-
Text that support or a moderator wrote for the user: a public reply or
the public reason of a decision. Plain text; clients show it as text,
never as HTML. Internal notes of the staff are never public texts.
SupportCaseCreateSupport:
type: object
description: >-
New support case. Both the object reference and the assessment target
are optional context; omit what does not apply.
additionalProperties: false
required:
- type
- description
properties:
type:
type: string
enum:
- support
description:
$ref: "#/schemas/SupportCaseDescription"
object:
$ref: "#/schemas/SupportCaseObjectReference"
assessment_target:
$ref: "#/schemas/SupportCaseAssessmentTarget"
SupportCaseCreateComplaint:
type: object
description: New complaint about an organization or an offer.
additionalProperties: false
required:
- type
- description
- complaint_reason
- object
properties:
type:
type: string
enum:
- complaint
description:
$ref: "#/schemas/SupportCaseDescription"
complaint_reason:
$ref: "#/schemas/SupportCaseComplaintReason"
object:
$ref: "#/schemas/SupportCaseComplaintReference"
SupportCaseCreateGradeAppeal:
type: object
description: >-
New appeal of a category the caller received: the result of an own
assessment attempt, or the outcome of an own resolved manual
assessment.
additionalProperties: false
required:
- type
- description
- object
properties:
type:
type: string
enum:
- grade_appeal
description:
$ref: "#/schemas/SupportCaseDescription"
object:
$ref: "#/schemas/SupportCaseGradeAppealReference"
SupportCaseCreateAnticheatAppeal:
type: object
description: New appeal of an anti-cheat review decision on an own assessment attempt.
additionalProperties: false
required:
- type
- description
- object
properties:
type:
type: string
enum:
- anticheat_appeal
description:
$ref: "#/schemas/SupportCaseDescription"
object:
$ref: "#/schemas/SupportCaseAttemptReference"
SupportCaseCreateManualAssessment:
type: object
description: >-
New request for a manual assessment of a category by a subject expert.
A prior attempt of the same category is optional context: a failed
first test or no attempt at all never blocks the request.
additionalProperties: false
required:
- type
- description
- assessment_target
properties:
type:
type: string
enum:
- manual_assessment
description:
$ref: "#/schemas/SupportCaseDescription"
assessment_target:
$ref: "#/schemas/SupportCaseAssessmentTarget"
object:
$ref: "#/schemas/SupportCaseAttemptReference"
SupportCaseCreate:
description: >-
New case, selected by `type`. Each type fixes its required fields and
the object types it accepts. The body carries only what the user
states: the request has no status, decision, outcome, priority,
response target, assignee, moderator, rubric, or contact field, and
every variant rejects unknown fields, so a client cannot set any of
them. The user and the account come only from the session.
oneOf:
- $ref: "#/schemas/SupportCaseCreateSupport"
- $ref: "#/schemas/SupportCaseCreateComplaint"
- $ref: "#/schemas/SupportCaseCreateGradeAppeal"
- $ref: "#/schemas/SupportCaseCreateAnticheatAppeal"
- $ref: "#/schemas/SupportCaseCreateManualAssessment"
SupportResponseTarget:
type: object
description: >-
Operational target for the answer to the case (PRD FR18: a case gets a
number, a status, and a response deadline). The server fixes it on
creation from the product policy version and the configured business
calendar; it is a goal of the team, not a deadline set by law. The
target is met by the first public reply, a decision, or a closure for
`support` and `complaint`, and only by a decision or a closure for the
appeals and `manual_assessment`. Missing the target never closes the
case, never decides it, and never changes a grade.
additionalProperties: false
required:
- kind
- business_days
- due_at
- answered_at
- late
- policy_version
properties:
kind:
type: string
enum:
- operational_goal
description: >-
Nature of the target. `operational_goal` is a goal of the team
that clients label as such, never as a legal deadline.
business_days:
type: integer
format: int32
minimum: 1
maximum: 60
description: >-
Length of the target in business days of the policy version, for
example 5 for a manual assessment and 10 for an appeal.
due_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
answered_at:
description: Time the target was met, or null while it is not.
oneOf:
- $ref: "./common_schemas.yml#/schemas/Timestamp"
- type: "null"
late:
type: boolean
description: >-
Whether the target was missed: it was met after `due_at`, or it is
not met and `due_at` has passed at the time of the response.
policy_version:
type: integer
format: int32
minimum: 1
description: Number of the `product` policy version that fixed the target.
SupportCaseDecisionOutcome:
type: string
description: |-
Outcome of a decision as the user sees it. The allowed outcomes depend on the case type.
- upheld: the appeal or the complaint is upheld in full.
- partially_upheld: the appeal or the complaint is upheld in part.
- not_upheld: the appeal or the complaint is not upheld.
- answered: a support case was answered.
- assessed: the expert finished a manual assessment. The resulting category is part of the assessment results, not of the case.
enum:
- upheld
- partially_upheld
- not_upheld
- answered
- assessed
SupportCaseDecision:
type: object
description: >-
Decision visible to the user. It exists only once the case is
`resolved`. It holds the outcome and the public reason; it never names
the moderator or the expert and never contains internal notes,
evidence, sanctions against another party, or risk signals. An upheld
grade appeal never rewrites the original result: the corrected result
is a separate decision of the assessment, and both stay in the history
of that attempt.
additionalProperties: false
required:
- outcome
- reason
- decided_at
properties:
outcome:
$ref: "#/schemas/SupportCaseDecisionOutcome"
reason:
$ref: "#/schemas/SupportCasePublicText"
decided_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
SupportCaseActorKind:
type: string
description: |-
Who caused an event, by kind only. A case never names or identifies a moderator, an expert, or a support agent; assessment experts and appeal moderators are `support` too. Adding a value is a contract change.
- user: the author of the case.
- support: a person of the support, moderation, or expert staff.
- system: the server, for example on creation or when it routes the case.
enum:
- user
- support
- system
SupportCaseEventKind:
type: string
description: |-
Kind of a public history event. Adding a value is a contract change. A reply of the author, planned with `waiting_for_user`, is a `reply` with the actor `user`, and a later revision of a decision is another `decision` event, so neither needs a new value.
- created: the case was created; `status` is `submitted`. For an appeal or a manual assessment, a `status_changed` event of the actor `system` to `waiting_expert` follows in the same transaction.
- status_changed: the status changed; `status` is the new status, and `message` may explain a closure.
- reply: support replied; `message` holds the reply and `status` is null.
- decision: a decision was made; `status` is `resolved` and `message` holds the public reason.
enum:
- created
- status_changed
- reply
- decision
SupportCaseEvent:
type: object
description: >-
One public event of the case history. Internal notes, assignments,
evidence requests, and risk signals are never history events.
additionalProperties: false
required:
- sequence
- kind
- actor
- occurred_at
- status
- message
properties:
sequence:
type: integer
format: int32
minimum: 1
description: Position of the event in the history, starting at 1 and increasing by one.
kind:
$ref: "#/schemas/SupportCaseEventKind"
actor:
$ref: "#/schemas/SupportCaseActorKind"
occurred_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
status:
description: Status of the case after the event, or null for a reply.
oneOf:
- $ref: "#/schemas/SupportCaseStatus"
- type: "null"
message:
description: Public text of the event, or null.
oneOf:
- $ref: "#/schemas/SupportCasePublicText"
- type: "null"
SupportCase:
type: object
description: >-
Case of the current account. It contains what the author sent, the
public processing state, and the public history. It never contains
the identity of a moderator, an expert, or a support agent, internal
notes, evidence, assessment answers or anti-cheat signals, risk
signals, or contact data of another person. Fields that do not apply
to the type are null.
additionalProperties: false
required:
- id
- number
- type
- status
- description
- object
- assessment_target
- complaint_reason
- rubric_version
- response_target
- decision
- history
- created_at
- updated_at
properties:
id:
type: string
format: uuid
description: Case identifier.
number:
$ref: "#/schemas/SupportCaseNumber"
type:
$ref: "#/schemas/SupportCaseType"
status:
$ref: "#/schemas/SupportCaseStatus"
description:
$ref: "#/schemas/SupportCaseDescription"
object:
description: >-
Object that the case is about, as sent on creation, or null when
the case has none.
oneOf:
- $ref: "#/schemas/SupportCaseObjectReference"
- type: "null"
assessment_target:
description: >-
Category of a manual assessment, the optional category of a
support case, or null.
oneOf:
- $ref: "#/schemas/SupportCaseAssessmentTarget"
- type: "null"
complaint_reason:
description: Ground of a complaint, or null for other types.
oneOf:
- $ref: "#/schemas/SupportCaseComplaintReason"
- type: "null"
rubric_version:
type:
- integer
- "null"
format: int32
minimum: 1
description: >-
For a manual assessment, the version of the grading policy pinned
by the server at creation. The exact reviewed category opening and
rubric manifest are retained privately so the expert can use the
same rubric as automated assessment. Null for other types and for a
manual assessment without one unique current reviewed category; the
case still waits in `waiting_expert`.
response_target:
$ref: "#/schemas/SupportResponseTarget"
decision:
description: Decision once the case is `resolved`, otherwise null.
oneOf:
- $ref: "#/schemas/SupportCaseDecision"
- type: "null"
history:
type: array
minItems: 1
maxItems: 200
description: >-
Every public event in the order it happened, starting with
`created`; the list is never truncated. The server keeps a case
within 200 events: it rejects a staff reply or status change that
would leave no room for the terminal event, so a case always fits
and can always be resolved or closed. Further correspondence goes
into a new case that references this one as `support_case`.
items:
$ref: "#/schemas/SupportCaseEvent"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
SupportCaseSummary:
type: object
description: >-
Case in a list: the fields that a list of cases shows, without the
description and the history. GetMySupportCase returns the full case.
additionalProperties: false
required:
- id
- number
- type
- status
- object
- assessment_target
- response_target
- decision_outcome
- created_at
- updated_at
properties:
id:
type: string
format: uuid
description: Case identifier.
number:
$ref: "#/schemas/SupportCaseNumber"
type:
$ref: "#/schemas/SupportCaseType"
status:
$ref: "#/schemas/SupportCaseStatus"
object:
description: Object that the case is about, or null.
oneOf:
- $ref: "#/schemas/SupportCaseObjectReference"
- type: "null"
assessment_target:
description: Category of the case, or null.
oneOf:
- $ref: "#/schemas/SupportCaseAssessmentTarget"
- type: "null"
response_target:
$ref: "#/schemas/SupportResponseTarget"
decision_outcome:
description: Outcome of the decision once the case is `resolved`, otherwise null.
oneOf:
- $ref: "#/schemas/SupportCaseDecisionOutcome"
- type: "null"
created_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
updated_at:
$ref: "./common_schemas.yml#/schemas/Timestamp"
SupportCaseList:
type: object
description: One page of the cases of the current account, newest first by creation time.
additionalProperties: false
required:
- items
- page
properties:
items:
type: array
maxItems: 100
description: Case summaries of the page.
items:
$ref: "#/schemas/SupportCaseSummary"
page:
$ref: "./common_schemas.yml#/schemas/PageInfo"
File diff suppressed because it is too large. Load diff
+1128
View File
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,27 @@
post:
operationId: RequestMyAccountDeletion
summary: Revoke C1 and request account deletion.
description: |-
Requires a verified session, its CSRF token in X-CSRF-Token, and the exact configured Origin. The subject comes from the session. In one transaction, revokes any active C1 record, creates or returns the subject's active durable deletion request, and writes the outbox intent. The API does not delete the account synchronously. Repeating the request returns the same active request; a later C1 grant never cancels it.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- consent
responses:
"202":
description: The durable account-deletion request is queued for processing.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentDeletionRequest
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
description: CSRF or Origin validation failed.
$ref: ../components/responses.yml#/CsrfCheckFailed
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,50 @@
get:
operationId: GetMyAssessmentAttempt
summary: Read an assessment attempt of the current candidate.
description: |-
Requires the session cookie of a candidate account. Returns the stored attempt projection with its state, fixed versions, time and session limits, progress, the item to answer now, and the practices. This GET is read-only: it never starts or resumes a work session, consumes session quota, advances the version, or commits expiry or finalization. A reload, a retried request, or a new session returns the same item instance with the same text and option order; a lost connection never creates a new attempt. After `idle_timeout_seconds`, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. The response never says whether an earlier answer was correct and never contains answer keys, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
When the deadline passes, this read still returns the stored state and deadline. A command or background transition commits the due outcome; if the stored state is still active, GetMyAssessmentResult answers 409 until that transition is committed. The client polls this operation while a practice is `pending`, but polling alone never changes attempt state.
The attempt must belong to the candidate of the session: an attempt of another candidate answers 404 not_found, the same as an unknown identifier, so identifiers cannot be probed. An employer account answers 403 forbidden; no operation gives an employer the answers, qualification evidence, or attempt history.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
responses:
"200":
description: The attempt.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
adaptive_resumed:
$ref: ../components/examples.yml#/AssessmentAttemptResumed
practice_pending:
$ref: ../components/examples.yml#/AssessmentAttemptPracticePending
practice_verdict_pending:
$ref: ../components/examples.yml#/AssessmentAttemptPracticeVerdictPending
sandbox_failed:
$ref: ../components/examples.yml#/AssessmentAttemptSandboxFailed
ready_to_finalize:
$ref: ../components/examples.yml#/AssessmentAttemptReadyToFinalize
additional_practice_pending:
$ref: ../components/examples.yml#/AssessmentAttemptAdditionalPracticePending
completed:
$ref: ../components/examples.yml#/AssessmentAttemptCompleted
insufficient_bank:
$ref: ../components/examples.yml#/AssessmentAttemptInsufficientBank
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,90 @@
post:
operationId: SubmitMyAssessmentAnswer
summary: Answer the current item or submit a practice of an assessment attempt.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body names the item and carries the answer in the format of that item: `choice`, `number`, `string`, `order`, `find_error`, `configuration`, or `practice`. It never carries a score, a duration, or a correctness flag; the server records the times itself and scores the answer with the key of the fixed item instance. Time never enters the ability estimate or the grade decision.
Lab: an item with format `lab` takes no answer here. Its lab is started with CreateMyAssessmentLab and submitted with SubmitMyAssessmentLab; any answer to a lab item answers 400 validation_failed with the pointer `/answer/format`, like an answer in the wrong format, and stores nothing.
The response is the attempt with the next item to answer. It never says whether the answer was correct. Items are answered in order and each answer is final.
A work command requires an active session. After `idle_timeout_seconds` of inactivity, the candidate calls StartMyAssessmentAttemptSession to explicitly start or resume a session; this answer command never starts one or consumes session quota. Reading the attempt or result is always read-only. A command that finds a due deadline transition may commit it before returning; a command that finds an expired idle session answers 409 until the candidate explicitly starts the next session.
Practice: an answer with format `practice` submits the solution of the main or the additional practice. It is stored, and the sandbox runs it asynchronously against the hidden check groups; the response shows the practice `pending`, and the client polls GetMyAssessmentAttempt for the verdict. Only the score 0-3 and the pass state of each group are shown, never the checks, error output, or seeds. Every outcome caused by the solution, such as a compilation error, a crash, or a time or memory limit, is a `finished` verdict. A `failed` verdict means only that the sandbox infrastructure could not run it; it consumes nothing. After `finished` the practice accepts no other solution, so hidden group results cannot be used to tune it. Debug runs of the candidate's own tests and the public examples are unlimited apart from the sandbox rate limit and never show hidden group results; they are planned as a separate operation.
One page at a time. While another page holds the work session of this attempt (HoldMyAssessmentWorkSession), a request from a different `X-Attempt-Client`, or from none, answers 409 `state_conflict` and stores nothing, so a second window cannot answer. That refusal is not stored under the Idempotency-Key and is checked before the stored answer is replayed.
Repeats and conflicts, per item:
- A retry with the same Idempotency-Key and body within 24 hours replays the stored response.
- Sending the answer already stored for the item again, even with a new key or an older `expected_version`, stores nothing, keeps the version, and answers 200 with the current attempt. Each answer format defines equality: sets for `option_ids` and `line_numbers`, the exact sequence for `element_ids`, numeric equality for `number`, identical text without normalization for `text` and `config`, and the same language with identical source for a practice.
- A different answer for an item that already has one answers 409 state_conflict when `expected_version` is current; with a stale version the version check comes first and answers 412.
- Exception for a practice whose latest verdict is `failed`: the repeat rule does not apply. A submission with the same or a different solution, with the current `expected_version`, queues it again and advances the version.
Optimistic concurrency: `expected_version` must equal the current attempt version, otherwise the server answers 412 version_conflict and stores nothing; the client reads the attempt again. 412 is the repository status for a stale version, also used by SaveMyQuestionnaire; 409 state_conflict is kept for commands that the attempt state does not allow at the current version.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the attempt (404 not_found for an unknown attempt or one of another candidate; a due deadline transition may be committed, but this request never starts a work session), the repeat of the stored answer (200, skipped for a practice whose latest verdict is `failed`), the version (412), the state (409 state_conflict: the attempt is terminal, the work session ended, the item is not current, the item has a different answer, or the practice verdict is pending or finished), then the answer against the item (400 with a pointer such as `/answer/format` or `/answer/option_ids/0`). Following the Idempotency-Key convention, 404 and 409 state_conflict are stored under the key and replayed; 400, 412, 429, and 5xx are not. The rate limit can answer 429 with Retry-After before any check.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
- $ref: ../components/parameters.yml#/AttemptClient
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAnswerSubmission
examples:
choice:
$ref: ../components/examples.yml#/AssessmentChoiceAnswer
order:
$ref: ../components/examples.yml#/AssessmentOrderAnswer
number:
$ref: ../components/examples.yml#/AssessmentNumberAnswer
string:
$ref: ../components/examples.yml#/AssessmentStringAnswer
find_error:
$ref: ../components/examples.yml#/AssessmentFindErrorAnswer
configuration:
$ref: ../components/examples.yml#/AssessmentConfigurationAnswer
practice:
$ref: ../components/examples.yml#/AssessmentPracticeAnswer
responses:
"200":
description: >-
The answer was stored, or this exact answer was already stored, and
the response is the attempt with the next item.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
accepted:
$ref: ../components/examples.yml#/AssessmentAnswerAccepted
practice_submitted:
$ref: ../components/examples.yml#/AssessmentAttemptPracticeVerdictPending
"400":
$ref: ../components/responses.yml#/AssessmentAnswerValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentCommandConflict
"412":
$ref: ../components/responses.yml#/AssessmentVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,69 @@
post:
operationId: FinalizeMyAssessmentAttempt
summary: Ask for the grade decision of an assessment attempt.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. Finalize always answers with the attempt, never with the result: the decision may continue the attempt, and one response type keeps that unambiguous for every generated client. When the returned state is `completed`, the client reads the result with GetMyAssessmentResult.
Finalize is a work command and requires an active session. After `idle_timeout_seconds` of inactivity, the candidate first calls StartMyAssessmentAttemptSession with the latest `expected_version`; finalize never starts a session. GET attempt and result operations do not change state. A command or background transition may commit a due deadline outcome.
Allowed in `ready_to_finalize`, where every required part is done, and in `additional_practice_pending` while the additional practice is `not_started` or `failed`. The server decides from the stored answers with the policy, bank, and algorithm versions fixed at creation:
- `demo_basic` compares the raw score with the pass mark of the recorded basic grading policy and completes the attempt. It never offers an additional practice.
- `adaptive` applies the probability bands of the recorded policy. Confirmation or rejection completes the attempt. A probability in the band below confirmation (0.50 to below 0.80 in the demo policy) on the first finalize, while time and sessions remain, completes nothing: the server appends an `additional` practice, moves the attempt to `additional_practice_pending`, and answers 200 with it. The additional practice continues the same attempt, keeps its limits, and spends no new attempt. The next finalize, after its verdict, decides with the added evidence; a probability still below confirmation gives `not_confirmed`. An attempt offers at most one additional practice.
- Finalize in `additional_practice_pending` declines the offer and gives `not_confirmed` with the current evidence. A retry of the first finalize with a new key cannot decline by accident: it carries the version from before the offer and answers 412.
A failed attempt never lowers a confirmed grade. Repeats return the same outcome: a retry with the same Idempotency-Key replays the stored response, and a finalize of a `completed` attempt answers 200 with that attempt even with a new key or an older `expected_version`; the result is computed once. When `expires_at` passes or the session limit is reached, a command or background transition finalizes `ready_to_finalize` without offering an additional practice. A finalize after this transition answers 200 with the stored `completed` attempt; a GET never commits it.
An attempt in `in_progress` or `practice_pending`, one with a practice verdict `pending`, or one that ended as `expired` or `insufficient_bank` answers 409 state_conflict. When required questions are unfinished, the problem includes their frozen IDs in `pending_item_ids`; other state conflicts omit that field. A stale `expected_version` answers 412 version_conflict, the repository status for a stale version.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the attempt (404 not_found; a due deadline transition may be committed, but this request never starts a work session), the repeat on a `completed` attempt (200), the version (412), then the state (409 state_conflict, including an ended idle session). 404 and 409 state_conflict are stored under the key; 400 and 412 are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentFinalization
examples:
finalize:
$ref: ../components/examples.yml#/AssessmentFinalization
responses:
"200":
description: >-
The attempt after the decision: `completed`, with the result available
from GetMyAssessmentResult, or `additional_practice_pending` when an
adaptive attempt offers an additional practice.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
demo_basic_completed:
$ref: ../components/examples.yml#/AssessmentAttemptCompleted
additional_practice_offered:
$ref: ../components/examples.yml#/AssessmentAttemptAdditionalPracticePending
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentFinalizeConflict
"412":
$ref: ../components/responses.yml#/AssessmentVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,55 @@
get:
operationId: GetMyAssessmentLab
summary: Read the lab of an assessment attempt item.
description: |-
Requires the session cookie of a candidate account. Returns the state of a lab started with CreateMyAssessmentLab: whether it is still provisioning, ready for the consoles, being checked after the submission, or ended. It never contains a node address, a credential, the seed, the checker state, or the result of the check. This GET is read-only; the server may record a due timer transition, such as `ready` to `expired`, before it answers.
A lab of another candidate's attempt, a lab of another attempt, and an unknown identifier all answer 404 not_found.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- name: lab_id
in: path
required: true
description: Identifier of a lab of this attempt.
schema:
type: string
format: uuid
responses:
"200":
description: The lab.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLab
examples:
ready:
summary: A ready lab whose consoles can be opened.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a80
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a61
state: ready
nodes:
- name: r1
kind: mikrotik
- name: r2
kind: mikrotik
created_at: "2026-10-11T09:00:00Z"
ready_at: "2026-10-11T09:00:40Z"
expires_at: "2026-10-11T09:45:00Z"
finished_at: null
failure_reason: null
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,70 @@
post:
operationId: CreateMyAssessmentLabConsoleSession
summary: Open a console session of one node of a ready lab.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body names a node of the lab by its task name.
The response describes one console session: the client opens a WebSocket to `websocket_path` on the same origin before `expires_at`. The upgrade is authorized by the session cookie and the Origin check, and the server relays the serial console of the node through the lab provisioner. The response never carries a node address, a port, a password, a key, or a token; the browser never connects to a node or to the provisioner. Console traffic is not stored as an answer and is not logged.
The WebSocket relay is planned together with the candidate interface of labs; this contract fixes the session shape it uses.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the attempt and the lab (404 not_found for an unknown attempt, lab, or one of another candidate), the node (400 with the pointer `/node`), the state (409 state_conflict: the lab is not `ready`, the attempt is terminal, or its work session ended), the limit of open sessions per lab (429 rate_limited with Retry-After), then the provisioner (503 service_unavailable without Retry-After; nothing was opened).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- name: lab_id
in: path
required: true
description: Identifier of a lab of this attempt.
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLabConsoleSessionCreate
examples:
r1:
summary: Open the console of r1.
value:
node: r1
responses:
"201":
description: The console session was opened.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLabConsoleSession
examples:
opened:
summary: A console session of r1.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a90
node: r1
websocket_path: /api/v1/me/assessment-lab-consoles/0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a90
expires_at: "2026-10-11T09:02:00Z"
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/StateConflict
"429":
$ref: ../components/responses.yml#/TooManyRequests
"503":
$ref: ../components/responses.yml#/ServiceUnavailable
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,89 @@
post:
operationId: SubmitMyAssessmentLab
summary: Submit the lab of the current lab item as its answer.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body carries the attempt version last read and the answer with format `lab`, which names the lab.
The server closes the consoles, freezes the lab, and answers 202 with the lab `checking`; the checker of the task reads the state of the nodes asynchronously, the answer is recorded, and the lab becomes `submitted` and is deleted. The client polls GetMyAssessmentLab and then reads the attempt, which moves to the next item. Neither response says whether the answer was correct, and the candidate never sees the checker criteria or their results.
When the checker cannot reach the nodes because of the lab infrastructure, the lab becomes `failed` with `lab_error`: nothing is recorded or consumed, the attempt version is unchanged, and the candidate may start a new lab of the item while it is current. A failure of the infrastructure is never scored as a wrong answer.
Optimistic concurrency: `expected_version` must equal the current attempt version, otherwise the server answers 412 version_conflict and stores nothing.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the attempt and the lab (404 not_found for an unknown attempt or lab, or one of another candidate), the version (412), the state (409 state_conflict: the lab is not `ready`, `answer.lab_id` is not the lab in the path, the item is not current, the attempt is terminal, or its work session ended), then the provisioner (503 service_unavailable without Retry-After; nothing was stored and the lab keeps running). Following the Idempotency-Key convention, 202, 404, and 409 state_conflict are stored under the key and replayed; 400, 412, 429, and 5xx are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
- name: lab_id
in: path
required: true
description: Identifier of the lab to submit.
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLabSubmission
examples:
submit:
summary: Submit the lab as the answer of its item.
value:
expected_version: 7
answer:
format: lab
lab_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a80
responses:
"202":
description: The submission was accepted and the lab is being checked.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLab
examples:
checking:
summary: A submitted lab whose nodes are being checked.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a80
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a61
state: checking
nodes:
- name: r1
kind: mikrotik
- name: r2
kind: mikrotik
created_at: "2026-10-11T09:00:00Z"
ready_at: "2026-10-11T09:00:40Z"
expires_at: "2026-10-11T09:45:00Z"
finished_at: null
failure_reason: null
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentCommandConflict
"412":
$ref: ../components/responses.yml#/AssessmentVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
"503":
$ref: ../components/responses.yml#/ServiceUnavailable
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,86 @@
post:
operationId: CreateMyAssessmentLab
summary: Start the lab of the current lab item of an assessment attempt.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body names the current item, whose content has the format `lab`.
The server asks the lab provisioner for a lab of the variant fixed for this item instance and answers 201 with the lab `provisioning`; the client polls GetMyAssessmentLab until it is `ready`. The lab lives until `expires_at`, the earlier of the item's `time_limit_seconds` and the attempt deadline, and is then deleted with everything done in it. Creating a lab does not change the attempt version, the current item, or any answer.
One lab per item at a time. While the item has a lab in `provisioning`, `ready`, or `checking`, the server answers 200 with that lab and starts no second one. After a `failed` lab the candidate may start a new one while the item is current; after `submitted` or `expired` the item cannot start another lab (409 state_conflict).
Busy pool. When the lab pool of the provisioner has no free capacity, the server answers 503 service_unavailable with Retry-After, for example `{"type": "urn:lincodex:problem:service_unavailable", "title": "Service unavailable", "status": 503, "code": "service_unavailable", "detail": "No lab capacity is free. The attempt is unchanged; retry later."}`. Nothing was stored: no lab exists, the attempt version and the current item are unchanged, the lab lifetime has not started, and the attempt is not consumed; the client retries after Retry-After with a new Idempotency-Key. When labs are not enabled on this server, or the provisioner cannot be reached, the server answers 503 service_unavailable without Retry-After and stores nothing either. The attempt deadline keeps running in both cases.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the attempt and the item (404 not_found for an unknown attempt or item, or one of another candidate), the state (409 state_conflict: the attempt is terminal or its work session ended, the item is not current, its format is not `lab`, or its lab was submitted or expired), the rate limit (429), then the availability of labs and the capacity (503). Following the Idempotency-Key convention, 201, 200, 404, and 409 state_conflict are stored under the key and replayed; 400, 429, and 503 are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLabCreate
examples:
start:
summary: Start the lab of the current item.
value:
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a61
responses:
"200":
description: The item already has an active lab; it is returned and no second lab is started.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLab
"201":
description: The lab was requested and is provisioning.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentLab
examples:
provisioning:
summary: A lab of two routers that is being prepared.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a80
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a61
state: provisioning
nodes:
- name: r1
kind: mikrotik
- name: r2
kind: mikrotik
created_at: "2026-10-11T09:00:00Z"
ready_at: null
expires_at: "2026-10-11T09:45:00Z"
finished_at: null
failure_reason: null
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentCommandConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
"503":
$ref: ../components/responses.yml#/ServiceUnavailable
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,64 @@
get:
operationId: GetMyAssessmentPracticeRun
summary: Read a debug run of a practice solution.
description: |-
Requires the session cookie of a candidate account. Returns the state of a debug run started with CreateMyAssessmentPracticeRun and, once it is `finished`, the outcome of the public examples and of the tests of the candidate. It never contains a hidden check, its outcome, the score, or the source. This GET is read-only.
A run of another candidate's attempt, a run of another attempt, and an unknown identifier all answer 404 not_found. The graded solution submitted with SubmitMyAssessmentAnswer is not a debug run and is not readable here.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- name: run_id
in: path
required: true
description: Identifier of a debug run of this attempt.
schema:
type: string
format: uuid
responses:
"200":
description: The run.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PracticeRun
examples:
finished:
summary: A finished run whose test of the candidate failed.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a70
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a60
state: finished
created_at: "2026-10-05T09:30:00Z"
finished_at: "2026-10-05T09:30:04Z"
failure_reason: null
result:
outcome: wrong_answer
compile_diagnostic: null
tests:
- source: example
index: 1
outcome: accepted
time_ms: 21
memory_kb: 9216
diagnostic: null
- source: candidate
index: 1
outcome: wrong_answer
time_ms: 20
memory_kb: 9180
diagnostic: null
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,78 @@
post:
operationId: CreateMyAssessmentPracticeRun
summary: Start a debug run of a practice solution.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body names the practice item of the attempt and carries the language, the source, and up to ten tests of the candidate.
A debug run executes the solution in the isolated sandbox against the public examples of the task and the tests of the candidate only. It never runs, lists, or scores a hidden check, and it changes neither the practice state, the verdict, nor the attempt version; the graded solution is submitted with SubmitMyAssessmentAnswer. The run is stored with its own identifier and executed asynchronously: the response is 202 with the run `queued`, and the client polls GetMyAssessmentPracticeRun. The source is never echoed.
The practice must be the current item: the attempt is in `practice_pending` for the main practice or `additional_practice_pending` for the additional one, and its deadline has not passed. Otherwise the server answers 409 state_conflict.
Limits. Debug runs are bounded by a per-candidate rate limit and by one unfinished run per practice; either answers 429 rate_limited with Retry-After. The sandbox queue holds one running and ten waiting runs and submissions together; when it is full the server answers 503 service_unavailable with Retry-After and stores nothing. When code practice is not enabled on this server, the server answers 503 service_unavailable without Retry-After and stores nothing.
Repeats. A retry with the same Idempotency-Key and body within 24 hours returns the stored run in its current state with 202, without starting another run. A different body with the same key answers 422 idempotency_key_reused. Refusals (400, 404, 409, 429, 503) are not stored under the key and are evaluated again.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the availability of code practice (503), the Idempotency-Key (422, replay), the attempt and the practice (404 not_found for an unknown attempt or item, or one of another candidate), the state (409), the solution against the item (400 with a pointer such as `/language` or `/source_code`), the limits (429), then the queue (503).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PracticeRunCreate
examples:
run:
summary: A Python solution with one test of the candidate.
value:
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a60
language: python
source_code: "print(sum(map(int, input().split())))\n"
tests:
- input: "2 3\n"
expected_output: "5\n"
responses:
"202":
description: The run is queued, or this request was already accepted and the stored run is returned.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PracticeRun
examples:
queued:
summary: A queued run.
value:
id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a70
item_id: 0192a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a60
state: queued
created_at: "2026-10-05T09:30:00Z"
finished_at: null
failure_reason: null
result: null
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/StateConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
"503":
$ref: ../components/responses.yml#/ServiceUnavailable
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,48 @@
get:
operationId: GetMyAssessmentResult
summary: Read the result of an assessment attempt of the current candidate.
description: |-
Requires the session cookie of a candidate account. Returns the immutable result of a terminal attempt: `completed`, `expired`, or `insufficient_bank`. A real result records the mode, policy, bank, and algorithm versions, decision, previously confirmed grade, calibration status and limitations, uncertainty where the method computes it, practice verdicts, weak domains, working time as a separate label, and allowed next steps. A corrective result also carries the root attempt and its immutable chain deadline. A `demo_express` result is a short educational summary only: it has no category, percentile, confirmed grade, score, uncertainty, or qualification evidence. A later policy, bank, or algorithm version never changes a result.
Fields that the method does not compute are null and never zero: a `demo_basic` result has null `uncertainty` and `strength`. The result never contains answers, per-item correctness, answer keys, seeds, hidden checks, or anti-cheat signals.
An active attempt answers 409 state_conflict; an attempt in `additional_practice_pending` is active and has no result yet. This GET is read-only and never commits a due transition. If a deadline has passed but the due transition is not yet stored by a command or background worker, the attempt remains active for this read and answers 409; wait for the transition and retry. An attempt of another candidate answers 404 not_found, the same as an unknown identifier. An employer account answers 403 forbidden; employers see only the current category through a separate projection, never this result or the attempt history.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
responses:
"200":
description: The result.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentResult
examples:
demo_basic:
$ref: ../components/examples.yml#/AssessmentDemoBasicResult
adaptive_confirmed:
$ref: ../components/examples.yml#/AssessmentAdaptiveResult
adaptive_not_confirmed:
$ref: ../components/examples.yml#/AssessmentNotConfirmedResult
insufficient_bank:
$ref: ../components/examples.yml#/AssessmentInsufficientBankResult
corrective:
$ref: ../components/examples.yml#/AssessmentCorrectiveResult
demo_express:
$ref: ../components/examples.yml#/AssessmentExpressResult
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentResultNotReady
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,65 @@
post:
operationId: StartMyAssessmentAttemptSession
summary: Start or resume a work session for the current candidate's attempt.
description: |-
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The body carries the attempt version the candidate last read. The server checks ownership, idempotency, and `expected_version` atomically before starting a session; a stale version answers 412 and consumes no session. Repeating the same key and body within 24 hours replays the stored response.
Creation starts session 1. After `idle_timeout_seconds` of inactivity, the candidate uses this command to start the next session. Calling it while a session is already active returns the current attempt without consuming another session or advancing its version. Starting a session advances the version once. The command cannot extend `expires_at` or `chain_deadline`.
If the attempt deadline or session budget has passed, this command commits the due terminal transition and returns the resulting attempt. A pending practice submitted before the limit is graded first. `GetMyAssessmentAttempt` and `GetMyAssessmentResult` remain read-only: they never start a session or commit a due transition. A background transition may persist a due outcome independently; after that, this command returns the stored terminal attempt without changing it.
One page at a time. While another page holds the work session of this attempt (HoldMyAssessmentWorkSession), a request from a different `X-Attempt-Client`, or from none, answers 409 `state_conflict` and changes nothing; the client tells the candidate that the attempt is open in another window. That refusal is not stored under the Idempotency-Key, because it lasts only until the other page closes or stops renewing. A real attempt that nobody holds is not refused.
The attempt must belong to the candidate of the session. An attempt of another candidate answers 404 not_found, the same as an unknown identifier. An employer account answers 403 forbidden; no operation gives an employer answers, qualification evidence, or attempt history.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
- $ref: ../components/parameters.yml#/AttemptClient
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttemptSessionStart
example:
expected_version: 7
responses:
"200":
description: >-
The current attempt after starting or resuming work, or after a due
terminal transition was committed. A replay returns the stored body.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
resumed:
$ref: ../components/examples.yml#/AssessmentAttemptResumed
terminal:
$ref: ../components/examples.yml#/AssessmentAttemptCompleted
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/AssessmentCommandConflict
"412":
$ref: ../components/responses.yml#/AssessmentVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,74 @@
put:
operationId: HoldMyAssessmentWorkSession
summary: Hold the single active work session of a real assessment attempt for this page.
description: |-
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and the `X-Attempt-Client` header of the page. A real attempt (`root` or `corrective`) allows one open page at a time. The page that works on the attempt calls this operation when the candidate starts or resumes work and then repeats it every `renew_after_seconds`; each call holds the work session until `held_until`.
- If nobody holds the work session, the previous holder released it, or its hold expired, the page becomes the holder and the answer is 200.
- If the same page holds it, the hold is renewed and the answer is 200.
- If another page holds it, the answer is 409 `state_conflict` and nothing changes: the second page is refused until the first one releases the session (ReleaseMyAssessmentWorkSession) or stops renewing and its hold expires. The client tells the candidate that the attempt is open in another window and does not show the task.
The same 409 answers a terminal or expired attempt and a `demo_express` attempt, which has no protected work session. The hold is a one-page-at-a-time rule, not a lock on the candidate: a candidate who closes a page, reloads, or opens the attempt on another device can continue when the hold is released or has expired (at most two minutes after the last renewal). It is not a security boundary: a client that never calls this operation is refused only while another page holds the session. The server stores one-way keyed digests of the page identifier and of the User-Agent, bound to the attempt; it never stores or returns either value. A change of the User-Agent digest during an attempt is a weak server signal for a manual review, never an automatic decision.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the attempt (404 not_found for an unknown attempt or one of another candidate), then the hold (409 state_conflict).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/AttemptClientRequired
responses:
"200":
description: The page holds the work session until `held_until`.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentWorkSession
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/StateConflict
default:
$ref: ../components/responses.yml#/Problem
delete:
operationId: ReleaseMyAssessmentWorkSession
summary: Release the work session that this page holds.
description: |-
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and the `X-Attempt-Client` header of the page. The page calls it when it closes, so that the candidate can open the attempt in another window at once instead of waiting for the hold to expire. The request is idempotent and reveals nothing: it answers 204 whether this page held the session, another page holds it (which stays held), nobody held it, or the attempt is not held at all, and a repeat after a lost response succeeds. A page that is killed without calling it loses the hold within two minutes.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden), the attempt (404 not_found for an unknown attempt or one of another candidate), then the release (204).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/AttemptClientRequired
responses:
"204":
description: This page no longer holds the work session.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,74 @@
post:
operationId: CreateMyAssessmentAttempt
summary: Start a real, corrective, or training assessment attempt.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The request is one of three disjoint shapes. A real assessment names a specialization, target grade, and task language; the server picks `demo_basic` or `adaptive` and fixes the policy, bank, and algorithm versions, limits, and item variants. A corrective real assessment also names `root_attempt_id`; the server verifies the lower-grade chain and reuses its fixed quota and deadline. The client never sends a real mode, a seed, a version, or a chain deadline. Explicit `demo_express` starts a separate interactive training run that lasts 3 to 5 minutes, has no category or target grade, and creates no qualification evidence or percentile. Creation starts session 1. The self-assessed grade only chooses where a real test starts and adds no points. An adaptive retest starts from the previous ability estimate of the specialization, adjusted for the time passed, so a new attempt adds evidence instead of starting the measurement over.
A specialization has at most one active real attempt. A new root attempt cannot start while one is active, during a retry or promotion interval, past the root quota, or when the bank is insufficient; each such preflight refusal answers 409 state_conflict and creates nothing or consumes no root slot. Starting a root attempt reserves one slot in the root quota. A corrective attempt must reference its root, target a strictly lower grade not already attempted in that chain, and remain inside the root's fixed quota and deadline (72 hours from the root start in the current policy). It gets its own item, practice, and session limits, but spends no additional root slot and cannot reset the chain deadline or any 30/90-day timer. After a failure, including the first test, a lower grade can be tested at once. An expired or incomplete attempt does not create a free new chain; an insufficient bank or sandbox failure does not grant another root slot. `demo_express` is outside real-assessment availability, quotas, retry intervals, and qualification history.
The limits are server-side: `expires_at` and `sessions` come from the policy version, the client clock never extends them, and after them the attempt accepts no work command. For a corrective attempt, `expires_at` is no later than the root's immutable `chain_deadline`. Within these limits the attempt is also bounded by the item limit of its policy.
Idempotency: a retry with the same key and body within 24 hours replays the stored 201 or 409 state_conflict response and creates nothing, so a lost response never creates a second attempt. A different body with the same key answers 422 idempotency_key_reused. 400 is never stored, so a corrected retry is evaluated again.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), domain rules (400 with a pointer, for example `/specialization` for a specialization that is not in the questionnaire or `/task_language` for a language that the bank does not offer), then availability (409 state_conflict). The rate limit can answer 429 with Retry-After before any of them; it is not stored.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttemptCreate
examples:
backend_junior_go:
$ref: ../components/examples.yml#/AssessmentAttemptCreateBackendJunior
corrective_backend_junior_go:
summary: Start a lower-grade assessment inside an existing correction chain
value:
kind: corrective
specialization: backend
target_grade: junior
task_language: go
root_attempt_id: 01928f7b-1111-7a2b-8c3d-4e5f6a7b8c9d
demo_express:
summary: Start a short educational training run
value:
kind: demo_express
responses:
"201":
description: >-
The attempt was created, or a retry with the same Idempotency-Key
replayed its creation.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
demo_basic_created:
$ref: ../components/examples.yml#/AssessmentAttemptCreated
corrective_created:
$ref: ../components/examples.yml#/AssessmentCorrectiveAttemptCreated
demo_express_created:
$ref: ../components/examples.yml#/AssessmentExpressAttemptCreated
"400":
$ref: ../components/responses.yml#/AssessmentAttemptCreateValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"409":
$ref: ../components/responses.yml#/AssessmentCreateConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,32 @@
get:
operationId: GetMyAssessmentAvailability
summary: Read which assessment attempts the current candidate can start.
description: |-
Requires the session cookie of a candidate account; the candidate comes from the session. For each specialization of the questionnaire, returns the confirmed grade, the active attempt, and for every grade whether an attempt can start now, in which mode, and with which limits: the time limit, the session limit, the item limit, and whether a code practice is required. The client shows them before the start, together with the method and the signals that are collected, and resumes an active attempt by `active_attempt_id`, for example after it lost the response of CreateMyAssessmentAttempt.
`insufficient_bank` is the state of a category whose bank is not published or has too few families that this candidate has not seen; the server limits attempts instead of repeating families. `cooldown` carries the date when the attempt opens, so the client can explain a blocked attempt with that date and offer support. Specializations and their retry intervals are independent. Attempts that ended as `insufficient_bank` or with the reason `sandbox_unavailable` are platform limitations and never cause a `cooldown`.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- assessment
responses:
"200":
description: Assessment availability of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAvailability
examples:
backend_and_network_engineer:
$ref: ../components/examples.yml#/AssessmentAvailability
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,41 @@
get:
operationId: ListMyAssessmentResults
summary: List immutable real assessment results of the current candidate.
description: |-
Requires a candidate session. Returns only completed root and corrective results owned by this candidate, newest first by decided_at and attempt_id. demo_express training results never appear. The cursor is opaque and bound to this candidate and listing; a malformed or foreign cursor returns 400 validation_failed.
A v2 result includes the category decision captured when that attempt ended, including the confirmed grade then in force. Legacy v1 results omit category_decision because a later category must not be projected backward. Later policy, bank, review, or category changes do not alter either result. Employers cannot read this history; their separate projection contains only the current permitted category and no answers.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- name: limit
in: query
required: false
description: Maximum number of results per page.
schema:
type: integer
format: int32
minimum: 1
maximum: 50
default: 20
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: One owner-scoped page of immutable results.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentResultHistoryPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,71 @@
get:
operationId: GetMyAssessmentSignalNotice
summary: Read whether the current candidate acknowledged the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email; the candidate comes from the session. Returns the notice version that the server requires now and whether this candidate acknowledged it. The notice lists the signals that are collected during a real assessment attempt and states that images, sound, and clipboard contents are not collected. Client signals are the time away from the tab or window, copy, paste and cut with a size only, and exits from fullscreen mode. Server signals are the response time of each item measured by the server, a change of network address during the attempt, parallel sessions, and the comparison of answers to variants of the same task by candidates. The server stores for these only one-way keyed digests: it stores no network address, no session token, and no answer text. Client signals are stored only while the C3 consent is current. The notice also lists the measures that the page applies during a real attempt: fullscreen mode, hiding the task when the candidate leaves fullscreen, the tab, or the window, blocking copy, selection, the context menu, drag, and printing of the task text, and blocking paste into answer fields (paste into the practice code editor is allowed and recorded as a signal with a size only). A watermark on the task page is announced as planned. These measures are applied by the client and never change a score, a category, or a quota. The client shows the notice before a real attempt starts and does not start the attempt until the notice is acknowledged.
The acknowledgement is stored on the server per account and notice version, so it survives a reload and a new browser. An acknowledgement of an earlier version never counts for the current one: when the text gains a version, every candidate acknowledges it again. It is not a consent and never changes C3: the signal operation still requires a current C3 consent, and an unacknowledged notice does not make that operation fail. The demo_express training mode collects no signals and needs no acknowledgement.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account or an unconfirmed email answers 403 forbidden.
security:
- sessionCookie: []
tags:
- assessment
responses:
"200":
description: The notice version and the acknowledgement state of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNotice
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
put:
operationId: AcknowledgeMyAssessmentSignalNotice
summary: Record that the current candidate read the signal notice.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body carries the notice version the candidate was shown. The server stores the acknowledgement for the account and that version; the response carries the server time of the first acknowledgement.
The operation needs no Idempotency-Key: it is idempotent. Repeating it for an acknowledged version changes nothing, keeps the first time, and answers 200, so a retry after a lost response succeeds. A version other than the one the server requires answers 409 state_conflict and stores nothing; the client reads the notice again.
The acknowledgement is not a consent. It does not grant, replace, or hide C3, and it does not affect the signal operation or any score, category, or quota. The body carries no signal, answer, or clipboard data.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account (403 forbidden), then the version (409).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNoticeAcknowledgement
responses:
"200":
description: The stored acknowledgement, new or repeated.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalNotice
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"409":
$ref: ../components/responses.yml#/StateConflict
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,53 @@
post:
operationId: RecordMyAssessmentAttemptSignals
summary: Store a bounded batch of client-reported assessment signals.
description: |-
Requires a candidate session, its CSRF token in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The attempt must belong to the candidate, be a real root or corrective attempt, remain active, and have a current C3 consent. The server locks C3 before locking the attempt, checks every item_instance_id against that attempt, and commits the receipt and any events in one transaction. A terminal, expired, or demo_express attempt accepts no new evidence; demo_express remains a separate training mode and receives no signal storage or grade effect.
The contract accepts only focus-loss duration, copy/paste/cut byte counts, fullscreen exits, item identifiers, and untrusted client timestamps. It never accepts answer text, clipboard contents, arbitrary strings, camera, microphone, screen recordings, screenshots, or organization identifiers. Client timestamps must be within five minutes before attempt creation and five minutes after the database receipt clock. Server receipt time controls rolling rate limits. Signal events are removed with the assessment attempt or account; this release does not promise an independent expiry schedule. Signals do not change scores, categories, quotas, or candidate/employer result responses.
A batch has at most 50 events and the raw request body is limited to 32 KiB before decoding. At most 30 new receipts per candidate and attempt are accepted in a rolling minute; an over-limit request answers 429 and does not consume its idempotency key. Storage is capped at 10,000 events per attempt. If the whole batch would exceed that cap, the server stores no events from it and replays a `saturated` receipt. Repeating the same key and body within 24 hours returns the original receipt without storing another batch; using that key with another body answers 422.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalBatch
responses:
"200":
description: >-
The stored or replayed receipt. A saturated receipt explicitly says
that none of this batch's events was stored.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentSignalReceipt
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/StateConflict
"413":
$ref: ../components/responses.yml#/PayloadTooLarge
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
+39
View File
@@ -0,0 +1,39 @@
get:
operationId: ListMyEvidence
summary: List the skill evidence of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only the caller's own facts. Returns a page, newest event first with the fact identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
A fact is derived from the immutable result of a confirmed real assessment (root or corrective), in the same transaction that stores the result. Each fact names its source (the event and the result, which the candidate can open at `GetMyAssessmentResult`), the skills of the event, the grade that was passed with its basis and calibration, the attribution, the date, the visibility, and the trust level. An online assessment without a reliable confirmation of the identity has trust 1. One source event is one fact: its skills are tags of that fact, so several tags never make several facts.
The list never carries raw answers, items, scores, failed attempts, or anti-cheat data. A failed attempt, a result without a reviewed category source, and an express training run (`demo_express`) create no fact, so reading the list before and after an express run shows no new fact. The list includes facts the candidate hid, with `visibility` `hidden`.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account, or a candidate with an unverified email, answers 403 forbidden. A malformed `limit` or `cursor`, or a cursor of another candidate, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- evidence
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the skill evidence of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EvidenceFactList
examples:
page:
$ref: ../components/examples.yml#/EvidenceFactListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
+46
View File
@@ -0,0 +1,46 @@
get:
operationId: GetMyInvitation
summary: Open the terms of an invitation addressed to the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session; the invitation must be addressed to this candidate.
Returns the organization, the current terms version with the full terms, the state, and the deadline. While an acceptance is possible (`delivered` or `viewed` before the deadline), `contact_consent` holds the published text of the consent C4 for this organization and the kinds of contact that the profile holds, with nothing preselected; otherwise it is null. It is null as well when the profile holds no contact: a grant must cover at least one field, so the client asks the candidate to add a contact to the profile before accepting. After an answer the response holds the candidate's own decline or the contact grant that the acceptance created, with the selected kinds, its status, and whether the organization can read it now (`readable`, with `blocked_by` `visibility` when the profile is not published or is hidden from the organization), never contact values. The response never carries the candidate's handle, the need of the organization, the salary indicator of the organization, or any contact or salary minimum of the candidate.
Reading has no side effect on the invitation: it never records a view. The client records that the candidate opened the terms with ViewMyInvitation, an explicit command, so a prefetch, a retry, or a cache refresh never changes the state that the organization sees. The only change a read can cause is the due expiry: a read at the deadline or later first applies the server transition to `expired` with `invitation_timeout`, which would happen without the read as well, and the response shows it. Reading earlier terms versions is planned as a separate operation.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden; a draft, an invitation addressed to another candidate, and an unknown identifier all answer 404 not_found, so identifiers cannot be enumerated. An `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/MyInvitationId
responses:
"200":
description: The invitation in its current state.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitation
examples:
delivered:
$ref: ../components/examples.yml#/CandidateInvitationDelivered
viewed:
$ref: ../components/examples.yml#/CandidateInvitationViewed
accepted:
$ref: ../components/examples.yml#/CandidateInvitationAccepted
declined:
$ref: ../components/examples.yml#/CandidateInvitationDeclined
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,69 @@
post:
operationId: AcceptMyInvitation
summary: Accept the current terms and disclose the selected contacts.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
Only an acceptance of the current terms version with the consent C4 creates access to contacts (PRD FR12). The body names the `terms_version` the candidate read and accepts, the `expected_version` of the invitation, and `consent_c4`: the C4 text version that the candidate saw, `accepted: true`, and the contact fields the candidate selected. At least one field is required and nothing is preselected or defaulted, so a grant never covers a field the candidate did not choose. The fields come only from the candidate's profile; the request never carries contact values.
Allowed in `delivered` and `viewed` before `response_deadline_at`; accepting directly from `delivered` is allowed, as in the PRD FR12 transition table. In one transaction the server moves the invitation to `accepted`, records the consent C4 in the consent ledger with the organization, the fields, the invitation, the terms version, and the text version and its hash, creates the contact grant for exactly those fields, and writes the audit event. The response is the invitation with `contact_grant`. The acceptance never publishes the profile (C2) and never bypasses a profile hidden from the organization: the grant alone does not guarantee a read, and the organization reads only while the visibility allows it.
412 or 409: a `terms_version` or `expected_version` that is not current answers 412 version_conflict, the repository status for a stale version, and records nothing; this is the stale terms case, for example after the organization raised the salary, and the client reads the invitation again and shows the new terms for a new decision. A state that does not allow an acceptance answers 409 state_conflict: `withdrawn`, `expired`, `declined`, `cancelled_by_candidate`, the planned `counter`, or a command received at the deadline or later, which is late. A terminal state and a passed deadline are checked before the versions: the server first applies the due expiry, and the client then gets 409 for a withdrawn, expired, or late invitation even when its versions are stale, so it shows the final state instead of rereading and retrying. The repository rule keeps 412 for any stale version, so clients branch on `version_conflict` to reread and on `state_conflict` to show the final state.
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and an acceptance of an invitation that is already `accepted` whose `terms_version` and set of fields equal those of its `contact_grant`, the terms version and fields that the candidate accepted, answers 200 with it even with a new key, an older `expected_version`, or a current `terms_version` that a later raise advanced; no second consent, grant, or audit event is created. A different terms version or field set on an accepted invitation answers 409 state_conflict; changing the disclosed fields is a matter of the consent operations. Of two concurrent acceptances only one makes the transition.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on an accepted invitation (200), a terminal state or a passed deadline (409 state_conflict, whatever the versions), the versions (412), any other state that does not allow an acceptance (409 state_conflict), then the consent rules (400 with the pointer `/consent_c4/text_version` for a text version that is not the published one, or `/consent_c4/fields/0` for a field that the profile does not hold). The schema rejects a missing `terms_version`, an empty or repeated field list, an unknown field kind, `accepted` other than true, and unknown fields such as `email` or `phone`. The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/MyInvitationId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/InvitationAcceptance
examples:
email_only:
$ref: ../components/examples.yml#/InvitationAcceptEmailOnly
stale_terms:
$ref: ../components/examples.yml#/InvitationAcceptStaleTerms
responses:
"200":
description: >-
The accepted invitation with the contact grant, or the same
invitation when this acceptance was already made.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitation
examples:
accepted:
$ref: ../components/examples.yml#/CandidateInvitationAccepted
visibility_blocked:
$ref: ../components/examples.yml#/CandidateInvitationAcceptedVisibilityBlocked
"400":
$ref: ../components/responses.yml#/InvitationAcceptValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/InvitationCommandConflict
"412":
$ref: ../components/responses.yml#/InvitationVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,63 @@
post:
operationId: CancelMyInvitation
summary: Cancel the participation in an invitation and revoke its contact grant.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
Moves an unfinished invitation to the terminal state `cancelled_by_candidate` (PRD FR12): `delivered`, `viewed`, `accepted`, and the planned stages up to `negotiation`. The process closes. In the same transaction the server revokes the contact grant that the acceptance of this invitation created, with the reason `participation_cancelled`, so the next contact read of the organization answers 404. Grants of other invitations or applications stay; revoking the consent C4 for the organization as a whole, which closes all of them, belongs to the consent operations.
Cancel differs from decline and withdraw: a decline is the structured answer before an acceptance and counts as a response; a cancellation leaves the process at any unfinished stage, mostly after an acceptance, and carries no reason; a withdrawal is the organization's command and keeps the grant. Before an answer the client offers the decline.
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a cancellation of an invitation that is already `cancelled_by_candidate` answers 200 with it even with a new key or an older `expected_version`. A terminal state other than `cancelled_by_candidate` answers 409 state_conflict even with a stale `expected_version`; otherwise a stale `expected_version` answers 412 version_conflict. The deadline does not limit a cancellation.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on a cancelled invitation (200), a terminal state (409 state_conflict, whatever the version), then the version (412). The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/MyInvitationId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/InvitationCommand
examples:
cancel:
$ref: ../components/examples.yml#/InvitationCancelCommand
responses:
"200":
description: >-
The invitation in the state `cancelled_by_candidate` with its grant
revoked.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitation
examples:
cancelled:
$ref: ../components/examples.yml#/CandidateInvitationCancelled
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/InvitationCommandConflict
"412":
$ref: ../components/responses.yml#/InvitationVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,65 @@
post:
operationId: DeclineMyInvitation
summary: Decline an invitation with a structured reason.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, an allowed Origin, and an Idempotency-Key. The candidate comes from the session.
Allowed in `delivered`, `viewed`, and the planned `counter`, before `response_deadline_at`. Moves the invitation to the terminal state `declined` with the reason and the optional comment; no consent and no access arise (PRD FR12). A timely decline counts as an answer for the responsiveness metrics, not as a consent or a hire. The reason is one of InvitationDeclineReason, including the neutral `other`; no reason requires a comment.
Visibility: the organization sees only the state `declined` and `responded_at`. It never sees the reason or the comment of an individual decline, because a reason such as `salary` would tell it that the hidden minimum is above the range. Reasons feed only aggregates with a minimum group size (planned); the comment is never shown to the organization, published, logged, or sent in a notification. The candidate reads both back in `decline`. A new invitation of the same organization to this candidate is possible only after the 30-day pause.
Repeats return the same result: a retry with the same Idempotency-Key replays the stored response, and a decline of an invitation that is already `declined` with the same reason and comment answers 200 with it even with a new key or an older `expected_version`. A terminal state, another reason or comment on a declined invitation, and a command at the deadline or later answer 409 state_conflict even with a stale `expected_version`; otherwise a stale `expected_version` answers 412 version_conflict.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), the Idempotency-Key (422, 409 idempotency_in_progress, replay), the invitation (404 not_found, after any due expiry), the repeat on a declined invitation (200), a terminal state or a passed deadline (409 state_conflict, whatever the version), the version (412), then any other state that does not allow a decline (409 state_conflict). The schema rejects an unknown reason, an empty comment or one of only white space, a comment over 500 characters, and unknown fields. The general rate limit can answer 429 with Retry-After before any check. 404 and 409 state_conflict are stored under the key; 400, 412, and 429 are not.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/MyInvitationId
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/InvitationDeclineRequest
examples:
other_without_comment:
$ref: ../components/examples.yml#/InvitationDeclineOther
with_comment:
$ref: ../components/examples.yml#/InvitationDeclineWithComment
responses:
"200":
description: >-
The declined invitation with the candidate's own reason, or the same
invitation when this decline was already made.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitation
examples:
declined:
$ref: ../components/examples.yml#/CandidateInvitationDeclined
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/InvitationCommandConflict
"412":
$ref: ../components/responses.yml#/InvitationVersionConflict
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,47 @@
post:
operationId: ViewMyInvitation
summary: Record that the current candidate opened the terms of an invitation.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The candidate comes from the session. The request has no body.
The view transition of PRD FR12 is an explicit command, so reading the invitation with GetMyInvitation stays free of side effects. The client sends it when the candidate opens the terms screen. For a `delivered` invitation the server moves it to `viewed`, sets `viewed_at`, advances `version`, and keeps the deadline. In any other state, including `viewed`, `accepted`, and the terminal states, it changes nothing and answers 200 with the current invitation. A view never reopens, extends, or answers an invitation, and the organization sees only the state `viewed` and `viewed_at`.
The command is idempotent by its effect: the first view wins and every repeat returns the current invitation. It therefore needs no Idempotency-Key and no `expected_version`: a view must never fail because the invitation changed after the client read it, for example after a salary raise. A view at the deadline or later first applies the due expiry and answers 200 with `expired`.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; an employer account answers 403 forbidden; a draft, an invitation addressed to another candidate, and an unknown identifier all answer 404 not_found. An `invitation_id` that is not a UUID answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/MyInvitationId
responses:
"200":
description: >-
The invitation, now `viewed` when it was `delivered`, otherwise in
its current state.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitation
examples:
viewed:
$ref: ../components/examples.yml#/CandidateInvitationViewed
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
+37
View File
@@ -0,0 +1,37 @@
get:
operationId: ListMyInvitations
summary: List the invitations addressed to the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. Returns a page of the candidate's inbox, newest first by delivery time with the identifier as the tie-breaker, with cursor pagination: every invitation that was delivered to this candidate, in any later state, including withdrawn and expired ones. Drafts and invitations addressed to other candidates are never listed.
A summary has the organization, the state, the versions, the role, the salary range, the work formats, and the deadline. Listing never records a view: the state `delivered` stays until ViewMyInvitation records that the candidate opened the terms. Responsiveness metrics of the organization and filters by state are planned and add fields or optional parameters.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- invitation
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the invitations of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateInvitationList
examples:
last_page:
$ref: ../components/examples.yml#/CandidateInvitationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,43 @@
post:
operationId: MarkMyNotificationRead
summary: Mark an item of the inbox of the current candidate as read.
description: |-
Requires the session cookie of a candidate account with a confirmed email, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The recipient comes from the session. The request has no body.
The command is idempotent by its effect: the first mark stores the read time and every repeat returns that first time, so it needs no Idempotency-Key. It never reads the source and returns no content, so marking an item whose content is no longer available still works. It changes no other item.
The general rate limit can answer 429 with Retry-After before any check.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed; an employer account answers 403 forbidden; an item of another account and an unknown identifier both answer 404 not_found, so identifiers cannot be enumerated. A `notification_id` that is not a UUID answers 400 validation_failed with the path pointer.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/NotificationId
responses:
"200":
description: The read state of the item, newly set or repeated.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationReadReceipt
examples:
read:
$ref: ../components/examples.yml#/NotificationReadReceipt
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,37 @@
get:
operationId: ListMyNotifications
summary: List the inbox of the current candidate.
description: |-
Requires the session cookie of a candidate account with a confirmed email. The recipient comes from the session, never from a request parameter, so the response holds only the caller's own items. Returns a page, newest delivery first with the identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
The inbox is the in-platform delivery state of a notification. An item exists as soon as the event reached the platform, whether or not any email was sent, and an email that failed or was never sent does not block it. The inbox stores a reference to the event, not its text: the `content` of every item is resolved from the current source for this recipient on this read. When the source is gone or the recipient may not see it now (for example the candidate hid the organization), the item stays in the list with `content` null, and no earlier text is shown. An event that is delivered twice is one item.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor`, or a cursor of another account, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the inbox of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationList
examples:
page:
$ref: ../components/examples.yml#/NotificationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
+34
View File
@@ -0,0 +1,34 @@
get:
operationId: GetMyPrivacySettings
summary: Read the visibility settings of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. Returns the publication of the candidate card, the search status, and the number of hidden organizations in one read. The response is `Cache-Control: no-store`.
A profile is closed by default. A candidate who never published reads `publication.state` `closed` with `closed_reason` `never_published`, an empty field set, and version 0; creating or saving the profile (`SaveMyProfile`) never publishes it, and no operation of the profile, the questionnaire, or an assessment changes these settings. The C2 consent, the search status, and the hidden organizations are three independent settings: the C2 record in the consent ledger proves that the candidate accepted the publication text, the publication records which fields are published, and the search status is a statement of the candidate that is not a consent. A change of one never changes another, and none of them ever makes the candidate more visible by itself: the search status lapses to the non-public `not_looking`, a revoked C2 closes the card, and a new C2 grant publishes nothing.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- privacy
responses:
"200":
description: The visibility settings of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PrivacySettings
examples:
new_candidate:
$ref: ../components/examples.yml#/NewCandidatePrivacySettings
published_and_looking:
$ref: ../components/examples.yml#/PublishedCandidatePrivacySettings
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,39 @@
get:
operationId: ListMyCardAccessHistory
summary: List the accesses of organizations to the card of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only accesses to the caller's own card. Returns a page, newest first with the record identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
An access is a view of the anonymous card by an organization (`card_viewed`) or a read of the contacts through an active contact grant (`contact_read`). Reading the history is not an access and writes nothing. A retained access record permits the candidate to see the organization's identifier and current name and to hide their profile from it. The nullable organization field is preserved for records whose organization cannot be presented. The entries carry no employee identity, search query, filter, or ranking of the organization. Hiding an organization prevents future reads; it does not erase earlier permitted accesses from the history.
Successful organization card reads are recorded transactionally with the visibility and quota checks. Contact-read records require the invitation grant workflow, which is not implemented yet; an accepted workflow status alone never authorizes contact access.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- privacy
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the accesses to the card of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CardAccessList
examples:
page:
$ref: ../components/examples.yml#/CardAccessListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,81 @@
put:
operationId: HideOrganization
summary: Hide the candidate profile from one organization.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The request has no body: the path names the organization and the candidate comes from the session. The hiding is a record that belongs to the candidate and references the organization; it changes neither the C2 consent, nor the publication, nor the search status.
The operation sets a state, so it is idempotent and needs no Idempotency-Key: hiding an organization that is already hidden answers 200 with the existing record and its original `hidden_at`, changes nothing, and writes no history record. There is one record per candidate and organization.
Anti-enumeration: an organization that does not exist and an organization that the candidate cannot see answer the same 404 not_found, with the same body and without a timing or an error code that tells them apart, so the operation is not a way to ask whether an identifier belongs to an organization. The candidate may name an organization in their own card-access history or an existing hidden-organization record. Invitation visibility will be added with the invitation workflow, and a candidate lookup remains planned. The response names the organization only after that check, with its current name. The identifiers are random, the general rate limit applies and can answer 429 with Retry-After before any check, and the record never reveals to an organization that a candidate hides it.
A candidate hides at most 1000 organizations; hiding one more answers 409 state_conflict with the entry `{in: path, pointer: /org_id, code: limit_reached}` in `errors`, which tells it apart from other conflicts, and changes nothing, and a repeat of an existing hiding is never refused for the limit.
Hiding an organization that holds an active contact grant of the candidate revokes that grant with the reason `visibility_closed` in the same transaction (planned together with the invitation operations). Lifting the hiding never reopens a grant.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation of the path (400), account scenario (403 forbidden for an employer), the organization and its visibility to the candidate (404 not_found), then the repeat (200), then the limit (409 state_conflict). Like every visibility change, hiding needs a verified email (a usecase requirement).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- privacy
parameters:
- $ref: ../components/parameters.yml#/HiddenOrganizationId
responses:
"200":
description: >-
The organization is hidden from the candidate profile: the new record
or the one that existed.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/HiddenOrganization
examples:
hidden:
$ref: ../components/examples.yml#/HiddenOrganizationRecord
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
"409":
$ref: ../components/responses.yml#/HiddenOrganizationLimit
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
delete:
operationId: UnhideOrganization
summary: Lift the hiding of the candidate profile from one organization.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. Deletes the hiding record of the candidate for the organization in the path. The request is idempotent: it answers 204 whether the organization was hidden, was not hidden, or does not exist, so the operation reveals nothing about the organization, and a repeat after a lost response succeeds. The record is deleted, the settings history keeps the event `organization_unhidden` only when a record was deleted.
Lifting the hiding makes the candidate readable by that organization again only if the profile is published and the organization otherwise may read it. It changes neither the C2 consent, nor the publication, nor the search status, and it never reopens a contact grant that the hiding closed.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation of the path (400), account scenario (403 forbidden for an employer), then the deletion (204).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- privacy
parameters:
- $ref: ../components/parameters.yml#/HiddenOrganizationId
responses:
"204":
description: The organization is not hidden from the candidate profile.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,37 @@
get:
operationId: ListMyHiddenOrganizations
summary: List the organizations that the candidate hides the profile from.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only the caller's own records and no request can name another account. Returns a page of the hidden organizations, newest first with the organization identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
The records belong to the candidate. An organization never reads them, never learns that it is hidden, and sees a hidden candidate exactly as it sees one who is not published: no search result, no card, no contact read.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- privacy
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the hidden organizations of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/HiddenOrganizationList
examples:
page:
$ref: ../components/examples.yml#/HiddenOrganizationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,37 @@
get:
operationId: ListMyPrivacyHistory
summary: List the changes of the visibility settings of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, so the response holds only the caller's own records. Returns a page of the settings history, newest first with the event identifier as the tie-breaker, with cursor pagination. The response is `Cache-Control: no-store`.
The history is append-only evidence of what the candidate published, hid, and announced, and when. A publication event keeps the published fields and the C2 record behind them, which is what the consent ledger deliberately does not carry (the C2 record proves the consent to the text, not the field set). A revocation of C2 and a lapse of the search status are computed and are not events here; the consent history shows the revocation. The history never contains a profile value.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden. A malformed `limit` or `cursor` answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- privacy
parameters:
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the settings history of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PrivacyEventList
examples:
page:
$ref: ../components/examples.yml#/PrivacyEventListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,38 @@
get:
operationId: GetMyCardPreview
summary: Preview the anonymous card that organizations would read.
description: |-
Requires the session cookie of a candidate account. Returns a private preview of the permitted anonymous-card fields from the current profile, publication, and consent ledger. The response is `Cache-Control: no-store`.
The preview creates no view or access record and is never shown to an organization. While the profile is closed `card` is null. Its pseudonym uses a separate preview context and is not an organization's pseudonym. Organization-specific visibility filters and cohort checks can further generalize or suppress the card when an organization reads it.
`card` is the closed `AnonymousCardContent` projection. It reaches no private profile or contact schema and contains no name, email, phone, Telegram name, employer, salary figure, account identifier, or profile identifier. Unpublished or unknown values are null. Only allowed canonical skills and generalized experience are exposed; arbitrary profile text and imported excerpts never appear. `categories` contains only confirmed assessment results. Self-assessed grades and work formats appear only through their separate explicit publication choices, and self-assessment never becomes a confirmed category. Salary compatibility is nullable and contains no salary amount.
`evidence` shows what an organization would read in the evidence section of the card (`GetOrganizationCandidateEvidence`): for each category of the card, the one assessment fact that supports its confirmed grade, with its skill, the passed grade, the trust level, the year, and the basis and calibration (`synthetic_demo`, `uncalibrated`). It is null while `card` is null, and an empty list when the card shows no category or no visible fact supports one. The preview applies no organization or cohort, so an organization can still receive less.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- privacy
responses:
"200":
description: The anonymous card as organizations would read it now.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CardPreview
examples:
published:
$ref: ../components/examples.yml#/PublishedCardPreview
closed:
$ref: ../components/examples.yml#/ClosedCardPreview
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,56 @@
put:
operationId: SetMyPublication
summary: Publish or close the anonymous candidate card.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new publication setting: `state` `published` with the non-empty set of card fields, or `closed` with an empty set. It changes only the publication; the search status and the hidden organizations stay as they were.
Publication is not a consent and does not duplicate one. The consent C2 lives in the consent ledger (`ListMyConsents`); this setting refers to it. Publishing requires an active, unrevoked C2 record of the account and binds the publication to that record, so a client sends no consent identifier and cannot forge one. Without one the server answers 409 state_conflict with the entry `{in: body, pointer: /state, code: consent_required}` in `errors`, which tells it apart from every other conflict, and changes nothing: the client gives C2 first (planned in the consent settings) and then publishes. The server takes the C2 record under a share lock in the transaction that writes the publication, so a revocation that races with a publication either commits first (the publication is refused) or closes the card right after. A revocation of C2 closes the card at once, because `state` is computed from the unrevoked record; a later C2 grant never reopens it, and the candidate publishes again under the new record. The revocation path itself closes the stored publication and revokes the contact grants in its own transaction. A closing sent over a stored publication whose C2 was revoked is a real change: it stores the closing, records `publication_closed`, and revokes the grants as any closing does. Publishing, like every visibility change, needs a verified email (a usecase requirement; the unverified account cleanup deletes only accounts without such records). Publishing never adds a field that the body did not name, and a new `CardField` value is never published for a candidate who did not choose it.
The field set contains only the groups of `CardField`. The full name, contacts, and the lowest salary have no value there, so no body can publish them. Only values that the candidate confirmed ever reach the card. Contacts reach an organization only through the contact grant (C4), and a profile that is published or closed changes none of the grants that exist; closing the publication, and hiding an organization that holds a grant, revoke the contact grants concerned with the reason `visibility_closed` in the same transaction as the change (planned together with the operations, see the invitation contract).
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first publication. If it is not the current version the server answers 412 version_conflict and changes nothing. The version travels in the body rather than in If-Match because the generated client cannot read the ETag header yet. A body that equals the stored setting changes nothing, keeps the version, and answers 200 even when `expected_version` is older, so a retry after a lost response succeeds without an Idempotency-Key. A version above the current one never existed and always answers 412. Every change is recorded in the settings history with its time, the fields, and the C2 record.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), a version above the current one (412), rules that depend on the body alone (400), an unchanged body (200), a stale version (412), then the active C2 for a publication (409 state_conflict). The schema rejects an unknown field, a repeated or unknown card field, and more fields than there are groups; a published state with no field, and a closed state with a field, answer 400 validation_failed with the pointer `/fields`. Error bodies never repeat a submitted value.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- privacy
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/PublicationUpdate
examples:
publish:
$ref: ../components/examples.yml#/PublicationUpdatePublish
close:
$ref: ../components/examples.yml#/PublicationUpdateClose
responses:
"200":
description: >-
The saved publication with its new version, or the current one when
the body changes nothing.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/Publication
examples:
published:
$ref: ../components/examples.yml#/PublishedPublication
"400":
$ref: ../components/responses.yml#/PrivacyValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"409":
$ref: ../components/responses.yml#/PublicationConsentRequired
"412":
$ref: ../components/responses.yml#/PrivacyVersionConflict
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,54 @@
put:
operationId: SetMySearchStatus
summary: Set or confirm the search status of the current candidate.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new status: `looking` ("Ищу") or `not_looking`. The status is a statement of the candidate and never a consent. It changes neither the C2 consent, nor the publication, nor the hidden organizations, and it does not close or open any contact grant; a candidate whose profile is closed who sets `looking` becomes visible to no one.
`looking` stores the moment of the confirmation and a lapse time. The server takes the interval from the `search_status` section of the effective product policy (30 days in the demo policy, `searching_confirmation_interval_days`), stores the policy version it used, and fixes the lapse time then, so a later policy change moves no stored time. Setting `looking` again is the confirmation: it replaces the confirmation time with now and advances the version, also after a lapse. The body carries no time, interval, or policy version.
After the lapse time the status holds as `not_looking` with `lapsed` true on the next read. The lapse is computed and written nowhere, so it needs no job, it can never make the candidate more visible, and it never touches the publication or the hidden organizations. A reminder before the lapse is a planned notification, not a part of this operation.
Optimistic concurrency uses `expected_version` in the body, 0 for a candidate who never set the status; a stale or non-existent version answers 412 version_conflict and changes nothing. `not_looking` over a stored `not_looking` changes nothing and answers 200 even with a stale version. `looking` always changes the stored confirmation, so a retry of a confirmation whose response was lost with the old version answers 412 and the client reads the status again.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), a version above the current one (412), an unchanged `not_looking` (200), then a stale version (412).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- privacy
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/SearchStatusUpdate
examples:
looking:
$ref: ../components/examples.yml#/SearchStatusUpdateLooking
responses:
"200":
description: >-
The saved search status with its new version, or the current one
when the body changes nothing.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/SearchStatus
examples:
looking:
$ref: ../components/examples.yml#/LookingSearchStatus
lapsed:
$ref: ../components/examples.yml#/LapsedSearchStatus
"400":
$ref: ../components/responses.yml#/PrivacyValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"412":
$ref: ../components/responses.yml#/PrivacyVersionConflict
default:
$ref: ../components/responses.yml#/Problem
+96
View File
@@ -0,0 +1,96 @@
get:
operationId: GetMyProfile
summary: Read the private profile of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the profile yet gets 200 with version 0, every single field `unknown`, and empty lists rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing profile is not an error state.
The profile is personal data that only its owner reads: full name, contacts, work history, and the lowest salary. It is a private resource and never an organization-visible one; organizations see a candidate through the anonymous card and, after an accepted invitation, through the contact grant, and no organization contract refers to this schema. The response is `Cache-Control: no-store`, and the server never writes its values to logs, metrics, URLs, or events.
Every value carries its confirmation state and provenance, and every claim has trust level 0. The self-assessed grade of a role is separate from `confirmed_categories`, which only assessment results establish and which no request writes. The profile needs no file, no ML extraction, and no FSP account.
`experience_overlaps` lists every pair of entries whose inclusive month ranges overlap. Its indices refer to this response's `experience` array and are scoped to the same `version`; each pair is either `needs_confirmation` or `confirmed`.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- candidate
responses:
"200":
description: The private profile of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfile
examples:
new_candidate:
$ref: ../components/examples.yml#/NewCandidateProfile
backend_manual_with_suggestion:
$ref: ../components/examples.yml#/BackendCandidateProfile
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
put:
operationId: SaveMyProfile
summary: Replace the private profile of the current candidate.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state of every field and list; see CandidateProfileUpdate for the decisions that it carries. It replaces the stored profile as a whole.
Every field is optional in substance: a profile can be saved with any subset filled and the rest null or empty, so no value requires a resume, the ML service, an FSP account, or any other file or link. A successful save advances an account whose current onboarding step is candidate_profile to candidate_questionnaire, including a no-op save; it never moves a later step backwards. This update is atomic with the profile and its history.
Provenance is the server's: a value typed in the form is `manual`, confirming a stored suggestion keeps its origin, and every claim keeps trust level 0. The body has no origin, trust level, confirmation time, confirmed grade, or category, and unknown fields are rejected. A self-assessed grade never becomes a confirmed grade or a category.
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing, and the client reads the profile again and reapplies its edits, so a concurrent edit from another tab or device is never lost silently. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet, as for the questionnaire; the status and code are the same as for a failed If-Match.
The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose values equal the stored ones, with the same decisions, changes nothing, keeps the version, and answers 200 with the current profile even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412. A version above the current one never existed and always answers 412 version_conflict, even for an unchanged body.
The save replaces the stored claims as a whole. A suggestion that an import stored and that the client did not render and send back with the decision `extracted` is dropped by the save; a client therefore sends every suggestion that it received, and a client that read an older version gets 412 instead of silently dropping a suggestion it never saw.
Experience periods use inclusive calendar months. An overlap is allowed only when `confirmed_parallel_periods` explicitly acknowledges that the two date ranges are genuine parallel work. Each acknowledgement names two distinct experience indices and repeats their exact normalized `started_on` and `ended_on` values; both indices and periods must match the submitted array and `expected_version`. A new or changed period needs an acknowledgement in that PUT. The server carries an earlier acknowledgement only when the same two indices still contain the same dates; reordering or changing either date requires a new acknowledgement. Editing other experience fields does not invalidate a matching date-pair acknowledgement. A missing acknowledgement answers 400 with pointers to the period fields and changes nothing. Duplicate, out-of-range, self, and non-overlapping acknowledgements are invalid.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), a version above the current one (412), domain rules that depend on the body alone (400), then the rules that depend on the stored claims against the version: a decision `extracted` for a value that is not a stored suggestion answers 412 when `expected_version` is stale, because another save may have confirmed that value, and 400 when it is current; an unchanged body (200); any other change over a stale version (412). The schema rejects an unknown field, an unknown specialization or grade, a phone number outside E.164, a Telegram username without the leading @, an email that is not an address, a month outside `YYYY-MM`, a salary that is not a positive multiple of 1000, and more items than a list allows. The server also rejects a repeated tag, skill, or role specialization, a period that ends before it starts or lies in the future, a changed overlap without explicit confirmation, and a decision `extracted` for a value that is not a stored suggestion, with 400 validation_failed and pointers to the items, for example `/roles/1/specialization` or `/stack/1/status`. Error bodies never repeat a submitted value.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- candidate
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfileUpdate
examples:
backend_manual:
$ref: ../components/examples.yml#/BackendCandidateProfileUpdate
responses:
"200":
description: >-
The saved profile with its new version, or the current profile when
the body changes nothing.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateProfile
examples:
backend_manual_with_suggestion:
$ref: ../components/examples.yml#/BackendCandidateProfile
"400":
$ref: ../components/responses.yml#/ProfileValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"412":
$ref: ../components/responses.yml#/ProfileVersionConflict
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,32 @@
post:
operationId: RequestMyRepositoryChecks
summary: Ask the server to check the linked project repositories again.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The request has no body. It schedules a new check of every repository that the current profile links, for example after the candidate made a repository public, and answers 202 with the number of scheduled checks; the checks run in the background and `GetMyProfile` shows their state in `projects[].repository_check`. A profile without linked repositories answers 202 with 0.
A check reads only public metadata from the public GitHub API (`api.github.com`): whether the repository exists and is public, its description, topics, languages, and the beginning of its README as plain text. The server never fetches any other host, never follows a redirect to another host, and never shows the fetched text; it uses it only for semantic ranking. A verified repository does not prove that the candidate wrote the code.
The operation is limited per candidate: a second request inside the versioned window answers 429 rate_limited with Retry-After and schedules nothing. A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- candidate
responses:
"202":
description: The checks are scheduled.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ProfileRepositoryCheckRequest
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,84 @@
get:
operationId: GetMyQuestionnaire
summary: Read the questionnaire of the current candidate.
description: |-
Requires the session cookie of a candidate account. The candidate comes from the session, never from a request parameter. A candidate who has not saved the questionnaire yet gets 200 with version 0 and no specializations rather than 404, so the client reads the version for the first save in the same way as for later ones and a missing questionnaire is not an error state.
The response never contains a confirmed grade or a category; those come only from assessment results. A missing, unknown, expired, or revoked session answers 401 unauthenticated; an employer account answers 403 forbidden.
security:
- sessionCookie: []
tags:
- candidate
responses:
"200":
description: The questionnaire of the current candidate.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateQuestionnaire
examples:
new_candidate:
$ref: ../components/examples.yml#/NewCandidateQuestionnaire
backend_go_and_network_engineer:
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaire
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
put:
operationId: SaveMyQuestionnaire
summary: Replace the questionnaire of the current candidate.
description: |-
Requires the session cookie of a candidate account, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The body is the complete new state: one or two specializations, each with a self-assessed grade, task languages, stack tags, and stated experience or null, and the working context. It replaces the stored questionnaire as a whole.
Self-assessment is a claim. It influences where the assessment starts and which grade the assessment step offers first, but it adds no points and never writes a confirmed grade or a category: a self-assessed `senior`, or the word "Senior" in a stack tag, never assigns the Senior category. A real profile stays invisible to employers until an assessment confirms a category. Choosing a specialization whose test is `in_development` is allowed; no assessment starts for it until its bank is published. Removing a specialization from the questionnaire does not change assessment results.
Optimistic concurrency uses `expected_version` in the body: the client sends the `version` it read, 0 for the first save. If it is not the current version, the server answers 412 version_conflict and changes nothing; the client reads the questionnaire again. The version travels in the body rather than in If-Match because the generated client cannot read the ETag response header yet. The status and code are the same as for a failed If-Match, since the client action is the same.
The operation needs no Idempotency-Key: it replaces the whole state and is idempotent. A body whose specializations and working context equal the stored ones changes nothing, keeps the version, and answers 200 with the current questionnaire even when `expected_version` is older, so a retry after a lost response of a successful save succeeds instead of failing with 412.
Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400), account scenario (403 forbidden for an employer), domain rules (400), then the version (412). The schema rejects more than two specializations, an unknown grade, specialization, or task language, and unknown fields. The server also rejects a repeated specialization and a task language that the specialization's published bank does not offer, with 400 validation_failed and pointers to the items, for example `/specializations/1/specialization` or `/specializations/0/task_languages/0`.
A successful save on the onboarding step candidate_questionnaire advances the account to candidate_assessment (planned).
security:
- sessionCookie: []
sessionCsrf: []
tags:
- candidate
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateQuestionnaireUpdate
examples:
backend_go_and_network_engineer:
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaireUpdate
responses:
"200":
description: The saved questionnaire with its new version.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/CandidateQuestionnaire
examples:
backend_go_and_network_engineer:
$ref: ../components/examples.yml#/BackendGoAndNetworkEngineerQuestionnaire
"400":
$ref: ../components/responses.yml#/QuestionnaireValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"412":
$ref: ../components/responses.yml#/QuestionnaireVersionConflict
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,24 @@
get:
operationId: GetSpecializationCatalog
summary: Read the catalog of directions, specializations, and grades.
description: |-
Public operation without a session. Returns the directions with their specializations, the assessment availability of each specialization, and the grade scale. The candidate picks specializations and self-assessed grades from this catalog for the questionnaire, and the client joins the codes stored in the questionnaire with the titles here.
The catalog is public because it is the same for every caller and contains no personal data: the product shows it before registration, and a public read lets intermediaries and the browser cache it. It reveals nothing beyond what the landing pages already show.
A category is a specialization together with a confirmed grade. Task languages and the stack are attributes of a chosen specialization and never appear as categories. `test_availability` is derived from the published task banks at the time of the request, so it changes when a bank is published, without a contract change: the MVP opens an assessment only for a category with a published bank, and every other specialization is marked `in_development`. Presence in the catalog never means that its test is ready.
security: []
tags:
- catalog
responses:
"200":
description: The catalog.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/SpecializationCatalog
examples:
mvp:
$ref: ../components/examples.yml#/SpecializationCatalog
default:
$ref: ../components/responses.yml#/Problem
+45
View File
@@ -0,0 +1,45 @@
get:
operationId: ListMyConsents
summary: List the consents of the current account with their history.
description: |-
Requires the session cookie of a candidate or an employer account. The subject comes from the session, never from a request parameter, so the response holds only the caller's own consents: no request can name another account, and records of other accounts are never listed. Returns a page of the consent ledger of the account, newest grant first with the identifier as the tie-breaker, with cursor pagination.
The ledger is append-only. Every grant is a record with its purpose, the accepted text version, the source, and the grant time; the server also stores the hash of exactly the text the subject saw. A newer text version of the same purpose is a new record, and the earlier one becomes `superseded` without any change. A revocation stamps every unrevoked record of the purpose, and for c4 of one organization, once; a later grant is a new record. Purposes are independent.
Without `state` the page lists the whole history; `state=active` lists the consents that hold now, one per purpose for c1, c2, c3, and c5 and one per accepted invitation for c4. A c4 record names the organization with the name its consent text showed (a snapshot that a later rename does not change), the selected contact fields, and the invitation with its terms version; it never carries a contact value. A c2 record proves the consent to the publication text; the published field set and its changes are evidence of the publication history.
Settings grants of c1, c2, c3, and c5 require the currently published text and an explicit acceptance. Revoking c2, c3, or c5 is available in settings; c1 creates a durable account-deletion request, and c4 is revoked only for one organization. C4 is granted only in AcceptMyInvitation.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated. A malformed `limit`, `cursor`, or `state` answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- consent
parameters:
- name: state
in: query
required: false
description: Lists only the records in this state; omit it for the whole history.
schema:
$ref: ../components/schemas.yml#/ConsentState
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the consent ledger of the current account.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentRecordList
examples:
history:
$ref: ../components/examples.yml#/ConsentRecordListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
default:
$ref: ../components/responses.yml#/Problem
+7
View File
@@ -11,3 +11,10 @@ get:
application/json:
schema:
$ref: ../components/schemas.yml#/HealthResponse
examples:
ok:
summary: The process is responding
value:
status: ok
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,37 @@
get:
operationId: GetConsentText
summary: Read the currently published text of a registration consent.
description: |-
Public operation without a session. Returns the current text of a consent that is given before an account exists; only `c1` is available. The registration page shows this text and sends its `text_version` with RegisterAccount, and the server hashes the same stored text when it records the acceptance. If the text changes while the page is open, RegisterAccount answers 400 validation_failed with the pointer `/consent_c1/text_version`, and the page reads the text again. An unknown purpose fails parameter validation with 400.
security: []
tags:
- identity
parameters:
- name: purpose
in: path
required: true
description: Consent whose text is requested.
schema:
$ref: ../components/schemas.yml#/ConsentPurpose
responses:
"200":
description: The current consent text.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentText
examples:
c1:
summary: Current C1 text
value:
purpose: c1
text_version: c1-2026-10-01
text: |-
I consent to the processing of my personal data for registration and the use of the service.
The full text is published by the operator.
published_at: "2026-10-01T00:00:00Z"
"400":
$ref: ../components/responses.yml#/ValidationFailed
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,62 @@
post:
operationId: ConfirmEmailByCode
summary: Verify an email with the six-digit code from the verification message.
description: |-
Public operation without a session. The verification message carries a six-digit code next to the link. The client sends the address, the code, and the password chosen for the registration that issued the code, so the user types only the code after registration. A reloaded page has no password in memory, so it asks for the address, the password, and the code together.
The server finds the newest open verification token of the unverified account with this normalized address, whose registration is current and which carries a code. It compares the keyed digest of the code with the stored digest, checks the password against the token's pending password hash, and checks that the code has not expired. The code lives 30 minutes, or until the token ends if the token ends sooner. When all three checks pass, the server consumes the token, verifies the email, and applies the pending credentials in one transaction, exactly as the link confirmation does, and answers 200 with the same body. Success does not start a session.
Each refusal answers 400 `verification_token_invalid` with the same body, whatever the cause: an unknown address, an address without an open code, a wrong code, an expired code, a wrong password, or a code that was burned. This keeps the answer from showing which addresses have a pending registration. Every failed attempt of an open code counts against that token. The fifth failed attempt burns the token: the code and the link stop working, and the user must request a new message. A refused attempt changes nothing else.
The same refusal is returned after the rate limits are checked. The operation is limited per client address (`IDENTITY_CLIENT_HOURLY_LIMIT`) and per normalized email (`IDENTITY_LOGIN_EMAIL_HOURLY_LIMIT`, shared with login); a refused request answers 429 with Retry-After. A body that does not match the contract, such as a code that is not six digits, answers 400 `validation_failed` before any lookup. Like every unsafe public identity operation, it requires an Origin equal to the configured public application origin and answers 403 `csrf_check_failed` otherwise.
security: []
tags:
- identity
parameters:
- name: Origin
in: header
required: false
description: >-
The exact configured public application origin. This optional parameter
is read by the server as empty when absent, so the operation answers
csrf_check_failed rather than treating a missing Origin as an allowed
request.
schema:
type: string
minLength: 1
maxLength: 2048
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EmailVerificationCodeRequest
examples:
code:
summary: Address, code from the message, and the registration password
value:
email: candidate@example.com
code: "482915"
password: "correct horse battery staple"
responses:
"200":
description: The email is verified.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EmailVerificationResult
examples:
candidate:
summary: A candidate continues with consents
value:
email_verified: true
scenario: candidate
onboarding_step: candidate_consents
"400":
$ref: ../components/responses.yml#/EmailVerificationCodeFailed
"403":
$ref: ../components/responses.yml#/CsrfCheckFailed
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,43 @@
post:
operationId: ResendEmailVerification
summary: Request a new email verification link.
description: |-
Public operation without a session. The answer is the same 202 for an unknown email, a verified email, and an unverified one, so it does not enumerate accounts. Only for an unverified account does the server issue a new one-time token bound to the current registration version, invalidate every earlier token of that account, and queue the message. Resend never changes the password, the scenario, or the consent record; a user who did not start the pending registration registers again instead, which replaces it.
It is rate-limited per client and per email and answers 429 with Retry-After when the limit is reached. A retry is safe without Idempotency-Key: at worst it replaces the token again within the rate limit. Like every unsafe request, it requires an allowed Origin and answers 403 csrf_check_failed otherwise.
security: []
tags:
- identity
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EmailVerificationResendRequest
examples:
resend:
summary: Resend to an address
value:
email: candidate@example.com
responses:
"202":
description: >-
Request accepted. If the address belongs to an unverified account, a
new link is on its way; the response does not say whether it was.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/IdentityRequestAccepted
examples:
accepted:
summary: Neutral acknowledgement
value:
status: accepted
"400":
$ref: ../components/responses.yml#/ValidationFailed
"403":
$ref: ../components/responses.yml#/CsrfCheckFailed
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,63 @@
post:
operationId: ConfirmEmail
summary: Verify an email with the one-time token from the link.
description: |-
Public operation without a session. The verification link has the form `<frontend origin>/verify-email#token=<token>`: the token travels in the URL fragment, so it never reaches a server log or a Referer header. The page first removes the fragment with `history.replaceState`, then waits for an explicit user action, such as a Confirm button, before it posts the token here. A link scanner that only fetches the page therefore does not consume the token.
The server looks up the token by its hash and, in one transaction, checks that it is unused, not expired, and bound to the current registration version, marks it used, and marks the email verified. Only one of several parallel requests with the same token succeeds. An expired token of the current registration answers verification_token_expired; an unknown, used, replaced, or superseded token answers verification_token_invalid, even when that token is also expired. Neither refusal changes anything. For both, the client offers a new link and sign-in, because the address may already be verified.
Confirmation also requires the password chosen for the registration that issued this token. A token from a replaced registration cannot apply another registration's password or scenario. The server checks the password against the token's pending password hash before consuming the token, then applies that token's password, scenario, and onboarding step only if the current registration's C1 consent matches its registration version. A wrong password or token without pending registration data answers verification_token_invalid and leaves the account and token unchanged.
A repeated confirmation with an already used token is not an idempotent 200: exactly one request may succeed for a token, so the outcome of parallel requests stays unambiguous, and the next step after either outcome is sign-in anyway.
Success does not start a session: the link may be opened on another device or by a mail scanner, and a session must come only from the password. The response returns the scenario and the saved onboarding step so the client can continue after sign-in. The operation is rate-limited and requires an allowed Origin. Missing Origin, the special value `null`, or an Origin other than the configured public application origin answers csrf_check_failed.
security: []
tags:
- identity
parameters:
- name: Origin
in: header
required: false
description: >-
The exact configured public application origin. This optional parameter
is read by the server as empty when absent, so the operation answers
csrf_check_failed rather than treating a missing Origin as an allowed
request.
schema:
type: string
minLength: 1
maxLength: 2048
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EmailVerificationRequest
examples:
token:
summary: Token from the link and password chosen during registration
value:
token: q3Zt9b2Kx7LmP4vR8sW1yC6nD0fH5jA2eG9uI3oT7kE
password: "correct horse battery staple"
responses:
"200":
description: The email is verified.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/EmailVerificationResult
examples:
candidate:
summary: A candidate continues with consents
value:
email_verified: true
scenario: candidate
onboarding_step: candidate_consents
"400":
$ref: ../components/responses.yml#/EmailVerificationFailed
"403":
$ref: ../components/responses.yml#/CsrfCheckFailed
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
+26
View File
@@ -0,0 +1,26 @@
get:
operationId: GetCurrentAccount
summary: Read the account of the current session.
description: |-
Requires the session cookie. The account comes from the session, never from a request parameter. The client uses `scenario` and `onboarding_step` to return the user to the unfinished onboarding step. A missing, unknown, expired, or revoked session answers 401 unauthenticated. An unverified account never has a session, because login answers 403 email_not_verified for it, so this operation also answers 401 for such an account.
security:
- sessionCookie: []
tags:
- identity
responses:
"200":
description: The current account.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/Account
examples:
candidate:
$ref: ../components/examples.yml#/CandidateAccount
"401":
$ref: ../components/responses.yml#/Unauthenticated
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,67 @@
post:
operationId: RegisterAccount
summary: Register an account by email with a scenario and consent C1.
description: |-
Public operation without a session. The client reads the current C1 text with GetConsentText and sends the email, the password, the chosen scenario, and consent C1 with the version of the text the user accepted.
The answer is the same 202 whether the email is new, registered but not verified, or verified, so registration does not enumerate accounts:
- New email: the server creates an unverified account with the scenario and the first onboarding step, records C1 with its text version and text hash, stores only the hash of a one-time verification token plus the pending registration credentials, and queues the verification message, all in one transaction.
- Registered but not verified: the server treats the request as a new registration of that address. In one transaction it advances the registration version, replaces the C1 record, invalidates every earlier verification token, and queues a message with a new token carrying the pending password hash, scenario, and onboarding step. The account's saved credentials and scenario change only when the address owner confirms that token with its registration password, so a pre-registration with someone else's password cannot take over the account.
- Verified: nothing changes. The server may queue a rate-limited "you already have an account" notice to the address.
Every verification token is bound to the registration version it was issued for, so a token issued before a re-registration can never confirm the newer credentials. An account that stays unverified is deleted with its consent record and tokens 7 days after its last registration (planned value from configuration). Verification tokens live 24 hours (planned value from configuration).
The response does not depend on the branch in content or timing. Before it looks up the email, the server validates the whole body, including the password bounds after normalization, the password blocklist, and the C1 version, and it computes the Argon2id hash on every branch; a 400 therefore never depends on whether the email exists. Mail is delivered asynchronously from the outbox.
The operation requires Idempotency-Key. For this anonymous operation the key is scoped by the operation, the key, and an HMAC of the normalized email, and the request fingerprint is an HMAC-SHA-256 with a server secret over the canonical JSON body. The server never stores the body, the password, or a plain hash of either; the secret keeps the fingerprint from serving as an offline password check. A retry with the same key, email, and body replays the stored 202 without a second message; the same key and email with a different body answers 422 idempotency_key_reused.
It is rate-limited per client and per email and answers 429 with Retry-After when the limit is reached. Like every unsafe request, it requires an allowed Origin and answers 403 csrf_check_failed otherwise.
security: []
tags:
- identity
parameters:
- $ref: ../components/parameters.yml#/IdempotencyKey
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/RegistrationRequest
examples:
candidate:
summary: Candidate registration
value:
email: candidate@example.com
password: correct horse battery staple
scenario: candidate
consent_c1:
text_version: c1-2026-10-01
accepted: true
responses:
"202":
description: >-
Registration request accepted. If the email can be registered, a
verification link is on its way; the response does not say whether
it was.
content:
application/json:
schema:
$ref: ../components/schemas.yml#/IdentityRequestAccepted
examples:
accepted:
summary: Neutral acknowledgement
value:
status: accepted
"400":
$ref: ../components/responses.yml#/RegistrationValidationFailed
"403":
$ref: ../components/responses.yml#/CsrfCheckFailed
"409":
$ref: ../components/responses.yml#/IdempotencyInProgress
"422":
$ref: ../components/responses.yml#/UnprocessableContent
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
+62
View File
@@ -0,0 +1,62 @@
post:
operationId: Login
summary: Sign in with email and password and start a session.
description: |-
Public operation that starts a server session. The server verifies the password with Argon2id; for an unknown email it verifies against a fixed dummy hash, so the response time does not reveal whether the account exists. An unknown email and a wrong password both answer 401 invalid_credentials.
Correct credentials for an unverified email answer 403 email_not_verified and create no session. This reveals the verification state only to someone who already knows the password, which proves more than the state itself; the client offers to resend the link.
On success the server revokes the session that the request carried, if any, creates a new random session in PostgreSQL with a new identifier and a new CSRF token, sets the HttpOnly session cookie, and returns the account and the CSRF token. The new session follows the idle and absolute timeouts of the sessionCookie scheme. The client keeps the token in memory and sends it in X-CSRF-Token with every mutating request that requires a session.
Login is rate-limited per client and per email and answers 429 with Retry-After. Like every unsafe request, it requires an allowed Origin, which protects against login CSRF, and answers 403 csrf_check_failed otherwise.
security: []
tags:
- identity
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/LoginRequest
examples:
login:
summary: Email and password
value:
email: candidate@example.com
password: correct horse battery staple
responses:
"201":
description: Session started; the session cookie is set.
headers:
Set-Cookie:
$ref: ../components/headers.yml#/SessionCookieSet
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/Session
examples:
candidate:
$ref: ../components/examples.yml#/CandidateSession
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/InvalidCredentials
"403":
description: >-
Correct credentials for an unverified email (email_not_verified), or
a disallowed Origin (csrf_check_failed). No session was created.
content:
application/problem+json:
schema:
$ref: ../components/schemas.yml#/Problem
examples:
email_not_verified:
$ref: ../components/examples.yml#/EmailNotVerified
csrf_check_failed:
$ref: ../components/examples.yml#/CsrfCheckFailed
"429":
$ref: ../components/responses.yml#/TooManyRequests
default:
$ref: ../components/responses.yml#/Problem
@@ -0,0 +1,60 @@
get:
operationId: GetCurrentSession
summary: Read the current session and its CSRF token.
description: |-
Requires the session cookie. Returns the account and the CSRF token of the current session, so the client can restore the token after a page reload or after 403 csrf_check_failed. A missing, unknown, expired, or revoked session answers 401 unauthenticated. Cross-origin pages cannot read the token, because the API sends no Access-Control-Allow-Origin header.
security:
- sessionCookie: []
tags:
- identity
responses:
"200":
description: The current session.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/Session
examples:
candidate:
$ref: ../components/examples.yml#/CandidateSession
"401":
$ref: ../components/responses.yml#/Unauthenticated
default:
$ref: ../components/responses.yml#/Problem
delete:
operationId: Logout
summary: Sign out and revoke the current session.
description: |-
Requires the session cookie and the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The server revokes the session in PostgreSQL, so the cookie value stops working even if a copy remains, and clears the cookie. A missing, expired, or revoked session answers 401 unauthenticated and also clears the cookie, so a stale cookie does not stay in the browser; a missing or wrong CSRF token or a disallowed Origin answers 403 csrf_check_failed and keeps the session and the cookie. The client clears its private query cache after the response.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- identity
responses:
"204":
description: The session is revoked and the cookie is cleared.
headers:
Set-Cookie:
$ref: ../components/headers.yml#/SessionCookieCleared
"401":
description: >-
No valid session; code unauthenticated. The cookie is cleared as
well.
headers:
Set-Cookie:
$ref: ../components/headers.yml#/SessionCookieCleared
content:
application/problem+json:
schema:
$ref: ../components/schemas.yml#/Problem
examples:
unauthenticated:
$ref: ../components/examples.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailed
default:
$ref: ../components/responses.yml#/Problem
+68
View File
@@ -0,0 +1,68 @@
post:
operationId: SearchOrganizationMatches
summary: Search the current organization-visible candidate bank.
description: |-
Requires the session cookie of an employer account with an active owner membership in `org_id`, the CSRF token of that session in X-CSRF-Token, and an allowed Origin. The organization comes from the path and the active server-side membership. Hidden profiles, revoked or missing C2 publication, and the organization's visibility restrictions are applied before any result is returned.
The body selects either a Need's `requirements_version` snapshot or the current organization-visible bank with explicit filters. A need reference uses `Need.requirements_version`, not the general `Need.version`; title or suggestion-only edits do not change the confirmed-requirements snapshot. An empty bank filter searches all otherwise eligible specializations, returning each specialization separately.
A search reveals card content, so it is charged like card reads. The whole visible bank is ranked, but each group returns at most the versioned per-group limit and no total is returned. In the order `main`, `near`, `unconfirmed`, each newly revealed candidate is counted as a distinct card view of the organization (a candidate it already viewed inside the window costs nothing again, so repeating the search or opening the card afterwards does not charge twice) and appears in the candidate's access history with the fields actually returned. When the allowance ends, the entries already counted are returned and `truncated` is true; the flag is also true when a group exceeded its limit, and it carries no count. No new error is returned for an exhausted allowance.
Every entry is one candidate specialization. A confirmed result in Backend never confirms Networks for the same candidate. The `main`, `near`, and `unconfirmed` arrays are separate groups. A confirmed category with required-skill coverage below 0.25 belongs to `near`; other confirmed entries belong to `main` (FR09). Entries in `unconfirmed` are ordered by Fit, then coverage, then a stable internal tie-breaker that is never returned. Their category and strength remain null, and they have no theta, T, P, or test percentile. The search result uses the organization-scoped opaque `candidate_handle` as its display pseudonym and invitation reference, never a candidate account or profile identifier.
The card context is limited to safe public fields: recognized stack tags, coarse experience, accepted work formats, and coarse salary compatibility. It contains no contact, candidate location, salary amount or minimum, raw answer, arbitrary profile text, or reason for withheld FSP data. Evidence explanations use bounded codes, not free text.
Semantic similarity `Sem` is the calibrated cosine between the stored vector of the need's confirmed requirements snapshot and the stored vector of the candidate's published card text (roles, recognized stack, and published projects with the public metadata of their verified repositories). The search never calls the ML service: vectors are computed in the background after a change, and an entry whose vectors are missing, stale for the current model, or not computed because ML is unavailable uses the neutral 0.5 and names `ml_unavailable` in `unknown_flags`. `semantic_evidence` lists, for a need search, the confirmed requirements whose closest published card item reaches a similarity band of the versioned policy; it names a project only by the title that the candidate published with the `projects` card field and says whether its repository is a verified public one, never the repository address or owner. Showing a project title records the `projects` field in the candidate's access history. For fewer than 30 comparable real candidates, the search uses neutral T = 0.5, returns no percentile value, and names `cohort_below_30`. When the comparable real cohort of a category reaches the minimum, the percentile is still not computed (the organization-safe projection carries no theta), T stays the neutral 0.5, the percentile stays null, and `unknown_flags` names `percentile_not_computed`; the search does not fail.
A missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden; an unknown organization or account without active membership answers 404 not_found. The response is `Cache-Control: no-store`.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- organization
parameters:
- $ref: ../components/parameters.yml#/OrganizationId
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/MatchSearchRequest
examples:
by_need:
$ref: ../components/examples/matches.yml#/SearchByNeed
by_bank_filters:
$ref: ../components/examples/matches.yml#/SearchByBank
responses:
"200":
description: Organization-visible candidates in separate match groups.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/MatchSearchResponse
examples:
three_groups:
$ref: ../components/examples/matches.yml#/ThreeGroups
empty:
$ref: ../components/examples/matches.yml#/Empty
ml_unavailable:
$ref: ../components/examples/matches.yml#/MLUnavailable
cohort_below_30:
$ref: ../components/examples/matches.yml#/CohortBelow30
truncated:
$ref: ../components/examples/matches.yml#/Truncated
semantic_evidence:
$ref: ../components/examples/matches.yml#/SemanticEvidence
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/CsrfCheckFailedOrForbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem
+89
View File
@@ -0,0 +1,89 @@
put:
operationId: GrantMyConsent
summary: Record an explicit consent grant from settings.
description: |-
Requires a verified session, its CSRF token in X-CSRF-Token, and the exact configured Origin. The subject comes from the session. The body names the current text version the user read and requires `accepted: true`; the server verifies that version is still current and stores the hash of the exact text. A stale version answers 400 validation_failed at `/text_version`, without writing a grant.
C1 is available to candidate and employer accounts. C2, C3, and C5 are available only to candidate accounts. C4 is excluded and can be granted only by accepting an invitation. A repeated grant of the same current version returns the existing record; after revocation a grant creates a new record and never reopens a publication or restores an older grant.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- consent
parameters:
- name: purpose
in: path
required: true
description: Independent consent being granted. C4 is not available here.
schema:
$ref: ../components/schemas.yml#/ConsentSettingsPurpose
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentSettingsGrantRequest
responses:
"200":
description: The created or existing consent record.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/ConsentRecord
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
description: CSRF or Origin validation failed, or an employer tried to grant a candidate-only purpose.
content:
application/problem+json:
schema:
$ref: ../components/schemas.yml#/Problem
examples:
csrf:
$ref: ../components/examples.yml#/CsrfCheckFailed
forbidden:
$ref: ../components/examples.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
delete:
operationId: RevokeMyConsent
summary: Revoke a non-scoped consent from settings.
description: |-
Requires a verified candidate session, its CSRF token in X-CSRF-Token, and the exact configured Origin. The subject comes from the session. Revokes every unrevoked record of c2, c3, or c5, including superseded records, and never changes another purpose. Repeating a revocation is harmless and creates no duplicate event.
Revoking c2 immediately closes the stored publication and records privacy history in the same transaction; a downstream revocation intent is written to the outbox. A later c2 grant does not reopen publication or restore old grants. Revoking c3 does not block the manual assessment path. Revoking c5 makes the consent gate deny further FSP import and writes a durable stop/delete intent; an external FSP deletion adapter is not available yet.
security:
- sessionCookie: []
sessionCsrf: []
tags:
- consent
parameters:
- name: purpose
in: path
required: true
description: Consent being revoked. C1 has a deletion-request operation and C4 requires an organization scope.
schema:
$ref: ../components/schemas.yml#/ConsentSettingsRevokePurpose
responses:
"204":
description: Consent revoked, or it was already revoked.
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
description: CSRF or Origin validation failed, or an employer account tried to revoke candidate consent.
content:
application/problem+json:
schema:
$ref: ../components/schemas.yml#/Problem
examples:
csrf:
$ref: ../components/examples.yml#/CsrfCheckFailed
forbidden:
$ref: ../components/examples.yml#/Forbidden
default:
$ref: ../components/responses.yml#/Problem
Loaded 100 of 2639 files, more files were not shown because too many files have changed in this diff. Show more