Skip to content

feat(filinq): build diwoo-documentsoort-to-opencatalogi - #2187

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
quality/build-diwoo-documentsoort-to-opencatalogi
Open

rubenvdlinde wants to merge 1 commit into
developmentfrom
quality/build-diwoo-documentsoort-to-opencatalogi

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Builds openspec/changes/diwoo-documentsoort-to-opencatalogi. It is paired with opencatalogi diwoo-metadata-on-the-publication, which is now merged on opencatalogi development.

Tasks done

  • 1 The field map: OpenCatalogiPublicationMap::FIELDS gains documentsoort. toPublication() writes the record's document type there and never writes summary. The class docblock no longer says the publication has no document type field.
  • 2 Refuse an opencatalogi without the field: OpenCatalogiPlatform::publicationDeclares() reads the publication schema of OpenCatalogi's publication register through OpenRegister's RegisterMapper::find() and SchemaMapper::findBySlugInIds(), using main's signatures. It fails closed. Before it reads the copy or writes anything, PublicationPipelineService::handoff() refuses with a 409 that names the OpenCatalogi update it needs. The record stays ready. A document type that OpenCatalogi refuses (a HookStoppedException from its pre-save listener) reaches the operator through the existing error path, and the record stays ready with no handed_off entry.
  • 3 Pin the contract: tests/fixtures/opencatalogi-publication-schema.json was refreshed from opencatalogi development e05ae03ce: publication_register.json plus its register.d fragments, deep-merged in filename order the way SettingsService does it, schema publication 0.0.8, 39 properties. The existing pin test testTheFieldMapMatchesOpenCatalogi now covers documentsoort, and the payload test validates the new payload against the refreshed schema.
  • The new _rbac: false read in OpenCatalogiPlatform is recorded in docs/authorization-decisions.md and RECORDED_BYPASSES. It returns a yes or no only and runs after PublicationAccess.

Tasks left, and why

  • 4, the e2e part: reading documentsoort on the OpenCatalogi publication needs a live instance with OpenCatalogi. woo-publicatie-pipeline.spec.ts answers the API with route handlers. The docs part of 4 is done.

Fails on development first

  • OpenCatalogiPublicationMapTest::testTheDocumentTypeGoesToItsOwnField fails on development with Failed asserting that two arrays are identical (development writes 'summary' => 'besluit' and no documentsoort). PublicationPipelineServiceTest::testAnOpenCatalogiWithoutTheFieldRefusesTheHandoff and ::testTheHandOffWritesTheDocumentTypeToItsOwnField also fail on development.

Payload this change produces (for opencatalogi's DiwooCompletenessListenerTest::testTheFilinqHandoffPayloadIsAccepted)

{"title": "Besluit 2025-017", "documentsoort": "besluit", "wooCategory": "infocat009", "publicationDate": "2026-09-29T00:00:00+00:00"}

Tests added

  • OpenCatalogiPublicationMapTest: 3 tests.
  • PublicationPipelineServiceTest: testTheHandOffWritesTheDocumentTypeToItsOwnField, testAnOpenCatalogiWithoutTheFieldRefusesTheHandoff and testARefusedDocumentTypeLeavesTheRecordReady, with mapper doubles shaped like OpenRegister main's.
  • A HookStoppedException stub that mirrors OpenRegister main.

Suite before/after

  • Unit: 7288 tests OK before (6 skipped), 7294 tests OK after (6 skipped).
  • phpstan and phpcs are clean on the touched lib files.

Generated by Claude Code

The hand-off writes the DiWoo document type to OpenCatalogi's own
documentsoort field and never to summary, refuses the hand-off when
OpenCatalogi's publication schema does not declare the field, and pins
the field map against opencatalogi development e05ae03ce.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant