feat(platform): add the notification inbox and deterministic match search

This commit is contained in:
shira committed 2026-10-09 13:14:46 +03:00
1 parent 5edff21d2d
commit 0b11021b16
169 files changed
+17083 -443

No files matched your search

+27
View File
@@ -4536,3 +4536,30 @@ HiddenOrganizationLimitReached:
pointer: /org_id
code: limit_reached
message: The candidate already hides the maximum number of organizations.
NotificationListPage:
summary: An unread notice and a read one whose source is no longer visible
value:
items:
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: "2026-10-09T08:30:00Z"
read_at: null
content:
title: Тестовое уведомление
summary: Организация «Север» отправила проверочное уведомление платформы. Оно создано для проверки доставки и не требует действий.
link_path: null
- id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f6f
kind: synthetic
organization_id: 01928f7a-1a2b-7c3d-8e4f-5a6b7c8d9e01
delivered_at: "2026-10-08T17:05:00Z"
read_at: "2026-10-08T17:10:00Z"
content: null
page:
has_more: false
next_cursor: null
NotificationReadReceipt:
summary: The first read time of an item
value:
id: 01928f7a-8b9c-7d0e-9f1a-2b3c4d5e6f70
read_at: "2026-10-09T08:45:00Z"
+57
View File
@@ -139,6 +139,7 @@ ThreeGroups:
unknown_flags:
- component: assessment
reason: no_confirmation_for_specialization
truncated: false
Empty:
summary: A valid search with no eligible visible candidates.
@@ -157,6 +158,7 @@ Empty:
main: []
near: []
unconfirmed: []
truncated: false
MLUnavailable:
summary: Semantic similarity uses the documented neutral value while ML is unavailable.
@@ -207,6 +209,7 @@ MLUnavailable:
reason: ml_unavailable
near: []
unconfirmed: []
truncated: false
CohortBelow30:
summary: A small comparison cohort has no published percentile.
@@ -257,3 +260,57 @@ CohortBelow30:
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
strength: standard
public_context:
stack: null
experience_band: null
work_formats: null
salary_compatibility: null
evidence_summary:
- code: confirmed_category
state: supports
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
+13
View File
@@ -158,3 +158,16 @@ HiddenOrganizationId:
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
+112 -1
View File
@@ -4847,7 +4847,7 @@ MatchUnknownComponent:
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
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
@@ -4856,6 +4856,7 @@ MatchUnknownReason:
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
@@ -5110,11 +5111,15 @@ MatchSearchResponse:
required:
- source
- groups
- truncated
properties:
source:
$ref: '#/MatchSearchSource'
groups:
$ref: '#/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.'
NeedVersion:
type: integer
format: int64
@@ -6027,6 +6032,112 @@ NeedUpdate:
oneOf:
- $ref: '#/NeedSalaryInput'
- type: 'null'
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. This is the in-platform delivery state of the invitation: it does not depend on any email, and a failed or missing email never blocks it. The invitation operations are planned; no invitation produces a notification yet.
- 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: '#/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: '#/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: '#/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: '#/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: '#/Notification'
page:
$ref: '#/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: '#/Timestamp'
OrganizationVersion:
type: integer
format: int64
+16 -1
View File
@@ -278,7 +278,12 @@ schemas:
- domain
MatchUnknownReason:
type: string
description: Bounded explanation for an unknown component, not a hiding reason.
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
@@ -287,6 +292,7 @@ schemas:
- need_field_unconfirmed
- no_freshness_history
- no_response_history
- percentile_not_computed
MatchUnknownFlag:
type: object
description: A safe, bounded explanation for one unavailable component.
@@ -567,8 +573,17 @@ schemas:
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.
@@ -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. This is the in-platform delivery state of the invitation: it does not depend on any email, and a failed or missing email never blocks it. The invitation operations are planned; no invitation produces a notification yet.
- 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"