Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

retrofit(rspec-2b): reverse-spec BackgroundJob cluster (14 methods / 5 files)#1804

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
retrofit/rspec-2b-backgroundjob-2026-05-24
Open

retrofit(rspec-2b): reverse-spec BackgroundJob cluster (14 methods / 5 files)#1804
rubenvdlinde wants to merge 1 commit into
developmentfrom
retrofit/rspec-2b-backgroundjob-2026-05-24

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Bucket 2b reverse-spec for the backgroundjob namespace-word cluster. Each of the 5 BackgroundJob classes implements a distinct task — split by observed behavior rather than minting a generic background-jobs umbrella capability (which would be a namespace-word anti-pattern).

Capabilities touched (4 caps, 3 new REQs + 1 backfill)

File Capability Disposition
CacheWarmupJob.php + NameCacheWarmupJob.php faceting-configuration NEW REQ — UUID-to-name cache pre-warmup (configurable hourly + nightly)
ExecutionHistoryCleanupJob.php workflow-operations Existing REQ-006 (Execution History Retention) — back-annotation only
ReportRenderJob.php (8 methods) rapportage-bi-export NEW REQ — dashboard-driven schedule, missing-owner refusal (no admin fallback), path-traversal rejection
SolrWarmupJob.php (3 methods) zoeken-filteren NEW REQ — post-import QueuedJob shape, availability gate, throughput metric

Why no background-jobs capability

TimedJob / QueuedJob is a Nextcloud framework hook, not a behavior. The 5 jobs do five different things:

  • Two warm the facet label cache (distributed UUID-to-name)
  • One prunes workflow execution history
  • One renders scheduled dashboards to Files
  • One warms Solr after imports

Naming a capability after the namespace would have hidden the actual contracts — including the security guards in ReportRenderJob (missing-owner refusal + path-traversal rejection) that are easy to regress without an explicit REQ.

Methods annotated (14/14)

  • CacheWarmupJob::run → task-1
  • NameCacheWarmupJob::run → task-1
  • ExecutionHistoryCleanupJob::run → task-2
  • ReportRenderJob::__construct,run,shouldRender,renderAndDeliver,writeToFiles,loadReportsRegister,loadDashboards,slugify → task-3
  • SolrWarmupJob::run,isSolrAvailable,calculateObjectsPerSecond → task-4

Observed gaps (advisory, not fixed)

  • ReportRenderJob calls mappers with _rbac: false, _multitenancy: false — system cron context, but worth highlighting against rapportage-bi-export REQ-13 ("cross-register reporting respects RBAC boundaries").
  • SolrWarmupJob uses \OC::$server->get(...) instead of constructor injection.
  • CacheWarmupJob (DI'd) and NameCacheWarmupJob (service-locator) use different patterns for the same dependency — consolidation candidate.

Test plan

  • Verify spec-driven coverage scanner picks up the 14 new @spec annotations
  • Confirm 3 new REQs render correctly in their parent capability files
  • Spot-check that ReportRenderJob security scenarios (missing owner, .. path) match the code's if ($owner === null) and if (str_contains($folderPath, '..')) guards

Source: /tmp/or-scan/rspec-2b-backgroundjob.json (14 methods / 5 files, Bucket 2b).

…5 files / 4 caps)

Bucket 2b reverse-spec for the `backgroundjob` namespace-word cluster. Each of
the 5 jobs implements a distinct task; split by behavior rather than minting
a generic `background-jobs` umbrella capability.

- faceting-configuration: NEW REQ for UUID-to-name cache pre-warmup
  (CacheWarmupJob + NameCacheWarmupJob)
- workflow-operations: existing REQ-006 (Execution History Retention)
  back-annotated on ExecutionHistoryCleanupJob (no new REQ)
- rapportage-bi-export: NEW REQ for ReportRenderJob — dashboard-driven
  schedule, missing-owner refusal, path-traversal rejection
- zoeken-filteren: NEW REQ for SolrWarmupJob — post-import QueuedJob
  shape, availability gate, throughput metric

3 new REQs + 1 backfilled REQ across 4 capabilities. 14/14 methods annotated.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 4b72796

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 162/162
npm ✅ 532/532
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-24 21:58 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant