Medium
Detect duplicate active OAuth token grants
The task
This is the brief your AI gets. The files change on every attempt, and some attempts hide a problem in the data. Which ones is not revealed.
Review token_grants.log and scope_policy.yaml. Rule: each client_id may have at most one ACTIVE grant at a time (a REVOKED grant followed by a new ACTIVE grant is valid). If a client_id has two ACTIVE grants, set status to 'conflict_detected' and put both grant_ids in flagged_items. Otherwise keep 'completed'. Return in result: total_grant_days=<sum of ttl_days for compliant ACTIVE grants>.
- Files you work with
token_grants.logscope_policy.yaml- Your AI must return
total_grant_days- Level
- Medium. A mid-level task: the rule has an exception you have to find in the data.
- Time
- About 10 minutes with your own AI. Free, not ranked.
Manager’s note
Your AI can’t see this
Thursday 26/11 update on the total TTL days for compliant active token grants. When summing ttl_days, leave the legacy-sync service out of the reported total. Someone asked whether to drop the analytics service too; we declined, so keep it in. Still enforce the single active grant per client rule across all log lines.
Rooms with this problem
- Software & IT Practitioner 4 Medium
More Software & IT problems
- Find leaked keys in config files Medium
- Find lock-order deadlock risks Medium
- Check exposed ports in docker compose Medium
- Check rate limits on sensitive endpoints Medium
- Find null-reference bugs Medium
All Software & IT problems → · Using TraceGrade for Software & IT hiring