Skip to content

CAP-PFM-QRY-017Maintain the fields and freshness of Quick Search

Markdown

CAP-PFM-QRY-017

Maintain the fields and freshness of Quick Search

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleQuestions, record exploration and data deliveryRevision1

Read atservices-platform ad3f6a65react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Customers choose the fields used for search.Source changes trigger document maintenance.Repair and health state make index problems actionable.
Surfaces
apijob
Intent sources
services-platform:docs/quick-search.md#2. The shared index and the document (D-29, Andrew 2026-10-19)

Controls

25 controls apply, from the corpus control catalogue.

TC-AVL-005 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-MON-001 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
platform.quick-search-settings.readapitenant
platform.quick-search-settings.updateapitenant
platform.quick-search-settings.rebuildapitenant
<application>.<dataset>.query (the owner's key)servicetenant

Business Rules

12 rules, 11 to be proved before approval. A rule's product intent is derived from its origin: 1 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Settings read, update and rebuild use separate permissions plus dataset query access, with inaccessible record types omitted from the settings list.
permissionapi, servicetest
services-platform:modules/quick-search/tests/e2e/quick-search-configurations.e2e.spec.js#refuses a rebuild to a caller who may change the field list, which is a different power
02must prove
Proposed
Reading never-configured settings returns default fields, version zero and unprovisioned state without writing.
policyservicetest
services-platform:modules/quick-search/tests/e2e/quick-search-configurations.e2e.spec.js#wrote nothing: reading what a tenant would get does not provision it
03must prove
Proposed
Search field configuration accepts one to thirty distinct eligible dataset fields in three tiers, excludes hidden or unsupported content types, and rejects all detected problems together without writing.
validationservicetest
services-platform:modules/quick-search/tests/e2e/quick-search-configurations.e2e.spec.js#reports every problem of a list in one refusal, so one round trip fixes them all
04must prove
Proposed
Configuration updates use the read version, leave unchanged lists and versions alone, and atomically record a changed target with the rebuild it requires.
lifecycleservicetest
services-platform:modules/quick-search/tests/e2e/quick-search-configurations.e2e.spec.js#committed the target beside it, so the configuration and the rebuild it owes are one fact
05must prove
Proposed
Rebuilding fills a new generation while the existing one serves searches, publishes after validation, and coalesces concurrent full rebuild requests for the same record type.
lifecycleservice, databasetest
06must prove
Confirmed
Change handling claims record versions before projection, removes documents for missing source records and avoids writing late updates after deletion.
origin: services-platform:docs/quick-search.md#2. The shared index and the document (D-29, Andrew 2026-10-19)
invariantservicetest
services-platform:modules/quick-search/tests/integration/services/indexing/handle-change-events.integration.spec.js#removes the document of a record the projection no longer finds, leaving no tombstone in the provider
07must prove
Proposed
Organization renames refresh current affiliates, address changes refresh linked contacts, and fan-out beyond two hundred contacts becomes rebuild work.
calculationservicetest
services-platform:modules/quick-search/tests/integration/services/indexing/handle-change-events.integration.spec.js#re-indexes only the contacts with a current affiliation to that organization, not one whose affiliation ended
08must prove
Proposed
A workspace’s provider failure affects only its events, while events for unindexed, deleting or missing workspaces settle without provider writes.
policyservicetest
services-platform:modules/quick-search/tests/integration/services/indexing/handle-change-events.integration.spec.js#writes the other tenant’s document, so one tenant’s provider failure stops nothing else
09must prove
Proposed
Retired fields degrade the index and trigger rebuilding without the field while remaining visible as unavailable in configuration, and saves retaining them are rejected.
policyservicetest
services-platform:modules/quick-search/tests/e2e/quick-search-configurations.e2e.spec.js#refuses a field list that keeps the archived field, by the rule any ineligible field is refused by
10must prove
Proposed
Repair resubmits owed rebuilds every fifteen minutes with hourly automatic backoff per type, reconciles types nightly in assigned hours, and retains deletion counters for at least fourteen days.
lifecycleservicetest
11must prove
Proposed
Provisioning creates workspace index resources and purge removes them, waits for active rebuilds, and suppresses writes during workspace deletion.
lifecycleservicetest
services-platform:modules/quick-search/tests/integration/services/maintenance/tenant-participant.integration.spec.js#purges the tenant once the rebuild has settled, the job’s own three tables included
12
Proposed
Provider-setting release changes advance the expected index settings and trigger automatic rebuilds through the repair pass.
policyservicedocumented
services-platform:docs/quick-search.md#3.4 Repair schedules (plan §9.7, §10.4 and §10.6)

Scenarios

IdGivenWhenThenProvenance
01An organization has current and former affiliates.Its rename event is processed.Current affiliates’ documents reflect the new name without updating former affiliates.test
services-platform:modules/quick-search/tests/integration/services/indexing/handle-change-events.integration.spec.js#re-indexes the contacts of the organization, so each hit shows the name the organization has now

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.