Repository navigation
fix(export): every generated app was born declaring AGPL, not EUPL-1.2 - #135
Conversation
The embedded template snapshot's appinfo/info.xml hardcoded
`<licence>agpl</licence>` while the very same file's description read "Free
and open source under the EUPL-1.2 license". Every app OpenBuild has ever
generated inherited that contradiction, and nothing failed.
The `{{license}}` token was already wired end to end — ExportJobService ->
RunExportJob -> PlaceholderResolver, defaulting to EUPL-1.2 at all three
layers — and reached exactly one file, src/manifest.json. info.xml never
consumed it. `<licence>{{license}}</licence>` closes that, and as a side
effect a caller who picks a licence now gets the licence they picked.
EUPL-1.2 is the schema-correct spelling, not a preference: the Nextcloud
appstore's own info.xsd enumerates `EUPL-1.2` as an allowed <licence> value.
It does NOT enumerate `eupl` — which is what upstream nextcloud-app-template's
`main` branch currently ships, and is separately invalid.
A test first, and shown to fail. testGeneratedAppDeclaresTheRequestedLicence()
exports a real app and asserts info.xml declares EUPL-1.2 and does not declare
agpl. Against the pre-fix snapshot it failed with the generated app's info.xml
in the message; after the one-line change all 3 integration tests and all 746
unit tests pass. Nothing in the suite covered this before: the existing
unresolved-placeholder assertion matches /\{\{[a-zA-Z]+\}\}/, and a hardcoded
wrong value contains no placeholder to be left unresolved.
Why this is a one-line Edit and not the whole-tree refresh docs/releasing.md
prescribes. The refresh is unsafe as written, measured three ways:
1. There is no upstream ref this tree fast-forwards from. The declared
sourceCommit 7ee06aae is not an ancestor of upstream main OR development;
`git branch -r --contains` places it only on two abandoned wsl-rescue/*
branches.
2. The snapshot carries OpenBuild-only fixes upstream never received — at
least 10 commits have edited files inside lib/Resources/template/ since,
among them c87d8c4 "fix(template): the generated app could not be built
at all (#39)" and 12da26f "fix(export): make exported app a Tier-4
manifest consumer (ADR-024)". `rsync --delete` reverts both.
3. The dialects differ. OpenBuild resolves {{token}}; upstream's info.xml
uses {APP_NAME}/{APP_SUMMARY}/{APP_DESCRIPTION}. PlaceholderResolver does
not know that dialect and the unresolved-placeholder assertion does not
match it, so a refreshed tree would ship literal {APP_NAME} into every
generated app and no test would fail.
.snapshot-meta.json and docs/releasing.md now say so at the point of use, so
the next agent does not run the rsync on the strength of the doc alone.
docs/releasing.md also now records that the "CI drift check" it describes does
not exist — no workflow mentions drift or nextcloud-app-template — which is
why the snapshot sat 86 days stale shipping the wrong licence.
.path-manifest.txt no longer lists .snapshot-meta.json: the regeneration
command in docs/releasing.md excludes it, so the checked-in manifest
disagreed with its own generator.
Quality Report — ConductionNL/openbuild @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| composer | ✅ | ✅ 101/101 | |||
| npm | ✅ | ✅ 654/654 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-05 20:10 UTC
Download the full PDF report from the workflow artifacts.
I ran the whole-tree refresh. Here is what it actually produces.The PR description argued the documented rsync -a --delete \
--exclude node_modules --exclude vendor --exclude .git \
../nextcloud-app-template/ lib/Resources/template/Step 1 deletes the snapshot's own metadata
Step 3 then tells you to "Update Step 2 fails outright — 0 of 8 tokens survive
Upstream does not carry OpenBuild's And the generated app comes out broken
<id>melding-systeem</id>
<name lang="en">{APP_NAME}</name>
<name lang="nl">{APP_NAME}</name>
<summary lang="en">{APP_SUMMARY}</summary>
<summary lang="nl">{APP_SUMMARY}</summary>
<description lang="en"><![CDATA[{APP_DESCRIPTION}]]></description>
<description lang="nl"><![CDATA[{APP_DESCRIPTION}]]></description>
<version>0.1.2</version>
<licence>EUPL-1.2</licence>A generated app whose name, summary, description and version are literal upstream placeholders. And the shipped suite does not catch it. The unresolved-placeholder assertion matches The suite did catch two other refresh regressions, exit 1,
So the refresh trades one wrong line for a scaffold that cannot produce a valid app. The one-line fix in this PR is what I shipped instead, and it is proven by a test that was shown to fail first. Full accounting of what the refresh movesShipped snapshot vs refreshed tree:
Behaviour-affecting additions, every one of which would land in every generated app:
Copyright check — no foreign copyright would be pulled in. Every What this leaves for youReconciling the fork with upstream is a migration with product decisions in it — manifest v1 → v2, three new controllers, MCP, retired-forge CI, suppression baselines — plus teaching |
What was broken
lib/Resources/template/appinfo/info.xmlshipped<licence>agpl</licence>while the same file's description read "Free and open source under the EUPL-1.2 license." That is the scaffold the exporter copies verbatim, so every app OpenBuild has ever generated was born declaring AGPL — a licence the fleet does not use, right after a sweep corrected 829 such declarations across 19,200 files.Proof it was live, not theoretical — a real export, before the fix:
The fix
<licence>{{license}}</licence>.The
{{license}}token was already wired end to end —ExportJobService→RunExportJob→PlaceholderResolver, defaulting toEUPL-1.2at all three layers — and reached exactly one file,src/manifest.json.info.xmlnever consumed it. So this is not "hardcode the other value": a caller who picks a licence now actually gets it.EUPL-1.2is the schema-correct spelling, not a preference. The Nextcloud appstore's owninfo.xsdenumeratesEUPL-1.2as an allowed<licence>value. It does not enumerateeupl.Test first, and shown to fail
ExporterEndToEndTest::testGeneratedAppDeclaresTheRequestedLicence()exports a real app and asserts itsinfo.xmldeclaresEUPL-1.2and does not declareagpl, and thatsrc/manifest.json/composer.jsonagree. It failed against the pre-fix snapshot (output above) before it was made to pass.Nothing covered this before. The existing unresolved-placeholder assertion matches
/\{\{[a-zA-Z]+\}\}/— and a hardcoded wrong value contains no placeholder to be left unresolved.tests/Integration/ExporterEndToEndTest.phpphpunit -c phpunit.xml(full unit)hydra-gates --base origin/developmentRun on PHP 8.4 in
nextcloud:latest; host PHP is 8.2 and this repo requires ^8.3.docs/releasing.mdprescribesThe intended fix was a snapshot refresh —
.snapshot-meta.jsonpins upstream7ee06aae(2026-05-11) and upstream already saysEUPL-1.2, so this looked like ordinary stale-snapshot drift. It is not. The rsync indocs/releasing.mdstep 1 is unsafe to run as written, measured three independent ways:There is no upstream ref this tree fast-forwards from.
sourceCommit7ee06aaeis not an ancestor of upstreammainordevelopment.git branch -r --contains 7ee06aaeplaces it only on two abandonedwsl-rescue/*branches.The snapshot carries OpenBuild-only fixes upstream never received. At least 10 commits have edited individual files inside
lib/Resources/template/since it was taken — includingc87d8c4e7 fix(template): the generated app could not be built at all (#39)and12da26f01 fix(export): make exported app a Tier-4 manifest consumer (ADR-024).rsync --deletereverts both. The tree the "do not scripted-edit individual files" rule protects no longer exists; the directory is a fork.The two trees use different placeholder dialects. OpenBuild resolves
{{token}}. Upstream'sappinfo/info.xmluses{APP_NAME}/{APP_SUMMARY}/{APP_DESCRIPTION}.PlaceholderResolverdoes not know that dialect, and the unresolved-placeholder assertion matches/\{\{[a-zA-Z]+\}\}/only — so a refreshed tree would ship literal{APP_NAME}into every generated app'sinfo.xmland no test would fail.What a full refresh would actually move (snapshot vs
origin/development, 2026-08-05)47 files differ. 5 paths exist only in the snapshot and
--deletewould remove them:src/router,src/navigation,src/views/Dashboard.vue,src/views/settings,tests/Unit. 68 exist only upstream, including:lib/Controller/HealthController.php,MetricsController.php,PreferencesController.php;lib/Mcp/;lib/Dashboard/;lib/Service/ActionAuthService.php;lib/Repair/InitializeActions.php+lib/actions.seed.json; new<repair-steps><install>entries ininfo.xml. Every generated app would gain all of it.src/manifest.jsonchanges shape entirely — upstream has migrated to manifest v2 ($schema/menu/pages) with no placeholder tokens; the snapshot's is the OpenBuild-authored v1 shape carrying{{appId}}…{{license}}. This is the ADR-024 Tier-4 contract.psalm-baseline.xml,phpstan-baseline.neon,.coverage-baseline— every generated app would be born with them..forgejo/— a full CI tree for the retired Codeberg forge, which would be propagated into every future generated app.playwright.config.ts,REUSE.toml,publiccode.yml,.githooks,docs/,CONTRIBUTING.md,SECURITY.md, 37 newl10n/*.json,tests/Unit→tests/unitrename.That is a migration with product decisions in it ("what should a generated app contain?"), not a copy — and not something to land unattended.
.snapshot-meta.jsonanddocs/releasing.mdnow say all of this at the point of use, so the next agent does not run the rsync on the strength of the doc alone.Also found: the control that should have caught this does not exist
docs/releasing.mddescribes a "CI drift check" that "diffslib/Resources/template/againstapps-extra/nextcloud-app-template/and warns when the snapshot is more than 90 days behind". No workflow under.github/workflows/mentions drift ornextcloud-app-template. It was never built. That is why the snapshot sat 86 days stale shipping the wrong licence — a documented control whose absence is indistinguishable from its success. It is now marked as non-existent in the doc. Building it is blocked on the fork decision above: a drift check has no correct comparison target until it is settled whether this tree tracks upstream or owns itself.🔴 DECISION FOR THE MAINTAINER — ADR-014 is stale and says the opposite of this PR
.claude/openspec/architecture/adr-014-licensing.md:2-3currently reads:Its stated rationale is factually false. The live Nextcloud appstore schema enumerates
EUPL-1.2as an allowed<licence>value.And it is contradicted by the fleet it governs — every one of these already declares
EUPL-1.2ininfo.xml, including openbuild's own:openregister,opencatalogi,openconnector,docudesk,nldesign,softwarecatalog,larpingapp,pipelinq,procest,openbuild,decidesk,portaliq(12/12 checked).Scope of the correction — the canonical copy is
hydra/openspec/architecture/adr-014-licensing.md, mirrored into 6 apps (decidesk,openbuild,pipelinq,procest,shillinq,softwarecatalog), and its stale claim is encoded inhydra-gatesgate-28 (run-hydra-gates.sh~line 2036: "per ADR-014 we accept that drift on info.xml ONLY").Proposed replacement for lines 2-3 (not applied — this PR changes no ADR):
Leaving the call to you — amending an ADR that six repos and a shared gate depend on is a decision, not a cleanup.