# Runnable Check: Prove The Pack Reproduces Platform Answers

This is the shortest acceptance check for the Results Alpha skill pack. It mints a demo token, calls the live MAP Quadrants report, asks the surface for the matching answer-key row, and compares row count plus `meta.resultHash`.

It does not carry an expected hash. The expected answer comes from `/reports/answer-key` at runtime.

Prerequisites: `curl` and `jq`.

Packaged verifier:

```sh
node checks/verify-skill-pack.mjs
```

The verifier performs the same checks by HTTP and compares report metadata to `/reports/answer-key`. It does not carry expected hashes or business rules.

```sh
export RESULTS_BASE_URL="${RESULTS_BASE_URL:-https://platform3-andymontgomery-9773s-projects.vercel.app/results/alpha/implementation/api}"
export RESULTS_TOKEN="${RESULTS_TOKEN:-$(curl -fsS -X POST "$RESULTS_BASE_URL/dev/mint?tenantId=demo" | jq -r '.token')}"
export COMMON_2025="subject=math&canonicalTermId=term_2025_26_spring&growthWindow=fall_to_spring&normsSet=2025"

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/reports/map-quadrants?$COMMON_2025" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  > /tmp/results-map-quadrants-2025.json

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/reports/answer-key?normsSet=2025" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  > /tmp/results-answer-key-2025.json

REPORT_HASH="$(jq -r '.meta.resultHash' /tmp/results-map-quadrants-2025.json)"
REPORT_COUNT="$(jq -r '.count' /tmp/results-map-quadrants-2025.json)"
EXPECTED_HASH="$(jq -r '.data[] | select(.example_id=="map_quadrants_2025_math_demo") | .expected_result_hash' /tmp/results-answer-key-2025.json)"
EXPECTED_COUNT="$(jq -r '.data[] | select(.example_id=="map_quadrants_2025_math_demo") | .expected_row_count' /tmp/results-answer-key-2025.json)"

test "$REPORT_HASH" = "$EXPECTED_HASH"
test "$REPORT_COUNT" = "$EXPECTED_COUNT"
printf 'Results Alpha check passed: rows=%s hash=%s\n' "$REPORT_COUNT" "$REPORT_HASH"
```

Then flip norms without changing the recipe shape:

```sh
curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/reports/map-quadrants?subject=math&canonicalTermId=term_2025_26_spring&growthWindow=fall_to_spring&normsSet=2020" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq '{count,hash:.meta.resultHash,rows:.data}'
```

Changing only `normsSet` is the proof. Do not load a norms table, branch on growth-window columns, or recalculate Growth X.

Finally smoke the Results-owned state and derived reads. These commands only check that the surface returns the required fields; they do not compute the values.

```sh
curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/students/stu_timeback_10017/kc-state?subject=math&asOfDate=2026-06-03" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("initial_mastery") and has("current_retention") and has("durable_mastery") and has("fluency_state")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/students/stu_timeback_10017/track-state?subject=math&asOfDate=2026-06-03" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("track_id") and has("current_track_level_id") and has("current_segment_id") and has("status")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/next-task?studentId=stu_timeback_10017&subject=math&asOfDate=2026-06-03" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e 'has("task_type") and has("task_ref_type") and has("task_ref_id") and has("reason")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/students/stu_timeback_10017/xp-ledger" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("awarded_xp") and has("award_reason") and has("calculation_policy_ref")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/students/stu_timeback_10017/growth-windows?subject=math&canonicalTermId=term_2025_26_spring&growthWindow=fall_to_spring&normsSet=2025" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("growth_x_target") and has("on_track_for_growth_x_target") and has("projected_gap")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/map-percentile-translations?subject=math&gradeLevel=7&termSeason=spring&normsSet=2025&translationDirection=percentile_to_rit&inputPercentile=99" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("output_rit") and has("calculator_version")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/map-r90-norm-points?subject=math&gradeLevel=7&termSeason=spring&normsSet=2025" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("r90_rit") and has("calculator_version")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/reports/group-growth-x?$COMMON_2025&groupDimension=school_level" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("average_growth_x") and has("student_count") and has("policy_version")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/reports/closed-loop-reconciliation?studentId=stu_timeback_10017&metricKind=minutes" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | .metric_kind == "minutes" and has("activity_date") and has("alpha_value")'

curl -fsS "$RESULTS_BASE_URL/alpha/results/v1/content-effectiveness?subject=math" \
  -H "Authorization: Bearer $RESULTS_TOKEN" \
  | jq -e '.data[0] | has("validated_by_count") and has("failed_by_count") and has("effectiveness_rate")'
```
