chore: remove backlog references from code and documentation

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 01:38:49 +03:00
1 parent 0529601021
commit 8e7ce8d71c
129 files changed
+699 -701

No files matched your search

@@ -1,5 +1,5 @@
-- +goose Up
-- Sending of service identity mail (TASK-016). The sending worker claims a
-- Sending of service identity mail. The sending worker claims a
-- due delivery under a lease, checks that the token and the account behind
-- it are still current, and ends a delivery that must not be sent in a
-- terminal non-sent status with a reason.
@@ -112,8 +112,8 @@ ALTER TABLE deliveries ADD CONSTRAINT deliveries_body_present CHECK (
);
-- Serves the claim of due service mail. The predicate names the kinds the
-- sending worker handles, so rows of other kinds (notifications, which wait
-- for TASK-462) never enter the index and an idle poll does not scan them.
-- sending worker handles, so rows of other kinds (product notifications)
-- never enter the index and an idle poll does not scan them.
-- The claim query repeats the kind literals so the planner can use it.
CREATE INDEX deliveries_due_idx
ON deliveries (next_attempt_at, id)
@@ -1,5 +1,5 @@
-- +goose Up
-- The manual candidate profile (PRD FR02, TASK-066): full name and contacts,
-- The manual candidate profile (PRD FR02): full name and contacts,
-- stack, roles, work experience, soft skills, and desired terms, each value
-- with its confirmation state and provenance. Enum-like columns are text with
-- CHECK constraints, as in the identity tables.
@@ -1,5 +1,5 @@
-- +goose Up
-- Visibility of the candidate card (PRD FR02 and FR12, TASK-088): the
-- Visibility of the candidate card (PRD FR02 and FR12): the
-- publication, the search status, the organizations the candidate hides the
-- profile from, and the history of these settings. Enum-like columns are text
-- with CHECK constraints, as in the other tables.
+1 -1
View File
@@ -1,4 +1,4 @@
-- Queries of the manual candidate profile (TASK-066). The profile is personal
-- Queries of the manual candidate profile. The profile is personal
-- data of the account that owns it: every statement is scoped by user_id, and
-- no statement selects another account's row. None of them names a file, the
-- ML service, or an FSP account, because the profile needs none.
+2 -2
View File
@@ -1,4 +1,4 @@
-- Queries of the candidate visibility settings (TASK-088): the publication of
-- Queries of the candidate visibility settings: the publication of
-- the card, the search status, the hidden organizations, and the history of
-- these settings. Every statement is scoped by the candidate's user_id, and
-- no statement selects another account's row. No statement reads or writes a
@@ -285,7 +285,7 @@ FOR SHARE;
-- organization. No row means the organization reads nothing, whichever of
-- the reasons applies, so it cannot tell a hidden candidate from an
-- unpublished one. Every organization-facing read of a publication starts
-- from this shape (TASK-185, TASK-089, TASK-090).
-- from this shape.
-- name: ReadPublicationVisibleToOrganization :one
SELECT
effective.user_id,
+1 -1
View File
@@ -1016,7 +1016,7 @@ func TestServiceMailSending(t *testing.T) {
}
sender := harness.newSender(t, harness.transactor, 100, 3000)
if result := harness.pass(ctx, t, sender); result.Outcome != inbound.MailPassIdle || len(fixture.Requests()[calls:]) != 0 {
t.Fatalf("pass = %+v with %d provider calls, want idle and none: notifications belong to TASK-462", result, len(fixture.Requests()[calls:]))
t.Fatalf("pass = %+v with %d provider calls, want idle and none: product notification sending is not implemented", result, len(fixture.Requests()[calls:]))
}
if got := harness.delivery(ctx, t, delivery.ID()); got.Status() != domain.DeliveryStatusPending || got.AttemptCount() != 0 {
t.Fatalf("the notification is %s with %d attempts, want it untouched", got.Status(), got.AttemptCount())
@@ -48,11 +48,11 @@ func (c *codeRecorder) Unwrap() http.ResponseWriter {
// 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 (TASK-062), creates the
// contact grant for exactly those fields, and writes the audit event (TASK-201). 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.
// 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
@@ -62,9 +62,9 @@ func (c *codeRecorder) Unwrap() http.ResponseWriter {
// 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. TASK-197,
// TASK-201, and TASK-204 say 409 for stale terms; 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.
// 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
@@ -72,8 +72,8 @@ func (c *codeRecorder) Unwrap() http.ResponseWriter {
// 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 (TASK-064). Of two concurrent acceptances only one
// makes the transition.
// 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
@@ -330,7 +330,7 @@ func (s *Server) handleAcceptMyInvitationRequest(args [1]string, argsEscaped boo
// 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 (TASK-064).
// 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
@@ -1048,10 +1048,10 @@ func (s *Server) handleCreateMyAssessmentAttemptRequest(args [0]string, argsEsca
// `manual_assessment` | candidate | optional; a prior `assessment_attempt` of the caller in the same specialization | required `assessment_target`
//
// An organization is visible to a candidate when it sent the candidate an invitation or when the
// organization contract (TASK-077) shows the candidate its profile, and to an employer account when
// the account has an active membership in it. Invitations are in the contract (TASK-196) but not
// implemented yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat
// review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409
// organization contract shows the candidate its profile, and to an employer account when the account
// has an active membership in it. Invitations are in the contract but not implemented yet, so until
// they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not
// either, so until review decisions are implemented, every anti-cheat appeal answers 409
// state_conflict. The schema rejects an object type that the case type does not accept, for example an
// organization in a grade appeal.
//
@@ -1631,7 +1631,7 @@ func (s *Server) handleCreateOrganizationRequest(args [0]string, argsEscaped boo
// indicator-relevant setting: it counts against the limit shared by the whole organization with the
// ranges of needs, at most three settings a day, and against the withheld counter, after five settings
// within seven days the indicator is `withheld` for seven days from the fifth, on every draft and
// invitation of the organization (PRD FR13, planned in TASK-211; see InvitationSalaryFit). Over the
// invitation of the organization (PRD FR13, enforcement planned; see InvitationSalaryFit). Over the
// limit the server answers 429 with Retry-After and creates nothing.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
@@ -1913,10 +1913,10 @@ func (s *Server) handleCreateOrganizationInvitationRequest(args [1]string, argsE
//
// Salary limit: setting a salary range counts against a limit shared by the whole organization, every
// member and every need, on creation as on a change: at most three range settings a day (PRD FR13,
// planned in TASK-211). Over the limit the server answers 429 with Retry-After and creates nothing.
// enforcement planned). Over the limit the server answers 429 with Retry-After and creates nothing.
// After five settings within seven days the money component of the recommendations is `withheld` for
// seven days. The limit keeps an organization from probing hidden candidate minimums with new needs
// instead of edits; repeated range changes also feed the private risk signals of TASK-319.
// instead of edits; repeated range changes also feed the private organization risk signals.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
// nothing, so a lost response never creates a second need. A different body with the same key answers
@@ -5051,9 +5051,9 @@ func (s *Server) handleGetMyQuestionnaireRequest(args [0]string, argsEscaped boo
//
// The case must belong to the account of the session: a case of another account, including another
// member of the same organization, answers 404 not_found, the same as an unknown identifier, so
// identifiers cannot be probed. TASK-314 says forbidden for a foreign case URL; the contract answers
// 404 instead, so the client shows the same "not found" state for a foreign and an unknown case. A
// malformed `case_id` answers 400 validation_failed with the path pointer.
// identifiers cannot be probed. The contract answers 404, so the client shows the same "not found"
// state for a foreign and an unknown case. A malformed `case_id` answers 400 validation_failed with
// the path pointer.
//
// GET /api/v1/me/support-cases/{case_id}
func (s *Server) handleGetMySupportCaseRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) {
@@ -5693,8 +5693,7 @@ func (s *Server) handleGetOrganizationInvitationRequest(args [2]string, argsEsca
// handleGetOrganizationInvitationContactsRequest handles GetOrganizationInvitationContacts operation.
//
// Requires the session cookie of an employer account with an active membership in `org_id`. In the MVP
// only the owner of the organization reads contacts (TASK-202); the other roles of PRD FR07 are
// planned.
// only the owner of the organization reads contacts; the other roles of PRD FR07 are planned.
//
// This is the only operation that returns contact values, and its response is separate from the terms
// and from the invitation. It answers only while a grant created by the acceptance of this invitation
@@ -5714,8 +5713,8 @@ func (s *Server) handleGetOrganizationInvitationRequest(args [2]string, argsEsca
// Withdrawing the invitation keeps an existing grant. A later publication of the profile never reopens
// a closed grant; only a new explicit C4 creates a new one.
//
// Every successful read is recorded in the access audit (planned in TASK-090 and TASK-202), and the
// response has `Cache-Control: no-store`.
// Every successful read is recorded in the access audit (planned with the contact access history), and
// the response has `Cache-Control: no-store`.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate
// account answers 403 forbidden; an account without an active membership in the organization, an
@@ -6566,8 +6565,8 @@ func (s *Server) handleHideOrganizationRequest(args [1]string, argsEscaped bool,
// hidden organization cannot read the card.
//
// The storage of accesses is planned with the card and contact operations of the organization side
// (TASK-185 and the contact read of the invitation contract); until then the operation answers 501
// not_implemented after the session and request checks.
// (anonymous card reads and contact reads under the invitation contract); until then the operation
// answers 501 not_implemented after the session and request checks.
//
// 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.
@@ -6791,10 +6790,10 @@ func (s *Server) handleListMyCardAccessHistoryRequest(args [0]string, argsEscape
// 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 (TASK-088).
// changes are evidence of the publication history.
//
// Granting c1, c2, c3, and c5 in the consent settings and revoking any purpose are planned operations
// of this tag (TASK-063 and TASK-064); c1 is given at registration and c4 only in AcceptMyInvitation.
// of this tag; c1 is given at registration and c4 only in AcceptMyInvitation.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated. A malformed
// `limit`, `cursor`, or `state` answers 400 validation_failed.
@@ -10080,9 +10079,9 @@ func (s *Server) handleSaveMyQuestionnaireRequest(args [0]string, argsEscaped bo
// Sends the current terms version of a `draft`. Sending is internal and never visible as a state: in
// one transaction the server records the delivery, creates the candidate's inbox entry, starts the
// deadline `response_deadline_at = delivered_at + response_period_days`, spends one invitation of the
// weekly organization quota, and writes the outbox event for the notification (TASK-199), then answers
// 200 with the state `delivered`. A successful answer therefore means the candidate can already read
// the invitation; an email is a separate notification that never blocks or delays it, and its retries
// weekly organization quota, and writes the outbox event for the notification, then answers 200 with
// the state `delivered`. A successful answer therefore means the candidate can already read the
// invitation; an email is a separate notification that never blocks or delays it, and its retries
// never move the deadline. No contact of the candidate is disclosed by sending.
//
// The server checks again that the candidate is still visible to the organization: a revoked
@@ -10090,8 +10089,8 @@ func (s *Server) handleSaveMyQuestionnaireRequest(args [0]string, argsEscaped bo
// which. It also enforces the limits of the product policy: at most 20 invitations waiting for an
// answer per need (`delivered`, `viewed`, `counter`) and the 30-day pause for the pair of the
// organization and the candidate after a decline or a no deal, regardless of the member or the need,
// both with 409 state_conflict; and the rolling weekly quota of the organization (TASK-087), with 429
// and Retry-After. The pending limit and the quota are planned in TASK-205 and TASK-087.
// both with 409 state_conflict; and the rolling weekly quota of the organization, with 429 and
// Retry-After. Enforcement of the pending limit and the organization quota is planned.
//
// Repeats return the same result: a retry with the same Idempotency-Key replays the stored response,
// and a send of an invitation that was already sent answers 200 with the invitation in its current
@@ -10355,18 +10354,18 @@ func (s *Server) handleSendOrganizationInvitationRequest(args [2]string, argsEsc
// 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,
// TASK-063) 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 (TASK-064) 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.
// 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
@@ -11662,11 +11661,11 @@ func (s *Server) handleUpdateOrganizationRequest(args [1]string, argsEscaped boo
// candidate's minimum for the offered formats, and switching formats or the basis would otherwise
// probe the minimum for free. Such a change counts against the limit shared by the organization with
// needs and other drafts, at most three settings a day, and against the withheld counter, which
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13, planned in
// TASK-211; see InvitationSalaryFit). Over the limit the server answers 429 with Retry-After and
// changes nothing. A change that keeps the range, the basis, and the formats does not count. The
// operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a body that
// changes nothing answers 200.
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13,
// enforcement planned; see InvitationSalaryFit). Over the limit the server answers 429 with
// Retry-After and changes nothing. A change that keeps the range, the basis, and the formats does not
// count. The operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a
// body that changes nothing answers 200.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -11955,10 +11954,10 @@ func (s *Server) handleUpdateOrganizationInvitationRequest(args [2]string, argsE
//
// Salary limit: the recommendations aggregate candidates' minimums against the upper bound, so setting
// or changing a confirmed salary range counts against a limit shared by the whole organization, every
// member and every need, together with ranges set on creation: at most three a day (PRD FR13, planned
// in TASK-211). Over the limit the server answers 429 with Retry-After and changes nothing. After five
// settings within seven days the money component is `withheld` for seven days. Repeated range changes
// also feed the private risk signals of TASK-319.
// member and every need, together with ranges set on creation: at most three a day (PRD FR13,
// enforcement planned). Over the limit the server answers 429 with Retry-After and changes nothing.
// After five settings within seven days the money component is `withheld` for seven days. Repeated
// range changes also feed the private organization risk signals.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -12210,7 +12209,7 @@ func (s *Server) handleUpdateOrganizationNeedRequest(args [2]string, argsEscaped
// 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 (TASK-200) is an explicit command, so reading the invitation with
// 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
@@ -193,14 +193,14 @@ func (s *AccountScenario) UnmarshalText(data []byte) error {
// The anonymous candidate card as an organization reads it. Only values that the candidate confirmed
// reach it; an unconfirmed suggestion and an unknown value never do. A free text value (a stack tag, a
// soft skill, the location) that looks like a contact (an email address, a phone number, a URL or
// domain, a Telegram link, an @handle) is dropped by the builder (TASK-089) and never published. 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
// domain, a Telegram link, an @handle) is dropped by the builder and never published. 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 search ranking and the full card of an organization's search
// result are defined by the search contract (TASK-185), which reuses this content.
// result are defined by the search contract, which reuses this content.
// Ref: #/components/schemas/AnonymousCardContent
type AnonymousCardContent struct {
// Categories confirmed by assessment results, or null.
@@ -4245,8 +4245,8 @@ func (s *ConsentPurpose) UnmarshalText(data []byte) error {
//
// - 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 (TASK-088), not of this
// record. Adding a field scope to c2 records later is an additive change.
// 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
@@ -4574,8 +4574,7 @@ func (s *ConsentRevocationSource) UnmarshalText(data []byte) error {
// 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, TASK-063
// and TASK-064).
// - 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.
@@ -4878,7 +4877,7 @@ func (s *ContactConsentOffer) SetAvailableFields(val []ContactFieldKind) {
// 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 ledger of TASK-062).
// fields, the invitation, and its terms version (the consent ledger).
// Ref: #/components/schemas/ContactConsentText
type ContactConsentText struct {
TextVersion ConsentTextVersion `json:"text_version"`
@@ -4911,8 +4910,8 @@ func (s *ContactConsentText) SetText(val string) {
// 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,
// TASK-066), which must store the same formats; see ContactFieldKind.
// revocation closes the next read at once. The value formats depend on the profile contract (FR02),
// which must store the same formats; see ContactFieldKind.
// Ref: #/components/schemas/ContactDisclosure
type ContactDisclosure struct {
// Invitation whose acceptance created the grant.
@@ -5045,10 +5044,10 @@ func (*ContactDisclosureHeaders) getOrganizationInvitationContactsRes() {}
// - 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,
// TASK-066) 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.
// 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.
// Ref: #/components/schemas/ContactFieldKind
type ContactFieldKind string
@@ -7244,9 +7243,9 @@ type InvitationRoleTitle string
// `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 limit of TASK-211). 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.
// 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.
//
@@ -8031,8 +8030,8 @@ func (*LogoutNoContent) logoutRes() {}
// - 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 (TASK-082, TASK-084) must not reactivate it on their own. Who removed the member and
// why become additive fields of the member management.
// 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
@@ -9194,7 +9193,7 @@ func (s *NeedMoneyFit) SetShare(val NilFloat64) {
// - no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and
// `share` is null.
// - withheld: the organization changed salary ranges five times within seven days, so salary
// aggregates are withheld for seven days (PRD FR13, planned in TASK-211); the policy uses the
// aggregates are withheld for seven days (PRD FR13, enforcement planned); the policy uses the
// neutral value 0.5 and `share` is null.
//
// An unknown candidate minimum never counts as zero.
@@ -16289,7 +16288,7 @@ type OrganizationMembership struct {
State MembershipState `json:"state"`
// 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`, TASK-082).
// (`activated_at`).
JoinedAt Timestamp `json:"joined_at"`
}
@@ -20913,8 +20912,8 @@ func (s *SupportCase) SetUpdatedAt(val Timestamp) {
}
// Who caused an event, by kind only. A case never names or identifies a moderator, an expert, or a
// support agent; experts and moderators of TASK-316 and TASK-323 are `support` too. Adding a value is
// a contract change.
// 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.
@@ -21949,8 +21948,8 @@ func (s *SupportCaseEvent) SetMessage(val NilSupportCasePublicText) {
}
// 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
// (TASK-317) is another `decision` event, so neither needs a new value.
// 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.
@@ -22208,12 +22207,12 @@ func (s *SupportCaseObjectReference) SetID(val uuid.UUID) {
// 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
// TASK-272.
// 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 (TASK-196) but
// not implemented yet; until they are, every invitation reference answers 404 not_found.
// - 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.
//
@@ -23,11 +23,11 @@ type Handler interface {
// 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 (TASK-062), creates the
// contact grant for exactly those fields, and writes the audit event (TASK-201). 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.
// 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
@@ -37,9 +37,9 @@ type Handler interface {
// 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. TASK-197,
// TASK-201, and TASK-204 say 409 for stale terms; 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.
// 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
@@ -47,8 +47,8 @@ type Handler interface {
// 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 (TASK-064). Of two concurrent acceptances only one
// makes the transition.
// 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
@@ -74,7 +74,7 @@ type Handler interface {
// 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 (TASK-064).
// 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
@@ -186,10 +186,10 @@ type Handler interface {
// `manual_assessment` | candidate | optional; a prior `assessment_attempt` of the caller in the same specialization | required `assessment_target`
//
// An organization is visible to a candidate when it sent the candidate an invitation or when the
// organization contract (TASK-077) shows the candidate its profile, and to an employer account when
// the account has an active membership in it. Invitations are in the contract (TASK-196) but not
// implemented yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat
// review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409
// organization contract shows the candidate its profile, and to an employer account when the account
// has an active membership in it. Invitations are in the contract but not implemented yet, so until
// they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not
// either, so until review decisions are implemented, every anti-cheat appeal answers 409
// state_conflict. The schema rejects an object type that the case type does not accept, for example an
// organization in a grade appeal.
//
@@ -315,7 +315,7 @@ type Handler interface {
// indicator-relevant setting: it counts against the limit shared by the whole organization with the
// ranges of needs, at most three settings a day, and against the withheld counter, after five settings
// within seven days the indicator is `withheld` for seven days from the fifth, on every draft and
// invitation of the organization (PRD FR13, planned in TASK-211; see InvitationSalaryFit). Over the
// invitation of the organization (PRD FR13, enforcement planned; see InvitationSalaryFit). Over the
// limit the server answers 429 with Retry-After and creates nothing.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
@@ -366,10 +366,10 @@ type Handler interface {
//
// Salary limit: setting a salary range counts against a limit shared by the whole organization, every
// member and every need, on creation as on a change: at most three range settings a day (PRD FR13,
// planned in TASK-211). Over the limit the server answers 429 with Retry-After and creates nothing.
// enforcement planned). Over the limit the server answers 429 with Retry-After and creates nothing.
// After five settings within seven days the money component of the recommendations is `withheld` for
// seven days. The limit keeps an organization from probing hidden candidate minimums with new needs
// instead of edits; repeated range changes also feed the private risk signals of TASK-319.
// instead of edits; repeated range changes also feed the private organization risk signals.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
// nothing, so a lost response never creates a second need. A different body with the same key answers
@@ -699,9 +699,9 @@ type Handler interface {
//
// The case must belong to the account of the session: a case of another account, including another
// member of the same organization, answers 404 not_found, the same as an unknown identifier, so
// identifiers cannot be probed. TASK-314 says forbidden for a foreign case URL; the contract answers
// 404 instead, so the client shows the same "not found" state for a foreign and an unknown case. A
// malformed `case_id` answers 400 validation_failed with the path pointer.
// identifiers cannot be probed. The contract answers 404, so the client shows the same "not found"
// state for a foreign and an unknown case. A malformed `case_id` answers 400 validation_failed with
// the path pointer.
//
// GET /api/v1/me/support-cases/{case_id}
GetMySupportCase(ctx context.Context, params GetMySupportCaseParams) (GetMySupportCaseRes, error)
@@ -755,8 +755,7 @@ type Handler interface {
// GetOrganizationInvitationContacts implements GetOrganizationInvitationContacts operation.
//
// Requires the session cookie of an employer account with an active membership in `org_id`. In the MVP
// only the owner of the organization reads contacts (TASK-202); the other roles of PRD FR07 are
// planned.
// only the owner of the organization reads contacts; the other roles of PRD FR07 are planned.
//
// This is the only operation that returns contact values, and its response is separate from the terms
// and from the invitation. It answers only while a grant created by the acceptance of this invitation
@@ -776,8 +775,8 @@ type Handler interface {
// Withdrawing the invitation keeps an existing grant. A later publication of the profile never reopens
// a closed grant; only a new explicit C4 creates a new one.
//
// Every successful read is recorded in the access audit (planned in TASK-090 and TASK-202), and the
// response has `Cache-Control: no-store`.
// Every successful read is recorded in the access audit (planned with the contact access history), and
// the response has `Cache-Control: no-store`.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate
// account answers 403 forbidden; an account without an active membership in the organization, an
@@ -891,8 +890,8 @@ type Handler interface {
// hidden organization cannot read the card.
//
// The storage of accesses is planned with the card and contact operations of the organization side
// (TASK-185 and the contact read of the invitation contract); until then the operation answers 501
// not_implemented after the session and request checks.
// (anonymous card reads and contact reads under the invitation contract); until then the operation
// answers 501 not_implemented after the session and request checks.
//
// 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.
@@ -918,10 +917,10 @@ type Handler interface {
// 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 (TASK-088).
// changes are evidence of the publication history.
//
// Granting c1, c2, c3, and c5 in the consent settings and revoking any purpose are planned operations
// of this tag (TASK-063 and TASK-064); c1 is given at registration and c4 only in AcceptMyInvitation.
// of this tag; c1 is given at registration and c4 only in AcceptMyInvitation.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated. A malformed
// `limit`, `cursor`, or `state` answers 400 validation_failed.
@@ -1296,9 +1295,9 @@ type Handler interface {
// Sends the current terms version of a `draft`. Sending is internal and never visible as a state: in
// one transaction the server records the delivery, creates the candidate's inbox entry, starts the
// deadline `response_deadline_at = delivered_at + response_period_days`, spends one invitation of the
// weekly organization quota, and writes the outbox event for the notification (TASK-199), then answers
// 200 with the state `delivered`. A successful answer therefore means the candidate can already read
// the invitation; an email is a separate notification that never blocks or delays it, and its retries
// weekly organization quota, and writes the outbox event for the notification, then answers 200 with
// the state `delivered`. A successful answer therefore means the candidate can already read the
// invitation; an email is a separate notification that never blocks or delays it, and its retries
// never move the deadline. No contact of the candidate is disclosed by sending.
//
// The server checks again that the candidate is still visible to the organization: a revoked
@@ -1306,8 +1305,8 @@ type Handler interface {
// which. It also enforces the limits of the product policy: at most 20 invitations waiting for an
// answer per need (`delivered`, `viewed`, `counter`) and the 30-day pause for the pair of the
// organization and the candidate after a decline or a no deal, regardless of the member or the need,
// both with 409 state_conflict; and the rolling weekly quota of the organization (TASK-087), with 429
// and Retry-After. The pending limit and the quota are planned in TASK-205 and TASK-087.
// both with 409 state_conflict; and the rolling weekly quota of the organization, with 429 and
// Retry-After. Enforcement of the pending limit and the organization quota is planned.
//
// Repeats return the same result: a retry with the same Idempotency-Key replays the stored response,
// and a send of an invitation that was already sent answers 200 with the invitation in its current
@@ -1336,18 +1335,18 @@ type Handler interface {
// 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,
// TASK-063) 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 (TASK-064) 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.
// 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
@@ -1549,11 +1548,11 @@ type Handler interface {
// candidate's minimum for the offered formats, and switching formats or the basis would otherwise
// probe the minimum for free. Such a change counts against the limit shared by the organization with
// needs and other drafts, at most three settings a day, and against the withheld counter, which
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13, planned in
// TASK-211; see InvitationSalaryFit). Over the limit the server answers 429 with Retry-After and
// changes nothing. A change that keeps the range, the basis, and the formats does not count. The
// operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a body that
// changes nothing answers 200.
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13,
// enforcement planned; see InvitationSalaryFit). Over the limit the server answers 429 with
// Retry-After and changes nothing. A change that keeps the range, the basis, and the formats does not
// count. The operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a
// body that changes nothing answers 200.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -1611,10 +1610,10 @@ type Handler interface {
//
// Salary limit: the recommendations aggregate candidates' minimums against the upper bound, so setting
// or changing a confirmed salary range counts against a limit shared by the whole organization, every
// member and every need, together with ranges set on creation: at most three a day (PRD FR13, planned
// in TASK-211). Over the limit the server answers 429 with Retry-After and changes nothing. After five
// settings within seven days the money component is `withheld` for seven days. Repeated range changes
// also feed the private risk signals of TASK-319.
// member and every need, together with ranges set on creation: at most three a day (PRD FR13,
// enforcement planned). Over the limit the server answers 429 with Retry-After and changes nothing.
// After five settings within seven days the money component is `withheld` for seven days. Repeated
// range changes also feed the private organization risk signals.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -1635,7 +1634,7 @@ type Handler interface {
// 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 (TASK-200) is an explicit command, so reading the invitation with
// 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
@@ -28,11 +28,11 @@ var _ Handler = UnimplementedHandler{}
// 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 (TASK-062), creates the
// contact grant for exactly those fields, and writes the audit event (TASK-201). 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.
// 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
@@ -42,9 +42,9 @@ var _ Handler = UnimplementedHandler{}
// 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. TASK-197,
// TASK-201, and TASK-204 say 409 for stale terms; 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.
// 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
@@ -52,8 +52,8 @@ var _ Handler = UnimplementedHandler{}
// 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 (TASK-064). Of two concurrent acceptances only one
// makes the transition.
// 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
@@ -82,7 +82,7 @@ func (UnimplementedHandler) AcceptMyInvitation(ctx context.Context, req *Invitat
// 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 (TASK-064).
// 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
@@ -203,10 +203,10 @@ func (UnimplementedHandler) CreateMyAssessmentAttempt(ctx context.Context, req *
// `manual_assessment` | candidate | optional; a prior `assessment_attempt` of the caller in the same specialization | required `assessment_target`
//
// An organization is visible to a candidate when it sent the candidate an invitation or when the
// organization contract (TASK-077) shows the candidate its profile, and to an employer account when
// the account has an active membership in it. Invitations are in the contract (TASK-196) but not
// implemented yet, so until they are, every `invitation` reference answers 404 not_found; anti-cheat
// review decisions are not either, so until TASK-173 every anti-cheat appeal answers 409
// organization contract shows the candidate its profile, and to an employer account when the account
// has an active membership in it. Invitations are in the contract but not implemented yet, so until
// they are, every `invitation` reference answers 404 not_found; anti-cheat review decisions are not
// either, so until review decisions are implemented, every anti-cheat appeal answers 409
// state_conflict. The schema rejects an object type that the case type does not accept, for example an
// organization in a grade appeal.
//
@@ -338,7 +338,7 @@ func (UnimplementedHandler) CreateOrganization(ctx context.Context, req *Organiz
// indicator-relevant setting: it counts against the limit shared by the whole organization with the
// ranges of needs, at most three settings a day, and against the withheld counter, after five settings
// within seven days the indicator is `withheld` for seven days from the fifth, on every draft and
// invitation of the organization (PRD FR13, planned in TASK-211; see InvitationSalaryFit). Over the
// invitation of the organization (PRD FR13, enforcement planned; see InvitationSalaryFit). Over the
// limit the server answers 429 with Retry-After and creates nothing.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
@@ -392,10 +392,10 @@ func (UnimplementedHandler) CreateOrganizationInvitation(ctx context.Context, re
//
// Salary limit: setting a salary range counts against a limit shared by the whole organization, every
// member and every need, on creation as on a change: at most three range settings a day (PRD FR13,
// planned in TASK-211). Over the limit the server answers 429 with Retry-After and creates nothing.
// enforcement planned). Over the limit the server answers 429 with Retry-After and creates nothing.
// After five settings within seven days the money component of the recommendations is `withheld` for
// seven days. The limit keeps an organization from probing hidden candidate minimums with new needs
// instead of edits; repeated range changes also feed the private risk signals of TASK-319.
// instead of edits; repeated range changes also feed the private organization risk signals.
//
// Idempotency: a retry with the same key and body within 24 hours replays the stored 201 and creates
// nothing, so a lost response never creates a second need. A different body with the same key answers
@@ -770,9 +770,9 @@ func (UnimplementedHandler) GetMyQuestionnaire(ctx context.Context) (r GetMyQues
//
// The case must belong to the account of the session: a case of another account, including another
// member of the same organization, answers 404 not_found, the same as an unknown identifier, so
// identifiers cannot be probed. TASK-314 says forbidden for a foreign case URL; the contract answers
// 404 instead, so the client shows the same "not found" state for a foreign and an unknown case. A
// malformed `case_id` answers 400 validation_failed with the path pointer.
// identifiers cannot be probed. The contract answers 404, so the client shows the same "not found"
// state for a foreign and an unknown case. A malformed `case_id` answers 400 validation_failed with
// the path pointer.
//
// GET /api/v1/me/support-cases/{case_id}
func (UnimplementedHandler) GetMySupportCase(ctx context.Context, params GetMySupportCaseParams) (r GetMySupportCaseRes, _ error) {
@@ -835,8 +835,7 @@ func (UnimplementedHandler) GetOrganizationInvitation(ctx context.Context, param
// GetOrganizationInvitationContacts implements GetOrganizationInvitationContacts operation.
//
// Requires the session cookie of an employer account with an active membership in `org_id`. In the MVP
// only the owner of the organization reads contacts (TASK-202); the other roles of PRD FR07 are
// planned.
// only the owner of the organization reads contacts; the other roles of PRD FR07 are planned.
//
// This is the only operation that returns contact values, and its response is separate from the terms
// and from the invitation. It answers only while a grant created by the acceptance of this invitation
@@ -856,8 +855,8 @@ func (UnimplementedHandler) GetOrganizationInvitation(ctx context.Context, param
// Withdrawing the invitation keeps an existing grant. A later publication of the profile never reopens
// a closed grant; only a new explicit C4 creates a new one.
//
// Every successful read is recorded in the access audit (planned in TASK-090 and TASK-202), and the
// response has `Cache-Control: no-store`.
// Every successful read is recorded in the access audit (planned with the contact access history), and
// the response has `Cache-Control: no-store`.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate
// account answers 403 forbidden; an account without an active membership in the organization, an
@@ -983,8 +982,8 @@ func (UnimplementedHandler) HideOrganization(ctx context.Context, params HideOrg
// hidden organization cannot read the card.
//
// The storage of accesses is planned with the card and contact operations of the organization side
// (TASK-185 and the contact read of the invitation contract); until then the operation answers 501
// not_implemented after the session and request checks.
// (anonymous card reads and contact reads under the invitation contract); until then the operation
// answers 501 not_implemented after the session and request checks.
//
// 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.
@@ -1013,10 +1012,10 @@ func (UnimplementedHandler) ListMyCardAccessHistory(ctx context.Context, params
// 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 (TASK-088).
// changes are evidence of the publication history.
//
// Granting c1, c2, c3, and c5 in the consent settings and revoking any purpose are planned operations
// of this tag (TASK-063 and TASK-064); c1 is given at registration and c4 only in AcceptMyInvitation.
// of this tag; c1 is given at registration and c4 only in AcceptMyInvitation.
//
// Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated. A malformed
// `limit`, `cursor`, or `state` answers 400 validation_failed.
@@ -1436,9 +1435,9 @@ func (UnimplementedHandler) SaveMyQuestionnaire(ctx context.Context, req *Candid
// Sends the current terms version of a `draft`. Sending is internal and never visible as a state: in
// one transaction the server records the delivery, creates the candidate's inbox entry, starts the
// deadline `response_deadline_at = delivered_at + response_period_days`, spends one invitation of the
// weekly organization quota, and writes the outbox event for the notification (TASK-199), then answers
// 200 with the state `delivered`. A successful answer therefore means the candidate can already read
// the invitation; an email is a separate notification that never blocks or delays it, and its retries
// weekly organization quota, and writes the outbox event for the notification, then answers 200 with
// the state `delivered`. A successful answer therefore means the candidate can already read the
// invitation; an email is a separate notification that never blocks or delays it, and its retries
// never move the deadline. No contact of the candidate is disclosed by sending.
//
// The server checks again that the candidate is still visible to the organization: a revoked
@@ -1446,8 +1445,8 @@ func (UnimplementedHandler) SaveMyQuestionnaire(ctx context.Context, req *Candid
// which. It also enforces the limits of the product policy: at most 20 invitations waiting for an
// answer per need (`delivered`, `viewed`, `counter`) and the 30-day pause for the pair of the
// organization and the candidate after a decline or a no deal, regardless of the member or the need,
// both with 409 state_conflict; and the rolling weekly quota of the organization (TASK-087), with 429
// and Retry-After. The pending limit and the quota are planned in TASK-205 and TASK-087.
// both with 409 state_conflict; and the rolling weekly quota of the organization, with 429 and
// Retry-After. Enforcement of the pending limit and the organization quota is planned.
//
// Repeats return the same result: a retry with the same Idempotency-Key replays the stored response,
// and a send of an invitation that was already sent answers 200 with the invitation in its current
@@ -1479,18 +1478,18 @@ func (UnimplementedHandler) SendOrganizationInvitation(ctx context.Context, req
// 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,
// TASK-063) 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 (TASK-064) 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.
// 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
@@ -1707,11 +1706,11 @@ func (UnimplementedHandler) UpdateOrganization(ctx context.Context, req *Organiz
// candidate's minimum for the offered formats, and switching formats or the basis would otherwise
// probe the minimum for free. Such a change counts against the limit shared by the organization with
// needs and other drafts, at most three settings a day, and against the withheld counter, which
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13, planned in
// TASK-211; see InvitationSalaryFit). Over the limit the server answers 429 with Retry-After and
// changes nothing. A change that keeps the range, the basis, and the formats does not count. The
// operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a body that
// changes nothing answers 200.
// withholds `salary_fit` for seven days from the fifth setting within seven days (PRD FR13,
// enforcement planned; see InvitationSalaryFit). Over the limit the server answers 429 with
// Retry-After and changes nothing. A change that keeps the range, the basis, and the formats does not
// count. The operation follows the convention of UpdateOrganizationNeed: no Idempotency-Key, and a
// body that changes nothing answers 200.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -1772,10 +1771,10 @@ func (UnimplementedHandler) UpdateOrganizationInvitation(ctx context.Context, re
//
// Salary limit: the recommendations aggregate candidates' minimums against the upper bound, so setting
// or changing a confirmed salary range counts against a limit shared by the whole organization, every
// member and every need, together with ranges set on creation: at most three a day (PRD FR13, planned
// in TASK-211). Over the limit the server answers 429 with Retry-After and changes nothing. After five
// settings within seven days the money component is `withheld` for seven days. Repeated range changes
// also feed the private risk signals of TASK-319.
// member and every need, together with ranges set on creation: at most three a day (PRD FR13,
// enforcement planned). Over the limit the server answers 429 with Retry-After and changes nothing.
// After five settings within seven days the money component is `withheld` for seven days. Repeated
// range changes also feed the private organization risk signals.
//
// Order of checks: session (401), CSRF and Origin (403 csrf_check_failed), request validation (400),
// account scenario (403 forbidden for a candidate), membership (404 not_found) and role (403
@@ -1799,7 +1798,7 @@ func (UnimplementedHandler) UpdateOrganizationNeed(ctx context.Context, req *Nee
// 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 (TASK-200) is an explicit command, so reading the invitation with
// 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
@@ -280,7 +280,7 @@ func TestAnonymousCardReachesNoProfileOrContactSchema(t *testing.T) {
// The reverse: the private profile family does not reach the card or any
// visibility schema, and an organization path reaches no setting of a
// candidate. The card content stays the only privacy schema meant for
// organization-visible operations later (TASK-185).
// organization-visible operations later.
for name, schema := range spec.Components.Schemas {
if isPrivacySchema(name) {
continue
@@ -355,7 +355,7 @@ func (security *recordingSecurity) HandleSessionCsrf(ctx context.Context, _ api.
return ctx, nil
}
// The session-bound CSRF check of TASK-056 relies on the generated server
// The session-bound CSRF check relies on the generated server
// calling HandleSessionCookie before HandleSessionCsrf and passing the
// returned context on. ogen orders the calls by scheme name, so renaming a
// scheme or upgrading ogen must keep this test green.
@@ -19,7 +19,7 @@ var errSessionsNotImplemented = errors.New("v1.DenyAllSecurity - sessions are no
// call it and keep their own behavior, which is 501 not_implemented until
// their business logic exists.
//
// TASK-056 replaces it. The generated server (ogen v1.24.0) evaluates the
// Session authentication will replace it. The generated server (ogen v1.24.0) evaluates the
// schemes of an operation as follows; TestGeneratedServerSecurityOrder pins
// the order and the context propagation:
//
@@ -37,7 +37,7 @@ func (store *DeliveryStatisticsStore) DeliveryStatistics(ctx context.Context) (o
statistics.Counts = append(statistics.Counts, count)
earliest := row.EarliestPendingAttemptAt
// Only service mail is picked up by a worker; a due notification
// waits for TASK-462 and must not count as overdue.
// awaits product notification sending and must not count as overdue.
if !count.Kind.IsServiceMail() {
continue
}
@@ -81,7 +81,7 @@ type InsertCandidateProfileParams struct {
At pgtype.Timestamptz
}
// Queries of the manual candidate profile (TASK-066). The profile is personal
// Queries of the manual candidate profile. The profile is personal
// data of the account that owns it: every statement is scoped by user_id, and
// no statement selects another account's row. None of them names a file, the
// ML service, or an FSP account, because the profile needs none.
@@ -480,7 +480,7 @@ type ReadCandidatePublicationRow struct {
ConsentRevokedAt pgtype.Timestamptz
}
// Queries of the candidate visibility settings (TASK-088): the publication of
// Queries of the candidate visibility settings: the publication of
// the card, the search status, the hidden organizations, and the history of
// these settings. Every statement is scoped by the candidate's user_id, and
// no statement selects another account's row. No statement reads or writes a
@@ -574,7 +574,7 @@ type ReadPublicationVisibleToOrganizationRow struct {
// organization. No row means the organization reads nothing, whichever of
// the reasons applies, so it cannot tell a hidden candidate from an
// unpublished one. Every organization-facing read of a publication starts
// from this shape (TASK-185, TASK-089, TASK-090).
// from this shape.
func (q *Queries) ReadPublicationVisibleToOrganization(ctx context.Context, arg ReadPublicationVisibleToOrganizationParams) (ReadPublicationVisibleToOrganizationRow, error) {
row := q.db.QueryRow(ctx, readPublicationVisibleToOrganization, arg.UserID, arg.OrganizationID)
var i ReadPublicationVisibleToOrganizationRow
@@ -243,7 +243,7 @@ type Querier interface {
// field codes, and times, never a name; the caller
// writes it in the transaction of the change it records.
InsertCandidatePrivacyEvent(ctx context.Context, arg InsertCandidatePrivacyEventParams) error
// Queries of the manual candidate profile (TASK-066). The profile is personal
// Queries of the manual candidate profile. The profile is personal
// data of the account that owns it: every statement is scoped by user_id, and
// no statement selects another account's row. None of them names a file, the
// ML service, or an FSP account, because the profile needs none.
@@ -434,7 +434,7 @@ type Querier interface {
// 0). Claims come in a stable order: single fields by kind, list items by
// position. Never replace this with two statements.
ReadCandidateProfile(ctx context.Context, userID pgtype.UUID) ([]ReadCandidateProfileRow, error)
// Queries of the candidate visibility settings (TASK-088): the publication of
// Queries of the candidate visibility settings: the publication of
// the card, the search status, the hidden organizations, and the history of
// these settings. Every statement is scoped by the candidate's user_id, and
// no statement selects another account's row. No statement reads or writes a
@@ -455,7 +455,7 @@ type Querier interface {
// organization. No row means the organization reads nothing, whichever of
// the reasons applies, so it cannot tell a hidden candidate from an
// unpublished one. Every organization-facing read of a publication starts
// from this shape (TASK-185, TASK-089, TASK-090).
// from this shape.
ReadPublicationVisibleToOrganization(ctx context.Context, arg ReadPublicationVisibleToOrganizationParams) (ReadPublicationVisibleToOrganizationRow, error)
// Advances a delivery past one attempt and appends the attempt in one
// statement, so both happen or neither does, inside or outside a
+1 -1
View File
@@ -59,7 +59,7 @@ func ParseMailKind(value string) (MailKind, error) {
// ServiceMailKinds lists the kinds of service identity mail, the kinds the
// sending worker claims and sends. Notifications are not among them until
// their sending is connected (TASK-462). The delivery metrics of due mail,
// their sending is connected. The delivery metrics of due mail,
// the sending worker, and the due index of the deliveries table follow this
// list; changing it changes the predicate of deliveries_due_idx too.
func ServiceMailKinds() []MailKind {
+1 -1
View File
@@ -100,7 +100,7 @@ func (level OrganizationVerificationLevel) QuotaTier() (OrganizationTier, bool)
return OrganizationTierE2, true
case OrganizationVerificationE3:
// The PRD gives E3 a separate policy, not a quota tier. A caller that
// reads quotas (TASK-087) must fail closed on false: grant no quota
// reads quotas must fail closed on false: grant no quota
// and refuse the action, never fall back to a lower or a default tier.
return "", false
default:
+2 -2
View File
@@ -278,8 +278,8 @@ type AssessmentPolicy struct {
SameGradeRetryAfter CalendarDays
// MaxAttemptsPerWindow limits attempts in any AttemptWindow. Whether the
// limit counts per grade, per specialty, or across all assessments of a
// candidate is an open question for the attempt tasks (TASK-157 and
// TASK-158); the policy stores only the number.
// candidate is an open question for attempt accounting;
// the policy stores only the number.
MaxAttemptsPerWindow int32
AttemptWindow CalendarDays
// PromotionMinInterval is the minimum time between grade promotions.
+7 -8
View File
@@ -14,8 +14,8 @@ import (
"golang.org/x/text/unicode/norm"
)
// This file holds the visibility settings of a candidate (PRD FR02 and FR12,
// TASK-088): the publication of the anonymous card, the search status, and the
// This file holds the visibility settings of a candidate (PRD FR02 and FR12):
// the publication of the anonymous card, the search status, and the
// organizations the candidate hides the profile from.
//
// The rules that shape every type here:
@@ -757,8 +757,7 @@ func (event PrivacyEvent) LogValue() slog.Value {
)
}
// Rules for the content of an anonymous card (TASK-089 builds it; these are
// the hard requirements of this task):
// Rules for the content of an anonymous card:
// - Only confirmed profile values ever reach the card. A suggestion that
// the candidate did not confirm (status extracted) and an unknown value
// never do.
@@ -768,8 +767,8 @@ func (event PrivacyEvent) LogValue() slog.Value {
// check the builder must apply to every free text before it enters the
// card; it errs on the side of dropping.
// - Quasi-identifiers (a rare combination of location, stack, and
// experience) and the generalization of rare features are an acceptance
// criterion of TASK-089, not decided here.
// experience) and the generalization of rare features must be handled
// by the card builder; they are not decided here.
const (
// cardWordStart and cardWordEnd are Unicode word boundaries. Go's \b is
@@ -813,8 +812,8 @@ var (
// with NFKC first, so fullwidth and compatibility forms of @, +, and digits
// count, and every Unicode decimal digit counts toward a phone number. A card
// builder drops such a value instead of publishing it. The check errs on the
// side of dropping; it is the barrier for free text until TASK-089 replaces
// free text by a closed taxonomy, which closes the residual risk.
// side of dropping; a closed taxonomy in the card builder is still needed
// to replace free text and address the residual risk.
func CardTextLooksLikeContact(text string) bool {
normalized := norm.NFKC.String(text)
lowered := strings.ToLower(normalized)
+1 -1
View File
@@ -81,7 +81,7 @@ type ConsentLedger interface {
// Superseded is decided by granted_at, then the record ID: the
// unrevoked record granted last is active, whatever its text version,
// so Grant accepts any published version. The usecase consent.Service
// (TASK-063) is the path that checks that the version is the current
// is the path that checks that the version is the current
// text of the purpose, ConsentTexts().Current at the grant time, before
// it calls Grant; business code grants through it, not directly.
//
@@ -23,7 +23,7 @@ type DeliveryStatistics struct {
// EarliestPendingAttemptAt is the earliest NextAttemptAt of a pending
// service mail delivery (domain.ServiceMailKinds, the kinds a worker
// sends), by the application clock that wrote it; zero without one. A
// notification waits for its sending to be connected (TASK-462) and is
// notification waits for its sending to be connected and is
// not counted, so it never looks overdue.
EarliestPendingAttemptAt time.Time
}
+1 -1
View File
@@ -93,7 +93,7 @@ type UserRepository interface {
// The same statement deletes the C1 records with the source
// registration that the earlier registration of this account stored,
// because the earlier registrant's consent must never stand for the new
// one. The registration usecase (TASK-053) must record the new C1 with
// one. The registration usecase must record the new C1 with
// ConsentLedger().Grant in the same transaction; a version conflict
// deletes nothing.
UpdateRegistration(ctx context.Context, user domain.User) (domain.User, error)
+1 -1
View File
@@ -33,7 +33,7 @@ var (
// concurrent hashing; a context that ends while waiting returns the context
// error and computes nothing. Errors never contain the password or the hash.
//
// Login (TASK-055) must answer invalid_credentials for an unknown email, a
// Login must answer invalid_credentials for an unknown email, a
// wrong password, and a stored hash that is invalid
// (domain.ErrInvalidPasswordHash, from the repository or from Verify). For
// an invalid hash it must also log an error and call VerifyDummy, because a
+3 -3
View File
@@ -11,7 +11,7 @@
//
// Revocation is not part of this package. Its downstream effects (closing
// publication and grants, the deletion request, the manual path, stopping
// the import) belong to TASK-064, which calls ConsentLedger().Revoke.
// the import) belong to consent revocation, which calls ConsentLedger().Revoke.
package consent
import (
@@ -110,7 +110,7 @@ type SettingsGrantInput struct {
// *StaleConsentTextError: an older one, one that is scheduled but not yet
// published, and one that never existed.
//
// The registration (TASK-053) must call it with C1 and the submitted version
// The registration must call it with C1 and the submitted version
// before it branches on a new or an existing email. A stale version then
// fails the same way for both, so the answer does not reveal whether the
// account exists; GrantAtRegistration repeats the check inside the
@@ -300,7 +300,7 @@ type ContactGrantInput struct {
// It checks that TextVersion is the current C4 text like GrantInSettings does, and
// the ledger checks that the hash is the hash of that text with the
// organization name filled in. It is meant for the transaction of the
// acceptance (TASK-201), next to the invitation state change and the audit
// acceptance, next to the invitation state change and the audit
// event. When the invitation already has a C4 record of the same subject,
// the result has Created false and holds that record, revoked or not; the
// caller compares its scope with the input to tell a repeat from a conflict.
+2 -2
View File
@@ -7,11 +7,11 @@ package files
type Namespace string
const (
// NamespaceResume holds uploaded resume files (TASK-070).
// NamespaceResume holds uploaded resume files.
NamespaceResume Namespace = "resume"
// NamespaceProfilePDF holds generated standard profile PDFs (FR02).
NamespaceProfilePDF Namespace = "profile-pdf"
// NamespaceAccountExport holds personal data exports (TASK-093, TASK-458).
// NamespaceAccountExport holds personal data exports.
NamespaceAccountExport Namespace = "account-export"
)
+1 -1
View File
@@ -61,7 +61,7 @@ func NewStore(storage outbound.ObjectStorage) *Store {
// object. One race remains: when the whole body was sent before the caller
// canceled, the server may still commit after the cleanup Delete returned.
// Such an orphan has no Record, so a planned namespace sweeper that removes
// keys without a record (with backups, TASK-030 and TASK-458) is the final
// keys without a record (with backups) is the final
// cleanup. See Record for the caller's order of operations.
func (store *Store) Put(ctx context.Context, policy Policy, upload Upload) (Record, error) {
if !policy.valid() {
@@ -23,7 +23,7 @@ func NewCredentials(hasher outbound.PasswordHasher) *Credentials {
// HashNewPassword applies the registration password policy to raw and hashes
// the normalized password. A password outside the policy returns an error
// wrapping domain.ErrInvalidPassword without calling the hasher. Errors
// never contain raw. Registration (TASK-053, not implemented yet) must call
// never contain raw. Registration must call
// it on every branch before it looks up the email, so that neither the
// outcome nor the time depends on whether the account exists.
func (credentials *Credentials) HashNewPassword(ctx context.Context, raw string) (domain.PasswordHash, error) {
@@ -332,7 +332,7 @@ func (registration *Registration) createAccount(ctx context.Context, unit outbou
// reRegister starts a new registration of an unverified address. It never
// changes the credentials, scenario, or onboarding step of the account row:
// the new registration carries its own on its verification token, and
// confirming a token applies only the credentials of that token (TASK-054).
// confirming a token applies only the credentials of that token.
// So neither the first nor the latest registrant of an address can make its
// owner adopt a password the owner did not choose. The lock order of the
// identity repositories applies: tokens first, then the account.
@@ -7,7 +7,7 @@
// consumer's dedup marker, reads the request, resolves the recipient address
// from the account, renders the current template version once, stores the
// Delivery, and deletes the request. Sending notifications is planned
// (TASK-462); no worker claims them yet.
// ; no worker claims them yet.
//
// Service mail of the account flows (email verification and password reset)
// takes a shorter path: ServiceMailer stores its delivery directly in the
@@ -40,7 +40,7 @@ var (
// is used up: the delivery waits for the reset in waiting_quota, and an
// operator may decide otherwise.
//
// The sending worker (ServiceMailSender, TASK-016) uses it in two
// The sending worker (ServiceMailSender) uses it in two
// transactions around one transport call:
//
// 1. PrepareSend in the transaction that claims a due delivery. It either
@@ -124,7 +124,7 @@ func (decision SendDecision) Proceed() bool { return !decision.Permit.IsZero() }
// NextAttemptAt at the reset, which is what an operator and the user's
// status view (DeliveryStatusReader) read;
// - an unknown delivery is returned unchanged with ResetAt: its retry
// belongs to the retry policy (TASK-017), and parking it would hide that
// belongs to the retry policy, and parking it would hide that
// an earlier attempt may have been accepted.
//
// The caller chooses which deliveries are due. A delivery pinned to another
@@ -15,7 +15,7 @@ const jitterShare = 5
// (temporary or rate_limited), and of a delivery on which the sending worker
// itself failed. It is the minimum that the delivery state machine needs,
// because a pending delivery must say when it is due; the attempt limit, the
// unknown outcome policy, and manual retries belong to TASK-017.
// unknown outcome policy, and manual retries are part of the planned delivery retry policy.
//
// There is no limit on provider refusals on purpose: service mail carries a
// token that expires, and the sending worker cancels the delivery with the