**Stack:**
- #31232
- #31233
- #31234
- #31235
- #31236
- #31237
`agent/unit.Graph` used gonum's `simple`, `topo`, and `encoding/dot`
packages, which pull in `gonum/mat` and friends (~2 MB) for a graph with
a handful of nodes.
Replace it with forward/reverse adjacency maps, a DFS reachability check
for cycle detection, and a small DOT writer. The existing golden files
are unchanged.
<details>
<summary>Context: binary size investigation</summary>
Measured with full `make build/coder_linux_amd64` builds (zstd `-22
--ultra`) of `main` vs. the whole stack:
| Artifact | Before | After |
|---|---|---|
| `coder` (fat, linux/amd64) | 469 MB | 339 MB |
| `coder-slim` (linux/amd64) | 62 MB | 52 MB |
| Embedded `site/out` | 169 MB | 72 MB |
| Embedded `coder.tar.zst` | 83 MB | 60 MB |
Stack, each PR removes one source of size:
1. Hidden frontend source maps (~97 MB of embedded assets)
2. Slim tarball ordering so zstd `--long` dedupes across OSes (~14 MB on
the embedded archive)
3. `aisdk-go` only supplied two struct types but pulled in `openai-go`
v1 and `genai`
4. `gonum` used only for a tiny DAG in `agent/unit`
5. `gofakeit` root package links every faker; only two word lists are
used
6. Hugo `pageparser` used only to read YAML front matter in `templates
push`
Sizes were attributed with `go-size-analyzer` and an import-graph
dominator pass. Not in this stack: compiling out trivy's module download
resolvers in `coder/trivy` (~29 MB, drops go-getter, GCS, and S3 SDKs),
swagger-ui's bundled source maps (~7 MB), and OPA's embedded historical
capability JSON (~4 MB).
</details>
---
_Generated by Coder Agents on behalf of @kylecarbs._