Repository navigation
feat(filinq): build flow-operations - #2120
Open
rubenvdlinde wants to merge 10 commits into
Open
rubenvdlinde wants to merge 10 commits into
rubenvdlinde wants to merge 10 commits into
Conversation
Four Nextcloud Flow file operations (anonymise intake, OCR, PDF/A copy, validation checks), their registration listener, the queued job that runs them as the file owner, and the loop guard on the operations' own output. Assisted-by: ClaudeCode:claude-opus-5-5
Unit tests for the four Flow operations, the trigger, the run store, the queued job, the registration listener and the workflow category; the OCP WorkflowEngine contracts load lazily in the unit bootstrap. Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
Rem-Dam,
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 14, 2026 14:05
The Flow rule-builder script registering the four operations, with labelled option editors for the PDF/A target folder and the validation document type; the Flow runs listing; EN and NL strings. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
flowOperationRun and ocrResult changed shape on this branch without a version bump, so an existing install would never import them. Both move to 1.1.0 and the register to 8.56.0. Assisted-by: ClaudeCode:claude-opus-5-5
Resolves the conflicts with development: l10n catalogues keep both sides' strings, the register moves to v8.64.0 over development's v8.63.0, webpack keeps both the flowOperations and verify entries, and ListenerRegistrarTest counts both sides' listeners (26). FlowOperationRunRepository::save() moves to openregister main's saveObject(ObjectSaveOptions) form, which development's stubs now use; same register, schema, uuid and RBAC/multitenancy off. Assisted-by: ClaudeCode:claude-opus-5-5
Register info: both lines' entries kept, version 8.67.0 above development's 8.66.0. ListenerRegistrarTest counts both lines' listeners (30). Assisted-by: ClaudeCode:claude-opus-5-5
Register v8.68.0 keeps both sides: the line's flowOperationRun and ocrResult 1.1.0 beside development's document and documentType schemas and seeds. Assisted-by: ClaudeCode:claude-opus-5-5
Resolves the conflicts in the register (both lines' schemas kept, register 8.72.0) and in ListenerRegistrarTest (the two flow-operation listeners and the PDF/UA attach listeners both counted). Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues
flow-operationsafter #2062 (register schema and demo runs, tasks 1.1–1.2).Tasks done
RegisterFlowOperationsListenerregisters the four operations onRegisterOperationsEventand loads the rule-builder script onLoadSettingsScriptsEvent; wired inDocumentGenerationRegistrar.ISpecificOperationclasses underlib/Flow/Operation/(file entity, admin + personal scope, translated name/description, icon).validateOperation()refuses malformed options withUnexpectedValueException: options must be a JSON object; validation takes only a knowndocumentType(newValidationProfileResolver::documentTypes()); PDF/A takes only a relativetargetFolderwithout...FlowOperationTrigger(request side): resolves the file from the event (file events, rename/copy targets, tag assigned), asksIRuleMatcher::getFlows(), dedupes on{operation, fileId}with a queued/running run, stores the run asqueuedand enqueues oneFlowOperationJob. It never throws into the triggering request.FlowOperationJobstarts the run, resolves the file in the owner's folder tree, runs the operation as the owner (volatile session, restored afterwards) and records the outcome; every failure ends the runfailedwith a reason.producedFileId, or a file created while an operation is writing its output (FlowOutputGuard), gets askippedrun with reasonown_outputand is never queued.extractAndDetectEntities(), counts per entity type, never values; a publication prohibition or the gate exception fails the run, a gate that cannot be asked fails closed; no review is written and no override passed). OCR =OcrRunService::run()withtriggeredBy: flow(added to theocrResultenum); disabled / no Tesseract / no text fail, a non-candidate is skipped; the summary holds confidence and text length only. PDF/A = new<name>.pdfa.pdfbeside the source or in the target folder (created under the owner's home), the intermediate PDF of a non-PDF source removed; the source is never touched, and a run refuses rather than let the conversion replace an existing<name>.pdfof the user. Validation =DocumentValidationService::validate()with the configured profile;failedfails the run, warnings leave it succeeded with the findings.<category>workflow</category>inappinfo/info.xml.src/flowOperations.js(own webpack entryfilinq-flow-operations.js, outside the shared chunks): registers the four operators by PHP class withwindow.OCA.WorkflowEngine.registerOperator; PDF/A and validation get a plain custom element (labelled input, hint linked viaaria-describedby, CSS variables only) that stores the options JSON and emitsupdate:model-value.FlowRunsindex page overflowOperationRun(operation, file, status, reason, start, end; no add action) in the settings menu.l10n/*.json,.jsrebuilt). Theme: only Nextcloud CSS variables are used; not checked visually.docs/features/flow-operations.md(text only; 4.4 stays open for the screenshots).passtransition (running → skipped), a failure-notification body naming operation, file and reason, andfileNameas its object name.Tasks left
P1Yretention placeholder needs a selectielijst-manager-approved value; a lint that fails on the placeholder would turn the suite red until that sign-off, so it is not added here.openspec validate --strictand the hydra gates: live, e2e, screenshot and tooling tasks, not done in this build.element,update:model-valuewithdetail[0]); confirm it in the live check.Tests
node tests/validate-manifest.js: PASS.test:l10n: OK (en/nl parity).check:l10n-jsreports the six.jscatalogues stale on plain development as well: the generator drops their SPDX header. Inherited; the headers are kept here and only the new keys change.Generated by Claude Code