Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/platform/scrub/scrub_test.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 43d56387270ef4da4cabd794d97ca6a49909bc7d |
| Branch | w3-ai-staffing-recommendations |
| Path or archive member | internal/platform/scrub/scrub_test.go |
| Original SHA-256 | 0c975cecd8c0b7073fe0bd5b0311ebcdffdcf7daa255bec15ddee4352f4ac711 |
| Git blob SHA | 1dbbed4676a643c7f0c539a0b588f5d7ef8e2876 |
| Reading-copy SHA-256 | 0c975cecd8c0b7073fe0bd5b0311ebcdffdcf7daa255bec15ddee4352f4ac711 |
Every recorded occurrence
These 21 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/platform/scrub/scrub_test.go | w3-ai-staffing-recommendations | 43d56387270ef4da4cabd794d97ca6a49909bc7d | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ai-intelligence-layer | 5d5ddff70393a197c5f54a45280bb5dd42b24755 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | per-tenant-routing | 9bde0f9a74b89d01980fa658e5253acda7528d0c | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ai-brain-live | aac32fc49c878cc5bca099459307611562d0bac1 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws1-ontology-sync | b596f449a32a1016fbd403c36505cc00a1ac9ee6 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | deploy-and-ops | bdacd9d0b4d5998d25fc74bf4007f4c3ec538c7a | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws2-alias-relationship | e4dada4601c6eb101830f9d223a9655dfa120616 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | per-tenant-routing | 9bde0f9a74b89d01980fa658e5253acda7528d0c | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws1-ontology-sync | b596f449a32a1016fbd403c36505cc00a1ac9ee6 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | w3-ai-staffing-recommendations | 43d56387270ef4da4cabd794d97ca6a49909bc7d | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ai-intelligence-layer | 5d5ddff70393a197c5f54a45280bb5dd42b24755 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | deploy-and-ops | bdacd9d0b4d5998d25fc74bf4007f4c3ec538c7a | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/platform/scrub/scrub_test.go | ai-brain-live | aac32fc49c878cc5bca099459307611562d0bac1 | Open original |
Recovered source transcript
Download complete source text ↓64 lines · 3.7 KB
package scrub
import (
"strings"
"testing"
)
// TestValidAbstractSignalPasses proves a contents free craft signal is accepted.
func TestValidAbstractSignalPasses(t *testing.T) {
b, err := Marshal(TeachingSignal{
Pattern: "adjacent_skill_substitution_outcome", Band: BandMedium, Outcome: OutcomeApproved,
Observations: 40, Successes: 31, ModelVersion: "v1.0.0",
})
if err != nil {
t.Fatalf("a valid abstract signal must pass the boundary: %v", err)
}
if err := Validate(b); err != nil {
t.Fatalf("Validate rejected its own Marshal output: %v", err)
}
}
// TestClientFactsAreRefused is the core safety test: every shape of a client fact must be refused at the
// boundary. If any of these passes, a tenant's contents could reach the shared inference plane.
func TestClientFactsAreRefused(t *testing.T) {
leaks := map[string]string{
"uuid org": `{"pattern":"adjacent_skill_substitution_outcome","band":"medium","outcome":"approved","observations":1,"successes":1,"model_version":"11111111-1111-1111-1111-111111111111"}`,
"uuid anywhere": `{"pattern":"adjacent_skill_substitution_outcome","band":"high","outcome":"approved","observations":1,"successes":1,"model_version":"v1.0.0 / a1b2c3d4-e5f6-7890-abcd-ef1234567890"}`,
"email": `{"pattern":"adjacent_skill_substitution_outcome","band":"high","outcome":"approved","observations":1,"successes":1,"model_version":"jane.doe@agency.gov"}`,
"free text smuggled in pattern": `{"pattern":"candidate Jane Doe TS SCI resume text leaked here as a label","band":"high","outcome":"approved","observations":1,"successes":1,"model_version":"v1.0.0"}`,
"unknown extra field (smuggled fact)": `{"pattern":"adjacent_skill_substitution_outcome","band":"high","outcome":"approved","observations":1,"successes":1,"model_version":"v1.0.0","candidate_id":"abc"}`,
"impossible counts": `{"pattern":"adjacent_skill_substitution_outcome","band":"high","outcome":"approved","observations":1,"successes":9,"model_version":"v1.0.0"}`,
"band out of vocabulary": `{"pattern":"adjacent_skill_substitution_outcome","band":"0.873211","outcome":"approved","observations":1,"successes":1,"model_version":"v1.0.0"}`,
"outcome out of vocabulary": `{"pattern":"adjacent_skill_substitution_outcome","band":"high","outcome":"hired Jane at Org X","observations":1,"successes":1,"model_version":"v1.0.0"}`,
}
for name, raw := range leaks {
if err := Validate([]byte(raw)); err == nil {
t.Errorf("BOUNDARY BREACH: %q passed Validate but carries a client fact or escapes the vocabulary", name)
}
}
}
// TestMarshalRefusesToEmitALeak proves the convenience path cannot bypass the boundary: a model version
// that is actually a UUID (a client org id) is refused at Marshal, not just at Validate.
func TestMarshalRefusesToEmitALeak(t *testing.T) {
if _, err := Marshal(TeachingSignal{
Pattern: "clearance_gap_override_outcome", Band: BandLow, Outcome: OutcomeRejected,
Observations: 2, Successes: 0, ModelVersion: "11111111-1111-1111-1111-111111111111",
}); err == nil {
t.Fatal("Marshal emitted a payload whose model_version is a UUID (a client fact)")
}
}
// TestNoFreeTextChannel proves the signal has no string field that can hold arbitrary contents: an
// overlong value in any string field is refused.
func TestNoFreeTextChannel(t *testing.T) {
long := strings.Repeat("x", maxFieldLen+1)
if _, err := Marshal(TeachingSignal{
Pattern: "adjacent_skill_substitution_outcome", Band: BandHigh, Outcome: OutcomeApproved,
Observations: 1, Successes: 1, ModelVersion: long,
}); err == nil {
t.Fatal("an overlong string field passed the boundary, the channel is not contents free")
}
}