Skip to content

fix(gate-22): sync the vendored manifest schema to 2.29.0 - #667

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/gate-22-manifest-schema-2-29-0
Sep 3, 2026
Merged

rubenvdlinde merged 1 commit into
mainfrom
fix/gate-22-manifest-schema-2-29-0

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Why

check_manifest.js deliberately prefers this vendored copy over the app's own node_modules, so that a gate-22 pass means canonically valid rather than valid against whatever nc-vue version an app happens to have installed. The cost of that choice is that this file has to move whenever the canonical schema does, or gate-22 rejects a manifest the library itself accepts.

What

2.28.0 to 2.29.0, adding two keys to an open-form action:

  • size: how wide the create dialog is, passed to NcDialog
  • columns: 1 or 2, how many columns the fields flow into

dossiq's New case button declares both. Without this sync gate-22 fails it for two keys the schema it validates against has never heard of.

The file is byte-identical to the canonical copy in nextcloud-vue#937.

Verification

  • python3 -c "import json; json.load(...)" parses, version reads 2.29.0
  • Diff is 13 insertions, 1 deletion. No reformat: this file has been accidentally re-serialised before, which turns a two-key change into a 6600-line diff
  • Grepped hydra-gates for other references to 2.28.0 and for a test pinning the version. There are none, so this is the only place that moves

🤖 Generated with Claude Code

check_manifest.js deliberately prefers this vendored copy over the app's
own node_modules, so that "pass" means canonically valid rather than
valid against whatever nc-vue version an app happens to have installed.
The cost of that choice is that this file has to move whenever the
canonical schema does, or gate-22 rejects a manifest the library itself
accepts.

2.29.0 adds `size` and `columns` to an open-form action: how wide the
create dialog is, and whether its fields flow into two columns. dossiq's
New case button declares both, and without this sync gate-22 fails it
for two keys the schema it is validating against has never heard of.

