ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

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

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/clamp_test.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/matching/clamp_test.go
Original SHA-256622e82997072312837b2e6b64c4c7f48483c2dee6fc2638dd6fae13bda292758
Git blob SHA47b64903f1bf23e43969205d6431900528e4e78f
Reading-copy SHA-256622e82997072312837b2e6b64c4c7f48483c2dee6fc2638dd6fae13bda292758

Original source ↗

Every recorded occurrence

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

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/modules/matching/clamp_test.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/matching/clamp_test.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/matching/clamp_test.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original

Recovered source transcript

package matching import "testing" // TestClampMaxCandidates proves the slate candidate cap is bounded on both ends: a non positive request // defaults, an in range request passes through, and an oversized or hostile request is clamped to the hard // bound so a single slate generation can never balloon the transaction or the member count. A stress finding // motivated this: MaxCandidates had no upper clamp. func TestClampMaxCandidates(t *testing.T) { cases := []struct{ in, want int32 }{ {0, defaultMaxCandidates}, {-1, defaultMaxCandidates}, {-1000000, defaultMaxCandidates}, {1, 1}, {499, 499}, {defaultMaxCandidates, defaultMaxCandidates}, {maxSlateCandidates, maxSlateCandidates}, {maxSlateCandidates + 1, maxSlateCandidates}, {1000000, maxSlateCandidates}, } for _, c := range cases { if got := clampMaxCandidates(c.in); got != c.want { t.Errorf("clampMaxCandidates(%d) = %d, want %d", c.in, got, c.want) } } }

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