refactor(math-updater): add durable enrichment work#1065
Open
nicobao wants to merge 49 commits into
Open
Conversation
✅ Deploy Preview for agoracitizen canceled.
|
Add pnpm minimum release age policies with scoped security-patch exceptions, update vulnerable JavaScript packages and transitive overrides, and enforce patched uv/pip tooling for Python services. Remove obsolete services/nlp and refresh active Python lockfiles so dependency audits run cleanly under the install cooldown policy. Verified: pnpm audits across JavaScript services; app check and unit tests; agora build and tests; api typecheck and tests; math-updater TypeScript/Python checks; shared-backend tests; scoring-worker lint, typecheck, and tests. Deploy: app, agora, api, math-updater, python-bridge, scoring-worker
Add a sticky opinion-group selector with bottom-drawer group selection, compact scope controls, and scroll preservation for dropdown-driven group switches while keeping visualization clicks in place. Thread an explicit conversation scroll context through normal, embedded, and dev analysis views so sticky offsets can account for the action bar consistently. Extract the shared dropdown selector trigger and keep email input state normalized while accepting Quasar's broader emitted value. Deploy: agora
Add a small compact-mode gap between the sticky group scope text and chevrons so the merged control remains tight but no longer feels cramped. Deploy: agora
Move conversation analysis display to canonical view snapshots and remove reliance on live conversation counter columns. Imported conversations now wait for terminal analysis work before reporting completion, while opinion/comment/vote flows refresh snapshots and schedule analysis consistently. Add persisted AI and translation expectation state so the API can decide whether pending enrichment should block display without mirroring worker environment configuration. Persist math artifacts before enrichment, track committed-but-incomplete work with persisted_analysis_snapshot_id, and recover enrichment/completion idempotently after worker restarts. Introduce lineage-level English description work and description-locale translation work tables. Latest/checkpoint snapshots create durable enrichment demand, old non-checkpoint work can be abandoned when superseded, and checkpoint enrichment remains retryable. Split math analysis and AI-description Valkey queues, add source helpers for analysis scheduling, and update math-updater to process RedDwarf pass counts correctly, drain first-pass enrichment work, and retry AI labels/translations without long database transactions. Move imports to the new Python import-worker service and replace the old Python bridge. Add generated import queue contracts, regenerated Python shared models/types, worker tests, and import completion event bridging. Add premium entitlement administration endpoints and UI, generated OpenAPI clients/docs, and database backfills. Keep generated migrations and synced schemas aligned with the TypeScript schema source of truth. Harden package installation and service documentation, clean up obsolete TypeScript math-updater files, remove dead config, and refresh formatting for source files that are checked by service tooling. Verification already run: api format:check/lint/test; math-updater ruff format --check, ruff check, basedpyright, pytest; import-worker ruff format --check, ruff check, basedpyright, pytest; scoring-worker make test/lint/typecheck. Deploy: agora, api, import-worker, math-updater, scoring-worker
Add conversation_view_snapshot.activated_at as the publication gate for generic latest snapshot readers. API and import-created current-state snapshots activate immediately, while math-updater analysis snapshots remain inactive until expected first-pass AI description and translation statuses are terminal. Move the generated Flyway activation migration into a separate V0063.4 pre-drop slot, matching the existing branch pattern where additive migrations run before destructive legacy drops. Keep the Drizzle migration as the generated source-of-truth counterpart. Also harden AI description enrichment by adding explicit Bedrock, Secrets Manager, and Google Translation timeouts, processing claimed AI/translation work with bounded parallelism, running external provider calls outside DB sessions, and verifying lease tokens before persisting returned results. Deploy: agora, api, import-worker, math-updater
Move long-lived AI description and translation retry work out of the main math-updater loop while preserving mandatory first-pass activation semantics.\n\nChanges:\n- Keep math-updater focused on analysis plus first-pass enrichment for newly created snapshots\n- Add separate AI description and description translation worker entrypoints using the existing math-updater package/image\n- Add a dedicated translation Valkey wakeup queue while keeping Postgres as the source of truth\n- Add layered worker env prefixes with shared Python worker config and math-updater fallback\n- Add Bedrock contextual translation with Google fallback and stricter output validation\n- Add first-pass retry/cooldown behavior so failed fresh snapshots fallback-activate before background retry\n- Add local kitty tabs and production compose processes for the new workers\n- Cover config layering and Bedrock translation parsing/payload behavior in tests\n\nDeploy: math-updater
Prevent administrators from manually granting premium features that should be system-derived.\n\nChanges:\n- Add a GrantablePremiumFeature schema that excludes prioritization\n- Update entitlement creation DTOs and generated API clients to use grantable features\n- Remove prioritization from the administrator entitlement UI options\n- Stop deriving prioritization access from MaxDiff conversation type in premium entitlement checks\n- Refresh generated OpenAPI/shared DTO artifacts for the changed request schema\n\nDeploy: agora, api
Remove stale Claude planning and analysis documents from the API service directory.\n\nThese files are no longer part of the maintained project documentation and were left behind from earlier planning work.\n\nDeploy: none
Complete non-processable analysis and AI-description work instead of leaving inactive snapshots blocked by pending locale statuses. Non-processable conversations now have pending locale statuses moved to fallback, display-safe snapshots activated, and queued work skipped before claiming. Claimed work also re-checks processability before external AI calls and before persistence so it can be abandoned safely if the conversation stops being processable.\n\nAdd SQLite-backed coverage for the stranded snapshot cleanup path and the claimed non-processable lineage path.\n\nDeploy: math-updater
Add checkpoint-aware analysis views across the API, frontend, and worker pipeline. Analysis fetches now support selectable views and explicit checkpoint snapshots, with premium gating for fixed group counts and snapshot-backed action-bar counts. Add the compact checkpoint timeline, live pause/resume behavior, analysis-view drawer, report checkpoint routing, and generated OpenAPI clients. Live analysis now updates counts from display-available SSE snapshots while avoiding heavy analysis refetches when the analysis tab is inactive. Persist lifecycle and milestone checkpoints, add reopened checkpoint support, and route display-safe snapshot activation through the math-updater and AI description activation flow. Add durable realtime outbox events backed by Postgres NOTIFY. Deploy: agora, api, math-updater, import-worker, scoring-worker
Remove legacy API one-shot startup repair jobs that ran database queries immediately after process start. These included stuck export cleanup, import body cleanup, and legacy MaxDiff comparison backfill. The regular import/export worker plumbing remains active. Add PostgreSQL readiness retry in the shared backend DB factory so the API waits for primary and read-replica connections to answer a simple query before continuing startup. This prevents transient Postgres startup states from crashing the API before it can serve. Harden import-worker, math-updater, and scoring-worker startup by retrying database readiness and restarting worker loops after unexpected transient failures. Also catch API export worker ticks and import-worker event bridge polls so background failures are logged instead of becoming unhandled rejections. Deploy: api, import-worker, math-updater, scoring-worker
Regenerate the analysis schema migrations as an additive schema migration followed by ordered manual data steps and a cleanup migration. The manual Flyway steps seed default opinion-group specs, backfill legacy Polis analysis data, backfill premium feature entitlements, create the realtime outbox notify trigger, and publish due indexed conversations before legacy columns are dropped. Add durable conversation view snapshots, analysis checkpoints, premium analysis variants, realtime analysis update events, and related frontend handling. Update live analysis and checkpoint timeline flows to use snapshot ids and checkpoint-aware invalidation. Update math-updater and generated worker models for persisted analysis work, AI description/translation work, retry handling, and view snapshot activation. Regenerate shared API/client artifacts and Python generated models. Deploy: agora, api, import-worker, math-updater, scoring-worker
Check survey premium access in the create conversation flow before routing from the seed step to the survey step. Users without survey entitlement now publish directly from the seed step with no survey config. Protect direct navigation to the survey creation route by withholding the editor until access is confirmed, clearing stale survey config, and redirecting back to the seed step when access is missing. Deploy: agora
Ensure the statement list renders after creating the first statement in an empty conversation. The newly-created statement is already held as the highlighted target opinion, but the empty-state gate previously hid the list while the cached query data was still empty. Deploy: agora
Broadcast a new_opinion SSE event when a non-seed opinion is created, excluding the author so their own submission does not trigger the pill. Reuse the feed new-content pill for both new conversations and new statements. The statement pill is driven by SSE, marks comment queries stale without immediate refetch, loads the New statements tab on tap, and can be dismissed with a horizontal drag animation. Add a small opinion updates store to track pending statement updates per conversation and add the new SSE event type to shared/synced type definitions. Deploy: agora, api
Expose aiLabelingEnabled in conversation metadata and propagate it through generated API clients. Mask cached and checkpointed Polis cluster AI labels and summaries on the frontend when AI labeling is disabled, while keeping stored analysis data unchanged. Also refresh generated Python models so premium feature enums no longer include prioritization. Deploy: agora, api, import-worker, math-updater, scoring-worker
Update the new conversation control bar and labeling options dialog to refer to LLM usage consistently across all supported display languages. This also updates the dialog descriptions so the explanatory copy matches the LLM on/off labels. Deploy: agora
Wrap root dev targets with a shared log runner that preserves terminal output while writing rotating logs under .local/logs. The runner also extracts AGORA_LOAD_EVENT and AGORA_BROWSER_EVENT marker payloads into JSONL files and exposes paths for k6 summary exports. Add dev-only Quasar browser logging for console calls, runtime errors, unhandled rejections, and route changes. The browser logger and Vite middleware are registered only when ctx.dev is true, so production runtime behavior is unchanged. Add semantic load-test events for setup, page fetches, opinion creation, votes, and teardown, then document log locations and helper commands across the repo and worker READMEs. Deploy: none
Position the reusable new-content pill from an in-place anchor while rendering the sticky version in a body teleport. This keeps it centered on the content column and above sticky/tab stacking contexts without relying on q-page-sticky event typing workarounds. Use the existing action-bar scroll injection when showing new statements so the pill action matches the conversation controls instead of forcing a raw window scroll. Deploy: agora
Create an activated conversation view snapshot for every completed analysis generation so action-bar counts and analysis keep sharing the same version boundary, even when no candidate is displayable due to privacy or insufficient grouping. Keep checkpoint timeline reasons and AI label work gated to displayable candidates, so non-displayable snapshots update counts without creating fake checkpoints or pending AI-label work. Add the analysis dev harness/live preview refinements, preserve previous analysis data during refreshes, animate statement list changes, and add subtle count transitions for action-bar/tab counts. Deploy: agora, math-updater
Add a start-aligned content variant to the shared dropdown selector button while keeping centered alignment as the default for existing callers. Use the shared start alignment for the opinion group selector so the selected group label and chevron stay together on the left. Deploy: agora
Route completed conversation onboarding through the existing intention-aware exit helper instead of replacing directly to the conversation route. This preserves the stored agreement intention after auth, ticket, or survey onboarding so the conversation page receives the original opinion query parameter and highlights the statement the user tried to vote on. The first conversation onboarding back button now uses the same exit helper as close, while internal step back buttons continue to navigate within onboarding. Deploy: agora
Rename the root landing-page development target from dev-app-new to dev-landing and update the matching documentation references.\n\nClean up stale services/app documentation and empty facilitator/participant placeholders that described the SvelteKit service as the future Vue app replacement instead of the landing page and blog.\n\nDeploy: none
Keep the analysis checkpoint timeline visible when no checkpoints are available so users still see disabled Start and live Now markers. Keep playback controls available without checkpoint data and allow pausing the current empty live frame. Reset invalid checkpoint route selections back to live after checkpoint data loads, matching the empty timeline state until a real checkpoint exists. Deploy: agora
Keep the opinion group visualization harness aligned with production behavior by preventing auto mock events from mutating visible setup controls. The facilitator preference now starts as a fixed five-group preference for the analysisView=5 test path, while auto mock variant events change only per-snapshot scores so the recommended default can move through backend-like data. AI label events now cycle backend payload states instead of changing the AI label scenario control: configured labels, omitted labels for fallback A/B/C rendering, and refreshed label/summary text. Deploy: agora
Update analysis view option semantics and UI for the group-count selector. Changes: - Remove the enabled flag from analysis view option DTOs and derive selectability in the frontend. - Add unavailable status for no-result options and reserve discouraged for candidate-backed weak results. - Keep fixed group counts in numeric order while pinning facilitator preference and Auto first. - Hide candidate metrics for locked options while preserving selectable unavailable fixed-count rows for empty-state explanations. - Refresh the analysis view drawer with sections, chips, score labels, Learn More copy, and reusable chip/header support. - Update dev visualization controls for discouraged, unavailable, and mobile static controls. - Regenerate OpenAPI clients and synced shared types. Deploy: agora, api
Add a dev-only simulation mode for AI description and translation providers so first-pass enrichment, retry scheduling, fallback, and worker retry behavior can be tested without Bedrock or Google calls. Simulation requires AGORA_DEV_MODE=true and MATH_UPDATER_SIMULATION_PROVIDERS_ENABLE=true. Config validation rejects simulation outside dev mode, rejects simulation modes without the explicit enable flag, and rejects mixed real-provider plus simulated-provider configurations. The math-updater, AI description worker, and description translation worker now build a simulation runtime after validation, emit explicit provider-mode logs, and produce AGORA_LOAD_EVENT markers for simulation outcomes, first-pass lifecycle, and retry scheduling. Dev Make targets set AGORA_DEV_MODE=true for the relevant Python workers. Tests cover normal non-dev config, real AI config, dev-only simulation validation, fake provider creation, retryable/non-retryable simulated failures, and semantic event logging. Deploy: math-updater
Remove the unsupported multi-conversation k6 scenario and its monitoring runner because the scenario relied on mutable per-VU state that teardown cannot reliably observe. Keep the Vite build focused on the remaining single-conversation scenario and refresh the load-testing lockfile dependency resolutions. Deploy: none
Emit full conversation settings snapshots over realtime SSE when facilitator-editable settings change, including close/open transitions. The frontend patches conversation metadata from the event, suppresses duplicate active-tab toasts via optimistic cache comparison, and only refetches live derived analysis queries that depend on the changed setting. Rename the analysis auto view from system_default to auto across shared schemas, generated clients, backend selection logic, and frontend picker state. Preserve snapshot-captured variants for historical views while using current facilitator group-count preference for live/default analysis selection. Update analysis picker behavior and tests for variant locks, unavailable facilitator preferences, and no-analysis states. Refresh user-facing copy to say facilitator in relevant conversation messages. Deploy: agora, api
Move shared Python worker logic out of math-updater into a dedicated agora-worker-shared package and update generated Python artifacts to sync there. Add separate ai-description-retry-worker and description-translation-retry-worker services with their own package metadata, Dockerfiles, Makefiles, env examples, and lockfiles. Keep math-updater focused on red-dwarf analysis plus immediate first-pass AI description and translation work, and enqueue retry/backlog work for the dedicated retry workers. Update root dev targets, Docker compose production examples, Kitty launcher tabs, and docs for the new service names. Add Python cache, virtualenv, and suffix .env ignore rules so runtime artifacts and real env files are not staged. Verification: - uv run --extra dev ruff check (python-worker-shared, math-updater, ai-description-retry-worker, description-translation-retry-worker) - uv run --extra dev pytest -q (python-worker-shared) - uv run --extra dev basedpyright (python-worker-shared, math-updater, ai-description-retry-worker, description-translation-retry-worker) Deploy: math-updater, ai-description-retry-worker, description-translation-retry-worker
Add reusable worker simulation scenario configs and launch paths for the math updater, AI description retry worker, and description translation retry worker. Scenario files now use env.simulated-* names so they can be committed without colliding with local .env handling. Extend worker and shared retry logs with queue lag, claim timing, processing timing, provider timing, retry delay, immediate rerun, and conversation slug context. Add slug-aware analysis wake scheduling and type-safe import-worker analysis enqueue payloads so logs can consistently include conversationSlugId where available. Deploy: api, import-worker, math-updater, ai-description-retry-worker, description-translation-retry-worker
Reject duplicate representative-opinion sets within a successful red-dwarf candidate as a contract violation. The check compares unordered (statement, agree/disagree) pairs, so order differences are invalid duplicates while the same statement with a different stance remains valid. Make lineage assignment explain normal reuse/create decisions while treating ambiguous historical matches and claimed-twice prior lineages as invariant failures. The math-updater isolates those persistence-time failures per claim and marks the affected analysis work non-retryable instead of retrying forever or blocking the whole batch. Deploy: math-updater
Allow the analysis checkpoint timeline to scroll horizontally with desktop mouse wheel input and mouse drag gestures. Preserve normal checkpoint selection by only treating mouse movement beyond the drag threshold as a scroll drag, then suppressing the synthetic click after an actual drag. Deploy: agora
Type the new content pill's computed style objects as CSSProperties so the Vue template style bindings satisfy linting. Keep the sticky pill hidden until its anchor has a measurable width to avoid rendering it at an incorrect position. Deploy: agora
Update the analysis view auto-mode translations so non-English locales use natural Auto/Automatic wording instead of literal recommended-default labels. Also align the unavailable and same-as captions with the auto-mode label for consistency across locales. Deploy: agora
Updates the create conversation title placeholder in every supported display language from ask-question wording to title wording. Deploy: agora
Avoid scheduling conversation analysis after a survey gate transition when the participant has no analysis input yet. Survey answers and completion state still persist immediately, but a survey-only participant cannot affect math inputs or survey aggregates until they vote or submit MaxDiff comparisons. The guard checks for counted votes in regular conversations and non-deleted comparisons in MaxDiff conversations before waking analysis. Later voting paths already schedule analysis, so skipped survey-only transitions are picked up when the participant contributes input. Deploy: api
Add per-conversation SSE subscriptions and subscriber-filtered realtime broadcasts so clients only receive conversation-relevant analysis, settings, and opinion events. Harden frontend SSE parsing, reconnect subscriptions on route changes, and add catch-up logic for expected live analysis snapshots. Refactor first-pass analysis activation so unactivated snapshots no longer become checkpoints. Checkpoint reasons are materialized only when a display-safe snapshot activates, while math-updater owns first-pass AI/translation recovery and stale unactivated snapshot abandonment. Retry workers remain activated-only and background-only. Improve checkpoint timeline reason labels and collapse behavior for first analysis, automatic group-count changes, available group counts, milestones, and closed conversations. Extend load-testing and worker observability/configuration for the new live-analysis and first-pass flows, including lease heartbeat validation and retry-worker image wiring. Verification: python-worker-shared ruff, basedpyright, full pytest; math-updater ruff and basedpyright; AI retry worker ruff and basedpyright; translation retry worker ruff and basedpyright; agora lint and vue-tsc; api lint and typecheck; load-testing lint; shared format check; git diff --check. Deploy: agora, api, math-updater, ai-description-retry-worker, description-translation-retry-worker
Persisted analysis work can be left running after math persistence succeeds but first-pass enrichment or lease extension fails. Recovery previously tried to clear lease fields while keeping running_data_generation, violating analysis_work_state_running_lease_check and leaving snapshots stuck unactivated. Changes: - allow expired persisted work to be claimed directly for resume without stealing active leases - only clear expired non-persisted running work during recovery - remove redundant first-pass lease extensions and update remaining heartbeat leases in ID order - batch AI/translation reconciliation inserts to stay below PostgreSQL parameter limits - ignore empty SSE frames before JSON parsing - use typed simulated retryable errors and log expected simulation retries as warnings Deploy: agora, math-updater, ai-description-retry-worker, description-translation-retry-worker
Split analysis fetching into metadata and candidate-content paths so the frontend can request only the stale parts of an analysis view. Add freshness-aware primary fallback checks so replica lag does not return stale primary data as fresh. Add live SSE catch-up, analysis view state handling, pull-to-refresh support, checkpoint action-bar stats, and reusable cluster selector behavior on the Agora frontend. Regenerate the OpenAPI clients for Agora and load-testing. Persist full survey aggregate values separately from publicly suppressed values and add migrations/backfills for the new survey aggregate columns. Add the realtime outbox replay index and drop redundant notification indexes. Move AI-description and translation retry logic onto shared worker helpers, add Python aggregate typechecking targets, and update scoring/load-testing support code for the new shared models and crypto contracts. Deploy: agora, api, math-updater, import-worker, scoring-worker
Refactor math-updater AI-description first-pass processing so English descriptions and translations run as explicit terminal phases before snapshot activation. First-pass claiming now only targets pending statuses, so ready/fallback statuses are treated as complete and retry workers are no longer required for initial activation. Finalization no longer creates more work immediately before activation. It refreshes status state, applies explicit config fallback behavior, rejects pending expected statuses, and activates only after the first pass has made every expected status ready or fallback. Add per-conversation claim indexes for AI description and translation work queues while keeping the existing global due-scan indexes for retry-worker discovery. Also document migration authoring rules in AGENTS.md and include the Flyway rename to V0068.1. Deploy: api, math-updater
Pass AGORA_LOG_RUN_ID explicitly to every kitty-launched development tab and print the selected run id plus log directory before launching services. This keeps all dev-log-runner output from run_all_in_kitty_tabs.sh grouped under one .local/logs/runs directory instead of letting each tab generate its own timestamped run id. Deploy: none
3a4f55b to
aac134a
Compare
Replace the persisted AI description locale status table with an expectation table that coordinates retry demand while deriving display readiness from canonical content and work rows. This avoids stale persisted status blocking snapshot activation or frontend analysis display. Update API and frontend analysis paths to derive English and requested-locale readiness from actual lineage descriptions, translations, and work rows. Ensure checkpoint views can create missing expectations on demand and keep latest analysis displayable while descriptions complete or fall back. Update math-updater and shared Python worker logic so first-pass activation logs pending expectations instead of hard failing, ignores work that already has ready content, fixes translation expectation retry reconciliation, and uses scoped SKIP LOCKED locking for AI description work claims. Add generated schema, OpenAPI client updates, migrations, and tests covering first-pass activation, ready-content pending checks, and translation expectation reconciliation. Deploy: agora, api, math-updater
Stabilize AI description and translation processing across first-pass and retry workers, including lease heartbeats, schema/startup readiness, batched translation and description processing, partial-output persistence, and lower-noise worker logging. Add realtime comment-stat updates and frontend handling for new statement pills, with generated API clients and shared DTO/SSE types updated accordingly. Make selected analysis views lazily request AI descriptions/translations for the chosen candidate and remove the eager LLM re-enable backfill for old snapshots. Deploy: agora, api, math-updater, ai-description-retry-worker, description-translation-retry-worker
Limit first-pass AI enrichment to the live eager candidate set: auto plus the stored facilitator-preference candidate when it differs. Math analysis still persists all variants; only AI description and translation work creation is narrowed. Make retry/readiness candidate resolution explicit between live eager candidates and explicit lazy-demand candidates. Stale checkpoints no longer retry old first-pass fallback work or fan out translations unless a selected variant/locale is requested. Add focused tests for eager candidate selection, stale checkpoint lazy behavior, and stale checkpoint translation fan-out prevention. Deploy: math-updater, ai-description-retry-worker, description-translation-retry-worker
Conversation edit now carries the current in-conversation route as a return target when opening the edit screen. Successful saves return to that same safe conversation sub-route, including tabs, report pages, query strings, and hashes. Survey edit keeps the same return target through nested edit navigation and uses the same fallback behavior after save or delete. Unsafe, external, cross-conversation, or edit-route return targets fall back to the clean base conversation page without preserving the returnTo query parameter. Deploy: agora
Backfilled legacy Polis analyses create only the current displayed candidate per conversation. Current analysis reads require a non-null selection_score, so otherwise valid backfilled snapshots could be treated as unavailable. Add an assessment row with a fixed selection score for non-singleton backfilled candidates while preserving hidden two-group singleton behavior. Deploy: api
Replace the legacy all-in-one analysis responses with frame-scoped manifest, group, label, and opinion-list sections. The frontend now promotes only complete frames and keeps previous displayed data while sections refresh. Remove legacy analysis routes, DTOs, frontend wrappers, and stale readiness polling. Label display is derived from the selected frame's concrete group labels instead of backend retry/readiness state. Optimize backend frame section queries by SQL-limiting opinion lists, hydrating cluster stats only for returned opinions, narrowing group representative hydration, and pushing mute filtering into SQL. Add the supporting representative-opinion stats index and drop the redundant mute-source index. Regenerate shared DTOs, OpenAPI clients, and the Flyway/Drizzle migration for the schema changes. Deploy: agora, api
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
conversation_view_snapshot.activated_atas the publication gate for generic latest snapshot readers; math-updater analysis snapshots activate only after expected first-pass enrichment is terminal.Included Commits
9f6a8f7cchore(deps): harden package installsabdd0897feat(agora): add sticky group selector0c56c098fix(agora): space sticky scope controls18544c84feat(analysis): add durable enrichment work436aadf6fix(analysis): gate latest snapshots by activationMigration Notes
V0062throughV0066, including pre-dropV0063.xmigrations for AI expectations, persisted analysis recovery markers, lineage/translation work tables, and conversation view snapshot activation.V0063.xFlyway files before destructive legacy drop migrations; Drizzle migrations remain the generated source-of-truth counterparts.Verification
cd services/api && pnpm exec prettier --check src/service/comment.ts src/service/common.ts src/service/conversationExport/generators/comments.ts src/service/conversationViewSnapshot.ts src/service/feed.ts src/service/opinionGroupAnalysis.ts src/shared-backend/schema.ts ../shared-backend/src/schema.ts drizzle/meta/_journal.json drizzle/meta/0068_snapshot.json && pnpm lint && pnpm testcd services/math-updater && uv run --extra dev ruff format --check src tests && uv run --extra dev ruff check src tests && uv run --extra dev basedpyright src/math_updater && uv run --extra dev pytestcd services/import-worker && uv run --extra dev ruff format --check src tests && uv run --extra dev ruff check src tests && uv run --extra dev basedpyright src/import_worker && uv run --extra dev pytestcd services/scoring-worker && make test && make lint && make typecheckNotes
src/apiare already ignored by service Prettier/ESLint config; they are committed as generated output.