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

The daily count: one line a day in the check log of how many pulls had their pages inferred, named by the builder, or left without (#13362 ask 4) #13433

opened this

Merged 20d 8h ago, live in production

The check log now gets one line a day saying how many pulls had their look pages inferred, named, or left without, for example [checks] look pages 2026-11-14: 3 inferred, 1 named, 2 none. tsc is clean, bun scripts/gate.ts printed no refusal and the five test files I ran pass.

Notes

opened this

The check log now gets one line a day saying how many pulls had their look pages inferred, named, or left without, for example [checks] look pages 2026-11-14: 3 inferred, 1 named, 2 none. tsc is clean, bun scripts/gate.ts printed no refusal and the five test files I ran pass. I did not run the full suite or try it against a live gate.

What changed

  • src/checks/look_count.ts is new. After each gate, landing.ts reads the gate's first look pages (…) note and adds it to today's tally. The tally lives in checks/look_pages.json under the data directory, with 30 days kept.
  • A finished day is logged once, when the next gate arrives on a later day. A gate with no look note still triggers it.
  • src/kernel/look_rule.ts now prints a look pages (named) note when a commit's Looks: line names a page of app.looks. Before, that case printed nothing, so "named" could not be counted. It is still only a note and never a refusal. I changed the named assertions in test/look-rule.test.ts to match.
  • New test/look-count.test.ts and a new docs/features/look-count.md, listed in the features index.

Left out

  • Pulls with a No look: waiver, or with no rendered change, print no note and are not counted.
  • The tally is per forge, not per repository.
  • There is no page or terminal screen for the count; the commit says No door and No look.

Try it Push a pull that edits src/web/. On the next day's first gate, the check log shows the line for the day before.

Closes #13372

4 earlier comments
commented

The check log now gets one line a day saying how many pulls had their look pages inferred, named, or left without, for example [checks] look pages 2026-11-14: 3 inferred, 1 named, 2 none. tsc is clean, bun scripts/gate.ts printed no refusal and the five test files I ran pass. I did not run the full suite or try it against a live gate.

What changed

  • src/checks/look_count.ts is new. After each gate, landing.ts reads the gate's first look pages (…) note and adds it to today's tally. The tally lives in checks/look_pages.json under the data directory, with 30 days kept.
  • A finished day is logged once, when the next gate arrives on a later day. A gate with no look note still triggers it.
  • src/kernel/look_rule.ts now prints a look pages (named) note when a commit's Looks: line names a page of app.looks. Before, that case printed nothing, so "named" could not be counted. It is still only a note and never a refusal. I changed the named assertions in test/look-rule.test.ts to match.
  • New test/look-count.test.ts and a new docs/features/look-count.md, listed in the features index.

Left out

  • Pulls with a No look: waiver, or with no rendered change, print no note and are not counted.
  • The tally is per forge, not per repository.
  • There is no page or terminal screen for the count; the commit says No door and No look.

Try it Push a pull that edits src/web/. On the next day's first gate, the check log shows the line for the day before.

commented

I found no defect in the pull, so I'm pushing nothing. Before I pushed, tsc was clean, bun scripts/gate.ts printed no refusal, and the five test files covering the change passed. I haven't seen a failing check recorded for the head, so I have nothing to fix. I'm leaving it for the forge's re-check, and if that goes red on a named test I'll fix it when I get the assertion.

commented

I merged main into the branch and pushed it. Git reported no conflicts, so src/tui/screens/waves.ts and test/wave-empty.test.ts merged without any manual resolution.

I ran the gate with --fix, which changed nothing. tsc --noEmit is clean. I ran the two test files this branch changes against main (13 tests); all pass. I did not run the full suite, since the forge runs it on push.

The change itself is unchanged: the check log still says once a day how many pulls had their look pages inferred, named, or left without.

commented

The daily look-pages count now counts each pull head once. I fixed the other three points in the same push. Locally the look-count tests (6) pass, tsc --noEmit is clean, and I ran gate --fix, which only rewrapped comments. I did not run the wider suite.

  • Once per pull and head: the count is keyed on repo@commitOid, kept in the day's record. Re-checks and batches of a head no longer add to it. A new push is a new head and counts again, so a red-then-green pair on two different commits still counts twice. I kept the "pulls" wording, since the line counts pull heads.
  • Counting can't affect landing: gateVerdict now calls noteLookPages, which catches any error and logs one [checks] look pages not counted: … line. A disk error there can no longer stop a verdict from being recorded.
  • Tests:
    • The corrupt-file test uses writeFileSync and asserts the tally restarts.
    • New tests cover once-per-head counting and a failing count not throwing.
    • A wiring test calls gateVerdict (now exported) and checks it counts once per head and survives a broken data directory. It fails if the call is removed.
  • Small: I dropped the marked alias and split the long line in read().

Direction: I'm not claiming a pipeline item for this. It is observability for #13362 ask 4, and a person should decide whether to hold it for the pipeline items. I have not changed anything on that point.

commented

The gate failed on as never casts in my wiring test. That test now builds a real app, user, repo and GateDone instead. I pushed the fix as 4ef145d20.

The daily look-pages count itself is unchanged from my last message:

  • Counting: each pull head is counted once, keyed on repo@commitOid.
  • Failure handling: a counting failure is caught and logged as one line, so it can't affect a verdict.
  • Wiring test: gateVerdict is still tested against a working data directory and against a broken one.

scripts/gate.ts now prints nothing, tsc --noEmit is clean, and the 6 look-count tests pass. I did not run the wider suite; the forge's check does that on this push.

I'm still not claiming a pipeline item for this. It is observability for #13362 ask 4, and a person should decide whether to hold it for the pipeline items.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs