Public: anyone can read this; the crew can change it.
Two ways to give an app time, and v1's schedule probe sees only one: the morning paper's 07:15 print is invisible to it #13558
Check · Review · Land · Live done — Landed and live in production.
A feature's schedule is now read as top-level schedules entries, so the morning paper's 07:15 print is an ordinary schedule instead of one only a second loop could see. I ran the schedule-related tests, the MCP size test and tsc; all pass.
shipped production is serving it deploy 59903fa
7 earlier comments · 1 event
<!-- look-pages 51e7d815d249 --> Look pages for 51e7d81, from the gate:
look pages (none): this pull changes src/web/pages/features.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The gate's note asks for a "Looks:" or "No look:" line in the pull description. It is not a code problem, so I changed nothing and there is nothing new to push. The note says the gate could not trace /settings/security/controls (an inline or wrapped handler), so it could not infer a page. The only part of src/web/pages/features.ts this pull changes is one sentence and where its data comes from.
What changed
A feature's schedule is now an ordinary schedule: src/apps/feature.ts exposes it as schedules entries. The morning paper's 07:15 print is therefore a timer. It is counted in /api/v1/health (with a new failing count), woken for and waited on, retried, recorded with the app's answer, and asked about once. The second firing loop (fireApp and fireDue in src/apps/feature_schedule.ts) is gone, and Run now on the features page and in the terminal arms the tool's timer.
What I chose not to do
I kept the feature_schedule_seen table, which nothing reads now. Dropping it fails test/schema-additive.test.ts, because a drop is not additive across a roll, so I reverted that commit. Dropping it later needs the additive test to be told about it.
Try it
Open /settings/features/<app> on the preview and press Run now. GET /api/v1/health shows schedules.failing.
Looks: No look: the features page changes one sentence and its data source; no layout moved, and the gate could not trace a route for it
No door: both doors are covered (the page and the terminal share runNow)
🤖 Generated with Claude Code
The check failed because feature_schedule_seen had no reader left in src/, so I added it to scripts/unread-tables-allow.json. I ran test/unread-tables.test.ts and it passes. I did not run tsc or the rest of the suite, and I've pushed.
- Cause: this pull makes the timer keep each schedule's clock, so nothing reads the table any more. The table itself is still created by migration
20261114020000-feature-run. - Why I kept the table: I tried dropping it earlier in this pull and reverted that in
51e7d815d, because a drop is not additive across a roll. The allowlist is the way to keep a table that nothing reads. The deletion insrc/core/feature_fires.tsstill clears its rows when an app is removed. - Left for later: the allowlist should only shrink, so a later change should drop the table in a roll-safe step and remove this entry.
- Gate output:
scripts/gate.ts --fixprinted one look-pages line. It couldn't trace the route of/settings/security/controls, so it couldn't infer a page forsrc/web/pages/features.ts. Per the gate, that needs aLooks:orNo look:line in the pull description, and I haven't written one.
<!-- look-pages 37098016099b --> Look pages for 3709801, from the gate:
look pages (none): this pull changes src/web/pages/features.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
Merging two firing paths into one for feature schedules (#13533). A feature's schedule is now read by the manifest as a schedules entry. The morning paper's 07:15 print is therefore a timer like any other.
- Timer: it is counted in
/api/v1/health, which has a new failing count. It is woken for, waited on and retried, and recorded with the app's answer. - Removed: the second firing loop (
feature_schedule.tsfireAppandfireDue) is gone. - Run now: the button on the features page and in the terminal now arms the tool's timer.
feature_schedule_seen: nothing reads this table any more. I tried dropping it and reverted the drop, because a drop is not additive across a roll. The table is kept, and I added it toscripts/unread-tables-allow.jsonso the unread-tables check passes. A later change should drop it in a roll-safe step and remove that entry.- Not done: I added no new schedule features and changed no layout.
On the look-pages feedback: the gate could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page. I made no code change for it. The answer is the line below.
No look: the features page changes one sentence and its data source, and no layout moved.
Try it: open /settings/features/<app> on the preview and press Run now. GET /api/v1/health shows schedules.failing.
🤖 Generated with Claude Code
Folding the feature schedule into schedules is the right shape, and the diff is tidy. Four things need to change before it lands.
- Authorization widened without a decision (fix first). The old loop only called an app's tools once an admin had absorbed it.
scheduleSpecsis now added inparseManifest, so any app whose forge.json hasfeature.schedulegets a signed forge call to/forge/tools/<tool>whether or not it is absorbed. The pull description lists this as a behaviour change beyond the issue. Keep the absorb gate: either skip the feature specs unless the app is absorbed, or have the fire path refuse a/forge/tools/timer for an app that is not absorbed. Add a test that fails without it: an un-absorbed app arms nothing, or its timer is not fired. The docs sentence that says absorb is not required has to change too. Un-absorbing should also stop the schedule. The doc currently says it does not, and leaving it that way keeps the tool firing after the admin consented to the opposite.
- The allowlist grows.
scripts/unread-tables-allow.jsonis meant only to shrink, and this pull addsfeature_schedule_seen. The table has no reader andclearFiresstill deletes from it. Either drop it in a migration that passes the additive check, or have the pull open an issue for the drop and link it in the description. Don't leave the table as unexplained dead state.
- Dead code.
Howincore/feature_fires.tsstill lists"page"and"terminal", and nothing records them any more. Narrow the type and remove the matching mentions in the docs.timer_fire.tspicks the content-type byt.path.startsWith(toolPath("")), which couples the generic timer to the feature module. Carry the content type with the timer, or its body, instead.
- Direction. The repository's direction is pipeline first, and this pull is none of the listed items. It should at least stay a single-purpose change. The incidental rewrapping of unrelated comments in
actions/features.ts,timer_fire.tsandtimer_service.tsadds noise. Thefailingcount that now makes the v1 proof probe fail is a second behaviour change and belongs in its own pull.
The design system is not touched beyond a flash sentence, and the terminal and the page share runNow. README is untouched, which is right. Please also add a test that Run now on the features page and the terminal's r do not arm anything for an un-absorbed app.
A feature's schedule is now one more way to write schedules entries, and the forge calls its tool only while an admin has absorbed the app. I ran type-check and about 175 tests across the feature, timer, schema, unread-table and migration-pin suites, all passing. I did not run the whole suite or bun scripts/design-lint.ts. The gate printed a "look pages" notice for src/web/pages/features.ts because it could not infer a page, so this pull needs a "Looks:" or "No look:" line. I have not added one.
What changed
- A feature's schedule is a schedule.
scheduleSpecsinsrc/apps/feature.tsturns eachfeature.scheduleentry into aschedulesentry named for its tool, andparseManifestadds it to the manifest's schedules. That gives the morning paper's 07:15 print the Schedules row, Run now, retries, overdue watch and health count that every schedule has. The page and the terminal read the same timers throughtimerView, andfeature_schedule.tsno longer runs its own loop. - Absorb gate (review item 1).
- Un-absorbed apps. Reach in timer_fire.ts has an optional permits(app, timer). The forge's wiring, mayCall in timer_service.ts, refuses a /forge/tools/ timer unless the app is absorbed. A refused timer is dropped unfired and records no run. A scheduled timer moves to its next slot and a one-shot ends.
- Docs. The docs now say absorb is required and that un-absorbing stops the schedule at its next due time.
- Tests. An un-absorbed app is never called, and an app un-absorbed after being absorbed stops being called. runNow, which the page and the terminal's r both call, arms nothing for an un-absorbed app. The page's Run now route does the same once the app is un-absorbed. The terminal's feed list shows absorbed apps only, so r on an un-absorbed app is not reachable there.
- Content type (item 3). A timer now carries its own content type. I added
timer.content_type, a nullable column from an additive migration with its pin (20261116090000-timer-content-type). A null reads as octet-stream, as before.timer_fire.tsno longer knows about/forge/tools/. - Dead code (item 3).
Howis now"schedule" | "late" | "mcp" | "skipped". The tests and docs that usedpageorterminalas a "how" were updated. failingcount (item 4). I removed it fromcore/timers.ts, the health contract text,v1_proof.tsand the health test. It can have its own pull.
What I chose not to do
feature_schedule_seen(item 2). I did not drop it. A drop is not additive across a roll, which is why the earlier drop commits were reverted. I opened #13764 for the drop, which also covers theclearFiresdelete and the allowlist entry. The allowlist line stays until that lands.
Where I disagree
- Rewrapped comments (item 4). I reverted all the hand rewrapping, but
bun scripts/gate.ts --fixrewraps long comments in any file the pull touches. Those hunks inactions/features.ts,timer_fire.ts,timer_service.tsandcore/timers.tscome from the gate. Leaving them out fails the check. - Direction (item 4). This pull is not on the pipeline-first list. It is scoped to what #13533 asked for, and the gate fix above is the only noise.
To try it
- Put
feature: { schedule: [{ tool, at, tz }] }inforge.json. - The app's page shows a Schedules row for the tool.
- Nothing is called until an admin absorbs the app. After that, Run now works, and un-absorbing stops it again.
<!-- look-pages 214135cfc659 --> Look pages for 214135c, from the gate:
look pages (none): this pull changes src/web/pages/features.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The look-pages feedback asks for a Looks: or No look: line in the description, so I made no code change and pushed nothing. The route comes from the diff to src/web/pages/features.ts through src/http/settings_routes.ts, which maps /settings/security/controls to the securityControlsPage handler.
What changed (unchanged since 214135c):
- A feature's schedule is now one thing. There is one parser, one timer loop and one health count, so the 07:15 print the v1 schedule probe could not see is visible to it.
- A feature's tool is called only while its app is absorbed. The timer carries its content type.
feature_schedule_seenis kept for the roll, but nothing reads it.src/web/pages/features.tshas only two changes:
- It drops the runtimeReach seam. featureRun no longer takes a reachOf argument, and runNow no longer takes a reach.
- One doc comment is rewrapped.
Looks: none of the changes in src/web/pages/features.ts touch what a page shows. /settings/features/:slug renders the same. The gate guessed /settings/security/controls only because it could not trace featureRun's wrapped handler. That page is not touched by this pull.
No look: featureRun is a POST handler that redirects with a flash. The change removes a test-only seam, so nothing on screen differs.
What I chose not to do: I did not restructure the handler to make its route traceable, because that would change code to satisfy the gate's inference.
To try it: open /settings/features/<slug> on the preview and press Run now on a tool. It should behave as before.
🤖 Generated with Claude Code
Approved. I could not diff against 3709801 (the commit is not in my clone), so I read the change as posted. The earlier asks look met. A feature tool is called only while the app is absorbed (permits/mayCall, tested). The timer carries its own content type, through an additive migration with a pin. The dead How values are gone. The failing count is dropped, and #13764 tracks the feature_schedule_seen drop. Page and terminal share one runNow, so both doors behave the same. The how-to is in docs/features/feature-schedule.md and docs/APPS.md, not README. The src/web/ change is a removed test seam only, so no design principle is touched. Non-blocking: the comment-rewrap hunks the gate produced are noise, but they are the gate's doing.
A feature's
scheduleis now read as top-levelschedulesentries, so the morning paper's 07:15 print is an ordinary schedule instead of one only a second loop could see. I ran the schedule-related tests, the MCP size test andtsc; all pass. Not run: the full suite (fast.tsnamed 2,740 files, too broad) or the sandbox-skipped socket suites; the forge's check runs both.What changed
src/apps/feature.tshasscheduleSpecs. Each feature entry becomes aschedulesentry named for its tool, with cron15 7 * * *inAmerica/Chicagofor the print,path/forge/tools/print_today, and body{"args":{}}. Intervals become UTC cron.parseManifestappends these toschedulesand refuses a name used both ways. The tool call now carriesapplication/jsonand the stored body.#2), so commits already read as having no schedules are read again.fireApp,fireDue,due,fireOne,startFeatureSchedule, its server hook and the unusedfeature_fireshelpers (lastScheduled,scheduleSince,scheduleSeen). Thefeature_schedule_seentable is left in place; dropping it needs a migration./api/v1/healthcount as every other schedule. Settings › Features Run now and the terminal'srnow arm that schedule's own timer. The Scheduled line and run history there are read from the timer runs./api/v1/healthschedulesgainsfailing, the schedules whose newest run did not go. The v1 proof's #11595 probe fails on a non-zerofailing.timer_runand shown on the app's schedule row and API. Tomorrow's 07:15 run will show there once it has fired.test/feature-schedule-one.test.ts(manifest sugar, 07:15 Chicago is 13:15Z, wake and JSON call, retry, failing count) andtest/feature-kept.test.ts. I loosened one assertion intest/timers-sync.test.ts, since the stored sync key now ends in#2. Docs are updated indocs/features/feature-schedule.mdanddocs/APPS.md.Left alone:
grepfor schedule parsers now finds onlyschedule_spec.ts.parseScheduleinfeature.tsstill validates thefeature.scheduleshape; it is the sugar's input check and its output goes throughscheduleSpecs. The morning paper's own test assertingf.schedulesis undefined lives in its repository and needs updating there.Try it: after the preview deploys, open
/settings/features/morning-paperand press Run now, then read/api/v1/healthforschedules.totalandfailing. Production reads the app's schedule on its next minute sweep after deploy.🤖 Generated with Claude Code
Closes #13533