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

retrofit: full Bucket 1 + 2a/2b/3b spec coverage for openregister (~500 methods annotated, 6 new specs)#1364

Merged
WilcoLouwerse merged 33 commits into
developmentfrom
feature/reverse-spec
May 1, 2026
Merged

retrofit: full Bucket 1 + 2a/2b/3b spec coverage for openregister (~500 methods annotated, 6 new specs)#1364
WilcoLouwerse merged 33 commits into
developmentfrom
feature/reverse-spec

Conversation

@WilcoLouwerse

@WilcoLouwerse WilcoLouwerse commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Lands the complete OpenSpec retrofit for openregister: Bucket 1 annotations, Bucket 2a reverse-specs, Bucket 2b cross-capability cross-refs, and Bucket 3b triage. No code behaviour changes — only @spec tags and spec files (plus one audit-trail immutability fix).

What this PR contains

Bucket 1 — @SPEC annotations (coverage scan → annotate run)

  • Coverage report generated from openspec/coverage-report.json
  • ~150+ lib/ methods annotated with @spec openspec/changes/retrofit-annotate-openregister-2026-04-23/tasks.md#task-N
  • Archived: openspec/archive/retrofit-annotate-openregister-2026-04-23/
  • Second Bucket 1 pass (2026-04-30): 169 additional methods annotated across 67 files (archived separately)

Bucket 2a — Reverse-spec (new capabilities / extended specs)

  • calendar-integration — 2 new REQs, 19 methods annotated
  • chat-ai — 5 new REQs, 22 methods annotated
  • content-versioning — REQ-017 (file versioning), 4 methods annotated
  • object-lifecycle — 5 new REQs, 252 methods annotated
  • tenant-lifecycle — REQ-005 (tenant deprovisioning), 4 methods annotated
  • archival-destruction-workflow — REQ-009, 11 methods annotated; spec headings normalized to REQ-NNN format

Bucket 2b — Cross-capability cross-refs (33 tasks)

  • Ghost change retrofit-b2b-crossrefs-2026-04-28 (archived) — maps 100+ files to existing spec tasks across 15 capabilities
  • Covers: event-driven-architecture, deep-link-registry, workflow-engine-abstraction, archival-destruction-workflow, data-import-export, zoeken-filteren, graphql-api, edepot-transfer, webhook-payload-mapping, faceting-configuration, retention-management, tenant-lifecycle, tenant-quotas, notificatie-engine, object-lifecycle, rbac-scopes

Bucket 3b — Triage

  • 5 unimplemented REQs marked as deferred

Other

  • fix(audit-trail): enforce immutability on destroyMultiple()
  • 6 BackgroundJob files annotated: CacheWarmupJob, NameCacheWarmupJob, SolrWarmupJob, ActionRetryJob, ExecutionHistoryCleanupJob, TransferExecutionJob (tasks 30–33)

New spec files

  • openspec/specs/calendar-integration/spec.md
  • openspec/specs/chat-ai/spec.md
  • openspec/specs/content-versioning/spec.md
  • openspec/specs/object-lifecycle/spec.md
  • openspec/specs/tenant-lifecycle/spec.md

What this PR does NOT do

  • No logic changes (except audit-trail immutability fix)
  • Does not claim 100% coverage — post-merge coverage scan will show remaining Bucket 2 clusters
  • Annotation commits are listed in .git-blame-ignore-revs

Review focus

  • @spec tags point to tasks.md anchors that exist
  • New REQ language matches observed behavior (not aspirational)
  • No conflict markers left in PermissionHandler.php (resolved: evaluateMatchConditions() removed per development version)

Source: openspec/coverage-report.md generated 2026-04-23, extended through 2026-04-30.


Follow-up

Remaining retrofit work tracked in ConductionNL/.github#33 — Tier 1 Bucket 2a reverse-specs (edepot-transfer, graphql-api, faceting-configuration, event-driven-architecture), object-interactions triage, and Tier 3 backlog inventory. The issue contains step-by-step instructions for a future agent to pick up.

Bucket 4 ADR cleanup tracked in ConductionNL/openregister#1370.

WilcoLouwerse and others added 19 commits April 28, 2026 11:48
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…apability refs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…task refs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onManager integration)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ethods

