ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/matching/mission_service.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/mission_service.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision3be46ba89edb737182075a2b320509b42dc916f8
Branchworkstream-d-missionmatch
Path or archive memberinternal/modules/matching/mission_service.go
Original SHA-25696bc314fc9ae85da3e2691599e979f561eb302a0dbcf3b0607b7665b33ca20d1
Git blob SHA9cb30ba26d58467f4ee50ebd2c2b66ff639bdd61
Reading-copy SHA-25696bc314fc9ae85da3e2691599e979f561eb302a0dbcf3b0607b7665b33ca20d1

Original source ↗

Recovered source transcript

package matching import ( "context" "github.com/google/uuid" "github.com/jackc/pgx/v5" "github.com/missionworkforce/missionmatch/internal/platform/database/dbgen" ) // SupportView is one candidate who can support a mission today, read from the persisted screenMATCH // qualification (the stored artifact), never a rescore. It carries the frozen total and band so the // number matches what screenMATCH and slateMATCH show for the same candidate. type SupportView struct { CandidateID string `json:"candidate_id"` FullName string `json:"full_name"` Total string `json:"total_score"` Band string `json:"band"` BandLabel string `json:"band_label"` Available bool `json:"available"` EvaluatedAt string `json:"evaluated_at"` } // WhoCanSupport returns the candidates with a persisted screenMATCH qualification for one requirement, // best first (the missionMATCH "who can support this mission today" rollup). It READS the stored // candidate_evaluations rows; it never rescores the pool, so the rollup agrees with the screen and the // slate to the cent. An empty result means no one has been screened against the requirement yet. func (s *Service) WhoCanSupport(ctx context.Context, requirementID uuid.UUID) ([]SupportView, error) { if s.db == nil { return nil, ErrNoDatabase } var out []SupportView err := s.db.RunInTenantTx(ctx, func(ctx context.Context, tx pgx.Tx) error { rows, e := dbgen.New(tx).ListEvaluationsForRequirement(ctx, requirementID) if e != nil { return e } out = make([]SupportView, len(rows)) for i, r := range rows { out[i] = SupportView{ CandidateID: r.CandidateID.String(), FullName: r.FullName, Total: r.TotalScore.StringFixed(2), Band: r.Band, BandLabel: bandLabel(r.Band), Available: r.Available, EvaluatedAt: r.EvaluatedAt.Format("2006-01-02"), } } return nil }) return out, err }

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