feat(app-repo): v2 format carries the app's whole configuration - #70
Merged
Conversation
…onnectors[] binding v1 emits four file kinds; everything that makes an app WORK — the shared data registers it binds, the OpenConnector configs feeding them, its automations and its skills — is left behind. spectr is the sharp case: its manifest references spectr-live 109 times and it has no meaningful per-app companion schemas, so v1 serialises it to a manifest plus ZERO schemas/ entries and reports success. Connectors are bound EXPLICITLY (21-connectors.json, ADR-037 fragment mirroring 20-data-registers.json) rather than inferred from register targets. Inference needed no schema change but would have made an app's published surface depend on which OTHER objects happened to target a shared register — the same app would export differently on two instances.
Serializer gains four channels — data-registers/, connectors/, automations/, skills/ — and stamps formatVersion 2.0. Parser accepts BOTH majors: a v1 repo parses byte-identically to before, a v2 repo additionally yields channels. Collectors are total, mirroring collectCompanionSchemas(): a missing source yields no entries rather than an exception, so serialisation never blocks a publish. The descriptor's per-channel counts are what stop that becoming a silently empty artefact — spectr under v1 serialised to a manifest plus ZERO schemas and reported success. Connectors come from the EXPLICIT Application.connectors[] binding, with one-level dependency resolution (a synchronization's source/mapping) reported separately from declared entries. Secret stripping is defence in depth, not the primary control: credentials live in OpenRegister's broker and configs reference them by UUID — verified against the live instance, where source 23 carries host/port/user/dbname plus a credential UUID and no password field at all. Parser channel reading is deliberately LENIENT where companion-schema parsing is strict: a companion schema is load-bearing, a channel entry is additive, so one unreadable connector must not make a valid repository unimportable. formatVersion had NO test coverage before this change — nothing asserted it, so the field governing whether a repo parses at all could change silently. Now pinned in both directions, and the v1 back-compat test was verified to fail without the fix.
…don't exist
Pre-existing gate-30 failure, confirmed by running the gates on origin/development
without any of this change: deepLinks[0] declared schemaSlug 'example' (no such
schema) and urlTemplate /apps/openbuild/#/examples/{uuid} (no matching page
route). A deep link to nothing — template leftover, removed rather than pointed
somewhere arbitrary.
Also fixes the @SPEC anchors: gate-46 slugifies an apostrophe, so
"the app's whole configuration" is ...the-app-s-whole..., not ...the-apps-whole...
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.
What
Extends the published app-repo format from 4 file kinds to 8, so a published app carries enough to actually work.
data-registers/<slug>.jsonApplication.dataRegisters[]connectors/<kind>/<slug>.jsonApplication.connectors[]bindingautomations/<slug>.jsonAutomation.applicationSlugskills/<name>/…SkillBundleSerializerlayout (one shape, two apps)Why
spectr is the sharp case. Its manifest binds pages to
spectr-live109 times and its per-app register has no companion schemas, so under v1 it serialises to a manifest plus zeroschemas/entries — and reports success. A green-but-empty publish: the artefact installs and the app does not work.Design notes for review
collectCompanionSchemas()): a missing source yields no entries, never an exception, so serialisation can't block a publish. The descriptor's per-channel counts are what stop that becoming a silent empty artefact.lib/Db, noopenconnector_*tables), so its configs are read as OR objects per ADR-022.Verification
SetupController,AutomationCompilerService) — confirmed by running onorigin/developmentunchangedformatVersionhad no test coverage at all before this; now pinned both directions, and the v1 back-compat test was verified to fail without the fix (mutation-checked, not assumed)Also fixed (pre-existing)
deepLinks[0]pointed at schemaexample(doesn't exist) and route/examples/{uuid}(no page matches) — a deep link to nothing, failing gate-30 ondevelopmentbefore this branch.