Repository navigation
feat: add conversation landscape gate, producer wiring, and canary test - #1438
Merged
Merged
Conversation
JorimTheuns
force-pushed
the
feat/landscape-gate
branch
from
November 30, 2026 12:19
f2b4202 to
861ee22
Compare
JorimTheuns
changed the base branch from
main
to
feat/portal-participant-token
November 30, 2026 12:19
…ing, single header helper
JorimTheuns
force-pushed
the
feat/portal-participant-token
branch
from
December 1, 2026 22:33
24b8fbb to
ee3da74
Compare
JorimTheuns
force-pushed
the
feat/landscape-gate
branch
from
December 1, 2026 22:35
ee48d92 to
d39f66b
Compare
… it on finish - A participant.token_invalid answer clears the stored token and resends the call once without it (the server checks the token before doing anything), so a chunk upload is not lost. The retry logs a warning. - Only participant.token_invalid counts as a rejection; other 403s keep the token. - The finish screen keeps the token while open (report sign-up, the landscape step) and clears it on leaving, deferred so StrictMode's dev remount does not count; /start still clears every token. - Verify helpers take the conversation id as a required string.
The regex pass alone let names through. After it, a fast model call names the personal details left and code replaces exactly those spans (any casing, whole words, capitalised name parts too, never a joining word like van/los/des alone), so the markdown and the rest of the text stay as typed. - Only edited text is checked; approving the unedited draft makes no call. - A failed or non-JSON answer (after one retry) saves nothing: verify.generation_failed. - content is capped at 20,000 characters and the check is rate limited per conversation (20 per 10 minutes), since it runs outside the AI allowance.
…participant-token
…t-pii-redaction # Conflicts: # dembrane/platform/PACKAGES.md
…participant-token # Conflicts: # dembrane/frontend/src/locales/cs-CZ.po # dembrane/frontend/src/locales/de-DE.po # dembrane/frontend/src/locales/en-US.po # dembrane/frontend/src/locales/es-ES.po # dembrane/frontend/src/locales/fr-FR.po # dembrane/frontend/src/locales/it-IT.po # dembrane/frontend/src/locales/nl-NL.po # dembrane/frontend/src/locales/uk-UA.po
# Conflicts: # dembrane/platform/packages/db/migrations/meta/0060_snapshot.json # dembrane/platform/packages/db/migrations/meta/_journal.json
Contributor
|
Now on staging, deployed 2026-12-02 14:08 UTC. |
This branch was successfully deployed
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.
Summary
Adds the expand-only conversation landscape gate schema, gate helpers, room producer wiring across all six producer sites, and a canary integration test. Existing non-deleted rows have
landscape_status IS NULLand behave unchanged in room producers; home search transcript lookup also now excludes soft-deleted conversations (c.deleted_at is null) so rejected conversations cannot leak in private reads.Schema and migration
landscape_status,landscape_review,landscape_text,landscape_text_hash,landscape_consent_version,landscape_decided_at,landscape_moderation,landscape_entered_at) and 3 check constraints (conversation_landscape_status,conversation_landscape_review,conversation_landscape_entry) toconversationindembrane/platform/packages/db/src/schema/index.ts.0064_expand_conversation_landscape.sql(with matching Drizzle snapshot and journal entry): combines all 8ADD COLUMN IF NOT EXISTSclauses into oneALTER TABLE "conversation"statement and adds all 3 constraintsNOT VALIDinside idempotentDOblocks so theconversationtable is not scanned under lock and migration re-runs remain safe.Gate helpers and producer sites
inLandscapeRoom,inRoomSql, andusesAcceptedTextfromdembrane/platform/packages/db/src/landscape.ts(re-exported from@dembrane/db), with a pure cross-product unit test indembrane/platform/packages/db/test/landscape.test.ts.dembrane/platform/packages/analysis/src/recipes/services.ts: gatesloadTranscriptsandcountConversationsWithTranscriptswithinRoomSql; gated rows readlandscape_textand use the neutralConversation nlabel.isoTimestampindembrane/platform/packages/legacy-shape/src/directus.tsalso handlesDateinstances returned by rawpostgres.jsclients.dembrane/platform/packages/popcorn/src/storage.ts: gatestranscripts()andwaitingConversations()withdeleted_at IS NULLandinRoomSql, joinsconversationwhen fetching chunks, and emitslandscape_text(with neutral label) for gated rows.dembrane/platform/packages/conversations/src/v1/storage.tsandreply.ts: gatesadjacent,adjacentContent, andadjacentConversationswithinRoomSqland substituteslandscape_textfor bothconversation.summaryandconversation_chunk.transcripton gated rows.dembrane/platform/packages/canvas/src/storage.ts: gatesgatherConversationsandgatherChunkswithdeleted_at IS NULLandinRoomSql, masksparticipant_name, and returnslandscape_textfor gated rows.dembrane/platform/packages/conversations/src/search/storage.ts: addsc.deleted_at is nullinreachableConversations(behavior fix for soft-deleted conversations, matchingsearchStorage.conversations()and required so rejected conversation chunks cannot appear in home search).Canary test
dembrane/platform/apps/api/test/landscape-canary.integration.test.ts, seeding a legacy conversation plus gated conversations inpending,accepted(review null),held,host_rejected,rejected(deleted_atset), and entered (landscape_entered_atset). Verifies all six room producer sites (Map/analysis, Popcorn, Explore, and Canvas), DB check constraints (wrappingpostgres.jslazy queries in native Promises so Bunexpect().rejectsexits promptly), and private reads (Ask retrieval, report input, and home search).Verification
bunx drizzle-kit generate < /dev/null: reportsNo schema changes, nothing to migrate.bun run lint: 0 errors.bun run typecheck: passes.bun run packages check: passes.bun test packages/db/test/landscape.test.ts packages/analysis/test/load-transcripts.test.ts apps/api/test/landscape-canary.integration.test.ts: 12 pass, 0 fail (canary 7 tests). Touched packages: 520 pass; the only failures are a DBOS "already registered" error when several conversations suites share one process, which fails the same way on the base branch.Review fixes
whenwould make Drizzle skip it. The SQL is the same hand-written idempotent expand with NOT VALID checks.landscape.tsand pinned by a canary: room producers (Map, Popcorn, Canvas, Explore) are gated, while host-private reads (search, Ask, reports) only drop soft-deleted rows. The new canary test checks that host search still finds pending, held and host-rejected conversations.Merge order: #1437, then #1439, then #1438.