Web optimisations - #115
Closed
Intern24601 wants to merge 41 commits into
Closed
Web optimisations #115Intern24601 wants to merge 41 commits into
Intern24601 wants to merge 41 commits into
Conversation
Updated the pull request template to include sections for Jira ticket, summary, testing, and security impact.
…uest-template Revise pull request template for clarity and completeness
…ith-11.0.x chore(ppi): sync shared API branch with 11.0.x
Adds `rake db:ppi_sample_data`, creating a deterministic minimum test data set for testing the Peer Progress Indicator dashboard: 2 units, 2 classes of 16 students per unit (4 students per target grade — Pass/Credit/Distinction/High Distinction), and 7 tasks per unit with completion rates scaled by target grade so percentages are clearly distinguishable across grade bands. Verified against the local dev environment: both units created successfully with 32 students and 7 tasks each, and completion percentages visibly differ by grade band in the Students tab.
Adds a permanent technical reference documenting where the Peer Progress Indicator's response fields actually come from in the backend, so PPI-B01, PPI-F01, PPI-S01 and future contributors don't have to rediscover it. Builds on the earlier PPI API discovery task (preserved here as a companion doc), which found the reusable aggregation infrastructure existed but wasn't reachable by students. This document goes further: it reviews the real, unmerged implementation on ppi/student-progress-endpoint (PPI-B01) and maps all 9 response fields to their exact source file/method, availability status, any transformation applied, and the ticket that owns each one. Includes a Mermaid data-flow diagram traced from the actual code (auth -> authorised project -> task validation -> server-side target-grade lookup -> nightly cohort aggregation -> small-cohort suppression -> percentage quantisation -> safe response -> frontend adapter -> existing widget), safe example responses for four business states, and a recorded list of concrete gaps found while reviewing the branch (unset config env vars, no unit has PPI enabled yet, a frontend/backend target-grade parameter mismatch, two frontend branches that independently renamed the same model, and a backfill migration that will blank every existing snapshot on first deploy). Does not implement the endpoint, frontend adapter, or any of the other PPI-* work explicitly out of scope for this ticket.
Quantising into buckets of B only hides the underlying count while B is strictly wider than one student's share of the cohort, 100.0 / cohort_size. A floor of 5 with a 5-point bucket satisfied neither side of that: for every cohort from 5 to 20 the mapping was injective and the returned percentage inverted to an exact submitted count. Move to a floor of 20 and a 10-point bucket, which leaves no cohort at or above the floor from which the count can be recovered, and add two tests that pin the relationship so the constants cannot drift apart again. Also scope the nightly aggregation to units that actually enabled the feature, rather than storing derived cohort statistics for every active unit and never serving them. Docs updated: the bucket size, the example response, the configuration floor, and the genuine-zero row, which is no longer true now that a small count also rounds to zero.
…ress-endpoint feat(ppi): add student-authorised task-level peer-progress API
…le-dashboard-testdata feat: add rake task to seed PPI sample dashboard test data
…urce-map docs: publish PPI backend data-source and field-ownership map
…tion-privacy-pr-20260824 fix(ppi): prevent singleton progress buckets
…-data-lint-pr-20260824 style(ppi): fix sample-data lint
…horisation-tests fix(ppi): prevent peer details leaking to logs
…mmunication job memory usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made minor web Optimisations