Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 720d47fae476b0d38477ae4401697d372b1ea2bc |
| Branch | feature/opportunity-to-outcome |
| Path or archive member | internal/modules/ai/bid_baserate_test.go |
| Original SHA-256 | cb64583d1e4303ed9d532851360463a8795eea6eb77270fbdb3d81ad29870447 |
| Git blob SHA | 281497d3557d06ce81bf29bd079be4fc73a1aa73 |
| Reading-copy SHA-256 | cb64583d1e4303ed9d532851360463a8795eea6eb77270fbdb3d81ad29870447 |
Every recorded occurrence
These 12 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/ai/bid_baserate_test.go | feature/opportunity-to-outcome | 720d47fae476b0d38477ae4401697d372b1ea2bc | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | feature/aioe-upgrade | 2178e7298d0e5d9af83afa12402fd587f0ba6ed8 | Open original |
| Janady13/missionmatch / internal/modules/ai/bid_baserate_test.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓45 lines · 2.2 KB
package ai
import "testing"
// TestBidWinRateIntentRegisteredAndSafe proves the M7 advisory base rate intent is wired safely into the
// closed Registry: it is registered under its name, the whole Registry still validates (every intent passes
// GuardReadOnlyQuery against the ReadAllowlist), and the new intent's own SQL passes the read only guard.
// This is the unit guarantee that the bid_win_rate_by_segment read can only ever run as a single read only
// SELECT over allowlisted tables, never a write and never an eeo read.
func TestBidWinRateIntentRegisteredAndSafe(t *testing.T) {
intent, ok := IntentByName(IntentBidWinRateBySegment)
if !ok {
t.Fatalf("intent %q is not registered", IntentBidWinRateBySegment)
}
if len(intent.Params) != 0 {
t.Fatalf("bid win rate intent takes no SQL parameter, got %d params", len(intent.Params))
}
// The whole Registry must still validate with the new intent and the new allowlist entry.
if err := ValidateRegistry(); err != nil {
t.Fatalf("ValidateRegistry failed with the bid win rate intent: %v", err)
}
// The new intent's SQL must pass the read only guard directly (defense in depth, the same check
// ExecuteIntent re runs at execution time).
if err := GuardReadOnlyQuery(intent.SQL, ReadAllowlist); err != nil {
t.Fatalf("GuardReadOnlyQuery rejected the bid win rate SQL: %v", err)
}
// bid_outcomes must be in the read allowlist (the reviewed decision that allowlists the tenant ledger).
if !ReadAllowlist["bid_outcomes"] {
t.Fatal("bid_outcomes must be in the AI ReadAllowlist for the advisory base rate read")
}
}
// TestBidWinRateIsTAGNotGraphOrBench pins the routing classification: the advisory base rate is a plain TAG
// aggregate intent, so it is NEITHER a graph intent NOR a person touching bench intent. A misclassification
// would route it to the graph evidence path or, worse, treat it as suppressed bench data, so this guards the
// boundary the task fixed.
func TestBidWinRateIsTAGNotGraphOrBench(t *testing.T) {
if IsGraphIntent(IntentBidWinRateBySegment) {
t.Fatal("the bid win rate base rate is a TAG aggregate intent, it must NOT be a graph intent")
}
if IsBenchIntent(IntentBidWinRateBySegment) {
t.Fatal("the bid win rate base rate reads no person table, it must NOT be a bench intent")
}
}