Repository navigation
feat(memos): the voice profile row, its vertex and the teardown filings - #1556
Merged
Merged
Conversation
`voice_profiles` holds one row per (workspace, user) — the pinned model/dimension pair, the sample count, the consent version and the revocation stamp — and no embedding: the vector is the `VoiceProfile` vertex in ArcadeDB, one per row, indexed at VOICE_EMBEDDING_DIM beside the text types' EMBEDDINGS_DIM. Dark on purpose: no route, no reader, no writer. `ensureVectorIndex` now names the type's own dimension in both messages, and the type joins WORKSPACE_VERTEX_TYPES for the teardown sweep but is filtered out of OPERATOR_QUERY_TYPES — an embedding is biometric. Refs #1553
… is current The upgrade path every deployed store takes: Chunk already at EMBEDDINGS_DIM and no VoiceProfile index. Only the 192-d voice index is built. Refs #1553
This was referenced Dec 3, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1553
Refs #1403
Refs #1400
What lands
voice_profilesand theVoiceProfilevertex, dark: no route, no reader, no write. Phase 2.2 (#1554) addsenrollment, the embedding and the purge; 2.3 (#1555) adds the consent screen and the admin switch.
The row, and why the vector is not in it.
voice_profilesholds one row per (workspace, user): the pinnedmodel/dimensionpair,sample_count,consent_version,consented_at, and therevoked_ata withdrawalsets. It deliberately has no
embeddingcolumn — the vector is theVoiceProfilevertex in ArcadeDB(
profileId,workspaceId,userId,embedding), one per row. A copy in PG would have no reader (every matchgoes through the index) and would be a second home for one value; docs/features/89 § Voice profiles supersedes
#1403's row list on exactly this point. No FK on either id (house policy) and no extra index: the unique
(workspaceId, userId)pair is the upsert key enrollment will use.The pinned pair and the 192-d index beside
EMBEDDINGS_DIM.VOICE_EMBEDDING_MODEL,VOICE_EMBEDDING_DIM(192) and
VOICE_CONSENT_VERSIONlive inapps/api/src/voice/voice.constants.ts— the home 2.2's service andprocessor import; nothing is on the wire.
ensureSchemaemits the type's DDL (VOICE_PROFILE_DDL, noLSM_VECTORline) and then callsensureVectorIndex('VoiceProfile', VOICE_EMBEDDING_DIM)outside the fourtext types' loop, so a change of
EMBEDDINGS_DIMnever rebuilds the voice index and vice versa. The helper's twomessages now name the type's own configured dimension instead of
EMBEDDINGS_DIM, which would have lied for thevoice index on a rebuild.
Swept, not operator-queryable.
'VoiceProfile'joinsWORKSPACE_VERTEX_TYPES, sodeleteWorkspaceGraphdeletes its rows with the workspace (
DELETE FROM … WHERE workspaceId = :workspaceId).OPERATOR_QUERY_TYPESfilters it back out beside the constant: an embedding is biometric, and the operator SQL read would hand it to a
person. The type is deleted with its tenant and never readable by anyone.
The two teardown filings.
WORKSPACE_TEARDOWNfilesVoiceProfile: 'workspace'aboveWorkspaceMember(therow that RESTRICTs the workspace stays last);
USER_TEARDOWNfiles it'delete'— the future account route ownsDELETE FROM VoiceProfile WHERE userId = :userId, and no route exists yet, so the inventory is the deliverable.Both inventories' completeness specs already fail on an unfiled model; each gained a disposition case.
The migration is hand-made and database-free:
prisma migrate diffbetweenorigin/dev's datamodel and thistree, because
prisma migrate devcannot run against this machine's shared database (the app role does not own_prisma_migrations). It is one additive statement plus its unique index, stamped20270223100000so it sortsafter
20270222110000_speaker_matches:It applied to a throwaway
scratch_1553withON_ERROR_STOP=1,\d voice_profileslisted the eleven columns andthe unique constraint, and
DROP TABLE/dropdbremoved the database. Rollback isDROP TABLE "voice_profiles"— nothing reads it and no vector can exist yet, so dropping leaves no state behind.
Blast radius beyond the issue's file list:
apps/api/src/config/env-report.tsand its spec. The admin configpage files every env key by prefix and
env-report.spec.tsfails on any key grouped asother;VOICE_joins thememosgroup, which is the call-participant feature's home. That is one map line and one assertion, not a newknob.
Divergences from the issue/doc
voice.consent,voice.enrolledandvoice.revokedship with the servicethat emits them:
audit.service.spec.tsfails on anAUDIT_ACTIONSvalue nosrccall writes, and this taskwrites no audit row. The doc tags them 2.1; they move to 2.2.
workspace_settings.voiceProfilesis not here. The doc tags the column 2.3; feat(memos): call participants 2.2 — enrollment routes, quality gates and the consent record #1554 lands it with the gatethat reads it, feat(memos): call participants 2.3 — consent screen, enrollment settings and the admin switch #1555 the admin write and the UI. This task adds no workspace setting and no settings DTO.
ensureNoteChunksexists because a note's own writer can run before the worker's firstingestion; 2.1 has no writer. feat(memos): call participants 2.2 — enrollment routes, quality gates and the consent record #1554 decides whether enrollment needs the same memoized bootstrap.
@Returns, no contract field:make api-clientwould only churn.Verification
make verify(db-generate + lint + typecheck + deps + test) exited 0 on2fee3acb, all four@knowledge/apitasks with
cache miss: 350 test files, 5,429 tests passed; dependency-cruiser clean (1,246 modules).scratch_1553is dropped.ensureSchemabuilds exactlyChunk@1024andVoiceProfile@192, a second call issues noLSM_VECTOR, a changed text dimension rebuildsChunkonly;SELECT FROM VoiceProfile(and a projectionnaming
embedding) is refused asunscopedTarget; both inventories pin their disposition.Operations:
VOICE_PROFILES_ENABLED(defaultfalse) is the platform ceiling for voice profiles. Nothingreads it until phase 2.2 mounts the enrollment route; leave it off. The migration is additive and reverses by
dropping
voice_profiles; the ArcadeDB type is created on the worker's next boot and holds no data.Review
Independent review before opening this PR, five fresh-context slices over the committed range (the
model/migration,
graph.service.ts, the env/changelog files, the vector spec, and the inventories with theirspecs). Four passed; one blocked and is fixed.
VoiceProfile'sabsent, which is every deployed store's state on this release →
2216edc5adds it and pins that only the192-d voice index is built.