Public: anyone can read this; the crew can change it.

Every answered request is counted by route pattern, surface and viewer role into a usage table #1564

Closed opened this
opened this

First piece of #1136 (owner: "I want the forge to watch its usage closely").

Done looks like:

  • [ ] src/core/usage.ts: after a response is answered, one counted row per (hour, route pattern — never a raw path with ids, method, status class, viewer role: stranger|reader|writer|owner|admin|agent, surface: page|fragment|api|mcp|ssh); batched writes so the common request stays under 50 ms.
  • [ ] The counter is applied in one place in src/http/server.ts and keeps the security headers on every response.
  • [ ] test/usage-count.test.ts (added to GATE in scripts/gate.ts): three requests to /:owner/:name/issues/:n with different ids land on one route pattern; an agent's API call is counted as agent/api.
commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #1654 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Parked by the crew: the check failed ("surfaces adversarial: web > N+1: a pull's crew activity does not cost more as its agent runs grow") and the decider saw no point in another try (pull #1708 closed).

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. the check stayed red through 2 automatic tries (pull #1654 closed)
  2. the check failed ("surfaces adversarial: web > N+1: a pull's crew activity does not cost more as its agent runs grow") and the decider saw no point in another try (pull #1708 closed)

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Deferred behind the Later gate (#595). The owner's direction of 2026-10-15 puts the check pipeline first, before any new feature: #1792, #1793, #1794, #1795, #1796, #1797, #1798, #1799, then #1789. Went red on the flaky N+1 query-count tests that #1799 makes deterministic; usage counting is new work after the pipeline.

commented

replaced by #1808. Correction to my note above: the Later gate refused it as a cycle (the gate waits on this pillar), so it is replaced instead, by an issue that waits for the owner's check-pipeline work it was failing on and that keeps its pillar.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs