Soft-delete + source-count diagnostics; thesis v4 (0.1.0:47)

- DELETE handlers soft-delete (set deleted_at) + cascade contact -> opps/comms/lp
  instead of hard-deleting (guardrail #3); list queries filter deleted rows.
- ingest: chunking excludes soft-deleted records; qdrant delete-by-source-id;
  sync prunes soft-deleted records' vectors incrementally.
- /api/system/status returns raw source-record counts for sanity-checking.
- docs/thesis-seed-v4.md (no "bet" language, scarcity-forward, freedom-tech as
  a banner option, tightened pillars, reworked segments + edge).

Soft-delete verified via the running HTTP server (delete -> hidden + row kept).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Keysat
2026-06-05 12:20:38 -05:00
parent bdf9bec4ff
commit 3c31b1e8a5
8 changed files with 144 additions and 17 deletions
+3 -2
View File
@@ -11,8 +11,9 @@ export const PACKAGE_TITLE = 'Ten31 Database'
// * 0.1.0:42 (Gmail integration) / 0.1.0:43 (Gmail POST-body hotfix)
// * 0.1.0:44 (Phase-0 ingest + MCP server in image; build-index action)
// * 0.1.0:45 (Phase-1 thesis system; dual approval; merge review; in-app index)
// * Current: 0.1.0:46 (packaging fix: ship full backend so migrations run + endpoints work)
export const PACKAGE_VERSION = '0.1.0:46'
// * 0.1.0:46 (packaging fix: ship full backend so migrations run + endpoints work)
// * Current: 0.1.0:47 (soft-delete instead of hard-delete; source-count diagnostics)
export const PACKAGE_VERSION = '0.1.0:47'
export const DATA_MOUNT_PATH = '/data'
export const WEB_PORT = 8080
+3 -2
View File
@@ -7,8 +7,9 @@ import { v_0_1_0_43 } from './v0.1.0.43'
import { v_0_1_0_44 } from './v0.1.0.44'
import { v_0_1_0_45 } from './v0.1.0.45'
import { v_0_1_0_46 } from './v0.1.0.46'
import { v_0_1_0_47 } from './v0.1.0.47'
export const versionGraph = VersionGraph.of({
current: v_0_1_0_46,
other: [v_0_1_0_39, v_0_1_0_40, v_0_1_0_41, v_0_1_0_42, v_0_1_0_43, v_0_1_0_44, v_0_1_0_45],
current: v_0_1_0_47,
other: [v_0_1_0_39, v_0_1_0_40, v_0_1_0_41, v_0_1_0_42, v_0_1_0_43, v_0_1_0_44, v_0_1_0_45, v_0_1_0_46],
})
+27
View File
@@ -0,0 +1,27 @@
import { VersionInfo } from '@start9labs/start-sdk'
// Soft-delete + diagnostics release.
// * The CRM DELETE endpoints now SOFT-delete (set deleted_at) instead of
// hard-deleting (CLAUDE.md guardrail #3), cascading to a contact's
// opportunities/communications/lp_profile. List queries filter deleted rows
// out, so deletes still disappear from the UI but nothing is destroyed.
// * The ingest pipeline excludes soft-deleted records from chunking and prunes
// their vectors from Qdrant on incremental sync (delete-by-source-id).
// * /api/system/status now also returns raw source-record counts so the
// resolved canonical numbers can be sanity-checked.
// No data migration; the deleted_at columns already exist (migration 0001).
export const v_0_1_0_47 = VersionInfo.of({
version: '0.1.0:47',
releaseNotes: {
en_US: [
'Records are now soft-deleted instead of permanently destroyed (deletes',
'disappear from the UI but are recoverable), the search index prunes',
'deleted records, and the System Status data now includes raw source-record',
'counts so the resolved entity numbers can be checked.',
].join(' '),
},
migrations: {
up: async () => {},
down: async () => {},
},
})