docs: add the MVP submission package and refresh the status sections
This commit is contained in:
1 parent
0beae4895d
commit
4fa1cf9198
8 files changed
+316
-34
No files matched your search
+19
-15
@@ -4,9 +4,13 @@ This document separates the target product architecture from the technical scaff
|
||||
|
||||
## Current scaffold
|
||||
|
||||
The repository contains a Go HTTP service with PostgreSQL, Redis, and SeaweedFS checks, cache and S3 storage adapters, a React interface scaffold with public pages and two cabinet shells of placeholder screens, a separate Python ML service with health and readiness routes, two OpenAPI contracts, code generation, Compose files, and monitoring configuration. The public API health route is under /api/v1/healthz. The web container uses /healthz. The internal Go /readyz checks PostgreSQL, Redis, and the SeaweedFS bucket. ML uses /healthz and /readyz; readiness returns 503 while inference is unavailable. Go exposes the standard /metrics endpoint on an internal port.
|
||||
The repository contains a Go HTTP service with PostgreSQL, Redis, and SeaweedFS checks, cache and S3 storage adapters, a React interface with public pages and two cabinets (working screens for the workflows described below), a separate Python ML service with health and readiness routes, two OpenAPI contracts, code generation, Compose files, and monitoring configuration. The public API health route is under /api/v1/healthz. The web container uses /healthz. The internal Go /readyz checks PostgreSQL, Redis, and the SeaweedFS bucket. ML uses /healthz and /readyz; readiness returns 503 while inference is unavailable. Go exposes the standard /metrics endpoint on an internal port.
|
||||
|
||||
Registration, email confirmation, login, and basic current-session operations work through the backend API. The frontend implements registration, confirmation, sign-in, and continuation from the server-provided scenario step; local browser E2E covers candidate and employer accounts. Consent settings and organization creation/editing work through the backend API. The internal notification inbox of both cabinets lists and marks its notices; a sent invitation is the first product producer (see [Internal notifications](#internal-notifications)). The organization side of the invitation draft (list, create, read, and update with versioned terms) and the send to the candidate's inbox with the candidate's list of invitations work through the backend API; the candidate's answers are not implemented (see [Invitation drafts](#invitation-drafts) and [Sending invitations](#sending-invitations)). Other product workflows are not implemented: roles, profiles, assessments, grades, answering invitations, resume processing, PDF generation, and FSP integration. The deterministic basic match search of the organization-visible bank works through the backend API without ML, competition data, snapshots, or invitations (see [Matching and explanations](#matching-and-explanations)). ML does not return invented results. Health checks and the technical smoke do not verify a product workflow.
|
||||
Registration, email confirmation, login, and basic current-session operations work through the backend API and the frontend screens; local browser E2E covers candidate and employer accounts. The backend API and the cabinet screens also cover consents C1-C5 and the account deletion request; organizations, memberships, and employer needs; the manual candidate profile and the questionnaire with specializations and self-assessment; the public specialization catalog; assessment attempts (create, answers, finalize, result history, server signals, and skill evidence), where the task bank and the categories are demonstration data and uncalibrated; privacy settings and publication of the anonymous card; the internal notification inbox of both cabinets (see [Internal notifications](#internal-notifications)); and support cases. The manual assessment request is implemented as a support case of that type (`usecase/supportcase`, `frontend/src/features/request-manual-assessment`): it does not depend on consent C3, creates no attempt, changes no category, and only puts the case into the expert queue; the API has no operation for the expert side of that queue. The deterministic basic match search of the organization-visible bank works through the backend API without ML, competition data, or search snapshots (see [Matching and explanations](#matching-and-explanations)); category recommendations for a need are not computed, and the response carries an empty list (`domain/need_response.go`).
|
||||
|
||||
Invitations are implemented end to end (see [Invitation drafts](#invitation-drafts), [Sending invitations](#sending-invitations), [Candidate view and decline](#candidate-view-and-decline), [Candidate acceptance](#candidate-acceptance), [Pending limit, cooldown, and expiry](#pending-limit-cooldown-and-expiry), and [Contact reads and revocation](#contact-reads-and-revocation)): an organization creates and updates a draft with versioned terms and sends it; the invitation reaches the candidate's inbox and produces an internal notification; the candidate reads it, marks it viewed, declines it, or accepts it with consent C4 for the chosen contacts; after acceptance the organization reads the shared contacts, and the candidate can revoke the contact grant. The pending limit per need, the cooldown of the organization-candidate pair after a decline, and the expiry at the response deadline apply. The frontend has the invitation composer reached from a search result, the organization's invitation list (`pages/employer-invitations`), and the candidate inbox. The operations for withdrawal by the organization (`WithdrawOrganizationInvitation`), cancellation by the candidate (`CancelMyInvitation`), and the salary raise (`RaiseOrganizationInvitationSalary`) are in the contract but not implemented, and answer 501 `not_implemented`.
|
||||
|
||||
Not implemented: counter-offers and the stages after acceptance (interviews), password reset, resume upload and analysis, PDF, search snapshots and refinement, ML inference and semantic search (the backend does not call the ML client), FSP integration (the `adapter/secondary/fsp` directory is empty), the SMTP transport (the backend fails to start with `EMAIL_PROVIDER=smtp`; only Resend sends mail), PDF generation (the `adapter/secondary/pdf` directory is empty), and ATS adapters. ML does not return invented results. Health checks and the technical smoke do not verify a product workflow.
|
||||
|
||||
See [development](DEVELOPMENT.md), [deployment](DEPLOY.md), and [testing](TESTING.md) for source layout, commands, and current check coverage.
|
||||
|
||||
@@ -573,7 +577,7 @@ backend/
|
||||
middleware/ request log and request metrics by route template
|
||||
observe/ request-scoped observations, such as the problem code
|
||||
problem/ RFC 9457 error responses
|
||||
v1/ handwritten health endpoint
|
||||
v1/ handwritten handlers of the contract operations
|
||||
router.go chi composition
|
||||
adapter/secondary/
|
||||
argon2id/ Argon2id password hasher with a memory budget
|
||||
@@ -601,7 +605,7 @@ backend/
|
||||
|
||||
Domain types live directly in `backend/internal/domain/`: `user.go`, `candidate.go`, and other files as their models are defined. Do not nest directories by entity or feature. The first type is `DomainEvent` in `domain_event.go`, the validated event that a transaction writes to the outbox. Identity storage types live in `email_address.go`, `secret_token.go`, `user.go`, `email_token.go`, and `session.go`; the normalized password is in `password.go`. The consent ledger types live in `consent.go`. The organization, verification, and membership types live in `organization.go` and `membership.go`. The product policy and its versions live in `policy.go`, `policy_document.go`, `policy_version.go`, and `policy_demo.go`.
|
||||
|
||||
Outside the implemented identity and consent flows, domain types and usecases for other product workflows are not implemented. SMTP and FSP adapters, and product worker jobs, remain planned. `main.go` starts bootstrap and handles process errors. The public generated transport uses ogen v1.24.0 and the contracts declare OpenAPI 3.2.0. Verify only the feature subset used by the repository, not every specification feature.
|
||||
Outside the implemented flows (identity, consents, organizations, profile and questionnaire, assessment, needs and matching, invitations, support cases, notifications), usecases for documents and FSP achievements are not implemented. SMTP and FSP adapters remain planned; the product worker jobs are currently only the computation of the assessment review band and the expiry of an invitation at its response deadline. `main.go` starts bootstrap and handles process errors. The public generated transport uses ogen v1.24.0 and the contracts declare OpenAPI 3.2.0. Verify only the feature subset used by the repository, not every specification feature.
|
||||
|
||||
This is a compact map, not a claim that every planned product package exists. Current Go code includes health usecases and adapters, generated API clients, bootstrap with startup migrations, a PostgreSQL health query, the transactional outbox writer, the outbox relay that publishes committed events to Kafka through the franz-go adapter, the event consumer runtime with the `notification_delivery` and `notification_inbox` handlers, the internal notification inbox with its list and read-state operations, the scheduled job runtime (`worker/jobrunner`) with no registered product job kind, identity usecases for registration, resend, confirmation, and login, PostgreSQL sessions and a security boundary for every operation protected by the API contract, the consent usecase that records C1 during registration, the versioned policy store with its publisher and the demo policy seed at startup, the `PasswordHasher` port with the Argon2id adapter and checks used by registration, confirmation, and login, a Redis cache adapter, a SeaweedFS S3 adapter with the shared private file layer over it, the `MailSender` port with the `disabled` and Resend transports, the mail template renderer, and the identity mail worker used for registration and resend. Profiles, resumes, assessments, invitations, product job kinds, file workflows, the SMTP transport, and FSP adapters remain planned. Do not create empty module directories before a real use case exists.
|
||||
|
||||
@@ -658,7 +662,7 @@ These intervals are the accepted initial policy, stored as demo version 1 of the
|
||||
|
||||
### Assessment bank
|
||||
|
||||
Implemented as storage and a loader, not as a candidate-facing feature: migration `backend/db/migrations/00011_create_assessment_bank.sql`, queries in `backend/db/queries/assessment_bank.sql`, the domain types in `backend/internal/domain/` (`assessment_family.go`, `assessment_generator.go`, `assessment_algorithms.go`), the `outbound.AssessmentBankRepository` port (`port/outbound/assessment_bank.go`, reachable through `UnitOfWork.AssessmentBank()`), the sqlc-backed adapter in `backend/internal/adapter/secondary/postgres/assessment_bank.go`, and the loader in `backend/internal/usecase/assessment/` (`Bank`, `Bundle`). Nothing in bootstrap or the HTTP API calls it yet, and no category is open.
|
||||
Implemented as storage and a loader, not as a candidate-facing feature: migration `backend/db/migrations/00011_create_assessment_bank.sql`, queries in `backend/db/queries/assessment_bank.sql`, the domain types in `backend/internal/domain/` (`assessment_family.go`, `assessment_generator.go`, `assessment_algorithms.go`), the `outbound.AssessmentBankRepository` port (`port/outbound/assessment_bank.go`, reachable through `UnitOfWork.AssessmentBank()`), the sqlc-backed adapter in `backend/internal/adapter/secondary/postgres/assessment_bank.go`, and the loader in `backend/internal/usecase/assessment/` (`Bank`, `Bundle`). Bootstrap creates `assessment.NewBank` once (`bootstrap/catalog.go`, with its own small PostgreSQL pool) and hands it to `CatalogHandler`; HTTP uses only the read `Bank.SpecializationAvailability` for the public specialization catalog (`GET /api/v1/specializations`). HTTP does not call the loader operations (`ImportBundle`, `PublishFamily`, `RetireFamily`, `OpenCategory`): the demonstration seed command (`adapter/primary/cli/demoseed`, `usecase/demoseed`) and `cmd/questionnaire-fixture` call them, so no category is open in a build without the seed. Assessment attempts run through a separate `AttemptService` that reads the bank through the `UnitOfWork.AssessmentBank()` repository, not through `Bank`.
|
||||
|
||||
- Family version. One `assessment_families` row is one version of one family (`family_key`, `version`): category, specialization (the domain inside the category), title, author (`ai:<name>` or `operator:<handle>`), reviewer (`operator:<handle>` or NULL), `review_status` (`pending`, `approved`, `rejected`), the seed generator, the answer key, the rubric, a content hash with its `hash_scheme`, a lifecycle (`draft`, `published`, `retired`), and the operators and times of publication and retirement. The reviewer is never the author, and a review is pending exactly while there is no reviewer (CHECK constraints; the domain applies the same rules). The reviewer in a bundle and the operator of a publication are declared values, not authenticated identities, until reviewer and operator accounts exist.
|
||||
- Immutability. The content of a stored version never changes: the trigger `assessment_families_guard_update` refuses every UPDATE that changes a column other than the lifecycle columns (`lifecycle`, `published_at`, `published_by`, `retired_at`, `retired_by`), and `assessment_families_refuse_removal` refuses DELETE and TRUNCATE, all with SQLSTATE 23000 and the constraint name `assessment_families_immutable`, which the adapter maps to `outbound.ErrAssessmentFamilyImmutable`. The lifecycle moves only forward (draft, published, retired), the trigger sets the times and keeps the publisher through a retirement, and a version is published only with an approved review by a reviewer (`assessment_families_published_requires_review`). A change is a new version with the next number; the loader accepts only version 1 for a new family and the successor of the latest version otherwise. A pending draft is never approved in place: its review is recorded by importing a new version of the family that carries the review, and the pending version stays an unpublished draft. The domain recomputes the content hash when it reads a row and returns `ErrAssessmentFamilyIntegrity` for a row changed outside the application. The hash is the SHA-256 of a canonical JSON document that holds the content without the bundle name, ID, lifecycle, and publication fields. The `hash_scheme` column (a smallint with a CHECK of the known values, one of the immutable columns) names the layout: the domain verifies a row with the hash function of the scheme the row was stored with, so a later scheme (a new function and a new CHECK value, never an edit of scheme 1) verifies new rows without invalidating old ones, and a row with an unknown scheme is refused; tests verify a row with its own scheme and pin the scheme 1 hash of a fixed input. As for `policy_versions`, a role that owns the table can still disable the triggers.
|
||||
@@ -669,7 +673,7 @@ Implemented as storage and a loader, not as a candidate-facing feature: migratio
|
||||
- Lifecycle and the loader. `Bank.ImportBundle` stores every family of a bundle as a draft in one transaction and never publishes, whatever the review says; importing the same bundle again, also concurrently, reports the versions as unchanged. `Bank.PublishFamily` and `Bank.RetireFamily` take the operator, and refuse with a reason (`reviewer_missing`, `review_not_approved`, `not_draft`, `not_published`, `newer_version_published`); the refusal is a `*domain.AssessmentRefusalError` that carries the reason, and the sentinels of a race that the database decided (a lifecycle step that lost to another, a missing approved review, insufficient coverage) become the same refusals. Publishing, retiring, and opening take a transaction-scoped advisory lock of the category first, so they run one after another per category; `LockCategory` works only inside a transaction (the repository of a unit of work takes it, the standalone store returns `ErrAssessmentLockOutsideTransaction`).
|
||||
- Category availability. `Bank.OpenCategory` records an opening in `assessment_category_openings` under a referenced policy version (`policy_versions.id`); it refuses with `grading_policy_missing` for a missing or unknown reference and with `grading_policy_not_current` unless the version is the one of the `product` family in force now, judged against the database clock of the same transaction (`clock_timestamp()`), the clock that stamps the effective time of a policy version, so the bank defines no thresholds of its own and no application clock enters the decision. The number of distinct published families that a category needs is read from that policy: `RequiredPublishedAssessmentFamilies` returns `assessment.stop_rule.max_scored_items` plus `assessment.stop_rule.seed_items`. The owner accepted this rule as a product decision on 2026-10-06. The reason: one family gives at most one item to an attempt, so a full adaptive attempt, which can run to the maximum of scored items and also carries the seed items, cannot run out of families. The insert trigger derives the same number from the stored policy document itself (the same two JSON paths; an integration test keeps the SQL and the domain equal) and checks both values as plain non-negative integers of at most four digits before the cast, so a malformed document written around the application raises the `assessment_category_openings_policy_thresholds` refusal instead of a cast error. The trigger also counts the published families, and the CHECK constraint refuses the row when they are fewer, so a call written around the usecase cannot open a category with a lower requirement. The opening stores the policy version, the operator (`operator:<handle>`), and the required and counted families, and is never edited. Availability is live: `Bank.CategoryAvailability` returns the current opening only while the published families counted now still reach the opening's requirement, and otherwise refuses with `coverage_insufficient` (or `ErrAssessmentCategoryNotOpen` without an opening), so a retirement can close a category. It also refuses with `grading_policy_not_current` when the opening's policy version is no longer the one in force, so a policy change requires a new opening. The table checks the policy reference in the trigger instead of a foreign key, because PostgreSQL refuses TRUNCATE of a referenced table before the `policy_versions` trigger can refuse it with its own error. `ListFamilies` pages by (key, version) cursor with a hard limit of 200.
|
||||
- Demo bundle. `backend/testdata/assessment/backend_demo_bundle.json` holds four original practice problems for the category `backend`. They are an AI-generated draft (author `ai:claude-draft`) with a pending review and no reviewer, so the loader imports them as drafts, publication is refused, and the category stays closed. No human has reviewed the statements, solutions, rubrics, or difficulty; the bundle makes no validity or calibration claim. A real review produces a new version of the families that carries the approval.
|
||||
- Not implemented: authorship and review of a real task bank, blueprints per specialty and grade, selection of tasks for an attempt, the storage of attempts and answers, grading, an HTTP or admin interface, authenticated reviewer and operator identities, and a wiring of the loader in bootstrap.
|
||||
- Not implemented: authorship and review of a real task bank, blueprints per specialty and grade, an HTTP or admin interface of the loader and authenticated reviewer and operator identities (the storage of attempts, answers, and grading exist as separate assessment operations, not as part of the loader).
|
||||
|
||||
### Assessment signals and the review band
|
||||
|
||||
@@ -980,7 +984,7 @@ The anonymous card for organizations is not built here: `AnonymousCardContent` i
|
||||
|
||||
### Invitation drafts
|
||||
|
||||
Implemented: the organization side of the invitation draft, that is `ListOrganizationInvitations`, `CreateOrganizationInvitation`, `GetOrganizationInvitation`, and `UpdateOrganizationInvitation` ([contract](../../api/README.en.md#invitations-and-contact-grants)). A draft is invisible to the candidate and produces no inbox entry, no event, and no quota charge; the send is described in [Sending invitations](#sending-invitations). Withdrawal, the salary raise, the contact read, and the cancellation still answer 501 after the common checks; the candidate's read, view, decline, and acceptance are described in [Candidate view and decline](#candidate-view-and-decline) and [Candidate acceptance](#candidate-acceptance). Code: `domain/salary_range.go`, `domain/invitation_terms.go`, `domain/invitation.go`, `usecase/invitation/`, `adapter/primary/http/v1/invitation.go`, the PostgreSQL adapter `adapter/secondary/postgres/invitations.go` with `db/queries/invitations.sql`, and migration `00037_create_invitations.sql`.
|
||||
Implemented: the organization side of the invitation draft, that is `ListOrganizationInvitations`, `CreateOrganizationInvitation`, `GetOrganizationInvitation`, and `UpdateOrganizationInvitation` ([contract](../../api/README.en.md#invitations-and-contact-grants)). A draft is invisible to the candidate and produces no inbox entry, no event, and no quota charge; the send is described in [Sending invitations](#sending-invitations). Withdrawal, the salary raise, and the cancellation still answer 501 after the common checks; the contact read is described in [Contact reads and revocation](#contact-reads-and-revocation); the candidate's read, view, decline, and acceptance are described in [Candidate view and decline](#candidate-view-and-decline) and [Candidate acceptance](#candidate-acceptance). Code: `domain/salary_range.go`, `domain/invitation_terms.go`, `domain/invitation.go`, `usecase/invitation/`, `adapter/primary/http/v1/invitation.go`, the PostgreSQL adapter `adapter/secondary/postgres/invitations.go` with `db/queries/invitations.sql`, and migration `00037_create_invitations.sql`.
|
||||
|
||||
Tables:
|
||||
|
||||
@@ -1144,7 +1148,7 @@ The Go service exports standard Go/process metrics and the product metrics on an
|
||||
- API: `lincodex_http_requests_total{method,route,status}`, `lincodex_http_request_duration_seconds{method,route,status_class}`, and `lincodex_http_problems_total{route,code}`. `route` is the chi route template of an operational route and, under `/api/v1`, the OpenAPI path template of the matched operation, such as `/api/v1/me/invitations/{invitation_id}`, which the router resolves with the generated server's `FindPath`; a path or method without an operation keeps the mount pattern `/api/v1/*` or `/api/*`, and a path outside every route is `unmatched`. `status_class` is `1xx` to `5xx`. `code` is the RFC 9457 problem code: `problem.New` records it from the closed catalogue through the request-scoped `observe` package (`adapter/primary/http/observe/`), the middleware counts it only for a 4xx or 5xx response, and the adapter counts a code outside its mirrored list as `other`. An error without a problem body, such as `/readyz` 503, is counted by status only. The request log (`middleware.RequestLog`, which replaces the go-httpkit logger) uses the same route template and logs the request ID, method, status and class, problem code, latency, response size, and the number of query parameters, never the raw path, a query key or value, a header, the client address, or the user agent; `/healthz` and `/readyz` are not logged.
|
||||
- Outbox and events: the relay, consumer, and scheduled job metrics in [Outbox relay](#outbox-relay), [Event consumers](#event-consumers), and [Scheduled jobs](#scheduled-jobs). Outbox lag is `lincodex_outbox_relay_oldest_pending_age_seconds`.
|
||||
- Mail: `lincodex_mail_deliveries{kind,status}` for every kind and the statuses `pending`, `waiting_quota`, `unknown`, `accepted`, `rejected`, and `cancelled`, zero included; `lincodex_mail_sender_running`, 1 while this process's mail sending loop runs and 0 otherwise (per process, so aggregate it with `max`; it stays 0 with `EMAIL_PROVIDER=disabled`, where no loop starts); `lincodex_notification_sender_running` reports the same for the notification loop; `lincodex_mail_delivery_oldest_due_pending_age_seconds`, which counts only service mail (`domain.ServiceMailKinds`), so a notification backlog never looks overdue; `lincodex_mail_sender_cancelled_total{reason}`, deliveries the sending worker ended without sending, by the closed set of cancel reasons, zero included; and, for an active transport, `lincodex_mail_quota_used_recipients`, `lincodex_mail_quota_limit_recipients`, and `lincodex_mail_quota_provider_exhausted`, each with `provider` and `window` (`day` or `month`). The sampler in `backend/internal/worker/deliverymetrics/` reads them every 30 seconds on its own one-connection pool: `postgres.DeliveryStatisticsStore` aggregates `deliveries` by kind and status, and `MailQuotaUsageReader.Usage` reads the current windows of the configured account. The delivery aggregate is the sqlc query `GetDeliveryStatistics` in `db/queries/delivery.sql`. It scans the table, which suits the current volume; add an index or per-status counters before the table holds millions of rows. `EMAIL_ACCOUNT` is not a label: it is free operator text that can name a person, and each process reports only its own account. Every instance reports the same database-wide values; aggregate them with `max`. A failed read keeps the previous values and logs `delivery metrics could not be read; the gauges are stale`; `lincodex_mail_metrics_last_success_timestamp_seconds` shows the last read in which every aggregate was read (0 from the sampler start until the first one), and the age gauge exists only after the first successful read. There is no attempt outcome counter yet; the delivery states, the logs of the sending worker, and the `delivery_attempts` history show outcomes.
|
||||
- Assessment answers: `lincodex_assessment_answer_saves_total{format,outcome}` with the outcomes `stored`, `unchanged`, `rejected`, and `failed`. PRD 6.6 asks to observe the saving of answers; this is read as the assessment answer command `SubmitMyAssessmentAnswer`. The command is not implemented, so only the hook `Metrics.ObserveAssessmentAnswerSave` exists, and no series appears until the usecase calls it once per command. A value outside the closed sets becomes `other`. The HTTP latency and errors of the command already appear under the route `/api/v1/me/assessment-attempts/{attempt_id}/answers`.
|
||||
- Assessment answers: `lincodex_assessment_answer_saves_total{format,outcome}` with the outcomes `stored`, `unchanged`, `rejected`, and `failed`. PRD 6.6 asks to observe the saving of answers; this is read as the assessment answer command `SubmitMyAssessmentAnswer`. The command is implemented, but nothing calls the hook `Metrics.ObserveAssessmentAnswerSave` yet, and no series appears until the usecase calls it once per command. A value outside the closed sets becomes `other`. The HTTP latency and errors of the command already appear under the route `/api/v1/me/assessment-attempts/{attempt_id}/answers`.
|
||||
|
||||
Do not use user, candidate, delivery, or request IDs, full URLs or query strings, addresses, or resume content as labels. Unit tests drive the real router and every metric hook with email and UUID fixtures and fail when the exposition contains an email-like or UUID-like value. Go runtime, PostgreSQL, Redis, SeaweedFS, Linux, and Lincodex product dashboard JSON files are maintained project sources, not imported dashboard IDs. Inference metrics are not implemented in the current scaffold.
|
||||
|
||||
@@ -1158,19 +1162,19 @@ Alert rules in `observability/prometheus/rules/lincodex.yml` cover an unavailabl
|
||||
|
||||
| Brief requirement | Target decision | State |
|
||||
| --- | --- | --- |
|
||||
| Two portals and verified email, pp. 3-4 | identity, roles, company, access checks | Not implemented |
|
||||
| Manual or PDF resume, p. 3 | Manual profile first; PDF and ML extend it | Not implemented |
|
||||
| Two portals and verified email, pp. 3-4 | identity, roles, company, access checks | Implemented (no password reset) |
|
||||
| Manual or PDF resume, p. 3 | Manual profile first; PDF and ML extend it | Manual profile implemented; PDF and ML import are not |
|
||||
| Standard PDF, p. 3 | PDFRenderer with Cyrillic and access checks | Not implemented |
|
||||
| Questionnaire, grade, test, category, pp. 1-3 | assessment, variants, grade history | Not implemented |
|
||||
| Questionnaire, grade, test, category, pp. 1-3 | assessment, variants, grade history | Implemented on a demonstration bank; categories are uncalibrated |
|
||||
| Comparable tests and leak resistance, pp. 1-2 | Families, blueprint, rubrics, rotation, pilot | Planned |
|
||||
| No forced grade decrease and change frequency, pp. 2-3 | verified/claimed, retry, cooldown, eligibility | Planned |
|
||||
| Candidate search and explanation, pp. 3-4 | Hard filters, matching evidence, score components | Basic deterministic search implemented; ML, competition data, and snapshots are not |
|
||||
| Refine search without losing prior results, p. 4 | Versioned search runs and server snapshots | Planned |
|
||||
| Invitation without a vacancy, p. 3 | Optional vacancy_id | Not implemented |
|
||||
| RUB salary range and employer contact, p. 4 | Required bounds and explicit period/tax basis | Not implemented |
|
||||
| Status for both sides, p. 4 | State machine and event history | Not implemented |
|
||||
| Contacts after acceptance/application, pp. 3-4 | Contact grant, separate DTOs, file access check | Not implemented |
|
||||
| Privacy and access to own records, pp. 3, 6 | Consent, object/company authorization, cache and snapshot checks | Required, no implementation |
|
||||
| RUB salary range and employer contact, p. 4 | Required bounds and explicit period/tax basis | Implemented |
|
||||
| Status for both sides, p. 4 | State machine and event history | Partial: draft, delivered, viewed, accepted, declined, expired; later stages, withdrawal, and cancellation are not |
|
||||
| Contacts after acceptance/application, pp. 3-4 | Contact grant, separate DTOs, file access check | Contacts after acceptance implemented; files and candidate applications are not |
|
||||
| Privacy and access to own records, pp. 3, 6 | Consent, object/company authorization, cache and snapshot checks | Consents, publication, hidden organizations, history, and access checks implemented; no match snapshots |
|
||||
| FSP ID and missing history, pp. 2, 6 | External identity and fixture provider; empty history allowed | Real API unknown |
|
||||
| Real FSP integration | Port and separate DTO until API is supplied | Not implemented |
|
||||
| Recurring assessments, p. 3 | Consent, scheduled worker job, freshness signal | After MVP |
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
# Lincodex MVP: submission package
|
||||
|
||||
Verified commit: `c9f029471ed78ce5ec4583009abdc5a4c8c3bd97` (branch dev, 2026-10-10).
|
||||
|
||||
This document describes what the minimal release contains, how to run it, what limits the demonstration category, what is not implemented, and how the release was checked. Details live in the guides: [ARCHITECTURE](ARCHITECTURE.md), [DEPLOY](DEPLOY.md), [TESTING](TESTING.md), [SECURITY](SECURITY.md), [COMPANY_QUOTAS](COMPANY_QUOTAS.md), and the [frontend guide](../../frontend/README.en.md). The HTTP API contract is in [api/](../../api/README.en.md). The statements below are derived from the code, the contract, and these guides; planned behavior is kept apart from working behavior.
|
||||
|
||||
## 1. What is implemented
|
||||
|
||||
### Registration and sign-in
|
||||
|
||||
- Registration of a candidate and an employer with the C1 consent. The address is confirmed with a link from the email or with a six-digit code from the same email; after confirmation, sign-in returns the user to the saved step. See [registration and confirmation](ARCHITECTURE.md#registration-email-verification-and-resend).
|
||||
- Email is sent only with `EMAIL_PROVIDER=resend`. With `disabled`, registration is accepted but there is no way to confirm the address, and sign-in answers 403 `email_not_verified`. The prepared accounts of the demo stand are confirmed in advance. See [mail](DEPLOY.md#2-mail-resend-or-disabled).
|
||||
|
||||
### Candidate
|
||||
|
||||
- Consents C1-C5 in settings. C3 allows automatic categorization; without it, a manual assessment can be requested through a support case.
|
||||
- The profile is filled in manually, step by step, without a resume and without an FSP ID. The questionnaire holds specializations and self-assessment. The home page shows the next step. See [candidate profile](ARCHITECTURE.md#candidate-profile).
|
||||
- Skill assessment in two modes (see [assessment](ARCHITECTURE.md#assessment-and-grade-verification)):
|
||||
- the full `demo_basic` Backend Junior with Go test: 25 tasks from a synthetic bank, a 72-hour window, two work sessions, no practice. The result is compared with the pass mark of the policy version; on the demo stand a passed test gets a category with the basis `synthetic_demo`, otherwise the result is `not_confirmed`;
|
||||
- the `demo_express` test: three tasks; it never assigns a grade, a category, a percentile, or evidence and does not appear in the result history.
|
||||
- Results, history, and skill evidence are available to the candidate; the declared grade is always kept apart from the confirmed one. See [evidence](ARCHITECTURE.md#skill-evidence).
|
||||
|
||||
### Publication and visibility
|
||||
|
||||
- The anonymous card is published only after an explicit C2 and carries no name, contact, or salary amount. The candidate sees a preview built from the same response that the card for organizations uses.
|
||||
- Search status, hiding of individual organizations, change history, and the history of card views and contact reads. A card is shown to organizations only in a group of at least five. See [visibility](ARCHITECTURE.md#candidate-visibility).
|
||||
|
||||
### Employer
|
||||
|
||||
- Organizations (one account can own several), a company profile, and a step-by-step need with a salary range. A need stores requirement versions; a search by a version does not change after an edit. See [organizations](ARCHITECTURE.md#organizations-and-memberships).
|
||||
- Candidate search by a need or by the bank with filters: specialization, confirmed and declared grade, confirmation status, stack, work format, and salary compatibility. The result is split into the groups `main`, `near`, and `unconfirmed`, and the server builds the explanation (score components and unknown flags).
|
||||
- The baseline match works without ML: semantic similarity is a neutral 0.5 marked with the flag `ml_unavailable`; for a cohort below 30 the flag `cohort_below_30` is added. See [matching and explanations](ARCHITECTURE.md#matching-and-explanations).
|
||||
|
||||
### Invitations and contacts
|
||||
|
||||
- The organization creates a draft from a search result, changes the terms with versions, and sends the invitation with a salary range in rubles. Sending spends one place of the weekly quota; a pending limit applies per need, a pair pause applies after a decline, and an unanswered invitation expires at its deadline. See [drafts](ARCHITECTURE.md#invitation-drafts), [sending](ARCHITECTURE.md#sending-invitations), and [limit and expiry](ARCHITECTURE.md#pending-limit-cooldown-and-expiry).
|
||||
- A delivered invitation reaches the candidate inbox. The candidate marks it viewed, declines it, or accepts it with the C4 consent and a choice of contact fields. See [view and decline](ARCHITECTURE.md#candidate-view-and-decline) and [acceptance](ARCHITECTURE.md#candidate-acceptance).
|
||||
- Acceptance creates a contact grant for exactly this pair. The organization reads the chosen fields on the invitation page, and every read checks the grant and the visibility again. Revoking C4, revoking C2, closing the publication, and hiding the organization close the read at once; republishing does not reopen a closed grant. See [contact reads and revocation](ARCHITECTURE.md#contact-reads-and-revocation).
|
||||
|
||||
### Company isolation and holdings
|
||||
|
||||
- Organization operations answer a foreign identifier with the same refusal as for a random identifier. Search, invitations, and contact reads are available only to the owner of the organization.
|
||||
- Organizations of one account form a holding: E0 companies share common quotas (in the demonstration policy, 10 invitations per 7 days and 50 unique card views per 24 hours). The number of organizations per account is not limited. See [COMPANY_QUOTAS](COMPANY_QUOTAS.md#holding-pool).
|
||||
|
||||
### Notifications and mail
|
||||
|
||||
- An inbox in both cabinets; the only product source is a delivered invitation. The entry appears through the outbox, the relay, and Kafka after the commit, not inside the sending transaction. See [internal notifications](ARCHITECTURE.md#internal-notifications).
|
||||
- The invitation email goes through the outbox and the delivery consumer, and a separate notification loop (a worker in the backend process) sends it; before each send it checks the recipient rights again and leaves a quota reserve for service mail. The body is neutral and holds no contacts. See [sending product notifications](ARCHITECTURE.md#sending-product-notifications).
|
||||
- Support cases in both cabinets.
|
||||
|
||||
### Privacy guarantees
|
||||
|
||||
- Before the C4 record and the grant, the organization receives no contacts; cards, search results, invitation lists, and notifications contain no email, phone, or name.
|
||||
- The server log, outbox payloads, inbox rows, and mail requests carry no contact or profile values (checked by the isolation integration test, see section 5).
|
||||
- Organization responses contain no PDFs and no stored search snapshots: there are no such operations.
|
||||
|
||||
## 2. How to run
|
||||
|
||||
Run all commands from the repository root. You need Docker with Compose, GNU make, python3, and openssl; no GPU or external keys are required. Full instructions: [quick start](DEPLOY.md#running-the-mvp-quick-start).
|
||||
|
||||
### Working stand
|
||||
|
||||
cp .env.example .env # replace every replace-this-... value and set IDENTITY_KEY_SECRET
|
||||
make -C deploy config
|
||||
make -C deploy up
|
||||
curl http://localhost:8080/api/v1/healthz
|
||||
|
||||
Open http://localhost:8080 (the value of `APP_PUBLIC_URL`). For email, set `EMAIL_PROVIDER=resend`, `RESEND_API_KEY`, and `EMAIL_FROM` in the server environment. A clean stand holds migrations and the starting policy; operator steps (`DATABASE_URL` is required):
|
||||
|
||||
1. Publish the matching section; without it the search answers 500: `make -C backend policy-publish ARGS='matching --actor operator:<handle>'`. See [match search policy](DEPLOY.md#match-search-policy-on-a-stand).
|
||||
2. For a passed full test to receive the demonstration category, set `ASSESSMENT_DEMO_CATEGORIES_ENABLED=true`, restart the backend, and attest the category opening with `make -C backend assessment-category-attest ARGS='attest --specialization backend --grade intern --task-language go --actor operator:<handle>'`. Publishing a new policy version requires a new opening and a new attestation, so do step 1 before candidates start attempts. See [demonstration categories](DEPLOY.md#demonstration-categories-on-a-stand).
|
||||
|
||||
The task bank is not loaded on the core stand, and the DEPLOY guide describes loading it only as part of the demo stand seed, so a test cannot be started on the core stand. Use the demo stand to show the full path.
|
||||
|
||||
### Demo stand and the jury route
|
||||
|
||||
make -C deploy demo-seed DEMO_MODE=isolated
|
||||
|
||||
The command starts a separate project at http://localhost:8090, publishes the policy with the matching section, loads the synthetic bank, attests the category, and creates the accounts `candidate@`, `prepared-1@` to `prepared-6@`, `employer-alpha@`, and `employer-beta@` in the domain `demo.lincodex.test`; the password comes from `deploy/demo/demo.env` or `demo.env.example`. The jury guide is at http://localhost:8090/demo; it takes eight minutes and exists only in the build of this stand. The route: the express and full tests of the candidate, prepared candidates with published cards, a need and a search by the owner of "Alpha", an invitation, acceptance with C4, and a contact read. See [demo stand](DEPLOY.md#3-demo-stand), [route](DEPLOY.md#4-demonstration-route), and [isolated stand](DEPLOY.md#isolated-demo-stand). Reset: `make -C deploy demo-reset DEMO_MODE=isolated` (it refuses when the stand holds ordinary accounts).
|
||||
|
||||
### Restoring from a release manifest
|
||||
|
||||
make -C deploy release-build
|
||||
make -C deploy release-smoke
|
||||
make -C deploy release-e2e
|
||||
make -C deploy release-manifest RELEASE_ID=<id>
|
||||
make -C deploy release-up RELEASE_ID=<id>
|
||||
make -C deploy release-manifest-verify RELEASE_ID=<id> RELEASE_VERIFY_PROJECT=<project>
|
||||
make -C deploy demo-seed DEMO_MODE=isolated RELEASE_ID=<id>
|
||||
|
||||
The manifest is immutable: it pins the sources, lockfiles, Compose files, and image IDs, and `release-up` starts those images without building or pulling and checks the hashes. A manifest is published only for a clean tree and after successful smoke and E2E runs on those images. `release-manifest-verify` compares the running containers with the manifest. A demo stand restored from a manifest has no `/demo` guide because it uses the frontend of the main release. The assessment bank is not snapshotted in the manifest (`product_data_status` is `partial`). See [release manifest](DEPLOY.md#release-manifest).
|
||||
|
||||
## 3. Limits of the demonstration category
|
||||
|
||||
- The task bank is small and synthetic: 25 families for the full test and three for the express test. The families go through the regular publication pipeline with author and reviewer labels, but their content did not receive a subject-matter review.
|
||||
- Thresholds are not calibrated, no percentile is computed, and there is no adaptive test. The result shows the mechanics, not a measured qualification.
|
||||
- In the API the category basis is `synthetic_demo`, described in the contract as a demonstration category that is not a validated measurement. By the product owner's decision the interface shows it as an ordinary confirmation (the label "Test result"). The API and this documentation keep the basis.
|
||||
- The express test assigns no grade under any settings.
|
||||
- The consent texts C1-C5 are published by migrations as `demo`, without legal review. Do not register real people on the demo stand.
|
||||
|
||||
## 4. What is not implemented
|
||||
|
||||
The following belongs to the full product and does not work in this release:
|
||||
|
||||
- coding practice (a sandbox) and an adaptive test;
|
||||
- the final bargaining round and counter-offers: no operation creates the `counter` state, and a salary raise answers 501 `not_implemented`;
|
||||
- interview scheduling and reminders;
|
||||
- withdrawal of an invitation by the organization and cancellation by the candidate: both operations answer 501;
|
||||
- roles other than the owner and need assignments: only the owner of an organization can search, invite, and read contacts;
|
||||
- PDF documents and stored search snapshots;
|
||||
- category recommendations for a need: the need response reports the state `pending` or `not_available` with an empty list;
|
||||
- enabled ML inference: the ML service starts separately without a model, and the backend does not call it;
|
||||
- FSP integration: there is no mode, fixture provider, or call to an external API;
|
||||
- the SMTP transport: selecting `EMAIL_PROVIDER=smtp` stops the backend at startup;
|
||||
- ATS integration;
|
||||
- password reset, resume upload and parsing, and emails for events other than confirmation and a new invitation.
|
||||
|
||||
## 5. How it was verified
|
||||
|
||||
Acceptance result on the verified commit (2026-10-10): `make verify` passed, including 110 integration tests and the technical smoke; `make -C deploy test-e2e-registration` - 95 passed, 1 skipped; `make -C deploy test-e2e` - 64 passed, 32 skipped; `make -C security install test check` and `make security-images` passed with no blocking findings (the scanners ran in a Linux container, as in CI, because their installer supports only Linux; the exception for CVE-2026-93687 is valid until 2026-10-19). The boundaries of every check are described in [TESTING](TESTING.md#commands).
|
||||
|
||||
| Check | What it proves |
|
||||
| --- | --- |
|
||||
| `make verify` | Contract generation without drift, formatting, linters, types, build, Compose, documentation, backend with the race detector, integration tests on PostgreSQL, Redis, SeaweedFS, and Kafka, and a technical smoke |
|
||||
| `make -C deploy smoke` | Stack startup, dependency readiness, and dependency failures; it does not check a business flow |
|
||||
| `make -C deploy test-e2e` | The Playwright suite on a throwaway stack with mail disabled, including `mail-unavailable.spec.ts`: the user sees that the email may arrive later and cannot sign in before confirmation |
|
||||
| `make -C deploy test-e2e-registration` | Registration, confirmation by link and by code, and sign-in through the local Resend-compatible inbox, and within it `acceptance-path.spec.ts` |
|
||||
| `acceptance-path.spec.ts` | The minimal path on the real backend: five candidates, the full test with a `synthetic_demo` category, publication, a need, a search with an explanation and a filter, invitations, acceptance with C4, a contact read, a decline, C2 revocation, and no duplicates after a refresh and a double acceptance. See [the path to contacts](TESTING.md#minimal-path-from-registration-to-disclosed-contacts) |
|
||||
| `TestCompanyIsolationAndRevocationOverHTTP` | Isolation of companies and candidates, immediate closure after hiding and after revoking C4 and C2, and no contacts in the log, outbox, inbox, and mail requests. See [organization tests](TESTING.md#organization-tests) |
|
||||
| `TestInvitationNoticesSurviveRelayAndConsumerRestarts` | Exactly one notice and one email per recipient after relay and consumer restarts and a lost offset |
|
||||
| `TestHoldings`, `TestCompanyQuota` | The shared E0 quota pool inside a holding and no overrun under concurrent reservations |
|
||||
| `make -C security check`, `make -C security images` | Dependency vulnerabilities, secrets, dangerous constructs, and images; see [SECURITY](SECURITY.md) |
|
||||
| `make -C deploy check-demo`, `make docs-check` | Guards of the demo stand targets and the documentation structure |
|
||||
| `make -C deploy release-smoke`, `release-e2e` | The same smoke and browser suite on the release images; a passing run produces evidence for the manifest |
|
||||
|
||||
The checks do not prove: assessment calibration, match accuracy, email delivery through the real Resend, operation behind HTTPS, and production load.
|
||||
Reference in new issue
Block a user