ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/sourcing/ingest.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/sourcing/ingest.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision09015496d565a172bcaa15cfe9a8e4b072b13df0
Branchworkstream-b-screenmatch
Path or archive memberinternal/platform/sourcing/ingest.go
Original SHA-256fa33ea6a5ce099d54017158ed503c46af36cfbd9581eda2bbbc1eee1799ac4dc
Git blob SHA06384ae2c2f827b3902f58210c840b4fd1b9f5ce
Reading-copy SHA-256fa33ea6a5ce099d54017158ed503c46af36cfbd9581eda2bbbc1eee1799ac4dc

Original source ↗

Every recorded occurrence

These 43 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-b-screenmatch09015496d565a172bcaa15cfe9a8e4b072b13df0Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-a-opportunity-intelligence1675031db74316e100782d063e9eda1a597fe3a1Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-d-command-center255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-d-missionmatch3be46ba89edb737182075a2b320509b42dc916f8Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-e-dataflow-deploy433815a042f9741411e60fa553fe72143e9b10dbOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gow3-ai-staffing-recommendations43d56387270ef4da4cabd794d97ca6a49909bc7dOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-e-commercial-stubs4437da660539284a400ee380b9b427a300c369eeOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows3-clearance4b8e7ce594c068621867f9c9deed0ec64ae6c553Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-c-slatematch5cd60c918301b46ecd6ed3e03e20c395da0062e2Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goai-intelligence-layer5d5ddff70393a197c5f54a45280bb5dd42b24755Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goper-tenant-routing9bde0f9a74b89d01980fa658e5253acda7528d0cOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goai-brain-liveaac32fc49c878cc5bca099459307611562d0bac1Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows1-ontology-syncb596f449a32a1016fbd403c36505cc00a1ac9ee6Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goruthless-debug-sweepb7d742f8f032984be3817efffa3eb8b13b651c1fOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.godeploy-and-opsbdacd9d0b4d5998d25fc74bf4007f4c3ec538c7aOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-b-sam-contract-awardsd5101cceb98e70000cebb31d3e7ac73d747d3a6dOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-a-shared-coree0de03ac3a1ec826bd15d0e048e3b02baa23eeffOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows2-alias-relationshipe4dada4601c6eb101830f9d223a9655dfa120616Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goper-tenant-routing9bde0f9a74b89d01980fa658e5253acda7528d0cOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-a-shared-coree0de03ac3a1ec826bd15d0e048e3b02baa23eeffOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-c-slatematch5cd60c918301b46ecd6ed3e03e20c395da0062e2Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows1-ontology-syncb596f449a32a1016fbd403c36505cc00a1ac9ee6Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gow3-ai-staffing-recommendations43d56387270ef4da4cabd794d97ca6a49909bc7dOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows3-clearance4b8e7ce594c068621867f9c9deed0ec64ae6c553Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-d-command-center255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-e-dataflow-deploy433815a042f9741411e60fa553fe72143e9b10dbOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goruthless-debug-sweepb7d742f8f032984be3817efffa3eb8b13b651c1fOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goai-intelligence-layer5d5ddff70393a197c5f54a45280bb5dd42b24755Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-a-opportunity-intelligence1675031db74316e100782d063e9eda1a597fe3a1Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.godeploy-and-opsbdacd9d0b4d5998d25fc74bf4007f4c3ec538c7aOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-b-screenmatch09015496d565a172bcaa15cfe9a8e4b072b13df0Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-e-commercial-stubs4437da660539284a400ee380b9b427a300c369eeOpen original
Janady13/missionmatch / internal/platform/sourcing/ingest.goai-brain-liveaac32fc49c878cc5bca099459307611562d0bac1Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-d-missionmatch3be46ba89edb737182075a2b320509b42dc916f8Open original
Janady13/missionmatch / internal/platform/sourcing/ingest.goworkstream-b-sam-contract-awardsd5101cceb98e70000cebb31d3e7ac73d747d3a6dOpen original

Recovered source transcript

