ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/bls/bls_test.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/bls/bls_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/bls/bls_test.go
Original SHA-256881281102bc9724bb3330c67acb4777f25717045abaa31a1ccb2147415507700
Git blob SHAddf17bcf7404a91c19b92cf8885b766ade45a36b
Reading-copy SHA-256881281102bc9724bb3330c67acb4777f25717045abaa31a1ccb2147415507700

Original source ↗

Every recorded occurrence

These 11 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/bls/bls_test.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/bls/bls_test.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/bls/bls_test.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/bls/bls_test.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

package bls import ( "context" "net/http" "net/http/httptest" "strings" "testing" ) const sampleResp = `{"status":"REQUEST_SUCCEEDED","responseTime":1,"message":[],"Results":{"series":[ {"seriesID":"OEUS150000000000015121204","data":[{"year":"2025","period":"A01","periodName":"Annual","value":"122660"}]}, {"seriesID":"OEUS350000000000015121204","data":[{"year":"2025","period":"A01","periodName":"Annual","value":"142450"}]} ]}}` func TestFetchLatestMapsValues(t *testing.T) { var gotKey, gotLatest bool srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { body := make([]byte, r.ContentLength) _, _ = r.Body.Read(body) s := string(body) gotKey = strings.Contains(s, "registrationKey") gotLatest = strings.Contains(s, "\"latest\":true") _, _ = w.Write([]byte(sampleResp)) })) defer srv.Close() c := New("secret", srv.URL) out, err := c.FetchLatest(context.Background(), []string{"OEUS150000000000015121204", "OEUS350000000000015121204"}) if err != nil { t.Fatalf("fetch: %v", err) } if !gotKey || !gotLatest { t.Fatalf("request must send registrationKey and latest: key=%v latest=%v", gotKey, gotLatest) } if len(out) != 2 || out[0].Value != "122660" || out[0].Year != "2025" { t.Fatalf("values mapped wrong: %+v", out) } } func TestFetchLatestThreshold(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write([]byte(`{"status":"REQUEST_NOT_PROCESSED","message":["You have exceeded the daily threshold of requests."]}`)) })) defer srv.Close() c := New("k", srv.URL) if _, err := c.FetchLatest(context.Background(), []string{"X"}); err != ErrThrottled { t.Fatalf("threshold message must map to ErrThrottled, got %v", err) } } func TestGalapagosSeriesShape(t *testing.T) { specs := GalapagosSeries() // 5 occupations x 2 areas x 2 metrics if len(specs) != 20 { t.Fatalf("want 20 series specs, got %d", len(specs)) } if specs[0].SeriesID != "OEUS150000000000015121204" { t.Fatalf("first series id wrong: %s", specs[0].SeriesID) } } // TestNationalSeriesID pins the national OEWS series id builder to the verified format: OEUN + national // area 0000000 + all industry 000000 + the six digit SOC + the datatype. SOC 151212 datatype 04 (annual // mean) must build OEUN000000000000015121204, the series that returned 132510 against the live BLS API, // and datatype 13 (annual median) must build the matching median series. func TestNationalSeriesID(t *testing.T) { if got := NationalSeriesID("151212", "04"); got != "OEUN000000000000015121204" { t.Fatalf("national annual mean series id wrong: got %s want OEUN000000000000015121204", got) } if got := NationalSeriesID("151212", "13"); got != "OEUN000000000000015121213" { t.Fatalf("national annual median series id wrong: got %s want OEUN000000000000015121213", got) } // The national prefix is OEUN, never the state prefix OEUS, and the series is exactly 25 characters (the // verified OEUN000000000000015121204 is 25 characters). got := NationalSeriesID("113021", "04") if got[:4] != "OEUN" { t.Fatalf("national series must carry the OEUN prefix, got %s", got) } if len(got) != 25 { t.Fatalf("a national OEWS series id must be 25 characters, got %d in %s", len(got), got) } }

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