docs: document Infisical secret workflows (#322)
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Skipped
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 2s

Closes #321
Closes #323

## Résumé
- Ajoute un skill projet pour utiliser le MCP Infisical sans divulguer les valeurs et relie les workflows concernés.
- Définit une évaluation automatique des releases et du SemVer, sans demander à l’utilisateur si une release est souhaitée ou quel numéro choisir.
- Les docs/skills seules ne déclenchent pas de release.

## Évaluation de release
Aucune release pour cette PR : elle ne contient que de la documentation et des skills. La version stable reste `1.0.0`; aucun tag ne sera créé.

## Validation
- `git diff origin/main...HEAD --check` : réussi.
- Inventaire Infisical limité aux noms de clés; aucune valeur secrète dans le diff.
- Les checks Gitea de la première révision passaient; les nouveaux checks sont en cours après la mise à jour.
- Tests applicatifs non exécutés : changement documentaire uniquement.

Reviewed-on: #322
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
This commit was merged in pull request #322.
This commit is contained in:
arnaud.dartois authored and Arnaud Dartois committed 2026-11-10 16:29:15 +01:00
1 parent 6e7f593cb3
commit bc7ddccfe3
8 files changed
+79 -1

No files matched your search

+2
View File
@@ -5,6 +5,8 @@ description: Validate Heimdall PostgreSQL and protected-volume backups using iso
# Heimdall backup and restore
For an explicitly authorized real backup/restore operation, follow [Infisical secrets](../infisical-secrets/SKILL.md) and retrieve only the selected environment's required key. Use generated credentials and disposable volumes for acceptance.
Use this workflow when changing `docker/scripts/backup*.sh`, `docker/scripts/restore*.sh`, the backup Compose, or the disaster-recovery runbook.
## Project-specific behavior
+2
View File
@@ -5,6 +5,8 @@ description: Maintain Central server installation, Compose refresh, and Docker i
# Central installation and image updates
For credentials needed by an explicitly requested real deployment, follow [Infisical secrets](../infisical-secrets/SKILL.md). Disposable Compose acceptance continues to use generated credentials and isolated resources.
Use this skill when changing the Linux or Windows Central installer, its generated Compose, or Central container update behavior.
For installer, Compose, image, and documentation work that can proceed independently, use [parallel development with Orca](../parallel-development/SKILL.md). Keep shared deployment contracts and the final isolated acceptance run coordinated and integrated before recording evidence.
@@ -5,6 +5,8 @@ description: Build and acceptance-test Heimdall changes in a disposable Docker C
# Disposable Compose acceptance
Follow [Infisical secrets](../infisical-secrets/SKILL.md) when the surrounding task also needs real credentials. Acceptance projects must always use generated synthetic values and must never retrieve deployment secrets from Infisical.
Use this skill for every Heimdall behavior, deployment, or operational change. Read the relevant project skill too; for first administrator setup, use `first-admin-bootstrap`.
When implementation or acceptance preparation has independent branches, use [parallel development with Orca](../parallel-development/SKILL.md) to assign bounded work. Keep the final Compose run, cleanup verification, and acceptance evidence under one coordinator so the combined change is validated as a whole.
+2
View File
@@ -5,6 +5,8 @@ description: Implement or diagnose Heimdall's mandatory first administrator setu
# First administrator setup
For deployment bootstrap credentials, follow [Infisical secrets](../infisical-secrets/SKILL.md) and retrieve only the explicitly selected environment's required keys. Disposable acceptance must use generated accounts and passwords, never vault credentials.
Use this skill when changing account bootstrap, signup, login routing, user creation, or initial deployment guidance.
- The first account is created through a dedicated setup assistant that is reachable only while the database has no users. Do not seed a production password or print credentials to logs.
+4
View File
@@ -5,6 +5,10 @@ description: Create, maintain, link, and close Heimdall project tickets in Gitea
# Gitea ticket workflow
For credentials used while investigating or validating tickets, follow [Infisical secrets](../infisical-secrets/SKILL.md). Never put secret values in issue descriptions or comments; use metadata-only existence checks when documenting prerequisites.
When a change is delivered through a PR, include its automatic release assessment using [pull request release assessment](../pr-release-versioning/SKILL.md); do not ask the user to choose whether or which version to release.
Gitea issues are the source of truth for planned work, acceptance evidence, operational follow-up, and completion. Do not use a repository markdown checklist as a parallel backlog.
For implementation work that has independent tasks, use [parallel development with Orca](../parallel-development/SKILL.md). Keep Gitea as the work-status source: create linked issues for independently deliverable outcomes, while Orca Runs/Tasks coordinate the execution and dependencies.
+30
View File
@@ -0,0 +1,30 @@
---
name: infisical-secrets
description: Retrieve and maintain Heimdall project credentials in the connected Infisical instance while keeping secret values out of repository files, transcripts, and logs.
---
# Heimdall secrets in Infisical
Use this workflow whenever a Heimdall skill needs a real credential, and link this skill from any skill that adds or changes a credential workflow. The connected MCP server is the supported interface to Infisical.
## Vault and scope
- Select project **Orca** (`orca-cc2-m`) explicitly; its project ID is `96fb3628-2ee3-45b5-b6a8-66a0212a5b46`. Use `dev`, `staging`, or `prod` only when the task names that environment. Never silently fall back from one environment to another.
- Use the MCP tools `list-projects`, `list-secrets`, `get-secret`, and `create-secret`. They are allowlisted in the local MCP configuration. Never use `create-secret` as an implicit overwrite operation: check the key first and explain/ask before replacing an existing value.
- `list-secrets` returns secret values as well as names. Treat its full response as sensitive even when only checking availability. Do not print, quote, summarize, or copy values into tool output, chat, shell history, command arguments, files in the repository, issue/PR text, or logs.
- Prefer retrieving only the needed key with `get-secret`. Pass the value directly to the one process that needs it using a protected stdin/temporary file outside the repository with mode `0600`, then remove that exact file. Never interpolate it into a command string or a checked-in Compose file.
- Use metadata-only checks to report which keys exist. Never test access by dumping a value. If a diagnostic accidentally emits a value, stop, do not repeat it, and tell the user that the credential should be rotated. Do not rotate it unless the user explicitly asks.
## Using secrets in skill workflows
- Distinguish real deployment credentials from disposable acceptance credentials. Compose acceptance recipes must generate unique synthetic credentials and must not fetch production or staging values from Infisical.
- For local manual integration work, fetch only the named development key needed by that skill. For a deployment task, use the explicitly requested environment and target. Never place fetched values in `.env.example`, tracked configuration, source, fixtures, or documentation.
- CI secrets remain in the CI secret store unless a task explicitly migrates the CI workflow. Infisical presence alone does not configure Gitea Actions or prove a runner can access the vault.
- When a workflow needs a credential not present in the selected environment, report its exact key name and purpose; do not substitute a similarly named credential or a different environment.
- When asked to persist a newly provided credential, use `create-secret` in the selected project/environment/path. First verify the key is absent, then create it, then verify presence by listing metadata only. Do not echo the supplied value.
## Current inventory verified 2026-11-10
The `dev` root currently contains `GITEA_ORCA_TOKEN`, `HEIMDALL_LOGIN`, `HEIMDALL_PASSWORD`, `HEIMDALL_PRIVATE_KEY_B64`, `HEIMDALL_URL`, `PENPOT_LOGIN`, `PENPOT_PASSWORD`, and `PENPOT_URL`. The `staging` and `prod` roots were empty at verification time. Treat this inventory as a dated snapshot; check metadata again before relying on it.
The development inventory does not include Heimdall deployment/database/JWT, RustFS, Agent site-token, Coturn, Redis, Sentry, Docker Hub, or release-signing credentials. Some are generated for disposable acceptance, some are optional, and CI publication credentials belong in Gitea Actions. Do not add real values simply to make the inventory look complete; report only keys required by the active task.
+32
View File
@@ -0,0 +1,32 @@
---
name: pr-release-versioning
description: Assess whether a Heimdall pull request needs a published release and select its SemVer increment from the change impact without asking the user.
---
# Pull request release assessment
Apply this assessment while preparing every Heimdall PR. Do not ask the user whether to release or which version to use. Record the decision, rationale, and proposed version in the PR description; update it if the diff changes.
## Decide whether a release is needed
- **No release** for documentation, skills, tests, CI-only changes, refactors with no externally observable change, or internal tooling changes. State `Release: no` and keep the current version unchanged.
- **Release required** when the PR changes behavior shipped to Heimdall users or operators, published images/installers/Agent assets, compatibility contracts, or security fixes that users need to receive.
- Do not create a release tag for a PR. A release tag points to a commit on `main`; assess the merged change after required checks pass and then follow the tag workflow in `release-automation`.
## Select the version automatically
Use the latest stable SemVer tag reachable from the integration branch (`MAJOR.MINOR.PATCH`); ignore prerelease tags when selecting the stable base. For multiple merged, unreleased changes, assess all changes since that tag together and use the highest required increment.
- **MAJOR** for a breaking API, configuration, data, or install/upgrade compatibility change.
- **MINOR** for a backward-compatible user-facing capability or operator feature.
- **PATCH** for backward-compatible bug fixes, security fixes, performance fixes, and shipped compatibility corrections.
- No release-worthy changes means no tag and no version increment.
Increment only the selected component and reset lower components to zero. For example, from `1.4.7`: breaking becomes `2.0.0`, a compatible feature becomes `1.5.0`, and a fix becomes `1.4.8`. If no stable tag exists, use `1.0.0` as the base only when the repository's first-release policy confirms that baseline; otherwise report the missing baseline instead of inventing one.
## PR and post-merge steps
- Put a short `Release assessment` section in every PR: `no release (reason)` or `release required; proposed version X.Y.Z (reason)`.
- For no-release PRs, do not create or push a tag. Keep the version unchanged.
- For a release-required PR, determine the exact next version from the current `main` tags after merge, verify it is unused, and create an annotated tag on the merged `main` commit only after required CI succeeds. If another merge changes the base before tagging, recalculate from the latest stable tag and all unreleased changes.
- Never overwrite or move an existing tag. If the change is prerelease-only or an emergency exception, explain the project-specific suffix/tag choice in the PR without asking the user to choose it.
+5 -1
View File
@@ -5,6 +5,10 @@ description: Build and validate changed Heimdall images on pushes, then publish
# Heimdall build and release workflow
For every PR, follow [pull request release assessment](../pr-release-versioning/SKILL.md). Determine and record whether a release is needed and the proposed SemVer from the change impact; do not ask the user to decide. Documentation and skills-only changes do not create a release or change the version. Only tag a release after the merged commit is on `main` and required checks pass.
For any local release investigation that needs credentials, follow [Infisical secrets](../infisical-secrets/SKILL.md). Keep publication credentials in Gitea Actions as specified below; do not assume that a key in Infisical is available to CI.
Use this skill for changes to `.gitea/workflows/build.yml`, `scripts/ci/change_scope.py`, image build/push scripts, installer packages, release signing, or the Gitea release job.
## Delivery contract
@@ -14,7 +18,7 @@ Use this skill for changes to `.gitea/workflows/build.yml`, `scripts/ci/change_s
- A push to `main` validates the changed source and builds/scans/pushes only affected images. The affected image gets immutable `sha-<full-sha>` and mutable `latest` tags on Docker Hub. Main pushes do not create Gitea releases.
- Runs for the same ref are serialized so a slower older `main` run cannot overwrite a newer `latest` image.
- A `MAJOR.MINOR.PATCH` tag (optional prerelease suffix allowed) is a version release. It validates the complete source and builds/scans server, Agent CPU, and Agent GPU images once each. The verified images are pushed to Docker Hub as `sha-<full-sha>` and the application version.
- When creating a PR, ask whether merging it should trigger a release. If yes, record the user's exact SemVer tag in the PR context. After merge, fetch `main`, verify the PR merge commit is reachable from it, verify the tag is unused, create an annotated tag at that merge commit, and push it to trigger this workflow. Never infer a version or force-update an existing tag. No affirmative release decision means no tag is created. Follow the global `pr-autopilot` skill for this handoff.
- After merge of a release-worthy PR, use the current stable tag and all unreleased changes to calculate the SemVer increment according to `pr-release-versioning`. Fetch `main`, verify the merged commit is reachable from it, verify the selected tag is unused, create an annotated tag at the merged commit, and push it to trigger this workflow. Never ask the user to choose a version or release, infer a version from the PR title alone, or force-update an existing tag. Documentation and skills-only changes do not get a tag.
- The tag release job does not build or scan Docker images. It pulls the already scanned immutable image refs to verify their source revision, then resolves canonical digests from Docker Hub Registry v2 using the immutable commit tags. It creates a signed Gitea release containing `heimdall-installers-<version>.zip`, framework-dependent Agent archives, the public key, signed update manifest, and CPU/GPU image digest manifests. Local Docker `RepoDigests` can contain multiple values and must not be used as a uniqueness check. Build provenance, image-digest bookkeeping, and checksums stay in CI package output and are not uploaded as end-user release assets. It never uploads Docker image archives to Gitea.
- The package script uses fast gzip compression for the framework-dependent release archives to reduce release-job CPU time; keep the archive names and layout stable for Linux and Windows installers.
- The installer ZIP preserves the `install/` and `docker/` layout consumed by the Linux and Windows server installers. A raw-branch `.sh` or `.ps1` bootstrap resolves Gitea's latest stable version (or an explicit `HEIMDALL_INSTALLER_VERSION`), verifies the Gitea SHA-256 asset digest, downloads that version's ZIP, and runs its version-pinned script. Versioned bundle scripts pin their source assets and server image to the same tag and do not resolve a moving release. Direct Agent install scripts served by Central continue to download Agent payloads through Central's configured Gitea release API.