Skip to content

feat(versioniq): build install-multi-instance-promotion - #735

Merged
rubenvdlinde merged 21 commits into
developmentfrom
quality/build-install-multi-instance-promotion
Nov 20, 2026
Merged

rubenvdlinde merged 21 commits into
developmentfrom
quality/build-install-multi-instance-promotion

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Continues install-multi-instance-promotion after #712 (tasks 1.1, 1.2, 2.1, merged).

Tasks done in this PR

  • 2.2 RemoteInstanceReader: one Basic-authenticated OCS GET of the remote manifest (15 s timeout, allow_local_address from allow_local_remote_servers), cached under instance.{id}.manifest. 401/403, 404 and unreachable each give their own message; a failed read keeps the previous manifest and its read time. The password stays inside the call and is never logged.
  • 2.3 POST /api/instances/refresh (admin-only): reads every connection, one failure does not stop the others. Saving a connection reads its manifest once and returns it; GET /api/instances carries each connection's cached read.
  • 3.1 Optional expectedSha on installAppVersion() (via InstallOptions): a different recorded digest refuses with 409 before any download; no recorded digest means the expected one is added to the binding, so the external installer's existing check refuses a different package. App Store installs ignore it.
  • 3.2 PromotionService::plan() / promote(): fresh manifest read, version-moved and waiting-period refusals (unknown runningSince counts as not met), install through installAppVersion() with the earlier stage's source and digest, audit operation promote with the override written into the message. promotion.min_days (0-90) in InstanceSettings.
  • 3.3 POST /api/app/{appId}/promote (admin, password-confirmed) and GET on the same path for the dialog's plan.
  • 5.1 occ versioniq:instances (--json, --refresh) and occ versioniq:promote (--dry-run, --allow-downgrade, --override-min-days, --continue; exit 10 waiting period, 11 connection, else the versioniq:install code), registered in info.xml.

Tasks left

  • 4.1-4.3 (Instances tab, connection and promote dialogs, the waiting-period field on the Settings tab including promotion.min_days in the instance-settings read/update, l10n): frontend, continued in a follow-up.
  • 4.4 e2e spec, the versioniq:instances --json line in tests/e2e/cli.spec.ts, and 6.1 (matrix rows and archive): need a live instance run.

Tests added: RemoteInstanceReaderTest (7), PromotionServiceTest (11), PromoteVersionTest (6), ListInstancesTest (2), 4 cases in InstallerServiceShaPinningTest, 10 in InstanceControllerTest.

Suite: unit-only 1718 → 1758, same 2 inherited failures (ExternalReleaseInstallGoldenTest, SelectedReleaseInstallGoldenTest), no new ones. Psalm clean on the new files; openapi.json regenerated with the extractor.


Generated by Claude Code

rubenvdlinde and others added 21 commits November 15, 2026 01:16
Read other instances' manifests (tasks 2.2, 2.3): RemoteInstanceReader
sends one Basic-authenticated OCS GET per read and caches the answer under
instance.{id}.manifest; a failed read keeps the previous manifest. Saving a
connection reads it once; POST /api/instances/refresh reads every
connection, one failure not stopping the others.

Assisted-by: ClaudeCode:claude-opus-5-5
An optional expected SHA-256 on installAppVersion() (task 3.1): a forge
binding that recorded another digest for the version refuses with 409
before any download; one that recorded none takes the expected digest, so
the external installer's recorded-digest check refuses a different
package. App Store installs ignore it.

Assisted-by: ClaudeCode:claude-opus-5-5
PromotionService (task 3.2): plan() reads a connection's manifest and
returns the version, source, digest, direction and waiting-period verdict;
promote() reads it again, refuses a version that moved or a waiting period
not met (unless overridden), installs through installAppVersion() with the
earlier stage's source and digest, and audits it as promote. The waiting
period is promotion.min_days in InstanceSettings, 0 to 90.

Assisted-by: ClaudeCode:claude-opus-5-5
POST /api/app/{appId}/promote (task 3.3), admin-only and
password-confirmed, answers the promotion's own status: 409 with the days
left when the waiting period is not met. GET on the same path returns the
plan for the dialog, without a password prompt.

Assisted-by: ClaudeCode:claude-opus-5-5
occ versioniq:instances (--json, --refresh) prints every instance's app
versions side by side, marking the rows that differ; occ versioniq:promote
<connection> <appId>... promotes in order with --dry-run,
--allow-downgrade, --override-min-days and --continue, exiting 10 for the
waiting period, 11 for an unknown or unreadable connection and otherwise
with versioniq:install's code (task 5.1).

Assisted-by: ClaudeCode:claude-opus-5-5
… [skip ci]

Assisted-by: ClaudeCode:claude-opus-5-5
Task 4.2: the waiting period on the Settings tab. GET/PUT
/api/instance-settings read and write promotionMinDays (0 to 90, 0 off,
validated before anything is written, audited with the other fields);
InstanceSettingsPanel gains the field and refuses 91 before saving.

Assisted-by: ClaudeCode:claude-opus-5-5
Tasks 4.1 and 4.3: the Instances tab. InstancesPanel shows every
connected instance's app versions beside this one's in chain order,
marks and filters differing rows, keeps a stale remote's last versions
with their age and error, shows an older Versioniq as such, refreshes,
and adds, edits and removes connections (InstanceConnectionDialog).
PromoteDialog reads the plan, names the waiting period and needs the
override inside it, asks for the downgrade confirmation, sends the
version it showed, and offers the rollback, which App.vue runs through
the last-known-good flow on the Apps tab. New strings in en and nl.

Assisted-by: ClaudeCode:claude-opus-5-5
… [skip ci]

The tab-order spec now lists development's Alerts tab and this branch's
Instances tab; Sources moves to index 4.

Assisted-by: ClaudeCode:claude-opus-5-5
… [skip ci]

Resolve the conflicts with development, keeping both sides:
- info.xml registers ListAdvisories next to ListInstances and
  PromoteVersion;
- InstanceController takes development's ManifestBuilderInterface next to
  the branch's RemoteInstanceReader and PromotionService;
- AuditLogger keeps development's move of the admin-change operations to
  AdminChangeAuditInterface and adds OPERATION_PROMOTE;
- the instance settings carry promotionMinDays next to the GitHub search
  and advisory feed settings, in the fields, the read and the applied list;
- ocs.ts keeps ocsPost and ocsUpload, App.vue the promotion rollback next
  to the one-click updates and the instances tab next to the settings
  wrapper;
- openapi.json is the structural merge of both documents, and the l10n
  catalogues take development's text plus the 54 new branch strings.

Assisted-by: ClaudeCode:claude-opus-5-5
… [skip ci]

Union of both sides' l10n keys. The promotion rollback test now ignores
the live install-progress poll that development's install runs beside
the install request.

Assisted-by: ClaudeCode:claude-opus-5-5
…omotion [skip ci]

Keeps both sides: development's notify-users-on-update switch beside this
line's promotion waiting period, in the settings fields, the settings
service, the panel spec and the strings.

Assisted-by: ClaudeCode:claude-opus-5-5
The e2e spec task 4.4 names: this instance's manifest is read by an admin
and refused to a non-admin, and the Instances tab shows this instance's
column with the fixture app's version; cli.spec.ts gains one
versioniq:instances --json run (5.1). Ticks 2.2 to 4.3, whose code and
unit tests are on this branch and pass.

Assisted-by: ClaudeCode:claude-opus-5-5
… [skip ci]

Assisted-by: ClaudeCode:claude-opus-5-5
… maintainability floor [skip ci]

Split the promotion units the floor measured as too long, too complex or too
wide: PromotionPlanner takes the planning out of PromotionService,
PromotionOptions carries promote()'s flags, and the remote reader, the CLI
commands, the settings update, the instance matrix and the two dialogs get
smaller helpers. Behaviour, messages and HTTP answers are unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
…skip ci]

Assisted-by: ClaudeCode:claude-opus-5-5
…p ci]

Assisted-by: ClaudeCode:claude-opus-5-5
InstallOptions: development added forceIncompatible and checkContext as the
fifth and sixth parameters; expectedSha (promotion) is now seventh and its
callers name it. Tabs spec lists both Upgrade readiness and Instances. l10n:
development's catalogues plus this branch's keys.

cloud-merge-versioniq

Assisted-by: ClaudeCode:claude-opus-5-5
…allTarget

With development's forceIncompatible and checkContext, InstallOptions grew to
seven parameters and php unit_interfacing >6 went past the SIG floor
(gate-123). The SHA another instance recorded names the exact package to
install, so it belongs with the app and version.

cloud-merge-versioniq

Assisted-by: ClaudeCode:claude-opus-5-5
…trimmed

cloud-merge-versioniq

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit da54221 into development Nov 20, 2026
1 check passed
rubenvdlinde added a commit that referenced this pull request Nov 20, 2026
The promotion (#735) added an expectedShaRefusal(InstallRun) to InstallerService;
this branch's check of the SHA-256 an admin pastes for an upload had the
same name.

cloud-merge-versioniq

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/versioniq @ 6a3bd5a

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ❌
phpstan ✅
phpmetrics ✅
eslint ❌
stylelint ❌
build ✅
composer ✅ ✅ 58/58
npm ✅ ✅ 314/314
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ❌
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-20 19:23 UTC

Download the full PDF report from the workflow artifacts.

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.

2 participants