Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/recruitmatch/dto.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | internal/modules/recruitmatch/dto.go |
| Original SHA-256 | 370b7dbd7e6467d87a0a722291861438166a0c983772e52ba24d0134a2c62ea9 |
| Git blob SHA | 6875bdaca55c58521c5d7d35a8fdd9430bd145a0 |
| Reading-copy SHA-256 | 370b7dbd7e6467d87a0a722291861438166a0c983772e52ba24d0134a2c62ea9 |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/missionmatch / internal/modules/recruitmatch/dto.go | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / internal/modules/recruitmatch/dto.go | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
Recovered source transcript
Download complete source text ↓110 lines · 4.7 KB
// Package recruitmatch is the recruitMATCH tool: the recruiting operations rollup over the SAME tables
// screenMATCH and slateMATCH already write. It owns no tables, so every number it shows equals what the
// other tools show for the same candidate.
//
// Two invariants govern this package.
//
// First, the funnel is monotonic by construction. Every stage counts DISTINCT candidates drawn from the
// same live candidate set (rm_cand), so identified >= screened >= submitted >= approved always holds.
// Counting evaluation or slate membership ROWS instead would let a stage exceed the bench, because
// candidate_evaluations carries one row per candidate and requirement pair and slate_members carries one
// row per slate and candidate pair. A candidate screened against five requirements is five rows and one
// person. Screened is a count of people.
//
// Second, this package emits no color and no band. Color is presentation and belongs to the frontend.
// Bands belong to the frozen engine, which already stamped candidate_evaluations.band at write time, so
// recruitMATCH reports the stored band and never recomputes one. Applying engine band thresholds to a
// conversion percentage would conflate two different scales.
package recruitmatch
// View is the whole GET /api/recruitmatch/dashboard body. Counts are integers. Percentages are decimal
// strings so exact decimal values survive the wire, matching the convention in every other tool.
type View struct {
AsOf string `json:"as_of"`
OrganizationID string `json:"organization_id"`
GeneratedAt string `json:"generated_at"`
Headline Headline `json:"headline"`
Funnel []FunnelStage `json:"funnel"`
Decisions Decisions `json:"decisions"`
BandMix BandMix `json:"band_mix"`
Clearance []ClearanceRow `json:"clearance"`
TopJobs []TopJob `json:"top_jobs"`
Recruiters []RecruiterRow `json:"recruiters"`
EmptyPanels []EmptyPanel `json:"empty_panels"`
}
// Headline is the stat tile row. Every count is a count of distinct people except ActiveJobs.
type Headline struct {
ActiveJobs int64 `json:"active_jobs"`
Identified int64 `json:"identified"`
Screened int64 `json:"screened"`
Submitted int64 `json:"submitted"`
Approved int64 `json:"approved"`
OnBench int64 `json:"on_bench"`
}
// FunnelStage is one bar of the pipeline overview. Pct is this stage as a share of identified, so the
// first stage is always 100.00 when the bench is non empty and every later stage is at most that.
type FunnelStage struct {
Key string `json:"key"`
Label string `json:"label"`
Count int64 `json:"count"`
Pct string `json:"pct"`
}
// Decisions counts slate membership DECISIONS, not people. A candidate approved on one slate and
// rejected on another contributes to both, which is why these are reported apart from the funnel.
type Decisions struct {
Approved int64 `json:"approved"`
Rejected int64 `json:"rejected"`
Pending int64 `json:"pending"`
Total int64 `json:"total"`
ApproveRate string `json:"approve_rate"`
}
// BandMix is the green yellow red split of persisted screenMATCH evaluations. These are evaluation rows,
// not people, because a band is a property of a candidate against a requirement.
type BandMix struct {
Green int64 `json:"green"`
Yellow int64 `json:"yellow"`
Red int64 `json:"red"`
Total int64 `json:"total"`
}
// ClearanceRow is one clearance level and how many live candidates hold it. Clearance is a self reported
// indicator, never a verified status.
type ClearanceRow struct {
Code string `json:"code"`
Label string `json:"label"`
Count int64 `json:"count"`
Pct string `json:"pct"`
}
// TopJob is one open requirement ranked by how many DISTINCT candidates have been submitted to it.
type TopJob struct {
RequirementID string `json:"requirement_id"`
Title string `json:"title"`
CustomerAgency string `json:"customer_agency,omitempty"`
RequiredLevel string `json:"required_level"`
Submitted int64 `json:"submitted"`
}
// RecruiterRow attributes work to a user in this organization. Screened counts evaluations that user
// performed. Decided counts slate decisions that user made. Neither is a performance score.
type RecruiterRow struct {
UserID string `json:"user_id"`
FullName string `json:"full_name"`
Screened int64 `json:"screened"`
Decided int64 `json:"decided"`
Approved int64 `json:"approved"`
}
// EmptyPanel names a panel the product intends to show and the feed it still needs. It is how the
// dashboard states honestly that something is not tracked yet instead of rendering a zero that reads
// like data.
type EmptyPanel struct {
Key string `json:"key"`
Title string `json:"title"`
Reason string `json:"reason"`
}