Adds REQ-017 to content-versioning spec describing the FileVersioningHandler's
observed behavior: listing and restoring file versions via NC files_versions app,
with graceful degradation when the app is disabled.

Ghost change: retrofit-content-versioning-2026-04-28 (archived)
Methods annotated: FileVersioningHandler::isVersioningEnabled, listVersions,
restoreVersion, getCurrentUserId
Clusters annotated (237 PHP methods total):
- archival-destruction-workflow: 10 methods → task-5, task-6
- graphql-api: 47 methods → task-37, task-38, task-39, task-40, task-41
- edepot-transfer: 37 methods → task-20, task-21, task-23
- event-driven-architecture: 97 methods → task-26, task-27
- faceting-configuration: 48 methods → task-29, task-31, task-33, task-35

Coverage report refreshed on branch retrofit/reverse-spec-openregister-tenant-lifecycle-2026-04-28 (2026-04-28).
New capability spec: openspec/specs/object-lifecycle/spec.md
REQ-001: Object save pipeline (SaveObjects, SaveObject, CrudHandler, etc.)
REQ-002: Object validation pipeline (ValidateObject, ValidationHandler)
REQ-003: Object cache management (CacheHandler, PerformanceHandler)
REQ-004: Bulk object operations (PreparationHandler, ChunkProcessingHandler)
REQ-005: Object metadata hydration (MetadataHydrationHandler, ComputedFieldHandler)

Cross-cap refs: PermissionHandler→task-7, LinkedEntityEnricher/RelationHandler→task-6,
AuditHandler→task-8, FacetHandler→task-9, SearchQueryHandler→task-10,
ExportHandler→task-11, RevertHandler→task-12, FilePropertyHandler→task-13

Scanner misclassification: all methods were in object-interactions Bucket 2a
but implement core CRUD pipeline, not the notes/tasks/files API.

Ghost change: retrofit-object-lifecycle-2026-04-28 (archived)
New capability spec: openspec/specs/calendar-integration/spec.md
REQ-001: Register objects exposed as CalDAV calendar events (ICalendarProvider impl)
REQ-002: Object→VEVENT transformation (all-day vs datetime, template interpolation)

Files: RegisterCalendarProvider, RegisterCalendar, CalendarEventTransformer (19 methods)
Ghost change: retrofit-calendar-integration-2026-04-28 (archived)
…chived)

All Bucket 2b clusters annotated with cross-capability @SPEC tags:
- ActivityService, Listeners, EventListeners → event-driven-architecture tasks
- ObjectReferenceProvider → deep-link-registry#REQ-002
- N8nAdapter, WorkflowResult, ActionScheduleJob → workflow-engine-abstraction tasks
- BulkLegalHoldJob, DestructionCheckJob → archival-destruction-workflow tasks
- BlobMigrationJob → data-import-export#REQ-001
- SolrNightlyWarmupJob, ObjectsProvider, SolrCommands → zoeken-filteren#REQ-001
- GraphQLSubscriptionListener → graphql-api#REQ-007
- TransferCheckJob → edepot-transfer#REQ-001
- WebhookRetryJob → webhook-payload-mapping#REQ-001
- SyncConfigurationsJob → faceting-configuration#REQ-002
- LogCleanUpTask → retention-management#REQ-009
- OrganisationController → tenant-lifecycle#REQ-001
- TenantQuotaException, LanguageMiddleware → tenant-quotas#REQ-001
- ConfigurationCheckJob → notificatie-engine
- ActionListener, FileChangeListener → event-driven-architecture
- FileExtractionController, ObjectTextExtractionJob → object-lifecycle
- Exception, AppInfo, Sections, Settings → object-lifecycle
- AuthenticationService → rbac-scopes#REQ-001
- Twig, ContactsMenuProvider → object-lifecycle
- SchemaTool, RegisterTool, ToolInterface → object-lifecycle (LLM tool layer)

Ghost change: retrofit-b2b-crossrefs-2026-04-28 (archived)
Completes the bucket-2b-cross-ref ghost change annotation pass.
Methods in AppInfo, BackgroundJob, Command, Contacts, Controller,
Exception, Listener, Repair, Sections, Service, Settings, and Twig
namespaces annotated with @SPEC tags pointing to existing spec tasks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CacheWarmupJob + NameCacheWarmupJob → object-lifecycle#REQ-003 (task-30)
SolrWarmupJob → zoeken-filteren#REQ-001 (task-31)
ActionRetryJob + ExecutionHistoryCleanupJob → workflow-engine-abstraction#REQ-010 (task-32)
TransferExecutionJob → edepot-transfer#REQ-001 (task-33)

