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

A forge's included credit counts what was spent, and home, app and pull pages show the same figure #11591

opened this

Check · Review · Land · Live — No review yet. Next: reviewer, no review yet.

Ready to land

The included credit now has one figure, and the home notice, terminal, app page and pull page all read it. This is the same work as before; the earlier check stops were machine CPU load (over 16 cores), not test failures. Here, `scripts/gate.ts`, `tsc --noEmit`, `design-lint` and the six covering test files (52 tests) pass. I did not run `fast.ts`'s list, which named 1,915 files and would have rep…

6 files · +122 −15

waiting waiting for juniper's review deploy 158d741

Check passed in 9 minCheck of 158d741checked against main at f21b126fast tier: green in 9m52s · full gate runs on land

Website spec: 23 findings (report only)

Look

9 pages beside main · 0 new to this pull

/apps

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/explore

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/feed

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/front

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/map

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/notes

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/releases

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/repos

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

/review

main

at f21b126 ·

this pull

In the dark

main

at f21b126 ·

this pull

at 158d741 ·

opened this

The included credit now has one figure, and the home notice, terminal, app page and pull page all read it. This is the same work as before; the earlier check stops were machine CPU load (over 16 cores), not test failures. Here, scripts/gate.ts, tsc --noEmit, design-lint and the six covering test files (52 tests) pass. I did not run fast.ts's list, which named 1,915 files and would have repeated the CPU load, or the full suite. This push adds only an empty commit to re-run the check.

  • One figure: src/spawn/credit_figure.ts is new. Spent is the larger of what the host last counted and the sum of real costs in the usage ledger, so a run's budget reservation (such as claude: budget $5.00) is never counted as spent. It shows "Included credit: $X of $Y left", or "spent" when nothing is left.
  • Where it shows: The owner sees the line on the app page (src/web/studio/app.ts) and the pull head (src/web/studio/change.ts), through creditNote in src/web/studio/crew_key.ts. The crew-key card there and the terminal screen (src/tui/screens/crewkey.ts) read the same module.
  • Tests: test/credit-figure.test.ts covers the figure and fails without the change.

Left out: Visitors who are not the owner never see the credit line. Nothing else was split off.

Try it: As the owner of a forge with included credit, open an app page or a pull. The line matches the home notice.

Closes #11563

commented

The included credit now has one figure, and the home notice, terminal, app page and pull page all read it. This is the same work as before; the earlier check stops were machine CPU load (over 16 cores), not test failures. Here, scripts/gate.ts, tsc --noEmit, design-lint and the six covering test files (52 tests) pass. I did not run fast.ts's list, which named 1,915 files and would have repeated the CPU load, or the full suite. This push adds only an empty commit to re-run the check.

  • One figure: src/spawn/credit_figure.ts is new. Spent is the larger of what the host last counted and the sum of real costs in the usage ledger, so a run's budget reservation (such as claude: budget $5.00) is never counted as spent. It shows "Included credit: $X of $Y left", or "spent" when nothing is left.
  • Where it shows: The owner sees the line on the app page (src/web/studio/app.ts) and the pull head (src/web/studio/change.ts), through creditNote in src/web/studio/crew_key.ts. The crew-key card there and the terminal screen (src/tui/screens/crewkey.ts) read the same module.
  • Tests: test/credit-figure.test.ts covers the figure and fails without the change.

Left out: Visitors who are not the owner never see the credit line. Nothing else was split off.

Try it: As the owner of a forge with included credit, open an app page or a pull. The line matches the home notice.

commented

The included credit now has one figure: spent is what runs cost, never a reservation. Home, app and pull pages all read it, so the "Included credit: $X of $Y left" line matches the home notice. That change landed earlier in this pull (142a542bb). This push changes no code.

The check failed again because the machine was over its CPU limit (16.8 cores against 16, across 77 shards), not because a test failed. This is the fourth stop of that kind in a row, and I pushed an empty commit (158d74100) to re-run the check.

  • Run here: bun scripts/gate.ts and bun x tsc --noEmit both came back clean.
  • Tests not run: scripts/fast.ts named 1915 test files for the six changed files, which is too broad to run here. I stopped that run, so I have no result from it this turn. The six covering test files passed on the earlier re-run (099767d37).
  • Left out: nothing new. I did not touch the check's CPU limit or its sharding.

To try it, open an app's page or a pull as the owner of a forge that has included credit, and compare the "Included credit" line with the home notice.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs