Skip to content

Commit 24c3bd8

Browse files
mpstatonclaude
andcommitted
feat(shell, flows), feat(person-db-resolver, resolver): N-flow rotation + a person-aware resolver as its own remote
Two coherent threads landed together tonight because the files overlap too much to split cleanly — the flow-registry rename (and the third flow it enabled) happened first, then testing that third flow against a real people CSV is what surfaced the need for the second. ROTATION becomes N flows: the header's "Flows" popdown moved to sit where the numbered bubble strip lives and now actually switches which flow is active. shell/src/remotes.ts's single hardcoded ROTATION split into CSV_AUGMENTATION_ROTATION, BUILD_CORPORA_ROTATION, and (added minutes later, proving the "one array + one registry entry" claim) EVENT_ATTENDEES_ROTATION. FlowWidget's bubble count is derived from the active flow's rotation length instead of a fixed constant. Person-aware resolver: record-db-resolver only ever knew organizations — running FreedomFest 2026's speaker CSV through it matched a person as a fuzzy org name and, on "create new org," actually wrote a person into the organizations table plus a nonsense opportunity (both deleted from SurrealDB Cloud by hand). The fix is a new sibling remote, person-db-resolver: match-or-create a person, then independently match-or-create their org and RELATE the affiliation with a role — no opportunity concept, person and org are separate decisions the operator can make in either order, together or alone, not a coupled 1:1 (the first version of this shipped with the org section wrongly gated behind the person being resolved first; fixed same night). Backend: person-resolver.ts (person.candidates / person.apply / person.affiliate / person.add_observation), reusing resolver.ts's org match/create logic via a newly-extracted resolveOrgRow rather than reimplementing it. Every id that crosses the NATS/WS wire and comes back in a later call is a plain person_uuid string, re-looked-up fresh inside the query that needs a real RecordId — the same lesson domains.ts already learned once for source_uuid, re-learned here the hard way (the first version failed RELATE with a type error on the first live test). Frontend: apps/person-db-resolver (new, port 3010) adds a column-mapping step asked once per record set — the direct fix for record-db-resolver's bug of hardcoding five Master Pipeline Tracker column names and dropping everything else a differently-shaped CSV carried. record-db-resolver itself got two fixes found along the way: RecordCard shows every raw CSV column now, not just the org-normalized subset, and it was missing the active-record-set-changed listener pack-runner already had, so a click from Record Collector on an already-mounted resolver landed on an empty picker instead of the uploaded set. record-collector gained a second button ("Resolve Orgs to Canonical DB" / "Resolve People to Canonical DB") and a new "Augment a CSV of People" flow. Files: - shell/src/flows.svelte.ts (new), shell/src/remotes.ts, FlowWidget.svelte, layout.svelte.ts, App.svelte, rsbuild.config.ts - services/record-surrealdb-resolver/src/person-resolver.ts (new), person-handlers.ts (new), resolver.ts, server.ts - services/workspace/src/capabilities.ts - apps/person-db-resolver/ (new) - apps/record-db-resolver/src/App.svelte, app.css, components/RecordCard.svelte - apps/record-collector/src/App.svelte - context-v/plans/Person-Aware-Canonical-Resolver-Extension.md (new) - context-v/explorations/Augment-It-Has-Outgrown-One-Flow-The-Choose-A-Flow-Front-Door.md - changelog/2026-07-07_02_ROTATION-Becomes-N-Flows-The-Bubble-Strip-Goes-Dynamic.md (new) - changelog/2026-07-07_03_Person-DB-Resolver-A-Sibling-Remote-For-People-Not-Orgs.md (new) Also included: - pnpm-lock.yaml (person-db-resolver's new workspace package) - clients/reach-edu and clients/humain-vc gitlinks intentionally NOT bumped here — reach-edu's own commit (FreedomFest CSVs) already pushed separately; parent gitlink reconciliation is the user's deliberate step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 618ec0d commit 24c3bd8

35 files changed

Lines changed: 2730 additions & 133 deletions
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "@augment-it/person-db-resolver",
3+
"version": "0.0.1",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "rsbuild dev",
8+
"build": "rsbuild build",
9+
"preview": "rsbuild preview",
10+
"check": "svelte-check --tsconfig ./tsconfig.json"
11+
},
12+
"dependencies": {
13+
"@augment-it/theme": "workspace:*",
14+
"@augment-it/workspace": "workspace:*",
15+
"svelte": "^5.56.4"
16+
},
17+
"devDependencies": {
18+
"@module-federation/enhanced": "^2.6.0",
19+
"@module-federation/rsbuild-plugin": "^2.6.0",
20+
"@rsbuild/core": "^2.1.2",
21+
"@rsbuild/plugin-svelte": "^2.0.0",
22+
"svelte-check": "^4.7.1",
23+
"typescript": "^6.0.3"
24+
}
25+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { defineConfig } from '@rsbuild/core';
2+
import { pluginSvelte } from '@rsbuild/plugin-svelte';
3+
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
4+
5+
// Federated remote — person-db-resolver. Sibling to record-db-resolver, but
6+
// for PEOPLE rows: match-or-create a person, then independently match-or-
7+
// create their org and RELATE the affiliation with a role. No opportunity
8+
// concept (that's an org/CRM concept). See
9+
// context-v/plans/Person-Aware-Canonical-Resolver-Extension.md for why this
10+
// is a separate remote rather than a mode inside record-db-resolver.
11+
export default defineConfig({
12+
plugins: [
13+
pluginSvelte(),
14+
pluginModuleFederation({
15+
name: 'personDbResolver',
16+
filename: 'remoteEntry.js',
17+
exposes: {
18+
'./mount': './src/mount.ts',
19+
},
20+
dts: false,
21+
}),
22+
],
23+
source: {
24+
entry: { index: './src/index.ts' },
25+
},
26+
output: {
27+
target: 'web',
28+
overrideBrowserslist: ['last 2 Chrome versions', 'last 2 Firefox versions', 'last 2 Safari versions'],
29+
},
30+
tools: {
31+
swc: {
32+
jsc: { target: 'es2022' },
33+
},
34+
},
35+
html: {
36+
title: 'augment-it · person-db-resolver',
37+
},
38+
server: {
39+
port: 3010,
40+
cors: { origin: ['http://localhost:3100'] }, // the federation shell
41+
},
42+
dev: {
43+
assetPrefix: 'http://localhost:3010',
44+
},
45+
});

0 commit comments

Comments
 (0)