Commit graph hyperhive/docs/ci.md
Author SHA1 Message Date
müde
4a48ce5024 refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
sock
6c95933775 docs(security): ci netns, knowledge .git tmpfs, matrix id/secret split
Security fixes landed without updating the security-model docs; bring them
current as present-tense invariants:

- security.md: matrix identities are public / cross-agent-readable via
  GetAgentMeta while the token stays private; name validation extends to
  GetAgentMeta; the nix-build blast radius has a network dimension (hive-ci
  netns) alongside the 0600 token policy.
- boundary.md: the core dashboard /api has no app-layer auth — protection is
  the gateway plus network isolation; stated as a standing invariant.
- ci.md: hive-ci runs in its own private netns behind the bridge, reaches the
  forge via the gateway, and cannot reach host-loopback (dashboard/forge port).
- knowledge.md: /knowledge excludes .git via tmpfs so the core token in
  .git/config isn't readable by agents.

Refs #2308, #2310, #2313.
2026-07-10 19:17:17 +02:00
atlas
9c3884e031 docs(ci): lint jobs are required and block merge 2026-07-08 23:43:29 +02:00
atlas
260dc7bb58 docs(ci): drop bullet descriptions, keep only link + one-liner
Per mara/argus feedback: no need to describe job contents inline,
just link to the workflow file.
2026-07-08 23:43:29 +02:00
atlas
7ef90996f6 docs(ci): replace YAML copy with link to .forgejo/workflows/ci.yml
Per mara's feedback: don't copy the YAML inline, just reference the file.
2026-07-08 23:43:29 +02:00
atlas
bfba148f76 docs(ci): update CI workflow section to reflect 3-job layout 2026-07-08 23:43:29 +02:00
iris
c594de07ca docs(ci): document CI checks, local equivalents, and pre-push hook 2026-07-04 20:48:58 +02:00
atlas
8406a45275 feat(#1997): add prettier markdown formatter to treefmt
- .prettierrc: proseWrap=preserve (no prose reflow)
- .prettierignore: exclude hivectl-cli.md (auto-generated) + 11 docs
  with multi-line list-item continuations prettier would strip to col 0
  (CommonMark limitation in prettier's list handling)
- format 16 markdown files: cosmetic only (*→_, table alignment,
  heading normalisation) — verified no broken continuations, idempotent
2026-07-02 23:33:11 +02:00
iris
6999217c29 docs(ci): document actions/checkout mirror + forge.mirrors option
feat(#2072) auto-seeded an actions/checkout pull-mirror when
forge.ci.enable is set, pointing Forgejo DEFAULT_ACTIONS_URL at the
local instance so CI uses: steps resolve on loopback. Also added a
general-purpose forge.mirrors option for pre-seeding any upstream
repo as a pull-mirror. Neither feature was documented in docs/ci.md.
2026-07-02 22:29:58 +02:00
atlas
2b4e928afe feat(#1867): make the internal forge mandatory (remove forge.enable)
The internal forge is the canonical store for the meta flake, every
agent's config repo, and the internal/* repos, so it can no longer be
optional. Remove the services.hyperhive.forge.enable toggle:

- hive-forge.nix: drop the `enable` option; the forge config now
  deploys gated on `services.hyperhive.enable` (it ships with hyperhive).
- hive-c0re.nix: HIVE_FORGE_URL env unconditional; forge-public-URL gate
  drops the enable check (keeps behindGateway).
- hive-gateway.nix: local /etc/hosts forge entry keyed on behindGateway.
- hive-ci.nix: drop the now-moot `forge.ci.enable requires forge.enable`
  assertion (forge is always present); reword the option doc.
- nix/docs/default.nix: drop the `forge.enable = mkForce false` stub
  (option gone); the options-doc eval stays light via hyperhive.enable.
- hive-c0re forge.rs / hivectl.rs: reword 'forge.enable = true' error
  text to 'wait for hive-c0re to start the container' (the runtime
  token-absent path is unchanged — it's a bootstrap-timing check, not
  the opt-out).
- docs/approvals.md, docs/ci.md: drop stale forge.enable references.

Migration: configs that set `services.hyperhive.forge.enable = false`
must drop the line — the forge is now mandatory.

Prereq/companion to #1838 (PR-based config flow, which assumes the forge
is always present).
2026-06-22 19:26:34 +02:00
damocles
d89666baa9 docs(ci): document jobTimeout, fix forge.ci option path 2026-06-15 11:37:50 +02:00
atlas
b7eb0f3930 docs(ci): recommend host-level nix store GC + min-free for CI disk pressure
Store GC is a host-level concern (the CI runner builds through the host
nix-daemon; the container shares the host store with no daemon of its own).
A service module should not change the host's global nix-daemon options, so
document the daily GC + disk-pressure min-free/max-free as a recommendation
for the operator's own host config instead. Notes the remote-builder caveat:
GC must be applied wherever the builder's store lives.
2026-06-08 19:32:14 +02:00
atlas
9209094397 fix: move core-token out of hive-ci container (host-side prefetch service) 2026-06-03 22:18:53 +02:00
atlas
d726a0d875 docs: clarify nix eval is not fully sandboxed (IFD, fetchGit can reach network) 2026-06-03 21:52:59 +02:00
atlas
e92cfe7e1a docs: add security warning for unsandboxed CI builds and trusted-contributor scope 2026-06-03 21:52:59 +02:00
atlas
9d816431dc fix(#981): validate runner credentials on every boot, purge stale .runner
hive-ci-register.service now runs unconditionally on every boot (not
just when .runner is absent). Before fetching a registration token it
validates existing .runner credentials via the forge admin API:
- 200: runner still registered, write dummy token and exit
- 404: runner deleted from forge, purge .runner and re-register
- 000: forge unreachable, keep credentials (runner surfaces the error)
- other non-200 or malformed .runner: purge and re-register

Removes ConditionPathExists so stale credentials from a wiped forge
no longer block the runner indefinitely. Updates docs/ci.md to match.
2026-06-02 00:27:47 +02:00
lexis
7f91d52569 docs: add ci.md to CLAUDE.md + clarify runner details
Follow-up to #905: adds CLAUDE.md index entries (file map + reading path)
for the new docs/ci.md. Also clarifies runner details in ci.md:
- curl/jq use absolute nix store paths (no systemPackages needed)
- .runner credential reuse: script writes dummy token on subsequent boots,
  runner ignores it when .runner file exists
2026-06-01 15:52:01 +02:00
iris
6f25ff7ee7 docs: add ci.md — hive-ci Forgejo Actions runner guide 2026-06-01 00:05:53 +02:00