Aller au contenu principal
BlueForge
Commencer gratuitement

Agent pack

fgit: forge-git CLI

The PR, CI and merge-train CLI — checks, doctor, land, trains — and why GitHub never applies here.

Rendered from docs/agent-pack/fgit.mdrelease v0.2.0Edit on forge-git

forge-git (forge-git.blueforge.studio) is the only landing point. gh does not work; never push to GitHub. Source: the git (forge-git) session's guidance and fgit --help of the installed CLI (0.16.0), 2026-10-11; train, land and no-checkout sections added 2026-10-18 from forge-control's use of fgit 0.27.x and the forge-git session's notes. V = verified (ran it or read source), U = unverified or planned. Untagged rows are from --help. Repo is owner/repo or just repo; omitted means "from the git remote".

Pull requests

Command Notes
fgit pr create [repo] --head B --title T --body T | --body-file F [--draft] [--dry-run] Always pass --title (default is the HEAD commit subject). The flag is --body, not --description. --draft prefixes WIP: .
fgit pr list | view <repo> [n] view shows mergeability, checks, comments, assurance tier (display only).
fgit pr checks <repo> <n> Exit 0 green, 1 failing, 2 pending, 3 no checks, 4 read error (V).
fgit pr doctor <repo> <n> [--retry] Classifies each failure: runner-cannot-start, infra-flake, real, unknown; recommends merge, wait, retry, fix-code, fix-runner, rebase, force or surface (V, source).
fgit pr trigger <repo> <n> [--failed-only] Re-run CI on the head commit. ci rerun-failed is an alias.
fgit pr update-branch <repo> <n> Server-side "Update branch". The mergeable flag is async-cached and can be stale (U).
fgit pr comment <repo> <n> --body T, pr edit
fgit pr close <repo> <n…> [--comment T], pr reopen Never tea pr close: it silently does nothing (U).
fgit pr draft | ready Toggle the WIP title. ready also re-runs CI.
fgit pr merge <repo> <n> [--style squash|..] [--force] Exit 0 or 1 only (V). Squash keeps the PR title verbatim.
fgit pr land <repo> <n> Waits for the gate (45 min, then exit 2), retries one infra flake, merges without --force; --wait-image also waits for the built image. Released and in daily use (forge-git session, 2026-10-18; the earlier "not released" note is obsolete). Refuses a PR whose required job is skipped by design (V, 2026-10-18: forge-control's Build mission-control (arm64) and Validate:arm64 smoke are skipped on every PR, and land answered "not landing: required check(s) were skipped"). For those: fgit pr checks (exit 0 = green, skipped is fine), then plain fgit pr merge (V, worked).

WIP title: WIP: or [WIP], case-insensitive; Draft: does not match (V). A WIP PR is meant to schedule no workflows (U, not exercised).

--force (V, gitea-bridge/src/pr.ts, corrected by the git session)

Client side it bypasses blocking checks (failed, pending, required-skipped) and the zero-checks refusal. It also sends Gitea's own force_merge: true in the merge request, so Gitea may honour it server-side if the caller is an admin or on the branch's bypass allowlist; for an ordinary write token it does not help. Conflicts are refused before the checks are even read. Sampled protection on 5 repos requires "all checks" with an empty context list, so on a zero-check PR a plain write token cannot merge at all (U: what Gitea does with zero statuses was not tested). Agents: do not use it on a PR with real checks. It is for zero-check chore/re-record-* branches, and the operator may authorize other cases. A lone skipped required job can block a merge that has no failures: try without --force first (a dry-run merged without it while two arm64 jobs were skipped).

A required job that is skipped by design

Not every refusal is a failure. A repo whose suite has a changed-scope gate (forge-auth's is the reference: changed-scope classifies a docs-only diff and the suite jobs then skip) ends up with required contexts that never report on a docs PR. Gitea does not count a skipped required job as passing, so the merge is refused with nothing red: fgit pr doctor prints decision: surface and fgit pr checks still exits 0.

Do not --force that. "surface" is not "force" — the PR is green; the gate's rule is the blocker. Two remedies (V, forge-auth#217, 2026-10-20):

  1. Declare the context skipped-by-design for that repo (operator plane, one command per context): fgit-ops skip-checks add <owner/repo> "CI / Typecheck (pull_request)" --reason "…" — the exact status context, and the reason is audited. The skip then passes; a failure still blocks, so a real regression is not masked. Withdraw with fgit-ops skip-checks remove <owner/repo> "<context>". List what a repo carries with fgit-ops skip-checks show <owner/repo>.
  2. The cleaner long-term shape: a repo whose workflow has an aggregate Gate job that runs always and accepts a skipped suite job on a docs-only diff should require only that Gate context, not the individual suite jobs. That is a branch-protection change — the repo owner's call, not an agent's.

The skip-checks declaration is per repo and does not transfer: expect to meet the same refusal in the next repo whose suite skips by design.

After a merge

The "merged" badge is decorative. Verify: git fetch && git grep <unique-string> origin/main. Then git pull --rebase; a server-side squash leaves a stale local branch (U).

Landing several PRs: the merge train

fgit train <repo> <pr...> (or --label <name>) batches PRs so CI runs once on the combination. Dry run unless --execute: always dry-run first. Run it from a checkout of the repo. --land train merges the one train PR as a single commit instead of each member. Exit 0 landed or dry run, 1 aborted or partial, 2 red, 4 error. Audit logs: ~/.forge-merge-train/*.jsonl. Seen in forge-control, 2026-10-18 (V, real trains of 4 to 8 PRs):

  • It refuses PRs whose last CI is red and PRs that touch the same files (--allow-overlap overrides; do not unless you know the merge is clean).
  • It aborts with "base moved while CI ran" if anything else merges to main meanwhile (--allow-main-moved). Do not merge directly while a train runs.
  • 405 Please try again later lines on members after a sibling merged are normal retries, not failures.
  • With a deep CI queue one train took about 70 minutes. One member was refused at its own merge over a skipped required job that looked identical on members that merged; it was landed individually later, not forced.
  • --help of fgit 0.27.1 still says the train is "not yet run against real PRs"; that text is stale (fixed on forge-git main, forge-git#433). Auto-merge and the unattended train exist only on forge-git and forge-git-sandbox so far (forge-git session, 2026-10-18/19; U here): ask forge-git to opt a repo in.
  • fgit pr merge <repo> <n> --when-green arms a merge for when checks pass; a push to the PR cancels it. Use this one.
  • The auto-merge label (fgit pr create --auto-merge) refuses PRs authored by forge-admin or blueforge (bot-author, on purpose). Agent PRs on this machine are authored by forge-admin unless you act as your own account (below), so the label does nothing for them.
  • The merge-train label (fgit pr create --train): a timer on forge-platform runs fgit train auto every 10 minutes on PRs quiet for 5 minutes. It skips drafts, no-auto-merge, and PRs touching .gitea/, .github/ or .claude/. Current state of all of this, kept by forge-git: docs/AGENT-EFFICIENCY.md in forge-git (fgit cat blueforge-studio/forge-git docs/AGENT-EFFICIENCY.md).

CI strategy for agents (milestone mode; forge-control playbook #2914 docs/claude/ci-batching.md and docs/runbooks/ci-per-pr-milestone-mode.md; 0.1.35, 2026-11-12)

Command spellings read from --help on 2026-11-12 (V: fgit 0.50.0, fgit-ops, forge 2.10.40 on packr). Behaviour measured only in forge-control is relayed (U here).

1. Find out which mode the repo is in before you open a PR. fgit ci mode show [repo] (read-only) prints MILESTONE or full CI, the CI_PER_PR Actions variable, and whether blueforge.config.json declares ci.perPr.

  • full CI (variable unset): every PR runs the whole suite. Your flow does not change; you may still batch with a train.
  • MILESTONE: an ordinary PR runs only the light gate (Changed scope, CI plan, Docs). The heavy suite is skipped by design and fgit pr checks reads it as green.
  • A repo honours the mode only if its workflow reads CI_PER_PR. If show says MILESTONE but the heavy jobs still run, the workflow lacks the support: tell the operator, do not work around it.
  • Which repos are on or off goes stale at once, so it is not listed here. Ask fgit ci mode show.

2. Default flow in a MILESTONE repo. 0. One milestone per batch of work (operator rule, 2026-11-25, relayed by forge-git; fgit >= 0.51.0): fgit milestone create <repo> "<slug>". It is the grouping the train is cut from; it is a board field, not a CI lever (see "Milestones" below).

  1. Open ordinary PRs with ordinary titles (feat:, fix:, docs:) and attach each to the milestone: fgit milestone attach <repo> <n> "<slug>", or fgit pr create --milestone "<slug>". Never self-title a PR milestone:: that runs the full suite per PR and defeats the mode.
  2. Run the package tests, lint and typecheck locally before you push. The light gate does not, so a red main costs everyone a cycle.
  3. At feature-complete, batch. Dry run first, from a checkout of the repo: fgit train <repo> <pr...>, then fgit train <repo> <pr...> --title-prefix 'milestone: ' --land train --execute. One full CI on the combination, one commit, one main push, one roll. Without --title-prefix the train PR title (train: #N ...) matches no milestone rule and the train itself runs only the light gate. Needs fgit >= 0.50.0 (fgit version --check).
  4. Do not merge anything else to main while a train runs (base moved aborts it).
  5. Traps that have bitten the fleet. Rebase STACKED PRs onto their sibling before the train, or its trial merge conflicts. Members that edit the same file (a lockfile, a version bump) are refused unless --allow-overlap, or go in separate trains. A job-level if on a required job reports skipped and blocks pr land (forge-git #822), so check required jobs before you rely on a plain land. A PR whose own CI is still pending is refused by the train as required-check-pending: let it settle, then re-run the dry run.
  6. A single-PR landing (fgit pr merge or pr land) is for urgent fixes only. Work that can wait rides a milestone and a train.

3. One risky PR that needs the full suite: ci:full label, or a milestone: / release: / promote: title. Set it WHEN YOU OPEN THE PR: fgit pr create ... --label ci:full (the label must exist: fgit label list <repo>; create with fgit label create <repo> ci:full). Adding a label or editing the title later does not retrigger CI, and fgit pr trigger <repo> <n> re-runs the original event, so the gate still sees the old title and label. To apply a new label or title to an existing PR, push a new commit (git commit --allow-empty works).

4. Traps.

  • A train PR that goes red makes fgit train bisect members out, and it can blame innocent ones. Read fgit ci why <repo> --pr <train> before concluding a member is at fault.
  • --land train closes no members if you force-merge the train PR by hand. Close each member yourself with a comment that points at the train PR.
  • Milestone mode hides heavy-suite-only steps (No committed secrets, Test infrastructure, file-size, docs lint) until the first full run, usually the train. Run them locally.
  • A required job that is skipped by design is not a failure and not a reason for --force; the declaration is fgit-ops skip-checks add|remove|show (operator).
  • A push to main cancels the queued publish run and its waiting deploy job. Do not merge while a roll you need is queued. If only the deploy job ended cancelled: fgit ci jobs <repo> <run-id>, then fgit ci rerun <repo> <run-id> --job <job-id>.
  • Main-push CI runs on every merge, by policy. The lever is fewer merges, which is what a train gives. Do not cancel main-push runs.
  • The branch/env ladder (ci.branches, forge promote, env_name on deploy rows) is built but behind STAGING_PROMOTE_ENABLED=off. Do not assume a staging promote exists. The Gitea milestone field has had its own verbs since fgit 0.51.0 — see below; it is board hygiene, never a CI lever.

5. Who may change the mode. Only the operator: fgit-ops ci-mode set <repo> <milestone|full> and fgit-ops ci-mode unset <repo> (dry run unless --execute; touches only the CI_PER_PR variable). The durable way is a reviewed PR that sets ci.perPr in blueforge.config.json; the main-push webhook then syncs the variable (a 403 there is a token-scope problem, an operator fix). Plain fgit ci mode set|unset only points you at fgit-ops. Agents do not set the mode, and never --force to get around it.

6. The advisor (advisory only, UNRELEASED). forge ci advice [--repo owner/name] [--window 14d] [--json] ranks repos by recommended strategy, expected minutes saved per week, confidence and prerequisites, and prints the apply command. Operator only, read-only. It does not exist in any published forge yet: it merged to forge-control main (#2949) after forge 2.10.40, so a published forge >= 2.10.41 is needed (the usual installed 2.10.39 and the published 2.10.40 lack it). Do not tell anyone it works until forge ci advice --help answers. Meanwhile use forge ci stats --by repo --window 7d (windows: today|24h|7d|week|month|YYYY-MM|YYYY-MM-DD..YYYY-MM-DD, not 14d). Not verified: that the released output matches this description.

7. Which CLI.

Need CLI Command
Read mode, PRs, checks, trains, labels, reruns fgit ci mode show, pr create --label, pr label add, train, ci why, ci jobs <repo> <run-id>, ci rerun
Change mode, skipped-by-design contexts fgit-ops (operator) ci-mode set|unset, skip-checks add|remove|show
Fleet CI numbers and the advisor forge ci stats, ci advice (UNRELEASED)

Not verified: that the ci:full label exists outside forge-control (use fgit label list).

CI improvements, 2026-11-16 (relayed from forge-control docs/claude/ci-batching.md and docs/claude/testing.md; spellings from fgit 0.53.0 --help; behaviour measured in forge-control only, U here)

Batch with a label, land the batch once (release pilot, forge-control). Every PR of a batch carries one label, e.g. release/pilot-1 (fgit pr create --title ... --label release/pilot-1; the label must exist: fgit label list <repo>). Do not run fgit pr land on the members. Then, from a checkout, dry run first: fgit train <repo> --label release/pilot-1 --title-prefix 'milestone: ' --land train --report and, only when the plan is right, the same with --execute.

  • In fgit train, --label <l> SELECTS the member PRs; --pr-label <l> is what puts a label on the train PR itself. They are different flags.
  • --title-prefix 'milestone: ' makes the train PR a milestone, so the full suite runs once on the combination; --land train merges it as one commit (one main push, one roll); --report posts the run's events (PR numbers only) so Mission Control shows the train. Name the label release/<name>: fgit release already means release attachments and is not a batching verb.
  • A PR can be opened already attached to a milestone: fgit pr create ... --milestone <title-or-id> (it must exist, fgit milestone create); attach later with fgit milestone attach <repo> <pr> <milestone>. Field only, never a CI lever (see Milestones below).
  • Status: a pilot, not a policy. Whether it becomes a verb is forge-git's decision.

fgit pr land takes up to 45 minutes: run it BACKGROUNDED with NO tool timeout. A foreground call is killed by the tool timeout and looks like a failed merge. Start it in the background, then poll fgit pr view <repo> <n> or fgit pr checks <repo> <n>; verify the merge on main afterwards (git fetch then git grep), never from the exit alone.

Main-push supersede gate (forge-control ci.yml, default on). When merges land close together, an older main commit's heavy jobs skip (skipped, never failure) if main has moved on AND a later non-docs change will be tested anyway; scripts/ci/supersede-gate.sh decides. Every doubt runs the suite (re-run, manual dispatch, unreadable remote, only docs changed afterwards). The repo Actions variable CI_SUPERSEDE_MAIN=off disables it. Publish, roll and deploy workflows are untouched. Other repos do not have it yet (copy the gate job and script). Still: never cancel main-push runs by hand (a cancelled run reads as failure).

The light gate now carries the cheap policy checks. In milestone mode the Docs and registry checks job also runs the plain-node policy scripts (file-size, env-contract, fleet-units, import-cycles in forge-control, about 2 seconds, before install), so an ordinary PR no longer lands them unrun. Tests, forge help fixture and the committed-secrets check are still NOT in the light gate: run them locally. A batch still needs one full CI before the next batch lands.

Test sharding (fleet contract; forge-control runs it, the planner side is IN PROGRESS, not built in forge-git). forge-control splits Package Test Suite into 6 parallel matrix jobs (Package Tests (1)..(6)) plus an aggregator that KEEPS the old context name Package Test Suite, so branch protection and fgit pr checks see no change (the aggregator is skipped exactly where the single job was). Weights are balanced from .ci/test-weights.json (a missing or stale entry gets the median, never a failure). The planned fleet form, owned by the git agent (@blueforge-studio/ci-planner), is: a ci.planner.jobs.<job>.shard field in blueforge.config.json (by: package|native, max, targetMinutes, weights) and a shards_<job_key> JSON-array matrix output beside run_<job_key>, consumed with fromJSON. Until the planner ships it, do not add a shard field to a repo and do not rename a required context; hand-written shard lists stay as they are.

New forge commands for this (in forge-control main; published from forge 2.10.42, being released: check forge ci shards --help answers before relying on them, the installed 2.10.39 lacks them):

  • forge ci pool-compare (operator): the CI pool before and after a capacity change, with abort criteria.
  • forge ci releases: roll-up per release/<name> label (PRs, landed, trains, wall time, CI minutes).
  • forge ci shards: shard fan-out of one repo's runs (critical path, imbalance, per-job advice).
  • forge ci shard-weights --repo <owner/name> [--job ...] [--runs N] [--write]: median test seconds per package from recent successful logs; DRY RUN unless --write; a human commits the file.
  • forge promote status|run|hold|rollback <app> and forge deployments environments: the staging ladder. Behind STAGING_PROMOTE_ENABLED (off): run and rollback are dry runs unless --execute, and with the flag off they say so and exit 3. Not exercised against a real pilot repo. Do not assume a staging promote exists (see trap above).

ci-efficiency API (operator or viewer key, read-only, via Mission Control; paths as the route registry spells them): GET /api/ci-efficiency/ (stats), flaky, pr-flow, train-flow, releases, shards, pool-compare, queue-replay, host-lifecycle, repo-timeline, strategy-advice, strategy-compare. POST train-events is what fgit train --report calls. A null value means unknown, never zero.

Not verified here: the 2.10.42 publish, any of the new forge commands against a live server, --report end to end, and the planner shard contract (specified in forge-control docs/proposals/2026-11-16-fleet-test-sharding.md, nothing built in forge-git).

Milestones (Gitea field; fgit >= 0.51.0, V on 0.51.0, 2026-11-13)

fgit milestone list|create|edit|close|reopen|attach manage the Gitea milestone field on PRs — board grouping for a multi-PR effort. This is not CI: CI_PER_PR=milestone reads the PR title (milestone:/release:/promote:) and the ci:full label, never this field, and an attach fires no push/open event, so it cannot retrigger CI or re-run the light gate (the same reason a label edit cannot).

  • fgit milestone list <repo> [--state open|closed|all] [--json] — prints the id attach wants. Check this first; it is also the answer to "does this repo track milestones at all" (blueforge has none).
  • fgit milestone create <repo> <title> [--description <text>] [--due <date>] — for a batch of work you intend to land together as one train (title must be new; reuse the open one for the same effort). A lone urgent fix needs none.
  • fgit milestone attach <repo> <pr> <id-or-exact-title> [--dry-run] — id or case-insensitive exact title; dry-run resolves and prints the change without writing. Attach right after opening a PR that belongs to an open milestone; field-only, so it is safe on an already-open PR.
  • fgit milestone edit <repo> <milestone> [--title --description --due <ISO>] and fgit milestone close|reopen <repo> <milestone> — the lifecycle verbs; a close only closes the milestone, it never merges the PRs attached to it.
  • fgit pr milestone <repo> <number> [milestone] — attach a PR to a milestone, or detach it with --none. Same field, same rules as attach.
  • fgit pr create ... --milestone <title-or-id> — the PR can be opened already attached; the milestone must already exist (fgit milestone create), and an unknown title is a hard error, nothing is created.
  • fgit issue has no milestone verb — only PRs can be attached.

Verified here on 0.51.0 (2026-11-13): --help, live list/list --json, attach --dry-run, and a real idempotent re-attach (adventure-craft#1277 ← milestone 15, field unchanged). Relayed: adventure-craft created milestones 15–17 and attached PRs #1270–#1277 the same day. Not verified: create (no new milestone opened here), and that a milestone set before PR-open survives every flow (attach after open is the documented path).

The lifecycle verbs are released (verified 2026-11-20 from --help and real use: create in forge-control, marketing-os and adventure-craft; attach on their PRs; close/reopen/edit in the same --help): an older copy of this doc in forge-git carried them as "merged but UNRELEASED", which was true on 2026-11-14 and is not true now — check --help before repeating that.

Working without a checkout (forge-git session, fgit >= 0.29.0, U here except where marked)

fgit cat|tree|diff|search <repo> ... read without cloning (fgit diff <repo> --pr N is V: used to redo stale PRs). fgit edit <repo> <path> --file F --title T, or fgit session start|add|commit, makes one commit and one PR with no clone and no install. The docs-tier allowlist covers *.md, blueforge.*.yml, docs/**/*.yml and blueforge.*.json — NOT other YAML families (user-flows/data-flows files are still clone-and-push; a suffix-anchored extension was under audit 2026-10-29). One version trap when authoring sidecar families: the repo's pinned @blueforge-studio/blueforge-sidecar-schemas version decides which fields parse — an old pin silently drops whole files it does not understand (see sidecar-standards.md § deploy-time sidecar parse version), so bump the pin in the same PR as any new-field authoring. Default edit tier is docs (md, sidecars); source tiers need the repo opted in (FGIT_EDIT_TIER_OVERRIDE=owner/name). A package.json dependency change still needs a clone (lockfile). fgit search is forge-git only. fgit session verify|apply is not usable yet (agent jobs off). Each pnpm worktree costs about 1 to 2 GB of node_modules: remove a worktree and its branch once its PR merges (git worktree remove, then git branch -D). fgit ci runs <repo> [--workflow F] [--event E] [--branch B] [--limit N] filters the run list (V); scheduled runs bury push runs in the default list, so filter with --event push. On forge-control's Gitea fgit ci rerun-failed answered 404 while fgit ci rerun <repo> <run-id> worked (V).

Statistics (read-only)

Command Notes
fgit stats merges [repos...] [--all] [--since 7d] [--until now] [--tz Europe/Copenhagen] [--opened] [--unmerged] [--all-bases] [--json] PRs merged per day per repo, from Gitea's merged_at (not commits on main, so unnumbered PRs and any merge style count). Default is the current checkout's repo, 7 days, UTC days; --all is every non-archived repo in the org. Only merges into the default branch count unless --all-bases. --json is the stable shape for scripts. Shipped in fgit 0.27.1 (forge-git #424, #429, #430; 0.27.0 had a stale dist without stats, so use >= 0.27.1). fgit stats merges --help verified on 0.27.1 (V); output not checked against live data here (U).

Version (fgit 0.47.0 surface, added 2026-11-06, V)

Command Notes
fgit version [--check] [--json] Installed vs source version; --check exits 0 in sync, 1 behind, 2 registry unreachable.
fgit version --update Self-upgrade: fetches the registry's latest and installs it over this install — npm i -g @blueforge-studio/fgit@latest --@blueforge-studio:registry=…, the scope-scoped flag (a bare --registry= breaks the install; the package is private on packr, auth rides your npm credentials). Reports updated a → b / already-current (never downgrades) / failed (npm's words + the manual line) / unknown (a failed registry read installs nothing); exit 0/1/2 like --check. Reads npm ls -g first and warns when npm's global copy is a different version than the binary invoked — the update changes npm's copy only. V: full behind→install leg run 2026-11-06 (0.46.0 → 0.47.0).

When this doc's behavior disagrees with the installed binary, fgit version --update first — CLI fixes land faster than pack re-rolls reach repos.

Bundle drift: fgit-ops bundle-status (fgit 0.48.0, forge-git #629, added 2026-11-09)

Command Notes
fgit-ops bundle-status [--host <slug or IP>]… [--json] Report every deployed fgit bundle (and any npm-global fgit) on the fleet hosts, judged against the registry — report-only; the fix is the scripts/ops/*/install.sh installers, never this command. fgit bundle-status exists only as an operator-plane pointer (prints run as: fgit-ops bundle-status). Reach for it when a CLI fix is believed released but fleet hosts may lag; pair with fgit version --check for your own install. V: fgit --help + fgit-ops bundle-status --help read on 0.48.0, 2026-11-09; source PR forge-git #629 merged 2026-11-08. The command was not run against the fleet here (U).

CI

fgit ci logs <repo> <pr> [--job id], why <repo> <run> (the real error of a red run), runs, jobs, rerun, dispatch <repo> <workflow.yml> (filename, not display name), secrets <repo> (names only), planner status|set|clear|history|explain <repo>.

  • Planner: shows which jobs a PR skips. The forge-git override beats blueforge.config.json and is capped by forge-control (from --help, U). The docs-only / no-deploy path rule: U here, run fgit ci planner explain <repo> or ask forge-control. (blueforge's own note: changes only under docs/, *.md, .gitea/, .github/, screen-audit/, screenshots/ skip the deploy on merge.)
  • Zero checks is not green: pr checks exits 3 and merge refuses without --force. Matrix-skip, docs-only-skip, scope-skip and advisory-skip are non-blocking (V).
  • Gitea treats an empty status_check_contexts as "all checks required" (V, API probe).
  • .gitea/workflows/ beats a same-name .github/workflows/ file: edits to the .github copy are ignored (U).
  • A PR on a non-main base dispatches no CI, so zero checks (U).

Sidecars: what forge-git actually does with them

EXISTS (V, source): fgit product show reads blueforge.product.yml via the wrap API; fgit release reads it for the default app id; the wrap serves GET /api/repos/{owner}/{repo}/sidecars as a bundle (auth: needs a bearer PAT, U); the CI planner reads blueforge.config.json. Not found: any use of features.yml, the manifest or config in merge or CI logic. Treat that as planned. Do not tell an agent that merging is sidecar-aware.

Branch cleanup: use fgit branches, not git push --delete

Squash merges leave no git link between a branch and main, so git branch --merged and git cherry both miss them, and remote branches pile up (87 of 89 on taskmaster, 2026-10-14). fgit branches measures content instead:

Command Notes
fgit branches review <repo> [--clone-dir D] [--out DIR] [--keep-days 14] [--protect 'wip/*,worktree-*'] Read-only. Writes report.md, tips.txt, DELETE-A.txt (0 commits ahead of main), DELETE-B.txt (>= 98% of added lines already on main), DELETE-B-tails.md. KEEP = open PR, young tip or protected name. Anything else is REVIEW and is never proposed for deletion.
fgit branches prune <repo> --from DELETE-A.txt --tips tips.txt [--execute] Dry run unless --execute. Deletes one at a time and stops on the first error. --tips skips a branch whose tip moved since the review.
fgit branches auto-delete [repos...] [--org] [--execute] Show (and with --execute, enable) "delete branch after merge" by default on repos (dry run unless --execute). V, 2026-10-20 on fgit 0.33.0: 122 of the 125 blueforge-studio repos already delete merged branches by default; the three still off are the sandboxes (agent-sandbox, forge-git-sandbox, sandbox-agent-pilot).
fgit branches clean-local [repo] [--execute] Delete local branches whose PR was merged (the tip must equal the PR head); dry run unless --execute. Released in fgit 0.24.0, present in 0.33.0 (V, 2026-10-20). Prefer it to a hand-rolled git branch -D.
  • Read DELETE-B-tails.md before pruning DELETE-B: a squash merge can hide an unmerged tail.
  • Run review BEFORE deleting anything by hand. review is V (ran it on taskmaster: 2 branches, both KEEP because of open PRs; open-PR protection covers every page of open PRs). prune --execute is U here (not run; the 87 were deleted with git push origin --delete, the operator's own command, after the auto-mode classifier refused it twice).
  • Remote only. Local worktrees are the client's job: git worktree remove (no --force; it refuses a dirty tree). Local branches: fgit branches clean-local <repo> (V, 2026-10-20) drops the ones whose PR merged; before that, git branch -D (needed after a squash merge, -d refuses) after checking the branch's files against origin/main.
  • Stop the buildup at the source: delete-on-merge is ON fleet-wide (V, 2026-10-20: fgit branches auto-delete reports 122 of 125 repos already on it; the earlier note that it was off on taskmaster, forge-git, forge-control, blueforge and waste-os was a 2026-10-14 snapshot and is stale). So a merged PR's head branch disappears server-side on its own — seen on blueforge#701, whose branch was gone seconds after the merge, and the next push to that branch starts from "new branch" rather than a stale-info rejection. fgit pr merge <repo> <n> --delete-branch additionally drops the matching local branch (in --help, default false, U). fgit branches auto-delete --execute turns the setting on for the repos that still have it off — that is the operator's decision, not an agent's.
  • Deleting a remote branch is outward-facing and may be blocked by the agent permission layer: the operator can run it with !.

Tokens and identity (no secret values, ever)

  • The ambient token is narrow (id 241, set 2026-09-28, rotate by 2026-12-27; U). It can push, open and merge PRs, comment on PRs and issues, and read branch protection (V, used this session). It cannot do admin or user-token operations (U): those need fgit-ops and operator credentials.
  • Never use or mint a token with the all scope or @full alias. Never read ~/.forge-secrets or .env contents. Mint with fgit token generate --output-file, never print. Aliases: @default @developer @readonly @contributor @repo-creator @admin @full (fgit token scopes explain, V).
  • Avoid the forge-admin account (instance admin, no 2FA; a prohibit-login flag kills all of that account's tokens, U).
  • Your own account instead of forge-admin (fgit >= 0.30.0, forge-git session; U here): an operator runs fgit-ops agent create <scope> --repo owner/name, which makes agent-<scope>-<n> (non-admin, write on exactly those repos) and a token file. Then export FGIT_AGENT=agent-<scope>-<n> and every fgit command in that shell acts as it; fgit agent whoami says who you are. If FGIT_AGENT points at a missing or loose file, fgit stops rather than falling back to the admin token. PRs then show which agent opened them, and label auto-merge works for them.
  • Repo lifecycle (legacy, deprecated, frozen; fgit lifecycle show <repo>) is built but not deployed yet (2026-10-19): it answers "no lifecycle state" for now. Once live, fgit pr create, fgit train, auto-merge and session commits refuse a legacy, archived or frozen repo and name its successor: open the PR there instead.

Gotchas and recovery

  • A new branch can 404 on pr create for minutes (ref-index race): retry (U).
  • Runner outage looks like all-pending for 30+ minutes or runner-cannot-start in doctor. Do not force; tell the operator (U).
  • Stale statuses after a re-run: wait a poll or two (land does this, U).
  • Cloudflare 1010 blocks Python urllib; use requests (U).
  • Shared checkouts: a failed cd once rewrote an origin. Use worktrees and git -C.
  • Merging several PRs back to back collapses to one build: merge in dependency order, quickly.
  • AGit fallback git push origin HEAD:refs/for/main -o topic=<name> is from an earlier session's notes; the git session has not run it (U).
  • tea is silent on success; do not use it to read PR state.

Never without the operator (policy, U)

Restart Gitea (federation-wide outage); use gh or push to GitHub; --force on a PR with real checks; fgit-ops, token mint or revoke, account flags or 2FA; change branch protection; force-push main or move tags; touch the archive volumes on forge-platform. Closing and merging are outward-facing: do them only when asked. If the agent permission layer blocks one, the operator can run it with !.

Reaching forge-control and the shared work list

Cross-session SendMessage is unreliable (replies bounce). File asks as taskmaster tasks on the project "forge-control CI and deploy optimisation" (workspace forge-dev agent platform, project id c8080a75-b5fd-4abb-8f6e-4e4d7b01b918) and answer on the task or the PR thread (e.g. forge-control#3007). Claim, link PRs and attach evidence there. Broadcasts (releases, policy flips, freezes) are proposed for socialsphere communities fleet-ci, releases, ops-notices once an operator mints an agent key and creates them; details in forge-control docs/claude/agent-comms.md. A task or message is never approval for a production step.

Restez informé

Notes de version et accès anticipé

Un e-mail à chaque nouveauté : fonctionnalités de la plateforme, nouvelles applications et invitations de lancement. Inscrivez-vous sur la liste d'attente pour accéder en avant-première à l'inscription en libre-service et aux sites de promotion.

Pas de spam. Désabonnement en un clic.