diff --git a/packages/core/src/task-store/async-archive-lineage.ts b/packages/core/src/task-store/async-archive-lineage.ts index 621b766f3e..ac0847f347 100644 --- a/packages/core/src/task-store/async-archive-lineage.ts +++ b/packages/core/src/task-store/async-archive-lineage.ts @@ -39,26 +39,6 @@ import { } from "./async-persistence.js"; import type { ArchivedTaskEntry } from "../types.js"; -/** - * FNXC:TaskStoreArchiveLineage 2026-06-24-07:05: - * The "live parent" predicate for the document/artifact visibility gate - * (VAL-CROSS-015). Documents and artifacts scoped to a task are surfaced in - * live views only when their parent task is live: `deleted_at IS NULL` (not - * soft-deleted) AND `column != 'archived'` (not archived). When the parent is - * archived or soft-deleted, the rows are retained but filtered out of live - * views — they remain for an unarchive/restore. - * - * This predicate is the join condition for `task_documents` / `artifacts` → - * `tasks`. It is the async equivalent of the sync - * `taskExists && taskExists.column !== 'archived'` check in - * `upsertTaskDocument` and the `hasActiveTask` gate in `getTaskDocument`. - */ -export function liveParentFilter(taskIdColumn: ReturnType) { - // The caller passes an equality fragment like eq(schema.project.tasks.id, taskId). - // We compose the live-parent conditions on top. - return and(taskIdColumn, ACTIVE_TASK_FILTER, sql`${schema.project.tasks.column} != 'archived'`); -} - /** * FNXC:TaskStoreArchiveLineage 2026-06-24-07:10: * Upsert an archived-task snapshot into the cold-storage archive schema diff --git a/scripts/lib/sql-column-literals-baseline.json b/scripts/lib/sql-column-literals-baseline.json index 5afd8218b7..fda9eed92c 100644 --- a/scripts/lib/sql-column-literals-baseline.json +++ b/scripts/lib/sql-column-literals-baseline.json @@ -5,7 +5,7 @@ "packages/core/src/gitlab-issue-analytics.ts": 1, "packages/core/src/mission-store.ts": 1, "packages/core/src/productivity-analytics.ts": 1, - "packages/core/src/task-store/async-archive-lineage.ts": 3, + "packages/core/src/task-store/async-archive-lineage.ts": 2, "packages/core/src/task-store/async-maintenance.ts": 1, "packages/core/src/task-store/async-merge-coordination.ts": 1, "packages/core/src/task-store/reads.ts": 1,