feat: P1 schemas and data model — 17 OpenRegister entities#5
feat: P1 schemas and data model — 17 OpenRegister entities#5rubenvdlinde merged 7 commits intodevelopmentfrom
Conversation
…#4) Implements the P1 schemas and data model for Decidesk: - Replace placeholder schema with 17 entity schemas in decidesk_register.json - Add seed data (3-5 Dutch objects) for all core governance schemas - Configure x-openregister relations between entities - Enable _mail metadata on Decision schema for email-to-decision linking - Register RepairStep in info.xml for automatic schema import - Update DeepLinkRegistrationListener for all 17 schema deep links - Register all object types in frontend store initialization - Add PHPUnit tests validating schema structure, types, enums, relations, and seeds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…r-created (#4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (215 total)
PHPUnit TestsPHPUnit tests were not enabled for this run. Integration Tests (Newman)Newman integration tests were not enabled for this run. E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
#4) - Add /** file doc comments to bootstrap.php, bootstrap-unit.php, DecideskTest.php - Replace ! operator with === false (Squiz.Operators.ComparisonOperatorUsage) - Replace implicit true comparisons with === true - Replace require with include_once for conditional file includes - Remove concat spacing around . operator (Squiz.Strings.ConcatenationSpacing) - Add missing @return void doc comment to testPlaceholder() - Convert positional assert arguments to named parameters (NamedParametersSniff): createMock, assertInstanceOf, assertSame, assertTrue, assertArrayHasKey
|
Hydra Builder — Quality Fix Fixed all PHPCS violations found across 4 test files (33 errors total → 0). Fixed findings`tests/bootstrap.php` (11 errors fixed):
`tests/bootstrap-unit.php` (8 errors fixed):
`tests/Unit/DecideskTest.php` (5 errors fixed):
`tests/unit/Controller/SettingsControllerTest.php` (9 errors fixed):
Verification``` |
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (215 total)
PHPUnit TestsPHPUnit tests were not enabled for this run. Integration Tests (Newman)Newman integration tests were not enabled for this run. E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
Code Review — Juan Claude van DammeResult: FAIL (0 critical, 1 warning, 3 suggestions) WARNING[WARNING] SUGGESTION[SUGGESTION] [SUGGESTION] Stale placeholder Dutch summary in [SUGGESTION] No seed data for 6 non-core schemas What's good
|
Security Review — Clyde BarcodeResult: PASS (0 critical, 0 warning, 2 suggestion) Scope164 changed files reviewed. PHP, JavaScript/Vue, and JSON files scanned with Semgrep ( SAST ResultsSemgrep: 0 findings across 15 scanned source files (13 PHP/JS/JSON in SUGGESTIONException message echoed to admin repair output Realistic-looking PII in seed data Conduction ADR Compliance
False Positives Suppressed
|
Security Review — Clyde BarcodeResult: PASS (0 critical, 2 warning, 2 suggestion) ScopeChanged files reviewed: PHP sources, Vue components, JS store, JSON schema/seed data, test files. WARNINGSecret ballot integrity gap — Vote schema is unconditionally searchable Decision mailEnabled without visible input sanitization controls SUGGESTIONSeed data references real Dutch government email domains Postman collection contains hardcoded default admin credentials False Positives Suppressed[FALSE POSITIVE] generic-hardcoded-password — Conduction Security Rules Check
|
…s to 1.15.0 (#4) - eslint.config.js: add @SPEC to definedTags so OpenSpec traceability annotations no longer trigger jsdoc/check-tag-names warnings - package-lock.json: npm audit fix upgrades axios from 1.13.6 → 1.15.0, resolving GHSA-3p68-rc4w-qgx5 and GHSA-fvcv-3m26-pcqx (critical SSRF) and @nextcloud/axios from 2.5.1 → 2.5.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hydra Builder — Quality Fix Fixed quality failures from CI run 24336061861: Fixed
Remaining (non-critical, informational)
|
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (410 total)
Denied packages
PHPUnit Tests
Code coverage: 0% (0 / 3 statements) Integration Tests (Newman)
E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
[WARNING] testRegistersAllSeventeenSchemas false positive:
- Renamed the misleading test to testIgnoresEventThatIsNotDeepLinkRegistrationEvent
- Added a DeepLinkRegistrationEvent stub (tests/Stubs/) loaded via bootstrap-unit.php
so the real happy path can be exercised without OpenRegister as a Composer dep
- Added testRegistersAllSeventeenSchemas: asserts exactly 17 register() calls with
correct appId, registerSlug, and URL template per schema slug
- Added testRegistersExpectedSlugsAndUrlTemplates: verifies each slug maps to the
correct /apps/decidesk/#/{route}/{uuid} template
- Also registered OCP namespace in bootstrap-unit.php for standalone test runs
- Fixed pre-existing expects(constraint:) named-param errors in InitializeSettingsTest
[WARNING] Vote schema unconditionally searchable (secret ballot risk):
- Set Vote.x-openregister.searchable to false; individual vote records are no longer
queryable via the OpenRegister search API, preventing participant-to-vote correlation
in secret ballot VotingRounds
[WARNING] Decision mailEnabled without sanitization controls documented:
- Added x-mail-security-audit annotation to Decision schema referencing issue #6
- Created tracking issue #6 with pre-release audit checklist (HTML sanitization,
sender validation, Vue v-html audit)
[SUGGESTION - security] Seed data PII — realistic Dutch municipal email domains:
- Replaced @westerkwartier.nl and @waterschap-aaenmaas.nl in Participant seeds
with @example.gemeente.nl and @example.waterschap.nl (clearly fictional)
|
Hydra Builder — Fix iteration 1 Fixed findings:
Additional fix (security SUGGESTION, both reviews):
Remaining SUGGESTIONs (not addressed — informational only):
Quality gate (25/25 tests, 420 assertions, 0 failures): |
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (410 total)
Denied packages
PHPUnit Tests
Code coverage: 0% (0 / 3 statements) Integration Tests (Newman)
E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
- Override apexcharts to 4.7.0 (MIT) in package.json; npm audit fix had upgraded @conduction/nextcloud-vue from 0.1.0-beta.3 to 0.1.0-beta.8, which pulled in vue-apexcharts -> apexcharts 5.10.6 (proprietary license) - Add DeepLinkRegistrationEvent stub loading to tests/bootstrap.php so PHPUnit integration runs (phpunit.xml) can find the class when OpenRegister is not installed in the Nextcloud test environment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hydra Builder — Fix iteration 2 Fixed CI failures introduced by the previous iteration's npm audit fix: Fixed findings:
Quality gate: Remaining SUGGESTIONs (not addressed — informational only):
|
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (416 total)
PHPUnit Tests
Integration Tests (Newman)
E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
…ispatcher\Event not found (#4) The DeepLinkRegistrationEvent stub extends OCP\EventDispatcher\Event. bootstrap.php was include-ing it before Nextcloud's lib/base.php was loaded, so the OCP class was not yet available in the CI environment. Moved stub loading to after the NC bootstrap block. Added the same vendor/nextcloud/ocp PSR-4 fallback that bootstrap-unit.php already uses, so standalone (no NC server) runs also resolve OCP correctly.
|
Hydra Builder — Fix iteration 3 Fixed finding:
Remaining SUGGESTIONs (not addressed — informational only):
|
Quality Report
Summary
PHP Quality
Vue Quality
Security
License Compliance
composer dependencies (100 total)
npm dependencies (416 total)
PHPUnit Tests
Code coverage: 0% (0 / 3 statements) Integration Tests (Newman)
E2E Tests (Playwright)Playwright E2E tests were not enabled for this run. Generated automatically by the Quality workflow.
|
Code Review — Juan Claude van DammeResult: PASS (0 critical, 3 warning, 2 suggestion) Overall this is a well-executed P1 sprint. The 17-schema register JSON is complete and internally consistent, enum values line up with seed data, the WARNINGLicense tag in Dutch
SUGGESTION
|
Security Review — Clyde BarcodeResult: PASS (0 critical, 1 warning, 1 suggestion) Scan Coverage
WARNING
SUGGESTIONException message forwarded to admin-visible repair output False Positives Suppressed
ADR Compliance
|
Security Review — Clyde BarcodeResult: PASS (0 critical, 1 warning, 2 suggestions) Scan coverage: Semgrep WARNING
SUGGESTIONPostman collection ships with weak default credentials No Content-Security-Policy defined for app False Positives Suppressed
|
|
Pipeline complete — code review and security review both passed. Fix iterations: 3. |
1 similar comment
|
Pipeline complete — code review and security review both passed. Fix iterations: 3. |
Closes #4
Summary
Implements the foundational data model for Decidesk by defining all 17 OpenRegister schemas in
decidesk_register.json. Each schema includes field types, required flags, enum constraints, schema.org type annotations, and cross-entity relations viax-openregister-relations. Seed data (3–5 Dutch governance objects per core schema) is included for development and demo use. The RepairStep is registered ininfo.xmlfor automatic import on install/upgrade. The Decision schema hasmailEnabled: trueto support email-to-decision linking via_mailmetadata.Spec Reference
openspec/changes/p1-schemas-and-data-model/design.mdChanges
lib/Settings/decidesk_register.json— Replaced placeholder with 17 entity schemas (GovernanceBody, Meeting, Participant, AgendaItem, Motion, Amendment, VotingRound, Vote, Decision, ActionItem, Minutes, DigitalDocument, MonetaryAmount, Offer, Order, Product, Report) with full property definitions, enums, relations, and seed dataappinfo/info.xml— Added<repair-steps><post-migration>to register InitializeSettings for automatic schema importlib/Listener/DeepLinkRegistrationListener.php— Updated to register deep links for all 17 schemas (was placeholder for "example")lib/Repair/InitializeSettings.php— Added@spectraceability tagssrc/store/store.js— Register all 17 object types with OpenRegister viaobjectStore.registerObjectType()Test Coverage
tests/Unit/RegisterJsonTest.php— 12 test methods (312 assertions) validating: OpenAPI structure, all 17 schemas exist, schema.org type annotations, enum values for GovernanceBody/Meeting/Motion/VotingRound/Participant, Decision mailEnabled flag, seed data with @self envelopes, cross-entity relations, schema slugs and versionstests/Unit/Listener/DeepLinkRegistrationListenerTest.php— 3 test methods: event handling, instantiation, non-matching event ignoredtests/Unit/Repair/InitializeSettingsTest.php— 4 test methods: getName, skip when OpenRegister unavailable, import when available, exception handling