T7: fixture recorder + fixes from live verification #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t7-fixtures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
T7: fixture recorder + fixes from live verification
Stacked on #15 (
t17-gitlab-connect) → … → #1. T7 was blocked until the first browser login, which happened today. It sits on top of the stack so it can fix the providers built since.First real login: results
course-restricted.accountshas 0 rows with tokens. Tokens exist only encrypted inconnections, andusers.usernameis set.audlists the services the OAuth app is authorized for (usermap-api-…,sirius-…,marast-…). Grades is missing, so it returns403 access_denied: token does not contain resource id (grades-…). Grades has to be enabled for the app inauth.fit.cvut.cz/manager. That's now in "Needs you" and documented indocs/fit-auth.md.bun run fixtures:record(scripts/record-fixtures.ts,scripts/scrub.ts).dev.vars. It makes GET requests only and never refreshes: refresh tokens may rotate and the app owns them, so it aborts if the token has expired.check_token.kosPersonId, notes and descriptions, teacher/student lists, role org units, and every secret, including the Sirius calendar token. Aliases stay consistent, and structure, types, dates and course codes are kept.test/fixtures/live/, which is git-ignored. Even scrubbed recordings of real grades shouldn't be committed without human review. The script prints only statuses and shapes.Fixes found by live verification
Api-Keyheader (marked as API key in the Swagger doc).fitGetJson(..., { auth: "api-key" }). Redirects still not followed.only_open/only_futurework with Api-Key (26 + 9 of 52, matching our computed statuses).upcoming. Unfiltered lists reporttruncated, which appears as amarast:truncatedwarning infit.today/fit.deadlines. Allowlisted the realis_important/is_tracked/name_enfields.null(preferredEmail: null), so name search failed with "unexpected response"..nullish()schemas (provider and login profile), plus a regression test with the live shape.linked.teachersis a list of strings. Course names are{ cs }only.200 text/calendar).Live run of our registry functions (counts only)
fit.me✔ ·fit.people.lookup✔ (10) ·fit.sirius.events✔ (10 events, course and teacher names resolved) ·fit.sirius.icalUrl✔ ·fit.marast.courses✔ (3) ·fit.marast.assignments✔ (35 upcoming / 52 total) ·fit.today✔ ·fit.deadlines✔ (13 deadlines: Sirius assessments + Marast quizzes, no warnings) ·fit.grades.*✘ until the resource is enabled.Verified
bun run lint && bun run typecheck && bun run test: 212 tests.docs/apis.mdanddocs/fit-auth.mdrecord everything above.Astra review (gpt-6-astra), 2 rounds
Fixed:
check_tokenrequest followed redirects, and the token is in its body →redirect: "manual".kosPersonIdwasn't scrubbed → added.only_openprobe used Bearer, so my "filter returns 401" conclusion was wrong → re-probed with Api-Key, the filters work, and server-side filtering is restored.truncatedflag and warnings.Round 2: "No remaining concrete defects found."
🤖 Generated with Claude Code