Skip to content

SP-2712: expose the LIVE package pointer as config pointer - #421

Closed
Albnor (albnorleku) wants to merge 1 commit into
mainfrom
albnorleku/sp-2712
Closed

SP-2712: expose the LIVE package pointer as config pointer#421
Albnor (albnorleku) wants to merge 1 commit into
mainfrom
albnorleku/sp-2712

Conversation

@albnorleku

@albnorleku Albnor (albnorleku) commented Aug 31, 2026

Copy link
Copy Markdown

Why

A content-cli release of a Context Model branch had no final step. The branch could be cut with config branch create and checked with config package validate, but selecting it as LIVE — the act that redirects the package's consumers to that branch — was only possible through the Studio UI. Any CLI-driven or agent-driven release therefore stopped one step short of finishing.

Pacman has exposed the pointer publicly at /api/core/pointers/packages/{packageKey} for a while; nothing in content-cli referenced it.

Problem context: SP-2712. Parent epic: SP-1989.

What changed

A beta config pointer group with two commands:

content-cli config pointer set --packageKey <main> --branchKey release-branch
content-cli config pointer get --packageKey <main>
File Role
pointer/api/pointer.api.ts Wraps the PUT/GET pointer routes, mirroring the branch module
pointer/interfaces/pointer.interfaces.ts PackagePointerTransport, SetPackagePointerTransport, and the conflict-body shape
pointer/pointer.command.service.ts Composes the branched key, maps each status to an actionable message
module.ts Registers the group as beta
core/http/http-client.ts Adds putStatusAndData, so a 204 is distinguishable from a body

Four decisions worth flagging for review:

set takes the two keys separately and composes <main>@<branch> itself. Callers never hand-assemble the branched form, and a branched key passed as --packageKey is rejected before a request goes out. main cannot be selected, since returning consumers to the main package is a merge, not a selection.

A 409 carrying package-pointer-blocking-problems is terminal. The message says the branch's problems must be resolved and names config package validate as the way to list them. There is deliberately no override flag — this matches the frontend dropping "Set live anyway" in celonis/ems-frontend#66094.

There is no --validate flag. Pacman's OpenAPI spec declares a validate query parameter on the PUT, but PublicPackagePointerController.set never binds it, so Spring silently discards it. A flag wired to it would report a successful dry run while having performed a real release. I removed the flag rather than ship that. The spec discrepancy is worth fixing separately on the Pacman side.

get distinguishes "no selection" from an error. Pacman answers 204 when the pointer is unset, which is the normal default — consumers read the main package — not a failure.

DELETE is intentionally not wrapped. Moving the selection forward to a corrected branch is a release; clearing it leaves consumers pointed at nothing.

A 403 is reported as ambiguous by design: the route answers 403 both for missing permission and for an inactive pacman.live-branch-pointer feature, with nothing in the body separating them. Claiming one cause would send users to request access they already have.

Testing

yarn test — 621 tests across 71 suites pass, no regressions. New coverage:

  • tests/commands/configuration-management/pointer/pointer-set.spec.ts — key composition, the main rejection, the 409 and 403 messages, and an explicit assertion that validate never appears on the request
  • tests/commands/configuration-management/pointer/pointer-get.spec.ts — the selected case and the 204 empty case
  • tests/integration/commands/configuration-management.spec.ts — command wiring

Two pre-existing tslint no-shadowed-variable errors in logger.ts and http-client.ts come from a tslint/TypeScript version mismatch on DeprecationError and are unrelated to this change.

Docs

docs/user-guide/branch-commands.md gains a LIVE-selection section that states there is no dry run and points at config package validate instead.

Made with Cursor

A content-cli release of a Context Model branch had no final step: the
branch could be cut and validated, but selecting it as LIVE was only
possible through the Studio UI, so no CLI-driven or agent-driven flow
could finish a release.

The new beta `config pointer` group takes the main package key and the
branch key separately and composes the branched key itself, so callers
never assemble `<main>@<branch>` by hand. `set` reports a
package-pointer-blocking-problems conflict as terminal and names the
command that lists the problems; there is no override, matching the
frontend dropping "Set live anyway". `get` distinguishes an unset
pointer from an error, since consumers reading the main package is the
normal default rather than a failure.

Neither `set` nor a dry-run of it accepts a validate flag. Pacman's
OpenAPI spec declares `validate` on the PUT but the controller never
binds it, so such a flag would report a successful validation while
performing a real release.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@albnorleku
Albnor (albnorleku) requested a review from a team as a code owner August 31, 2026 07:52
@sonarqubecloud

Copy link
Copy Markdown

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