package sourcing import ( "context" "errors" "fmt" "strings" "github.com/google/uuid" "github.com/jackc/pgx/v5" "github.com/missionworkforce/missionmatch/internal/platform/database/dbgen" "github.com/missionworkforce/missionmatch/internal/platform/extraction" ) // IngestPerson resolves a sourced person to a candidate record and writes their STRUCTURED workforce // data, so a sourced lead is a real scoring input (skills, certs, customer agencies as rows), not a free // text headline, and never a duplicate of an existing bench person. It runs on the caller's transaction; // the import command wraps it with the sourcing_log (consent and legal basis) write. Returns the // resolved candidate id. // // Identity resolution uses blocking plus multi attribute matching: an exact email match merges into the // existing person; failing that, an exact normalized name plus location match merges; otherwise a new // external candidate is created. A merge ENRICHES (links the external id, backfills an empty headline and // a lower years figure, adds any new skills, certs, and agencies) and never clobbers curated bench data. func IngestPerson(ctx context.Context, q *dbgen.Queries, orgID uuid.UUID, sp SourcedPerson, ext extraction.Extractor) (uuid.UUID, error) { candID, found, err := resolveCandidate(ctx, q, orgID, sp) if err != nil { return uuid.Nil, err } if found { if err := q.LinkSourcedCandidate(ctx, dbgen.LinkSourcedCandidateParams{ ID: candID, ExternalID: nzPtr(sp.ExternalID), Headline: nzPtr(buildHeadline(sp)), YearsExperience: int32(sp.Years), }); err != nil { return uuid.Nil, fmt.Errorf("link sourced candidate: %w", err) } } else { extID := sp.ExternalID candID, err = q.UpsertExternalCandidate(ctx, dbgen.UpsertExternalCandidateParams{ OrganizationID: orgID, FullName: sp.FullName, Email: firstOrNil(sp.Emails), Headline: nzPtr(buildHeadline(sp)), YearsExperience: int32(sp.Years), Location: nzPtr(sp.Location), Remote: strings.Contains(strings.ToLower(sp.Location), "remote"), ExternalID: &extID, }) if err != nil { return uuid.Nil, fmt.Errorf("upsert external candidate: %w", err) } } // Skills come from the provider's STRUCTURED field, more reliable than gazetteer extraction. Each is // upserted into the ontology then attached; the add queries are idempotent (ON CONFLICT DO NOTHING). for _, name := range dedupe(sp.Skills) { sk, err := q.UpsertSkill(ctx, dbgen.UpsertSkillParams{Name: name}) if err != nil { return uuid.Nil, fmt.Errorf("upsert skill: %w", err) } if err := q.AddCandidateSkill(ctx, dbgen.AddCandidateSkillParams{OrganizationID: orgID, CandidateID: candID, SkillID: sk.ID}); err != nil { return uuid.Nil, fmt.Errorf("add candidate skill: %w", err) } } // Certifications and customer agencies are not structured in the provider feed, so extract them from // the profile text via the extraction port. Its skills output is ignored in favor of sp.Skills. rx, err := ext.ExtractResume(ctx, profileText(sp)) if err != nil { return uuid.Nil, fmt.Errorf("extract profile: %w", err) } for _, name := range dedupe(rx.Certifications) { if err := q.AddCandidateCertification(ctx, dbgen.AddCandidateCertificationParams{OrganizationID: orgID, CandidateID: candID, Name: name}); err != nil { return uuid.Nil, fmt.Errorf("add candidate certification: %w", err) } } for _, agency := range dedupe(rx.Agencies) { if err := q.AddCandidateCustomerExperience(ctx, dbgen.AddCandidateCustomerExperienceParams{OrganizationID: orgID, CandidateID: candID, Agency: agency}); err != nil { return uuid.Nil, fmt.Errorf("add candidate customer experience: %w", err) } } return candID, nil } // resolveCandidate returns an existing candidate id for the sourced person when identity resolution // matches, else found is false. Email is tried first (strongest signal), then name plus a non empty // location. ErrNoRows is the normal not found path, not an error. func resolveCandidate(ctx context.Context, q *dbgen.Queries, orgID uuid.UUID, sp SourcedPerson) (id uuid.UUID, found bool, err error) { if len(sp.Emails) > 0 && strings.TrimSpace(sp.Emails[0]) != "" { got, e := q.FindCandidateByEmail(ctx, dbgen.FindCandidateByEmailParams{OrganizationID: orgID, Lower: sp.Emails[0]}) if e == nil { return got, true, nil } if !errors.Is(e, pgx.ErrNoRows) { return uuid.Nil, false, fmt.Errorf("find by email: %w", e) } } if strings.TrimSpace(sp.FullName) != "" && strings.TrimSpace(sp.Location) != "" { got, e := q.FindCandidateByNameLocation(ctx, dbgen.FindCandidateByNameLocationParams{OrganizationID: orgID, Lower: sp.FullName, Lower_2: sp.Location}) if e == nil { return got, true, nil } if !errors.Is(e, pgx.ErrNoRows) { return uuid.Nil, false, fmt.Errorf("find by name and location: %w", e) } } return uuid.Nil, false, nil } // buildHeadline composes a self reported title and skills line for a sourced lead. func buildHeadline(sp SourcedPerson) string { skills := sp.Skills if len(skills) > 6 { skills = skills[:6] } h := sp.JobTitle if h == "" { h = sp.Role } if len(skills) > 0 { if h != "" { h += " | " } h += strings.Join(skills, ", ") } return strings.TrimSpace(h) } // profileText is the free text the extractor reads for certs and agencies (skills come structured). func profileText(sp SourcedPerson) string { return strings.Join([]string{buildHeadline(sp), strings.Join(sp.Skills, " "), sp.JobTitle, sp.Role}, " ") } func nzPtr(s string) *string { s = strings.TrimSpace(s) if s == "" { return nil } return &s } func firstOrNil(xs []string) *string { if len(xs) > 0 { return nzPtr(xs[0]) } return nil } func dedupe(xs []string) []string { seen := map[string]bool{} out := make([]string, 0, len(xs)) for _, x := range xs { t := strings.TrimSpace(x) if t == "" { continue } k := strings.ToLower(t) if seen[k] { continue } seen[k] = true out = append(out, t) } return out }

Search equations, builds, manuscript text, and recovered sources.