Extends retrofit-b2b-crossrefs-2026-04-28 with 4 new tasks.
PHPCS clean on all 6 files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .git-blame-ignore-revs: expand 7 truncated SHAs to full 40-char form;
  truncated SHAs are silently ignored by git blame --ignore-revs-file.
  Update section comment to reflect full Bucket 2a/2b pass scope.

- lib/Event/*.php + lib/Service/Configuration/*.php: fix 87 @SPEC
  annotations that were missing a blank comment line before the tag and
  used triple-space (   ) instead of single-space. All now follow the
  established convention used in the other 1,075+ annotations.

- openspec/specs/object-lifecycle/spec.md (live + archive copy):
  - REQ-001: rewrite pipeline description to accurately reflect two
    distinct paths (single: SaveObject::saveObject(); bulk:
    SaveObjects::saveObjects() → SaveObject per item). Update scenario
    WHEN clause from the non-existent CrudHandler::save() to the real
    SaveObject::saveObject() entry point.
  - REQ-005 scenario: fix UUIv4 typo → UUIDv4.

- openspec/archive/retrofit-calendar-integration-2026-04-28/proposal.md:
  correct CalendarEventTransformer method count from 7 to 5 (matches the
  5 annotated methods listed in the parenthetical).

- openspec/archive/retrofit-notificatie-engine-2026-04-28/tasks.md:
  add missing #REQ-001 anchor to task-1 for consistency with all other
  tasks.md files in the PR.

- openspec/coverage-report.json + coverage-report.md:
  restore scope block / ## Scope table removed during report regeneration.
  Updated counts: spec_capabilities=45, spec_reqs_total=393 (reflecting
  new object-lifecycle, calendar-integration, content-versioning REQ-017,
  and tenant-lifecycle REQ-005). PHP/frontend counts unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…register-tenant-lifecycle-2026-04-28

retrofit: Bucket 2a/2b reverse-spec + annotate openregister (16 commits / ~380 methods)
Conflict in PermissionHandler.php resolved: evaluateMatchConditions() was
removed in development; kept development version with @SPEC annotation on
getAuthorizedGroups().
remko48
remko48 previously approved these changes Apr 30, 2026
WilcoLouwerse and others added 10 commits April 30, 2026 13:06
…ethods

Adds pre-destruction notification REQ (objects approaching archiefactiedatum
trigger per-object Nextcloud notifications to archivaris group, configurable
lead time, deduplication via app config). Ghost change archived.

Annotates 11 Bucket 2a methods with @SPEC refs:
- DestructionCheckJob::run, sendObjectNotification → REQ-009 task
- LegalHoldService: placeHold, releaseHold, hasActiveHold,
  hasActiveHoldFromRetention, bulkPlaceHold → REQ-006 (task-5)
- ArchivalController: createLegalHold, releaseLegalHold → REQ-006 (task-5)
- ArchivalService: calculateArchivalDate → REQ-007 (task-6)
- ArchivalService: findObjectsDueForDestruction → REQ-001 (task-1)

9 private/plumbing methods in cluster left unannotated (by design).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gnore-revs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Q-NNN format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
destroyMultiple() was calling logService->deleteLogs() and returning 200,
while its sibling destroy() correctly returned 405 Method Not Allowed.
Both now enforce the audit-trail-immutable spec: audit trail entries
cannot be deleted via any route.

Also refresh coverage-report.md/.json from 2026-04-30 rescan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Applied @SPEC tags pointing at ghost change
retrofit-annotate-openregister-2026-04-30. 96 tasks, 26 capabilities.
No logic changes. Source: openspec/coverage-report.md (2026-04-30).

Continues from retrofit-annotate-openregister-2026-04-23 which covered
the bulk of the codebase. This run adds annotations for Bucket 1
methods identified in the fresh coverage scan.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cleanup of leftover deletions from the archive move.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New capability spec openspec/specs/chat-ai/spec.md with 5 REQs drafted
from observed behavior of ChatController, ChatService, ConversationController,
and AgentsController. Ghost change retrofit-chat-ai-2026-04-30 archived.

REQs:
- REQ-001: AI message processing with RAG context
- REQ-002: Conversation lifecycle management (two-stage delete)
- REQ-003: Paginated message history retrieval
- REQ-004: AI agent management and tool discovery
- REQ-005: Chat analytics and user feedback

Annotations: 22 methods across 4 files tagged with @SPEC pointing at
openspec/changes/archive/retrofit-chat-ai-2026-04-30/tasks.md.
No logic changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ster-2026-04-30

retrofit: annotate openregister Bucket 1 (169 methods / 96 REQs)
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ bc85aef

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

Quality workflow — 2026-04-30 13:49 UTC

Download the full PDF report from the workflow artifacts.

WilcoLouwerse and others added 2 commits April 30, 2026 16:11
Merged both retrofit annotation SHAs from feature/reverse-spec and
retrofit/reverse-spec-openregister-chat-ai-2026-04-30.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…register-chat-ai-2026-04-30

retrofit: reverse-spec chat-ai cluster (5 REQs / 22 methods)
content-versioning: 4 requirements marked deferred
- draft/published lifecycle (no DraftService found)
- draft promotion (depends on lifecycle above)
- version comparison with visual diffs (no diffing service)
- delta storage for drafts (audit trail full diffs work; draft delta does not)

environment-otap: configuration promotion endpoint not found
- POST /api/organisations/{uuid}/promote not implemented
- environment field + validation IS implemented (TenantLifecycleService)

mock-registers: idempotent import not implemented
- no MockRegisterService or mock seed JSON files found

Source: openspec/coverage-report.md Bucket 3b, generated 2026-04-30.
@WilcoLouwerse WilcoLouwerse changed the title retrofit: full Bucket 1 + 2a/2b spec coverage for openregister (~300 methods annotated, 5 new specs) retrofit: full Bucket 1 + 2a/2b/3b spec coverage for openregister (~500 methods annotated, 6 new specs) Apr 30, 2026
@WilcoLouwerse WilcoLouwerse requested a review from remko48 May 1, 2026 09:12
@WilcoLouwerse WilcoLouwerse merged commit e1beb68 into development May 1, 2026
18 of 21 checks passed
@WilcoLouwerse WilcoLouwerse deleted the feature/reverse-spec branch May 1, 2026 11:07
@WilcoLouwerse WilcoLouwerse restored the feature/reverse-spec branch May 1, 2026 11:07
WilcoLouwerse added a commit that referenced this pull request May 4, 2026
…er + backfill design.md

Cleans up the retrofit cohort that landed across PRs #1364#1394.

**Archive consolidation**
- Move 12 retrofit ghost changes from openspec/archive/ → openspec/changes/archive/
- Move 2 older non-retrofit changes (2026-03-25-contacts-actions, 2026-03-25-mail-sidebar) too
- Delete the now-empty openspec/archive/ root
- Drop the broken openspec/changes/retrofit-actions-2026-05-01 symlink
- Rename 2026-05-01-retrofit-actions-2026-05-01 → retrofit-actions-2026-05-01 (drop redundant date prefix)

**Frontmatter standardisation**
- archival-destruction-workflow ghost change delta: full requirement text → REQ-009 ID; ### Requirement → ### REQ-009
- archival-destruction-workflow master: remove redundant quotes around REQ-009
- content-versioning master: inline list → block YAML
- tenant-lifecycle master: inline list → block YAML

**Backfill design.md on 5 retrofits**
The 2026-04-28 retrofit batch ran before opsx-reverse-spec step 11 (auto-call /opsx-ff)
was wired in. Adds design.md (Context / Goals / Decisions / Risks / Migration Plan)
to: archival-destruction-workflow, calendar-integration, content-versioning,
object-lifecycle, tenant-lifecycle.

**Why the design.md was written directly rather than via /opsx-ff:** the skill is
built to scaffold a NEW change at openspec/changes/{name}/, not to backfill
artifacts on already-archived ghost changes. The opsx-reverse-spec skill itself
already calls /opsx-ff at step 11, so future runs will get the auto-fill for free.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants