# Runnable Check

Run this check to prove the skill is wired up to the live NWEAMap 1EdTech
surface. It calls the platform and asserts only values the platform returns.

The check needs `curl`, `jq`, `awk`, and a POSIX shell.

## Copy-Paste Check

```bash
set -euo pipefail

BASE_URL="${NWEAMAP_BASE_URL:-https://platform3-andymontgomery-9773s-projects.vercel.app/nweamap/1edtech/implementation/api}"
WORK_DIR="$(mktemp -d)"
ACCOUNT_ID="skill-pack-check-$(date -u +%Y%m%dT%H%M%SZ)-$$"
TERM_NAME="Spring 2025-2026"

cleanup() {
  rm -rf "$WORK_DIR"
}
trap cleanup EXIT

DESCRIPTOR="$(curl -fsS "$BASE_URL")"
printf '%s' "$DESCRIPTOR" | jq -e '.module == "nweamap" and .surface == "1edtech"' >/dev/null

TOKEN_JSON="$(curl -fsS -X POST "$BASE_URL/dev/mint?tenantId=demo")"
printf '%s' "$TOKEN_JSON" | jq -e '.token_type == "Bearer" and .tenant_id == "demo" and .links.demoCdfBundle == "/dev/cdf"' >/dev/null
TOKEN="$(printf '%s' "$TOKEN_JSON" | jq -r '.token')"

for file in StudentsBySchool.csv AssessmentResults.csv ClassAssignments.csv ProgramAssignments.csv AccommodationAssignment.csv; do
  curl -fsS "$BASE_URL/dev/cdf/$file" > "$WORK_DIR/$file"
done

test "$(awk -F, 'NR==1{print NF}' "$WORK_DIR/AssessmentResults.csv")" = "143"

IMPORT_JSON="$(curl -fsS -X POST "$BASE_URL/nweamap/v1/imports" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: skill-pack-check-$ACCOUNT_ID" \
  -F "manifest={\"nweaAccountId\":\"$ACCOUNT_ID\",\"termName\":\"$TERM_NAME\"};type=application/json" \
  -F "StudentsBySchool.csv=@$WORK_DIR/StudentsBySchool.csv;type=text/csv" \
  -F "AssessmentResults.csv=@$WORK_DIR/AssessmentResults.csv;type=text/csv" \
  -F "ClassAssignments.csv=@$WORK_DIR/ClassAssignments.csv;type=text/csv" \
  -F "ProgramAssignments.csv=@$WORK_DIR/ProgramAssignments.csv;type=text/csv" \
  -F "AccommodationAssignment.csv=@$WORK_DIR/AccommodationAssignment.csv;type=text/csv")"

printf '%s' "$IMPORT_JSON" | jq -e '
  (.import.status == "applied" or .import.status == "no_op")
  and .import.row_counts["StudentsBySchool.csv"] == 1
  and .import.row_counts["AssessmentResults.csv"] == 3
  and .import.row_counts["ClassAssignments.csv"] == 1
  and .import.row_counts["ProgramAssignments.csv"] == 0
  and .import.row_counts["AccommodationAssignment.csv"] == 1
' >/dev/null

RESULT_JSON="$(curl -fsS "$BASE_URL/nweamap/v1/assessment-results?nweaAccountId=$ACCOUNT_ID&termName=Spring%202025-2026&sittingScope=test_of_record&studentId=stu-12345&subject=Math" \
  -H "Authorization: Bearer $TOKEN")"

printf '%s' "$RESULT_JSON" | jq -e '
  .data[0].student_id == "stu-12345"
  and .data[0].subject == "Math"
  and .data[0].test_rit_score == 211
  and .data[0].test_id == "1110000001"
  and .data[0].is_test_of_record == true
  and .data[0].test_of_record_reason == "highest_rit"
  and .data[0].norms_reference_data == "2025"
  and .data[0].growth_measure_yn == "Y"
' >/dev/null

AUDIT_JSON="$(curl -fsS "$BASE_URL/nweamap/v1/assessment-results?nweaAccountId=$ACCOUNT_ID&termName=Spring%202025-2026&sittingScope=all&includeDeleted=true&studentId=stu-12345&subject=Math" \
  -H "Authorization: Bearer $TOKEN")"

printf '%s' "$AUDIT_JSON" | jq -e '
  ([.data[] | select(.TestID == "1110000001" and .TestRITScore == "211" and .is_test_of_record == true)] | length) == 1
  and ([.data[] | select(.TestID == "1110000000" and .TestRITScore == "204" and .is_test_of_record == false)] | length) == 1
' >/dev/null

printf 'PASS NWEAMap 1EdTech skill-pack live check: account=%s test_of_record=stu-12345/Math/211\n' "$ACCOUNT_ID"
```

## What This Proves

The check proves the pack can reproduce the platform's own answers by surface
calls only:

- the descriptor is the NWEAMap 1EdTech implementation;
- demo token mint works;
- `AssessmentResults.csv` is the NWEA 143-column file;
- the demo bundle imports with the expected five-file row counts;
- the server-selected test-of-record row is `stu-12345 / Math / RIT 211`;
- the all-sittings audit includes both Math sittings.

It does not prove or implement Growth X, norms flipping, local RIT50/RIT90 or
Effective Grade calculators, MAP Quadrants report cells, or golden-cell report
verification. RIT-to-grade/R90 lookup, when needed, belongs to the NWEAMAP `/nweamap/v1/rit-to-grade*`
surface rather than this pack.
