Repository navigation
feat(privacy): enforce G13 cohort rule and cover G7, G14, G15 with tests - #23
Merged
Merged
Conversation
G13 and G15 were documented as "planned enforcement". Checking the analytics
endpoints showed G13 was not held: GET /analytics/team returned every
member's average score to any member of the organization, trainees included.
- services/privacy.py: MIN_COHORT = 5.
- GET /analytics/team: per-member stats for staff only; other members get
aggregates, and nothing but the member count when the org has fewer than 5.
- GET /risk-profile/org/{id}: a non-staff owner gets the same suppression
when fewer than 5 members have a risk profile.
- G15: regression test that a live click, a GoPhish-reported recipient and a
forwarded report leave XP, level, badges, lab results and the leaderboard
unchanged.
- G7: tests that an unknown objective fails pre-flight and that a client
cannot send a persona prompt.
- G14: index creation moved into server.ensure_indexes() so the 180-day TTL
on live_events and live_messages can be tested.
- docs: guardrails table points at the enforcing code; api.md documents the
cohort rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Brings #21 to
main. #21 was merged intofeature/persona-reliabilityafter that branch had already gone tomain(via #20 → #22), so its commit (52a0079) never reachedmain.No new changes; see #21 for the description.
pytest: 260 passed.🤖 Generated with Claude Code