Byte-identical to nextcloud-vue#937's copy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rubenvdlinde
rubenvdlinde merged commit af359d6 into main Sep 3, 2026
39 checks passed
rubenvdlinde added a commit that referenced this pull request Sep 3, 2026
… the widget list (#671)

dossiq#1729 failed dossiq's Dashboard on

  at /pages/0/config/headerActions/0: must NOT have additional properties

and the manifest was right. CnActionButtons binds includeFields,
excludeFields, fieldOverrides, size and columns straight onto CnFormDialog,
so the runtime renders every one of them; the narrowed "New case" form was
a deliberate feature (dossiq#1713). What was stale was this package's
vendored copy of the schema, 2.26.0, shipped as v1.11.0.

That copy is already current on main: #664 synced it to 2.28.0 and #667 to
2.29.0, and it is now byte-identical to nextcloud-vue's development copy.
Both syncs landed with no fixture, which is why the drift could ship three
times: nothing here could tell a current vendored schema from a stale one.

FAMILY K closes that. Its clean arm carries the whole open-form option set
and its planted arm carries two independently fatal defects in the same
action — an unknown key and an out-of-enum size — so a schema "fixed" by
setting additionalProperties to true, or by dropping the enum, passes the
clean arm and fails the planted one. Verified by re-introducing the 2.26.0
schema: family K goes red and names the same path #1729 reported.

The sweep for the same class found one more, in check_manifest.js rather
than in the schema. BUILT_IN_WIDGET_KEYS feeds the ADR-036 Decision 1 rule
and had six keys while nextcloud-vue's validator had eleven and its v2
runtime registry fifteen. A dashboard whose single 12x12 widget is a
library built-in — banner, header, text, divider, audit-trail, metadata —
was told to "declare as type:custom and register the component with
kind:page", advice the app cannot follow because it does not own the
component. The set is now the union of the library's validator list and the
registry CnWidgetGrid actually resolves against.

FAMILY L is its pair: a library built-in passes, an app-owned widget still
fails, so the anti-pattern rule is updated rather than retired. Verified by
restoring the six-key list, which reddens the built-in arm and leaves the
app-owned one failing.

The dashboard-widget catalog fallback (table, object-list, map, countdown,
tabs) is a known remaining gap, recorded in the code: nextcloud-vue's own
validator flags those too, so it is a change to make there first.

Full helper-suite run green before and after: 104 passed, 0 failed, 2
quarantined with reasons.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
rubenvdlinde added a commit that referenced this pull request Sep 4, 2026
…e the store plane

decidiq is red on gate-22 and gate-53 on `development`, four findings with
one cause:

    [gate-22] at /: must NOT have additional properties
              at /pages/29/type: must be equal to one of the allowed values
    [gate-53] the same two, against the ASSEMBLED manifest

The manifest is right and the gate was old. The declarative store plane
(ADR-080 / ADR-114 Decision 4) landed in nextcloud-vue across schema 2.30.0
to 2.32.0: a top-level `store` block and a `store` page type. The vendored
copy here was 2.29.0 and had heard of neither. check_manifest.js deliberately
prefers the CANONICAL vendored schema over the app's pinned node_modules
copy, so the stale copy won, and in the very same run decidiq's own
`npm run check:manifest` passed against 2.32.0 and said so in the advisory
block.

The schema file is now byte-identical to
ConductionNL/nextcloud-vue main:src/schemas/app-manifest-v2.schema.json.
The 2.29.0 to 2.32.0 diff is additive only: the store block, the store page
type, and one description that stopped restating the library widget list.
Nothing was tightened, so no app that passes today can start failing.

FIXTURED THIS TIME. This is the FOURTH time a stale vendored schema has
invented findings: 2.28.0 (#664), 2.29.0 (#667), the open-form option set
(family K), and now the store plane. Family K exists because the first two
landed with no fixture. Family M does for the store plane what K did for
open-form actions, with the same two arms:

  M1  a store block and a store page, the shape decidiq ships       -> PASS
  M2  `cardFieldz` and `type: "storefront"` in that same manifest   -> FAIL

M2 is the anti-widening arm. M1 alone would pass just as well against a
schema someone "fixed" by setting the store block's additionalProperties to
true or by deleting the page-type enum, which would retire the check rather
than update it.

Verified locally: test_gate_45_to_55_acceptance.sh ALL GREEN with the sync,
and exactly the two M1 arms FAIL with the 2.29.0 schema stashed back in, so
the fixture discriminates rather than agreeing with whatever is vendored.
rubenvdlinde added a commit that referenced this pull request Sep 4, 2026
…ema three releases behind (#686)

* feat(stubs): ship the OpenRegister AppHost Bootstrap analysis stub

decidiq and filinq are both red on psalm on `development` with the same
finding, and it is a false positive:

    UnusedParam - Param context is never referenced in this method
    private function bindStoreController(IRegistrationContext $context): void

The parameter is passed on the very next line, inside a
`class_exists(\OCA\OpenRegister\AppHost\Bootstrap::class)` guard. psalm
cannot resolve that class in a leaf checkout, because openregister is a
sibling Nextcloud app rather than a composer dependency, so it prunes the
guarded block as dead code and then reports the parameter as unused.

A suppression would hide the next genuinely unused parameter in the same
method. A stub answers the question instead, and leaves the call
type-checked.

Three apps carry the same code: decidiq, filinq and planninq all adopted the
shared AppHost route table, which declares /api/store/items whether the app
wants it or not. planninq had already hand-vendored a copy of this stub. So
the stub belongs here, in the package all three already depend on, not in
three separate trees.

New directory rather than `contracts/`. The two contract interfaces there are
`require`d for real by a leaf app's PHPUnit bootstrap, and the README tells
apps to point phpstan's `scanDirectories` at that whole directory. A file
that must never be loaded does not belong in a directory apps are told to
load wholesale, and an app carrying its own AppHost stub would get a
duplicate class declaration out of it.

Verified locally: with this file wired into decidiq's psalm.xml <stubs>,
psalm goes from 1 error to `No errors found!` (exit 0), and the count of
'other issues' is unchanged at 350, so nothing else moved.

* fix(gate-22): sync the vendored manifest schema to 2.32.0, and fixture the store plane

decidiq is red on gate-22 and gate-53 on `development`, four findings with
one cause:

    [gate-22] at /: must NOT have additional properties
              at /pages/29/type: must be equal to one of the allowed values
    [gate-53] the same two, against the ASSEMBLED manifest

The manifest is right and the gate was old. The declarative store plane
(ADR-080 / ADR-114 Decision 4) landed in nextcloud-vue across schema 2.30.0
to 2.32.0: a top-level `store` block and a `store` page type. The vendored
copy here was 2.29.0 and had heard of neither. check_manifest.js deliberately
prefers the CANONICAL vendored schema over the app's pinned node_modules
copy, so the stale copy won, and in the very same run decidiq's own
`npm run check:manifest` passed against 2.32.0 and said so in the advisory
block.

The schema file is now byte-identical to
ConductionNL/nextcloud-vue main:src/schemas/app-manifest-v2.schema.json.
The 2.29.0 to 2.32.0 diff is additive only: the store block, the store page
type, and one description that stopped restating the library widget list.
Nothing was tightened, so no app that passes today can start failing.

FIXTURED THIS TIME. This is the FOURTH time a stale vendored schema has
invented findings: 2.28.0 (#664), 2.29.0 (#667), the open-form option set
(family K), and now the store plane. Family K exists because the first two
landed with no fixture. Family M does for the store plane what K did for
open-form actions, with the same two arms:

  M1  a store block and a store page, the shape decidiq ships       -> PASS
  M2  `cardFieldz` and `type: "storefront"` in that same manifest   -> FAIL

M2 is the anti-widening arm. M1 alone would pass just as well against a
schema someone "fixed" by setting the store block's additionalProperties to
true or by deleting the page-type enum, which would retire the check rather
than update it.

Verified locally: test_gate_45_to_55_acceptance.sh ALL GREEN with the sync,
and exactly the two M1 arms FAIL with the 2.29.0 schema stashed back in, so
the fixture discriminates rather than agreeing with whatever is vendored.
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