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
+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 () => {},
},
})