• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vEnhance / otis-web / 22554003449
94%

Build:
DEFAULT BRANCH: main
Ran 01 Mar 2026 10:14PM UTC
Jobs 1
Files 113
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Mar 2026 10:13PM UTC coverage: 93.637% (+0.04%) from 93.597%
22554003449

push

github

web-flow
feat(rpg): first obtain tracking (#460)

* Add is_first_obtain tracking to AchievementUnlock

- Add `is_first_obtain` BooleanField (default False) to AchievementUnlock
- Migration 0017 adds the field; migration 0018 retroactively marks the
  earliest non-creator unlock for each Achievement as is_first_obtain=True
- stats view passes is_first_obtain=True via get_or_create defaults when
  the unlock is a genuine first find (non-creator)
- Diamonds meter template applies bg-success to first-obtain achievements
- Admin: is_first_obtain shown in list_display and available as a filter

https://claude.ai/code/session_01RXoD7Py4hCUvkEKa3fwJhi

* Add tests for is_first_obtain achievement tracking

Seven new tests covering:
- First non-creator finder gets is_first_obtain=True, subsequent get False
- Creator unlocking own achievement is skipped (not counted as first find)
- Creator-only unlock: is_first_obtain=False
- Re-submitting an already-obtained code leaves is_first_obtain unchanged
- Stats page renders bg-success for first-obtain achievements
- Stats page omits bg-success when no first-obtain achievements exist
- Retroactive migration logic correctly identifies the earliest non-creator unlock

https://claude.ai/code/session_01RXoD7Py4hCUvkEKa3fwJhi

* Optimize retroactive migration to use a single correlated subquery

Replace the O(n) Python loop (one query per achievement) with a single
UPDATE driven by a correlated subquery. For each AchievementUnlock row the
subquery finds the pk of the earliest non-creator unlock for the same
achievement; only the matching row is updated, making the whole operation
two DB queries regardless of data volume.

Also update test_is_first_obtain_retroactive_migration_logic to exercise
the identical subquery logic used in the migration.

https://claude.ai/code/session_01RXoD7Py4hCUvkEKa3fwJhi

* Drop stale test_is_first_obtain_retroactive_migration_logic

The test was duplicating the migration's own query logic rather than
t... (continued)

815 of 1046 branches covered (77.92%)

Branch coverage included in aggregate %.

64 of 64 new or added lines in 2 files covered. (100.0%)

8633 of 9044 relevant lines covered (95.46%)

0.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22554003449.1 01 Mar 2026 10:14PM UTC 113
93.64
GitHub Action Run
Source Files on build 22554003449
  • Tree
  • List 113
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • bcc9bdeb on github
  • Prev Build on main (#22548345808)
  • Next Build on main (#22556398007)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc