# Runnable Check: Platform Answers From Surface Calls

This check proves the skill pack can reproduce the platform's own pinned demo answers by calling the live OneRoster surface only.

It is not application logic. Do not copy it into a production app as a schema parser, validator, deduper, score-scale calculator, tenant router, ETag generator, idempotency replay engine, or PII filter. It is a smoke probe for the skill pack.

Prerequisites: `curl` and `jq`.

## Copy-Paste Probe

```bash
set -euo pipefail

export ONEROSTER_BASE_URL="${ONEROSTER_BASE_URL:-https://platform3-andymontgomery-9773s-projects.vercel.app/oneroster/1edtech/implementation/api}"
export BASE_URL="$ONEROSTER_BASE_URL"

if [ -z "${ONEROSTER_DEMO_JWT:-}" ]; then
  export ONEROSTER_DEMO_JWT="$(curl -fsS -X POST "$BASE_URL/dev/mint?tenantId=demo" | jq -r '.token')"
fi

export TOKEN="$ONEROSTER_DEMO_JWT"
WORK_DIR="$(mktemp -d)"

curl -fsS "$BASE_URL/orgs/school-north-valley" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/org.json"

curl -fsS "$BASE_URL/classes/class-algebra-1-a" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/class.json"

curl -fsS "$BASE_URL/users/student-maya-johnson" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/user.json"

curl -fsS "$BASE_URL/enrollments/enrollment-maya-algebra-1-a" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/enrollment.json"

curl -fsS "$BASE_URL/lineItems/lineitem-algebra-quiz-1" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/line-item.json"

curl -fsS "$BASE_URL/results/result-maya-algebra-quiz-1" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/result.json"

curl -fsS "$BASE_URL/gradingPeriods/grading-period-q1-2026" \
  -H "Authorization: Bearer $TOKEN" > "$WORK_DIR/grading-period.json"

curl -fsS -X POST "$BASE_URL/exports/csv" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: skill-pack-check-$(date +%s)" \
  -d '{"mode":"bulk"}' > "$WORK_DIR/export.json"

jq -e '.item.name == "North Valley High School"' "$WORK_DIR/org.json" >/dev/null
jq -e '.item.title == "Algebra I - Section A"' "$WORK_DIR/class.json" >/dev/null
jq -e '.item.username == "maya.johnson"' "$WORK_DIR/user.json" >/dev/null
jq -e '.item.role == "student"' "$WORK_DIR/enrollment.json" >/dev/null
jq -e '.item.title == "Algebra Quiz 1"' "$WORK_DIR/line-item.json" >/dev/null
jq -e '(.item.score | tostring) == "92"' "$WORK_DIR/result.json" >/dev/null
jq -e '.item.title == "Quarter 1 Grading Period"' "$WORK_DIR/grading-period.json" >/dev/null
jq -e '.batch.direction == "export"' "$WORK_DIR/export.json" >/dev/null
jq -e '.batch.batch_id | startswith("orbatch_")' "$WORK_DIR/export.json" >/dev/null
jq -e '.package.files | index("manifest.csv") != null' "$WORK_DIR/export.json" >/dev/null

jq -n \
  --arg baseUrl "$BASE_URL" \
  --arg org "$(jq -r '.item.name' "$WORK_DIR/org.json")" \
  --arg classTitle "$(jq -r '.item.title' "$WORK_DIR/class.json")" \
  --arg username "$(jq -r '.item.username' "$WORK_DIR/user.json")" \
  --arg score "$(jq -r '.item.score | tostring' "$WORK_DIR/result.json")" \
  --arg gradingPeriod "$(jq -r '.item.title' "$WORK_DIR/grading-period.json")" \
  --arg batchId "$(jq -r '.batch.batch_id' "$WORK_DIR/export.json")" \
  '{
    check: "oneroster-1edtech-skill-pack",
    verdict: "pass",
    generatedFrom: "live OneRoster 1EdTech surface",
    baseUrl: $baseUrl,
    pinnedAnswers: {
      org: $org,
      class: $classTitle,
      username: $username,
      resultScore: $score,
      gradingPeriod: $gradingPeriod,
      exportBatchId: $batchId
    },
    provenance: {
      customerWebsite: "https://platform3-andymontgomery-9773s-projects.vercel.app/oneroster/1edtech/customer_website",
      dataDictionary: "https://platform3-andymontgomery-9773s-projects.vercel.app/oneroster/1edtech/data_dictionary"
    }
  }'

rm -rf "$WORK_DIR"
```

Expected terminal result: JSON with `"verdict": "pass"`, `North Valley High School`, `Algebra I - Section A`, username `maya.johnson`, result score `92`, `Quarter 1 Grading Period`, and an export batch id beginning `orbatch_`.

If any assertion fails, report the exact failing response and route it as a surface issue. Do not repair the answer in the skill pack.
