fabro/lib/components/fabro-workflow/src
Bryan Helmkamp ee6576cff7
Resolve one Git identity per run and inject it everywhere
A run now resolves a single author and committer identity once, after its
GitHub credentials are selected and before anything can commit, and uses it
for every commit it creates. Resolution order: a complete explicit
`run.git.author`; the run's GitHub App bot account
(`<slug>[bot] <id+slug[bot]@users.noreply.github.com>`); the authenticated
user of the run's PAT; the generic `Fabro <noreply@fabro.sh>`. A partial
explicit author overlays the fields it supplies. Only the selected
credential is consulted; a failed lookup is a setup error. A standalone
installation token falls back to the generic identity with a warning.

The resolved identity is carried on `RunOptions` and `EngineServices`,
recorded as a `git.identity.resolved` event and `RunProjection.git_identity`
so resume reuses it, and exposed through the run state API. Engine
checkpoints and metadata commits read it through `RunOptions::git_author`.
Every workflow execution path receives it as `GIT_AUTHOR_NAME`,
`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`, and `GIT_COMMITTER_EMAIL`, applied
last so it wins over inherited host variables and `[run.environment]`
entries: prepare steps, command stages, native agent shell tools, and ACP
launches. The identity is injected even without a Git origin, and the old
local `git config user.*` write is removed.

fabro-github gains `GET /user` and `/users/{slug}[bot]` lookups with mocked
tests for success, unauthorized, malformed, and transient cases. Real-Git
integration tests commit in the primary checkout, a clone, and a fresh
repository under conflicting local config, `[run.environment]`, and host
variables, and prove concurrent runs do not leak identities. CLI workflow
tests cover host script stages and ACP launch env through `fabro run`.

Docs and generated option metadata now describe the credential-derived
defaults instead of the stale `fabro`/`fabro@local` values.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-12 11:35:46 -06:00
..
event Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
graph Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
handler Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
lifecycle Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
operations Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
pipeline Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
records refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
transforms Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
agent_memory.rs Let pebble discover memory and skills, and name the reuse rules 2026-09-11 19:40:36 -06:00
artifact.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
artifact_snapshot.rs Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
artifact_upload.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
billing_rollup.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
command_log.rs Unify blob hash vocabulary 2026-08-17 13:56:19 -04:00
condition.rs Reuse existing helpers in the for_each fan-out 2026-07-28 18:42:23 -04:00
context.rs Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
error.rs Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
event.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
file_resolver.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
git.rs Harden local RunIntent target observation 2026-08-31 14:08:35 -04:00
git_bridge.rs refactor(github): deduplicate additional-repository access plumbing 2026-08-21 16:31:48 -04:00
git_identity.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
graph.rs Harden succeed failure policy routing 2026-08-26 09:13:04 -04:00
hook_context.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
interview_runtime.rs Run agent stages, Ask Fabro, and fabro exec on pebble's CodingAgent 2026-09-11 14:19:15 -06:00
lib.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
model_fallback.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
node_handler.rs Retire the fabro Sandbox trait for one concrete RunSandbox 2026-09-10 00:14:42 -06:00
outcome.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
pull_request.rs refactor: simplify publish pipeline and collapse duplicated stage errors 2026-07-28 15:09:10 -04:00
retry.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_control.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_dir.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_lookup.rs Move run queries and pull request recovery to SQLite 2026-09-01 14:06:06 -04:00
run_materialization.rs Import lithos-llm types directly instead of through fabro-types 2026-09-10 10:03:08 -06:00
run_metadata.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
run_options.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
run_status.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
runtime_store.rs Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
sandbox_git.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
sandbox_git_runtime.rs Merge origin/main into pebble-agent-loop 2026-09-12 09:40:00 -06:00
services.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
stage_execution.rs Add version-backed run intent creation 2026-08-24 11:55:43 -04:00
stage_scope.rs Merge origin/main into feat/stage-execution-identity-on-resume 2026-07-24 10:07:35 -04:00
steering_hub.rs Run steering over pebble's bus and keep only fabro's attribution 2026-09-11 20:35:31 -06:00
test_support.rs Resolve one Git identity per run and inject it everywhere 2026-09-12 11:35:46 -06:00
web_search.rs Take environment helpers, compaction accounting, and search providers from pebble 2026-09-11 19:51:12 -06:00
workflow_bundle.rs Simplify local RunIntent producer support 2026-08-31 14:08:35 -04:00