You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kernel: when waiting becomes the Maintainer's to see #36
Part of the epic "Epic: nine gaps in the Kernel, found in review".
Why. A required Lens that never reports leaves an item waiting for ever, and it is never shown as needing the Maintainer. stale_after_minutes in the Lifecycle is demanded by the check and read by nothing.
Done when
The Maintainer rules: after how long, measured from what, a wait is stale.
The Kernel reads the limit from the Lifecycle data and gives the attention class stale past it. The boundary test is written first.
The same rule serves the issue Lifecycle's limits when that is declared.
#36 Kernel: when waiting becomes the Maintainer's to see
Working ruling (Solution Architect, delegated). The Maintainer may overturn it in review.
Question. After how long, and measured from what, does a wait become stale?
Options.
Use the Lifecycle's stale_after_minutes for the State, measured from the Work item's last movement, and only while passes were running. The result is the attention class stale; the outcome does not change.
As option 1, but as a Hold. A Lens that reports late would then need a person to release the item.
A deadline for each Lens, counted from the push. This covers verifying only, so converged and queued could still stall unseen.
§8.4 as written: an item is stale when it was not evaluated while passes ran. Every pass evaluates every item, so this is never true.
Ruling: 1. FR-3 says a Work item past its State's limit is escalated, and UJ-2 and NFR-5 need the answer to show on the item. State is never stored (decision 0002), so "since it entered this State" is derived as the newest of:
last_push_at;
each check's completion time;
the time of each review and each thread;
last_writer_action_at;
the item's run records.
§4.6 says a poller outage is one health alert, not one per item. So the count starts no earlier than passes_since, a value in the context: the start of the current unbroken chain of passes, taken from the poller's own run records. If it is unreadable it is ignored, which shows more, never less. stale applies only to the attention classes review and ready: a needs_you item already reaches a person, and a working item is moving.
Acceptance criteria.
test_a_lens_that_never_reports_is_stale: past the limit, the attention is stale and the outcome is unchanged; one minute before the limit it is review. The same holds for converged and queued.
test_staleness_counts_only_while_passes_run and test_needs_you_is_never_stale.
Checks gain a completed_at fact, in the facts schema, the example, tests/support.py and sim/world.py, with a counter-example. stale is added to the Decision schema's attention classes. The limits reach the Kernel with the configuration, read from lifecycle/pull_request.json and never copied into config/defaults.json. The function accepts any Lifecycle, so the issue Lifecycle can use it.
A mutant for the limit comparison and one for passes_since.
Documents: design §4.1, §4.6, §8.4 and I-1.
Confidence. Medium. I would rule otherwise if trial P-8 shows that reading check completion times is too expensive.
Needs the Maintainer? No. The minutes are placeholders under §6.1.
Working ruling: what counts as movement, and what is never stale
Working ruling (delegated), from the review and security passes on the branch for this story. The Maintainer may overturn it in review.
What was found. Counting every review and every thread as movement means anyone can keep a stalled item from going stale by commenting, which shows less, never more. A time in the future, or one with an impossible field, does the same. And under a Pause or a capacity deferral, every waiting item goes stale at once.
Ruling.
Movement is only what a writer, a Lens or the Factory does. That means a push; a required check's completion; a review or thread by a person with write access or by a Lens's App; a gating thread; last_writer_action_at; and the item's run records. A stranger's comment, or a check that is not required, does not restart the count. This is the same rule I-28 applies to attempts.
A time is read only when it is a real moment no later than now. The month is 1 to 12, the day fits the month, the hour is under 24, and the minute and second are under 60. The schema's time pattern says the same. Any other time is passed over, which shows more, never less.
A deferral that holds the whole scope is never stale.paused, pause_unreadable, capacity, capacity_unreadable, concurrency and a model provider's deferral are each one cause, and health reports each once (§4.6). The item keeps the attention it had. A Lens that stays silent once the deferral ends goes stale as usual.
Confidence. High on 1 and 2. Medium on 3: if trial P-8 or the first weeks show a Pause hiding a Lens that had already stalled, it should count from before the Pause.
Activity
don-petry commentedon Oct 14, 2026
#36 Kernel: when waiting becomes the Maintainer's to see
Working ruling (Solution Architect, delegated). The Maintainer may overturn it in review.
Question. After how long, and measured from what, does a wait become
stale?Options.
stale_after_minutesfor the State, measured from the Work item's last movement, and only while passes were running. The result is the attention classstale; the outcome does not change.verifyingonly, soconvergedandqueuedcould still stall unseen.Ruling: 1. FR-3 says a Work item past its State's limit is escalated, and UJ-2 and NFR-5 need the answer to show on the item. State is never stored (decision 0002), so "since it entered this State" is derived as the newest of:
last_push_at;last_writer_action_at;§4.6 says a poller outage is one health alert, not one per item. So the count starts no earlier than
passes_since, a value in the context: the start of the current unbroken chain of passes, taken from the poller's own run records. If it is unreadable it is ignored, which shows more, never less.staleapplies only to the attention classesreviewandready: aneeds_youitem already reaches a person, and aworkingitem is moving.Acceptance criteria.
test_a_lens_that_never_reports_is_stale: past the limit, the attention isstaleand the outcome is unchanged; one minute before the limit it isreview. The same holds forconvergedandqueued.test_staleness_counts_only_while_passes_runandtest_needs_you_is_never_stale.completed_atfact, in the facts schema, the example,tests/support.pyandsim/world.py, with a counter-example.staleis added to the Decision schema's attention classes. The limits reach the Kernel with the configuration, read fromlifecycle/pull_request.jsonand never copied intoconfig/defaults.json. The function accepts any Lifecycle, so the issue Lifecycle can use it.passes_since.Documents: design §4.1, §4.6, §8.4 and I-1.
Confidence. Medium. I would rule otherwise if trial P-8 shows that reading check completion times is too expensive.
Needs the Maintainer? No. The minutes are placeholders under §6.1.
don-petry commentedon Oct 15, 2026
Working ruling: what counts as movement, and what is never stale
Working ruling (delegated), from the review and security passes on the branch for this story. The Maintainer may overturn it in review.
What was found. Counting every review and every thread as movement means anyone can keep a stalled item from going stale by commenting, which shows less, never more. A time in the future, or one with an impossible field, does the same. And under a Pause or a capacity deferral, every waiting item goes stale at once.
Ruling.
last_writer_action_at; and the item's run records. A stranger's comment, or a check that is not required, does not restart the count. This is the same rule I-28 applies to attempts.now. The month is 1 to 12, the day fits the month, the hour is under 24, and the minute and second are under 60. The schema's time pattern says the same. Any other time is passed over, which shows more, never less.paused,pause_unreadable,capacity,capacity_unreadable,concurrencyand a model provider's deferral are each one cause, and health reports each once (§4.6). The item keeps the attention it had. A Lens that stays silent once the deferral ends goes stale as usual.Confidence. High on 1 and 2. Medium on 3: if trial P-8 or the first weeks show a Pause hiding a Lens that had already stalled, it should count from before the Pause.