fabro/docs
arc-1e68f1[bot] 43f5fb0edb
Inject GitHub App IAT into Sandbox as GITHUB_TOKEN (#7)
This PR adds GitHub App Installation Access Token (IAT) injection into
sandboxes, allowing `gh` CLI and other GitHub-authenticated tools to
work seamlessly inside workflow sandboxes. Workflow authors can declare
required GitHub permissions in `workflow.toml` under a `[github]`
section (e.g., `permissions = { contents = "write", pull_requests =
"read" }`), with project-wide defaults available in `fabro.toml`.
Workflow-level config fully replaces project-level defaults, consistent
with existing `[pull_request]` behavior.

The implementation introduces a `GitHubConfig` struct wired through
`WorkflowRunConfig`, `RunDefaults`, and `ProjectConfig`, with proper
`apply_defaults` (inherit if unset) and `merge_overlay` (replace if
present) semantics. At runtime, a new `mint_github_token()` helper signs
a JWT, resolves the repo's owner/repo from the origin URL, and requests
a scoped IAT which is injected as `GITHUB_TOKEN` into the sandbox
environment. The previously private
`create_installation_access_token_with_permissions` in `fabro-github` is
made public to support this. A preflight check also mints a token during
validation to surface credential or permission issues early.

Comprehensive tests cover TOML parsing with and without `[github]`,
default inheritance, workflow-over-default precedence, and overlay merge
semantics for `RunDefaults`.

### Fabro Details

<details>
<summary>Ran 7 stages in 27m 15s for $5.88</summary>

| Stage | Duration | Cost | Retries |
|---|---|---|---|
| start | 0s | – | 0 |
| toolchain | 0s | – | 0 |
| preflight_compile | 0s | – | 0 |
| preflight_lint | 0s | – | 0 |
| implement | 0s | $3.79 | 0 |
| simplify | 0s | $2.09 | 0 |
| verify | 0s | – | 0 |
| **Total** | **27m 15s** | **$5.88** | **0** |

</details>

<details>
<summary>Ran <code>ImplementAndSimplify.fabro</code> (10 nodes and 13
edges)</summary>

```dot
digraph ImplementAndSimplify {
    graph [
        goal="Implement and simplify",
        model_stylesheet="
            * { backend: api; model: claude-opus-4-6;}
        "
    ]
    rankdir=LR

    start [shape=Mdiamond, label="Start"]
    exit  [shape=Msquare, label="Exit"]

    toolchain         [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
    preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check 2>&1", max_retries=0]
    preflight_lint    [label="Preflight Lint", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1", max_retries=0]
    fix_lints         [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
    implement         [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan."]
    simplify          [label="Simplify", prompt="@prompts/simplify.md"]
    verify            [label="Verify", shape=parallelogram, script="cargo clippy -- -D warnings 2>&1 && cargo test 2>&1", goal_gate=true, retry_target="fixup"]
    fixup             [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]

    start -> toolchain
    toolchain -> preflight_compile [condition="outcome=success"]
    toolchain -> exit
    preflight_compile -> preflight_lint [condition="outcome=success"]
    preflight_compile -> exit
    preflight_lint -> implement [condition="outcome=success"]
    preflight_lint -> fix_lints
    fix_lints -> preflight_lint
    implement -> simplify -> verify
    verify -> exit  [condition="outcome=success"]
    verify -> fixup
    fixup -> verify
}

```

</details>

⚒️ Generated with [Fabro](https://fabro.sh)

---------

Co-authored-by: Fabro <noreply@fabro.sh>
Co-authored-by: Claude <claude@anthropic.com>
2026-03-15 18:24:30 -04:00
..
administration Reorganize docs nav: merge Server Mode into Deployment, move Comparison and Dark Factory 2026-03-14 15:39:08 -04:00
agents Rename metadata branch from refs/fabro/{run_id} to fabro/meta/{run_id} (#3) 2026-03-15 17:40:51 -04:00
api-reference Inject GitHub App IAT into Sandbox as GITHUB_TOKEN (#7) 2026-03-15 18:24:30 -04:00
changelog Update docs for rewind, workflow list, daytona, and validation 2026-03-14 13:51:57 -04:00
core-concepts Reorganize docs nav: merge Server Mode into Deployment, move Comparison and Dark Factory 2026-03-14 15:39:08 -04:00
deployment docs: rename Arc to Fabro throughout docs 2026-03-12 10:53:44 -04:00
examples Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
execution Rename metadata branch from refs/fabro/{run_id} to fabro/meta/{run_id} (#3) 2026-03-15 17:40:51 -04:00
getting-started commas 2026-03-15 12:31:08 -04:00
human-tools Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
images Improve workflow diagram with LR layout and docs styling 2026-03-14 12:10:35 -04:00
integrations Update docs for rewind, workflow list, daytona, and validation 2026-03-14 13:51:57 -04:00
languages Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
logo Fix logo SVG viewBox clipping the right edge of the O 2026-03-14 14:11:36 -04:00
reference Add instability warning to run directory docs 2026-03-14 16:11:24 -04:00
tutorials Update docs, frontend, marketing, and skills for .fabro extension 2026-03-13 22:38:25 -04:00
workflows Update docs for rewind, workflow list, daytona, and validation 2026-03-14 13:51:57 -04:00
.mintignore Fix Mintlify dev server: valid navbar URL and ignore AGENTS.md 2026-03-05 16:29:50 -05:00
docs.json Reorganize docs nav: merge Server Mode into Deployment, move Comparison and Dark Factory 2026-03-14 15:39:08 -04:00
favicon.svg Rebrand docs site from Arc to Fabro 2026-03-11 21:27:58 -04:00