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

andgineer / dinary-server / 24677965019
77%

Build:
DEFAULT BRANCH: main
Ran 20 Apr 2026 04:29PM UTC
Jobs 1
Files 20
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

20 Apr 2026 04:27PM UTC coverage: 71.716% (-0.07%) from 71.789%
24677965019

push

github

andgineer
Rebuild logging_mapping from latest_year, deduped by canonical key

Sourcing logging_mapping from year=0 — the cross-year aggregation of
every historical (sheet_category, sheet_group) pair — flooded the table
with stale capitalisations and cross-category aliases. The projection's
"first row by id" tie-breaker then routed `POST /api/expenses` writes
to whichever historical row happened to have the lowest id: e.g.
category `гаджеты` was written as `Машина / Gadgets`, category `еда`
as `Еда / ` (capitalised), category `машина` as `Машина / Car wash`.

Replace `_rebuild_logging_mapping_from_year_zero` with
`_rebuild_logging_mapping_from_latest_year`, which:

- Copies rows only from `import_mapping WHERE year = latest_year`
  (the user's current sheet conventions, kept small and predictable
  by step 8 of seed_classification_catalog).
- Dedups by canonical key `(category_id, event_id, sorted(tag_ids))`,
  so multiple legacy (sheet_category, sheet_group) pairs that resolve
  to the same 3D key collapse to a single output row.
- Synthesises the canonical default `(name, '', event=NULL, tags=[])`
  for any active category whose latest_year rows happen to all carry
  an event or tag set, so the bare API path never falls through to
  the "first row by id" branch.
- Falls back to canonical-defaults-only when no positive latest_year
  exists (fresh install with no configured import_sources).

Update architecture.md "Logging projection rules" with the new rebuild
invariant. Replace `test_logging_mapping_bootstrapped_from_year_zero`
with `_from_latest_year`, which asserts the dedup invariant and the
canonical-default safety net for every active category.

Made-with: Cursor

24 of 32 new or added lines in 1 file covered. (75.0%)

1 existing line in 1 file now uncovered.

1780 of 2482 relevant lines covered (71.72%)

0.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
78.59
-0.68% src/dinary/services/seed_config.py

Coverage Regressions

Lines Coverage ∆ File
1
78.59
-0.68% src/dinary/services/seed_config.py
Jobs
ID Job ID Ran Files Coverage
1 24677965019.1 20 Apr 2026 04:29PM UTC 20
71.72
GitHub Action Run
Source Files on build 24677965019
  • Tree
  • List 20
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24677965019
  • 36525c39 on github
  • Prev Build on main (#24677589726)
  • Next Build on main (#24678226255)
  • 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