---
title: "Report Code Graph Freshness"
method: PUT
path: "/api/rooster/code-graph/freshness"
tags: ["rooster"]
---

# Report Code Graph Freshness

`PUT /api/rooster/code-graph/freshness`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/rooster/code-graph/freshness`
- Auth: none declared

The code map's job says how stale its index is, every pass. Feeds the audit check `code_graph_stale`
(issue #7220, OPEN_ITEMS CODEGRAPH-1). Called by `tools/rooster_worker/code_graph.report_freshness` on the same
`rooster:seat:probe` grant the brain's own presence report uses (`/worker/presence`): both are the container
reporting about itself, and a new grant would need its service token minted by hand. Ruling
`docs/01_decisions/rulings/2026-11-02-the-code-map-reports-how-stale-it-is.md`.

## Request body

- CodeGraphFreshnessReport: How fresh the `rooster` container's code map is, posted after every pass. See `settings_service.CODE_GRAPH_FRESHNESS`. Every field is optional: a container that has never indexed sends None.
  - `indexed_sha` string, nullable
  - `indexed_at` string, nullable
  - `main_sha` string, nullable
  - `error` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-03** `3ff3353d67bc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/changes/api/rooster/code-graph/freshness/put.md)

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
