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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:228tok7cq4 is past its budget: trevato/forge: "every registered /api/v1 route has an OpenAPI row or is listed as not yet described" failed on 3 pulls … #8183

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The OpenAPI coverage tests are now listed in `TREE_GATES` (`src/checks/shared_red.ts`). Three pulls failing one of them in an hour is now each pull's own red, not a shared "lane's red" card.

shipped production is serving it deploy 119f4d2

opened this

The OpenAPI coverage tests are now listed in TREE_GATES (src/checks/shared_red.ts). Three pulls failing one of them in an hour is now each pull's own red, not a shared "lane's red" card.

Cause. "every registered /api/v1 route has an OpenAPI row or is listed as not yet described" only reads the source: it fails the pull that adds an /api/v1 route without a row under src/contract/openapi/routes/. It ran in 160 ms here, and nothing in it depends on the machine's load, disk or clock. It passes on every main commit from 02:38 to 05:38 today, so main never failed it. The likely reason three pulls failed it in an hour is the run of "GET /api/v1/… as MCP x does" pulls, each adding a route before describing it. Calling that shared hid a real red from each of those pulls and filed this issue as a flake. That is the same mistake #2868 and #7809 fixed for the design check and reserved names.

Changed

  • The gates: TREE_GATES gets the coverage test and its sibling "the gathered routes > the index is current: run bun scripts/openapi-routes.ts", which fails the same way when a pull adds a route file without regenerating the index.
  • New test: in test/shared-red.test.ts, three pulls failing either gate leave the fourth as its own red, and no shared card appears. It fails without the change to shared_red.ts.
  • Test helper fix: suiteNames in that test file used to skip tests that sit outside any describe. The coverage test is one of those, so the check that every gate names an existing test could not see it. It now records top-level tests too, with a one-line test of its own.

Not done: the coverage test itself is unchanged, since its verdict already depends only on the code. The other two tests in that file ("NOT_YET_DESCRIBED …") are not added to the list: NOT_YET_DESCRIBED is empty, so no pull trips them today.

Checks run: bun scripts/gate.ts and bun x tsc --noEmit are clean. These test files pass: shared-red, crew-shared-red, sentinel, vitals-degraded, flake, flow-vitals, red-main, openapi-coverage, openapi-routes. scripts/fast.ts named 190 files (about 17 minutes, over its 5-minute budget), so I ran these directly; the forge's full check covers the rest.

To try it: bun test test/shared-red.test.ts. Once deployed, the shared:…:228tok7cq4 card should leave the degraded list because the classifier no longer counts it, not because the hour ran out.

🤖 Generated with Claude Code

Closes #8140

commented

The OpenAPI coverage tests are now listed in TREE_GATES (src/checks/shared_red.ts). Three pulls failing one of them in an hour is now each pull's own red, not a shared "lane's red" card.

Cause. "every registered /api/v1 route has an OpenAPI row or is listed as not yet described" only reads the source: it fails the pull that adds an /api/v1 route without a row under src/contract/openapi/routes/. It ran in 160 ms here, and nothing in it depends on the machine's load, disk or clock. It passes on every main commit from 02:38 to 05:38 today, so main never failed it. The likely reason three pulls failed it in an hour is the run of "GET /api/v1/… as MCP x does" pulls, each adding a route before describing it. Calling that shared hid a real red from each of those pulls and filed this issue as a flake. That is the same mistake #2868 and #7809 fixed for the design check and reserved names.

Changed

  • The gates: TREE_GATES gets the coverage test and its sibling "the gathered routes > the index is current: run bun scripts/openapi-routes.ts", which fails the same way when a pull adds a route file without regenerating the index.
  • New test: in test/shared-red.test.ts, three pulls failing either gate leave the fourth as its own red, and no shared card appears. It fails without the change to shared_red.ts.
  • Test helper fix: suiteNames in that test file used to skip tests that sit outside any describe. The coverage test is one of those, so the check that every gate names an existing test could not see it. It now records top-level tests too, with a one-line test of its own.

Not done: the coverage test itself is unchanged, since its verdict already depends only on the code. The other two tests in that file ("NOT_YET_DESCRIBED …") are not added to the list: NOT_YET_DESCRIBED is empty, so no pull trips them today.

Checks run: bun scripts/gate.ts and bun x tsc --noEmit are clean. These test files pass: shared-red, crew-shared-red, sentinel, vitals-degraded, flake, flow-vitals, red-main, openapi-coverage, openapi-routes. scripts/fast.ts named 190 files (about 17 minutes, over its 5-minute budget), so I ran these directly; the forge's full check covers the rest.

To try it: bun test test/shared-red.test.ts. Once deployed, the shared:…:228tok7cq4 card should leave the degraded list because the classifier no longer counts it, not because the hour ran out.

🤖 Generated with Claude Code

Approved

Both gate names match real tests (test/openapi-coverage.test.ts:52, test/openapi-routes.test.ts:47). The new test fails without the change. The suiteNames fix is needed so the existence check can see the top-level coverage test. It is small, single-purpose and adds no dependency. This is server-side classification with no UI, so there is nothing to see in the preview. Two things I would do next: (1) make the reason a pull is red say "route has no OpenAPI row" in the pull's own red, so the builder knows what to run. (2) Check whether the mcp-tools index test (test/mcp-tools.test.ts:44) has the same shape and belongs in TREE_GATES.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs