- DevCraft Platform
- Documentation
- Promotion between instances
Using the platform
Promotion between instances
This page explains how configuration moves between DevCraft instances, for example from development to integration to production. It covers remote instance registration, the read-only protocol between instances, retrieval of completed update sets, validation and comparison, conflict resolution and the application engine that writes an approved set to the receiving instance. It is written for administrators who promote configuration and for developers who operate or extend the promotion pipeline. How changes are captured and packaged in the first place is described in Update sets and packages.
How promotion works
Promotion is a pull model. The receiving instance registers the source instance as a remote instance, retrieves its completed update sets as packages, assesses them and, after explicit decisions and an explicit approval, applies them through its own write services. The source instance only serves read-only data; nothing is ever pushed to a remote, and instances never connect to each other's databases.
DEV (source) INT / PROD (receiving instance)
──────────── ───────────────────────────────
author changes in update set S
complete S register DEV as a remote instance, store a credential
│ Test connection
│ GET /api/v1/remote/identity ◀─ Retrieve completed update sets
│ GET /api/v1/remote/update-sets
│ GET …/update-sets/{id}/package ─▶ stored as a remote update set (validated, nothing applied)
Compare with local instance → ready | conflicts
resolve conflicts → readiness: ready
Apply update set (approval token) → one transaction
receiving local update set "Applied: S" (completed)
Every stage is a separate, audited administrator action. Nothing is applied by retrieval, by a decision or by readiness alone. All endpoints on this page require auth:sanctum and the admin role.
| Stage | Backend | Status |
|---|---|---|
| Remote instances, protocol, retrieval | App\Platform\Remote: RemoteInstanceService, RemoteClient, RemoteUrlPolicy, Http\RemoteApiController | Implemented |
| Remote update sets: lifecycle, validation, comparison | RemoteUpdateSetProcessor, PackageComparison | Implemented |
| Conflict resolution and readiness | ConflictDetector, ConflictResolver | Implemented |
| Application engine | Remote\Application\ApplicationPlanner, ApplicationHandlers, UpdateSetApplier | Implemented |
| Back-out, dictionary deletes, physical tables, signatures, event table | none | Planned |
Remote instances
Registration
Remote instances are records of sys_remote_instance, a physical table adopted by the dictionary (data_class: environment, administrators only). Create, edit, list and search use the generic List & Form at /sys_remote_instance/list (Administration → Update Sets → Remote Instances), through the Table API and RecordWriter like any record.
| Fields | Written by |
|---|---|
name (unique, display field), url, type (development, integration, staging, production), active, description, auth_method (token) | administrators, through the form |
credential_set, credential_updated_at | the platform, when a credential is stored, replaced or removed |
remote_instance_id, remote_name, remote_version | the platform, on the first successful connection (identity binding) |
last_status, last_connection_at, last_success_at, last_error | the platform, after every connection attempt |
The registry is on the configuration exclusion list, so a URL or credential reference of one environment never travels in a package.
Service-account credentials
Authentication between instances uses a Sanctum personal access token of a service account on the remote, with the remote:read ability, sent as a bearer token. A user's session cookie was rejected (it is the user's identity, not the instance's); basic authentication was rejected (no scoping, no revocation without a password change); mutual TLS and signed requests are deferred until key distribution exists.
- On the remote instance, create a dedicated machine account (
identity_type: machine) with theadminrole. - As that account, issue a token:
POST /api/v1/auth/tokenswith{ "name": "...", "abilities": ["remote:read"], "expires_in_days": ... }. The token is shown once. - On the local instance, open the remote instance record and use Set credential….
The token is sent once over the admin API (PUT /api/v1/admin/config/remote-instances/{id}/credential) and stored in the column credential with Laravel's encrypted cast, which uses APP_KEY. That column is not a dictionary field: it never appears in metadata, the Table API, exports or packages, and the API never returns it. The form only says whether a credential is stored and when it changed. Credential changes are audited (sys_audit, field credential, values set, rotated, null) and logged without the value; every outbound message passes through RemoteClient::sanitise, which strips bearer values.
Identity binding
The first successful connection stores the remote's instanceId (its sys_environment.instance_id) on the record. Every later connection compares it. A remote that reports a different id is refused with identity_mismatch until an administrator replaces the credential, which clears the binding. The identity comes from the authenticated identity call, never from a package: a package whose source@instance differs is still stored, and the difference is recorded in its notes.
The DevCraft remote protocol
Version 1. Every request carries X-DevCraft-Protocol: 1 and the consumer's X-Correlation-Id, which the provider writes to its logs so one retrieval can be followed on both instances. The provider routes are read-only and sit behind auth:sanctum, throttle:api, the ability remote:read and the role admin:
| Route | Answer |
|---|---|
GET /api/v1/remote/identity | { instanceId, name, environment, version, protocol: { version: 1, supported: [1] }, capabilities: ["identity", "update-sets.list", "update-sets.package"], packageFormat: { format, version, payloadFormat }, limits: { maxPageSize: 100 } }. Also the connectivity test: 401 means the token is unknown or revoked, 403 that the account lacks the role or the token the ability. |
GET /api/v1/remote/update-sets | Completed sets only (state complete with a content hash; kinds work and application_release). Parameters page, pageSize (≤ 100), search, sort (completed_at, name or sys_updated_at, asc or desc). Items carry id, name, description, scope, kind, completedAt, contentHash, itemCount, originInstanceId. |
GET /api/v1/remote/update-sets/{id}/package | The devcraft-update-set-xml document, with X-Package-Id and X-Record-Count. 404 for unknown or incomplete sets; 422 package_not_exportable when the set cannot be packaged. |
Errors are RFC 9457 problem details with stable codes and requestId; stack traces never leave the provider. A consumer refuses a provider whose protocol.supported does not contain its version (incompatible). New capabilities are added to capabilities without a version change; removing or changing an operation is version 2. Only DevCraft Platform instances of this release (protocol 1, package format 1.0) are supported.
Test connection and retrieval
Test connection
The record action Test connection… calls POST /api/v1/admin/config/remote-instances/{id}/test. The server, never the browser, connects: the record must be active and have a credential, the URL must pass the outbound policy, the identity call must answer a valid identity, protocol versions must intersect, required capabilities must be present and the identity must match the binding. The answer is always 200 with { ok, outcome, message, remote, latencyMs, details, instance }.
Outcomes: connected, no_credential, inactive, blocked_url, unreachable, timeout, auth_failed (401), forbidden (403), not_found (404), remote_error (5xx, 429), invalid_response (redirects, non-JSON, unexpected shape), incompatible, identity_mismatch, too_large. Show status… displays the stored connection state without contacting the remote.
Retrieve completed update sets
The record action Retrieve completed update sets… runs four steps:
- Connect:
GET /api/v1/admin/config/remote-instances/{id}/update-setsstarts with the identity call. A failure ends the dialog with aremote_<outcome>problem (422). - Discover: the server lists the remote's completed sets and marks each with its local state:
not_retrieved,retrieved,changed,changed_on_remoteorfailed. - Select one or more sets; rows retrieved before with other content offer a replace option.
- Retrieve:
POST …/{id}/retrieve { ids, replace }(at most 20 ids per call). For each set the server fetches the package, refuses non-XML answers and documents overpackages.max_bytes, and passes the document toPreviewService::create, the same parser and validator as a manual upload.
Per-set outcomes: retrieved, unchanged, replaced, changed (new content held back), invalid (stored with retrieval_status: failed) or failed (transport or remote error, nothing stored). Each retrieval writes an audit row on sys_retrieved_update_set and a system log event.
Outbound network protection
RemoteUrlPolicy applies to every outbound request at connection time:
- The base URL must be absolute
httpswithout credentials, query or fragment. It is normalised before use. - Every resolved address (A and AAAA) must be public. Loopback, private, link-local, carrier-grade NAT, multicast, reserved ranges and cloud metadata names and addresses are refused.
- The validated address is pinned for the connection (
CURLOPT_RESOLVE), so a DNS answer cannot change between check and request. - Redirects are not followed; TLS verification stays on.
- No automatic retries: every request is a user action with a visible outcome.
Setting (config/platform.php remote) | Environment variable | Default |
|---|---|---|
connect_timeout_s | REMOTE_CONNECT_TIMEOUT | 5 s |
timeout_s | REMOTE_TIMEOUT | 20 s |
max_json_bytes | REMOTE_MAX_JSON_BYTES | 1 MB |
rejected_retention_days | REMOTE_REJECTED_RETENTION_DAYS | 30 |
allow_local | REMOTE_ALLOW_LOCAL | false |
Remote update sets
A retrieved package becomes a remote update set: a row of sys_retrieved_update_set (adopted read-only, managed_by: system), listed at Administration → Update Sets → Remote Update Sets and inspected on /remote-update-sets/{id}. Its identity is the authenticated remote instance plus the set's id on that remote; there is one row per pair.
The row keeps source metadata (what the package claims) apart from local metadata. The document is stored once as retrieved, with document_hash (SHA-256 of the stored bytes) checked before every read, and changes_hash (the package's integrity hash) as the key for every assessment. One row per change is stored in sys_retrieved_update_set_change, without the payload; payloads are read from the checked document on request.
States and transitions
| State | Meaning | Allowed next states (RetrievedUpdateSet::TRANSITIONS) |
|---|---|---|
retrieved | stored, assessment pending | validating, rejected, failed |
validating | a validation or comparison run holds the set | previewed, ready, conflicts, failed |
previewed | validated, not compared (or invalid after comparison) | validating, review, rejected, retrieved, failed |
ready | validated, compared, nothing blocking | validating, review, rejected, retrieved, failed, conflicts, applied |
conflicts | the comparison or readiness found blocking conflicts | validating, review, rejected, retrieved, failed, ready |
review | marked for review with a note | validating, rejected, retrieved, failed |
rejected | rejected with a reason; content removed after retention | retrieved |
failed | unreadable document or processing error | validating, retrieved, rejected |
applied | applied by a completed run; terminal | none |
RemoteUpdateSetProcessor::transition refuses anything else with 422 remote_invalid_transition and audits every move. One processing run holds a set at a time: a processing lock is taken atomically, a concurrent request gets 409 remote_busy, and locks older than 10 minutes are taken over.
Changed content on the remote
When the remote serves different content for a set already retrieved, the stored package and its assessment stay authoritative. The row becomes retrieval_status: changed with pending_changes_hash. Only Retrieve again and replace (POST …/refresh { "replace": true }) accepts the new content, after which a new assessment replaces the old one.
Review, rejection and retention
Mark for review (POST …/review { note? }) records a note and moves the set to review. Reject (POST …/reject { reason? }, with confirmation) moves it to rejected. Rejected sets keep their metadata, assessment and history; platform:remote-sets:prune (daily) removes their document after REMOTE_REJECTED_RETENTION_DAYS. A rejected set can be retrieved again.
Validation and comparison
Validation
Validate package (POST …/validate) checks the stored document against document_hash (else 422 remote_integrity and state failed), parses it with UpdateSetXmlParser and validates it with PackageValidator exactly like an upload: format, integrity, duplicates, supported kinds, identities, payload shape against this instance's dictionary, dependencies, cycles and limits. See validation codes.
Per-change classification
Compare with local instance (POST …/compare) validates again and classifies every change with PackageComparison::classify, using stable identities (kind plus object id, and the package key for identity conflicts), the three hashes and the local canonical payload from the version history. Canonical payloads exclude timestamps, actors, versions and display values, so a reported difference is a configuration difference.
| Classification | When |
|---|---|
new | insert of an object this instance does not hold |
different | the object exists here with other content |
identical | this instance holds exactly this content |
delete | the package deletes an object that is absent or in the expected state |
missing_dependency | a required dependency is neither in the package nor on this instance |
unsupported | the kind is not supported here, or the change failed validation |
potential_conflict | both sides changed the object, or an update targets a missing object |
unresolvable_identity | another local object carries the same key, or key, kind and payload disagree |
Conflict classes
From the package's base-hash, its hash and the local version's hash, each change gets a conflict class: none (applies cleanly), local_modified (both sides changed the object), target_missing (update of an object this instance does not have), dependency (a required object is missing on both sides) or undetermined (no baseline, unsupported kind or unresolvable identity). These classes remain the underlying verdict; conflict resolution refines them into the categories below.
Differences
For each change the sheet lists differences: top-level attributes of dictionary payloads and values.<field> of record payloads, as canonical JSON cut at 300 characters, at most 50 per change, shown as this instance versus package. Where no reliable comparison exists (unsupported kind, failed validation, no local object) the sheet states the reason instead of a diff.
Dependency order
Dependencies come from the package and are resolved by the validator as in_package, present_on_instance, missing, external or unresolved. The processor stores them per change, reports circular dependencies on the set (dependency_cycles) and records the proposed_order from DependencyAnalyzer::order: scopes, tables, fields and overrides, forms and lists, records; dependencies before dependants; deletes last. Nothing is fetched or installed to satisfy a dependency.
Conflict resolution
Conflict resolution records a decision per change on the assessment rows. A decision never changes configuration: it updates sys_retrieved_update_set_change and appends to the decision history, nothing else.
The twelve categories
| Category | Severity | When | Allowed decisions | Default plan |
|---|---|---|---|---|
no_change | none | identical on both sides, or deletion of an object already absent | skip | exclude |
remote_only | none (warning for a deletion) | insert of an absent object; update or deletion of an object unchanged here since the baseline | accept remote, keep local, skip (deletion: accept remote, keep local, unresolved) | include |
concurrent_modification | blocking | both sides changed the object in different fields; or both changed it and only hashes are known | merge (only with an available baseline), accept remote, keep local, unresolved | pending |
field_conflict | blocking | both sides changed the same field differently | accept remote, keep local, unresolved | pending |
deletion_conflict | blocking | the package deletes an object changed here since the baseline, or deletes without a baseline an object that differs | accept remote, keep local, unresolved | pending |
missing_dependency | blocking | a required object is neither in the package nor here | skip, unresolved | pending |
dependency_conflict | blocking | reserved for an incompatible version of a dependency; not produced yet | — | — |
identity_conflict | blocking | another object carries the same key, or key, kind and payload disagree | skip, unresolved | pending |
schema_conflict | blocking | the change fails validation against this instance's metadata model | skip, unresolved | pending |
unsupported_comparison | blocking | the object kind is not supported here | skip, unresolved | pending |
undetermined | blocking | the package inserts an object (no baseline) that exists here with other content | accept remote, keep local, unresolved | pending |
missing_target | warning | the package updates an object this instance does not have | accept remote (creates it), skip, unresolved | pending |
The detector answers undetermined rather than guessing: a same-id object with different content and no baseline is never reported as a remote-only change.
Three-way field analysis and the two-way fallback
Each change records its baseline status: available (this instance holds a version whose hash is the package's base-hash), unreliable (the package names a baseline this instance does not hold) or missing (the remote created the object). With an available baseline, ConflictDetector flattens base, local and remote payloads and classifies each field:
| Outcome | base = local | base = remote | local = remote |
|---|---|---|---|
unchanged (not listed) | yes | yes | yes |
remote_only | yes | no | no |
local_only | no | yes | no |
both_same | no | no | yes |
both_different | no | no | no |
Values are compared canonically, so key order and number formatting do not create false conflicts. Without a usable baseline the comparison is two-way: every differing field is differs, the UI labels the analysis "local vs. remote, two-way", and the only choices are one side or the other.
Decisions
| Decision | Plan | Meaning |
|---|---|---|
keep_local | exclude | the local object stays; the remote change is not applied |
accept_remote | include | the remote version is applied; a local change would be overwritten, a deletion removes the local object. Confirmation is required when a local object exists. |
merge | include, with proposed_payload | the safe merge is applied instead of the remote payload |
skip | exclude | the change is left out; changes that require it become blocked |
unresolved | pending | the conflict stays open; the set cannot be ready |
Safe merge is offered only for concurrent_modification with an available baseline and no both_different field. ConflictResolver::merge starts from the remote payload, copies every local_only and both_same field from the local object, and validates the candidate as a one-change package through PackageValidator. A merge that fails validation is refused (422 remote_merge_invalid). GET …/changes/{seq}/merge previews the merge without storing anything. The original package is never modified.
Optimistic locking and invalidation
POST …/changes/{seq}/resolve { resolution, version, note? } is checked by ConflictResolver::resolve:
- The set accepts decisions (not
applied,rejected,failed,validating, and not locked), its comparison is current and the stored document matches its checksum. Otherwise 409remote_stale_comparison. - The change's
versionequals the one sent. Otherwise 409remote_stale_decisionwith the current version. - The resolution is in the change's
allowed_resolutions. Otherwise 422remote_resolution_not_allowed. - The current local content hash equals the one the comparison saw. Otherwise 409
remote_stale_comparison. - In one transaction: the row is updated (
version + 1), a row is appended tosys_retrieved_update_set_decision, and an audit entryresolution:<key>is written. Readiness is then re-assessed.
Each decision is bound to the package hash (resolution_hash) and the local hash (resolution_local_hash). A re-comparison carries a decision over only when both still hold and the resolution is still allowed; otherwise the decision stays visible with resolution_valid = false and the plan returns to pending. A local edit of the object or a replaced package therefore invalidates earlier decisions.
Dependency-aware readiness and the application plan
After every decision and assessment the resolver recomputes dependency_blockers: an included or pending change whose required dependency is excluded, not yet decided, or missing. Skipping a table blocks its fields until the table is included again or the fields are excluded too. Assess readiness (POST …/assess) stores one verdict:
| Readiness | When |
|---|---|
invalid | validation invalid, state failed, or the document is missing or altered |
needs_review | not compared for the current content, stale decisions, local drift, or warnings awaiting a decision |
conflicts | at least one blocking change is still pending |
unresolved_dependencies | an included change has dependency blockers, or the package has cycles |
ready | none of the above |
When the set is in conflicts or ready, its state follows the readiness. GET …/plan returns the application plan: included changes in proposed order with their source (remote or merged) and blockers, plus the excluded and pending changes, with applied: false. Readiness is an assessment, not a permission; the application engine checks everything again.
The application engine
Eligibility
ApplicationPlanner::assess decides on the server at the moment of the call, from nothing the client sent. Each failed condition is a reason with a stable code:
| Code | Condition that must hold |
|---|---|
forbidden | the caller is an administrator |
state, already_applied | the set is ready; applied is terminal |
busy | no other processing holds the set's lock |
package_missing, integrity, unreadable | the document is stored, matches document_hash and parses |
format_version | the package format major version is supported |
content_changed | the parsed content hash equals the assessed changes_hash |
validation | a fresh PackageValidator run reports no error on any included change |
comparison, readiness | the comparison is current and a fresh readiness assessment answers ready |
stale_decision | every decision of an included change still holds |
local_drift | every planned object's current hash equals the one the comparison saw |
unsupported_operation | every included change has a handler; unsupported ones are named, never skipped |
empty_plan, cycles | at least one change is included and the package can be ordered |
run_in_progress | no live run exists for the set |
The approval token
GET …/apply returns the assessment and an approval token: a SHA-256 over the package integrity hash, the document checksum and, per planned operation, the sequence, source, expected content hash, local content hash and resolution. POST …/apply { approval, note? } requires it. Any change in between (another decision, a local edit of a planned object, a replaced package) produces a different token, and the request is refused with 409 remote_stale_approval, recorded as a failed run without writes. The token is not a secret and not a permission; it binds the confirmation to exactly what was shown.
Dependency-ordered execution in one transaction
UpdateSetApplier::apply runs under the set's processing lock and repeats the full eligibility assessment immediately before writing. Then, in one database transaction:
- A local update set Applied: {name} is created in the global scope to capture the writes, with source
import. - Every planned operation runs in
proposed_orderthrough its handler. Before each write the object's current content hash must still equal the plan's (else 409remote_stale_comparison). - After each write the object's latest
sys_config_versionmust carry exactly the expected hash (the package hash, or the merge proposal's hash). A mismatch fails withremote_verification_failed. - The receiving local update set is completed, and the remote update set gets
application_status = applied,applied_at,applied_by,application_idand the audited transitionready → applied.
Handlers (ApplicationHandlers) never touch a table directly. They call the platform's write services, which validate, version, capture and audit:
| Kind | insert | update | delete |
|---|---|---|---|
sys_scope | MetadataWriter::ensureScope | unsupported | unsupported |
sys_table | createTable with the package id (logical tables only) | updateTable | unsupported |
sys_field | createField with the package id | updateField | unsupported |
sys_field_override | overrideField | overrideField | unsupported |
sys_ui_form, sys_ui_list | saveForm, saveList | saveForm, saveList | unsupported |
| configuration and environment records | RecordWriter::create with the package id | RecordWriter::update | RecordWriter::delete |
Protected values never enter from a package: on insert the field keeps its default, on update it keeps its current value, and the run reports a warning.
Verification, rollback and recovery
Every supported operation is transactional, so any failure rolls the whole run back. The run becomes rolled_back: operations applied before the failure are recorded as rolled_back, the failing one as failed with the writer's message, the rest as not_run. The applier then re-reads every planned object and compares it with its pre-run hash; only when all match does it record recovery.status = rolled_back, otherwise the run is partially_failed with the objects that differ. The metadata cache is invalidated after a rollback. A run interrupted before a result was recorded is closed the same way on the next assessment.
After rolled_back or failed nothing remains applied, and a new attempt starts with a fresh plan and approval. A completed run is final.
Run history
Runs are stored in sys_update_set_application (frozen plan, eligibility report, approval, transaction_id, receiving change_set_id, summary, recovery, error) and sys_update_set_application_change (one row per operation with state, message, before_version_id, after_version_id, expected and result hash, verification). Run states: validating, applying, completed, rolled_back, failed, partially_failed (pending is reserved). Audit records application:<run id> on the set; every written object carries its own audit rows under the run's transaction_id with source import. The system log source is remote.application.
The Apply workflow in the UI
On the Remote Update Set page, Apply update set is enabled for a set in state ready. The dialog has three steps:
- Plan: the server's verdict or reasons, package identity and checksums, counts of inserts, updates, deletes and merged proposals, resolved conflicts, warnings, potentially destructive operations and the planned operations in execution order. A note and an explicit checkbox precede the confirmation button. Reload plan fetches a fresh assessment and token.
- Running: the request is in flight and the dialog cannot be dismissed.
- Report: run state, error, recovery outcome, result counts, the receiving local update set, and every operation with its state, verification and messages.
The Application runs section lists every run; Report opens the stored report of an earlier run.
Walkthrough: promoting one change from DEV to PROD
The example promotes a changed system property from a development instance (DEV) through an integration instance (INT) to production (PROD). Host names are placeholders.
- DEV: capture the change. In the top-bar picker, create and select an update set "List page size". Edit the system property
platform.ui.list.page_size. The change is captured as one item with keyglobal/sys_property/platform.ui.list.page_size. - DEV: complete the set. Open Administration → Update Sets, open the set, review the captured change and its snapshot, and choose Complete. The content hash is fixed. Optionally use Export XML to keep a copy of the package.
- DEV: prepare a service account. Create a machine account with the
adminrole and issue a token with theremote:readability throughPOST /api/v1/auth/tokens. - INT: register DEV. Open Administration → Update Sets → Remote Instances, create a record with name,
httpsURL and typedevelopment. Use Set credential… to store the token, then Test connection… and expectconnected. - INT: retrieve. Use Retrieve completed update sets…, select "List page size" and retrieve it. The result links to the remote update set, which is validated on arrival. Nothing is applied.
- INT: compare. Open the remote update set and choose Compare with local instance. If INT still holds the version DEV started from, the change is
remote_onlywith planincludeand the set becomesready. If someone changed the property on INT in the meantime, it is a conflict and the set isconflicts. - INT: resolve. Open each blocking change, read the three-way table, and choose Accept remote, Keep local, Merge (where offered) or Skip. Choose Assess readiness until the banner says
ready. - INT: apply. Choose Apply update set, review the plan, add a note, tick the confirmation and apply. The report shows the operation as
appliedand verified, and a completed local update set Applied: List page size holds the captured write. - INT: test. Test the change on INT as usual.
- PROD: register and retrieve. On PROD, register a remote instance in the same way and retrieve the completed set. PROD can retrieve the original set from DEV (the same package id that was applied on INT), or the completed Applied: List page size set from INT, which the INT provider lists like any completed set.
- PROD: compare, resolve, apply. Repeat steps 6 to 8 on PROD. Object ids are preserved across instances, so the property is matched by id on every instance.
API endpoints
Admin endpoints are under /api/v1/admin/config and require the admin role. Errors are problem details with stable codes.
| Method and path | Purpose |
|---|---|
POST /remote-instances/validate-url | check a URL against the outbound policy |
GET /remote-instances/{id}/status | stored connection state and recent retrievals |
PUT, DELETE /remote-instances/{id}/credential | store, replace or remove the credential |
POST /remote-instances/{id}/test | server-side connection test |
GET /remote-instances/{id}/update-sets | discover the remote's completed sets |
POST /remote-instances/{id}/retrieve | retrieve selected sets { ids, replace } |
GET /remote-update-sets/{id} | detail with summaries and allowed transitions |
POST /remote-update-sets/{id}/validate, /compare, /refresh, /review, /reject | lifecycle actions |
GET /remote-update-sets/{id}/changes, /changes/{seq} | paged assessment (filters classification, conflict, validation, operation, kind, category, severity, plan, resolution); one change with base, local and remote payloads |
POST /remote-update-sets/{id}/changes/{seq}/resolve | record a decision |
GET /remote-update-sets/{id}/changes/{seq}/merge | merge preview, nothing stored |
POST /remote-update-sets/{id}/assess | re-assess readiness |
GET /remote-update-sets/{id}/plan, /decisions, /history | application plan, decision history, audit history |
GET, POST /remote-update-sets/{id}/apply | eligibility and approval token; apply |
GET /remote-update-sets/{id}/applications, /applications/{runId} | run history; one run with per-operation results |
POST /remote-update-sets/{id}/preview, GET …/package | package preview of the stored document; download the document |
Provider routes for other instances: GET /api/v1/remote/identity, GET /api/v1/remote/update-sets, GET /api/v1/remote/update-sets/{id}/package. Tests: backend/tests/Feature/Remote/* and backend/tests/Unit/Remote/RemoteUrlPolicyTest.php, run with scripts/backend-test.sh (dedicated test database; never plain php artisan test).
Not yet implemented
| Item | Status | Today |
|---|---|---|
| Back-out of a completed application | Planned | A completed run is final. The receiving local update set and the recorded before_version_id of every operation hold the material a back-out will need. The UI says so before confirmation. |
| Dictionary deletes | Planned | MetadataWriter has no delete, so a package that deletes a scope, table, field, override, form or list is not eligible until those changes are excluded (keep local or skip). Record deletes are supported. |
| Physical tables | Planned | Tables with physical storage cannot be created by the engine until the schema synchronizer exists. |
| Package signatures | Planned | Hashes prove integrity, not origin. The bearer token authenticates the consumer and identity binding guards against a swapped provider. |
| Lifecycle event table | Planned | The history of a set is its sys_audit trail and the run tables; a dedicated event table is not needed yet. |
| Elevation for security objects, prompts for protected and environment values, installed-version records | Planned | Any administrator can apply; protected values keep the target's value; without an installed-version record many objects without a baseline stay undetermined. |
| Pushing packages, scheduled retrieval, background processing | Planned | The provider API is read-only; every retrieval and run is a synchronous administrator action bounded by the package limits. |