docs(openspec): scope seeding the hydra flow definitions — the stated blocker is not real - #111
Merged
Merged
Conversation
… blocker is not real The change was framed around IRepairStep having no user session, so seeding "fails closed with User 'Anonymous' does not have permission to 'create'". That is not what the code does. ObjectService::saveObject() takes `_rbac` and `_multitenancy` flags, and hermiq already uses them from a repair step: lib/Repair/SeedHydraTriageFlow.php seeds an agentflow object into the same register and schema with `_rbac: false, _multitenancy: false`. It is registered in appinfo/info.xml and its result is on the live instance right now — `Hydra Triage`, owner `__system__`, disabled. Thirteen hermiq repair steps use this pattern. So the work is unblocked and ordinary. What it is NOT is decided: the ten definitions live in the hydra repo, which is not a Nextcloud app, so the seeder must be a hermiq artifact and something has to own the copy. Vendoring duplicates them with nothing keeping the copies in step; fetching at install time puts a network call in a repair step that would then have to fail soft, which is the silent-success shape this batch exists to remove. Shipping them as an OpenRegister configuration is the most idiomatic and is costed first. That is an architectural choice, not a bug fix, so it is written up rather than made unilaterally. Everything the seeder must do is already settled by the existing pattern and recorded here.
Contributor
Quality Report — ConductionNL/hermiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 117/117 | |||
| npm | ✅ | ✅ 657/657 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 85.3% (93/109 statements)
Quality workflow — 2026-08-02 08:09 UTC
Download the full PDF report from the workflow artifacts.
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.
The blocker this was framed around does not exist
The task was framed as:
That is not what the code does, and not what the live instance shows.
ObjectService::saveObject()takes_rbacand_multitenancyflags, and hermiq already uses them from a repair step —lib/Repair/SeedHydraTriageFlow.php:That step is registered in
appinfo/info.xml(both<pre-migration>and<post-migration>), it seeds an agentflow object into the same register and schema the ten hydra flows would land in, and its result is on the live instance:Owner
__system__, notAnonymous. Thirteen hermiq repair steps use this pattern. Object seeding from anIRepairStepis a solved, shipped problem here.So why is this still a proposal?
Not because of the session. Because of a question that should not be answered unilaterally inside a bug-fix PR: the ten definitions live in the hydra repo, which is not a Nextcloud app and has no repair steps. The seeder must be a hermiq artifact, so something has to own the copy.
hermiq_register.jsonships. Cost: two copies, nothing keeps them in step.ConfigurationService::importFromApp()likeImportFlowRegisterdoes. Most idiomatic; costed first. Known trap: a non-forcedimportFromAppadvances the version without applying.Recommendation (c), falling back to (a).
Everything else is already settled
The proposal records what the seeder must do, taken from the existing pattern rather than invented: disabled with no owner (a trigger fires with no acting user, and every one of these flows writes to the forge), idempotent by name, preflighted per flow against or#2254, and — unlike
SeedHydraTriageFlow, which catches everyThrowableinto a warning so a failed seed still reports a clean install — it must not swallow a real failure.Live state
Two of ten present, both hand-seeded (
_owner = admin, disabled):hydra-file-findings,hydra-record-stage. All three node-owning apps are enabled, so every step type in all ten resolves.hydra-analyze-verdicts,hydra-record-stage,hydra-retry-escalate,hydra-lock-reaper). Fixing those definitions is a prerequisite for seeding them, and is listed as such.