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

bcgov / vc-common-service / 30112878052
72%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 05:25PM UTC
Jobs 1
Files 85
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

24 Jul 2026 05:24PM UTC coverage: 72.265% (+0.9%) from 71.404%
30112878052

push

github

web-flow
Operation tracking model and JSONB storage (#143)

feat(operation): add operation tracking model and JSONB storage (PE-07)

Closes #30.

Implement the Operation persistence layer that tracks async credential and
connection operations with flexible JSONB request/result storage and TTL-based
expiry.

- Add Operation entity: tenant FK (ON DELETE RESTRICT), nullable self-referential
  batch_id FK (ON DELETE CASCADE), type, state enum, request/result JSONB,
  external_id, viewed_at, expires_at, and timestamps.
- Add migration 000004_create-operation-entity with the operation_state enum,
  table, both foreign keys, and six indexes. Use a plain btree on expires_at
  instead of the spec's `WHERE expires_at < now()` predicate, since now() is not
  IMMUTABLE and Postgres rejects it in an index predicate.
- Add OperationRepository with create, save, findById, updateState, updateResult,
  findByExternalId, findByTenantWithFilters (created_at DESC cursor pagination),
  and countByBatchGroupedByState for batch aggregation.
- Add OperationService with the shared computeExpiresAt TTL helper (pending 24h,
  processing/completed-unviewed 72h, completed-viewed 1h, failed-viewed 24h,
  failed-unviewed 7d), plus createOperation (72h at creation), idempotent
  markViewed, and transitionState.
- Wire OperationModule into AppModule and register the migration in data-source.
- Add unit tests for the service (all TTL branches + orchestration) and repository.

Per-tenant TTL config and the scheduled purge job are deferred to PE-08 (#31);
operation polling endpoints are deferred to AG-02 (#76).

Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>

515 of 684 branches covered (75.29%)

Branch coverage included in aggregate %.

87 of 110 new or added lines in 7 files covered. (79.09%)

1 existing line in 1 file now uncovered.

879 of 1245 relevant lines covered (70.6%)

2.6 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
0.0
libs/database/src/migrations/000006_create-operation-entity.ts
6
0.0
apps/vc-common-service/src/operation/operation.module.ts
2
83.33
apps/vc-common-service/src/operation/operation.entity.ts
1
0.0
0.0% apps/vc-common-service/src/app.module.ts
1
93.22
apps/vc-common-service/src/operation/operation.service.ts
1
0.0
0.0% libs/database/src/data-source.ts

Coverage Regressions

Lines Coverage ∆ File
1
0.0
0.0% libs/database/src/data-source.ts
Jobs
ID Job ID Ran Files Coverage
1 30112878052.1 24 Jul 2026 05:25PM UTC 85
72.27
GitHub Action Run
Source Files on build 30112878052
  • Tree
  • List 85
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30112878052
  • bbf701b5 on github
  • Prev Build on main (#30112295461)
  • Next Build on main (#30120463382)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc