Skip to content

docs: publish from CI with a system client's token - #50

Open
EgorPashko wants to merge 1 commit into
develop-2.5from
docs/ci-publish-with-a-client
Open

EgorPashko wants to merge 1 commit into
develop-2.5from
docs/ci-publish-with-a-client

Conversation

@EgorPashko

Copy link
Copy Markdown
Contributor

What changed and why

docs/publishing.md gains a section, "Publishing from CI". Until now the page said only that
LOFT_REMOTE_ENDPOINT and LOFT_REMOTE_TOKEN point a command at the server with a token of its
own; it did not say where a CI job gets one. Now it does: an administrator registers a system
client for the document on the server, the job asks the server's token endpoint for the client's
token with the client credentials grant, naming the organization's API resource, and runs
loft publish with the token and the document's address. The section also says what the token
reaches, that the job commits spec/labels.yaml and loft.lock.json back, and what a withdrawal
or a rotation of the secret does to the job. CHANGELOG.md records it under
## Unreleased in 3.0.0. Nothing in loft changes.

How it fits

sequenceDiagram
    participant CI as CI job
    participant T as Token endpoint
    participant R as Document's remote
    CI->>T: grant_type=client_credentials, client_id, client_secret, resource
    T-->>CI: access_token, expires_in (an hour at most, no refresh token)
    CI->>R: loft publish, with LOFT_REMOTE_ENDPOINT and LOFT_REMOTE_TOKEN
    R-->>CI: the labels and the lock
    CI->>CI: commit spec/labels.yaml and loft.lock.json
Loading

Deliberately missing

  • No change to spec/: the criteria for the two variables stand in "Reaching a remote", and no
    node governs docs/.
  • The agent skill's reference "Verify in CI" is unchanged: configuring CI is the person's work,
    not the agent's.
  • Registering a system client and the grant itself are the server's, documented there.

Test plan

  • cargo nextest run -p loft-cli american_english (the guards module, 10 passed)
  • CI

🤖 Generated with Claude Code

docs/publishing.md gains a section on publishing from CI: an administrator
registers a system client for the document on the server, the job asks the
server's token endpoint for the client's token with the client credentials
grant, naming the organization's API resource, and runs loft publish with the
token in LOFT_REMOTE_TOKEN and the document's address in LOFT_REMOTE_ENDPOINT.
It says what the token reaches, that the job commits the labels and the lock
back, and what a withdrawal or a rotation of the secret does to the job. The
changelog records it under the line's section. Nothing in loft changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@EgorPashko
EgorPashko requested a review from ariloudev December 4, 2026 09:19

This branch has not been deployed

No deployments
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