Skip to content

Kernel: when waiting becomes the Maintainer's to see #36

Closed

Description

@don-petry

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.
  • Its mutant is killed.

Needs. The Maintainer's ruling, asked first.

Design. §4.1, "Stale after"; §8.4, stale; I-1.

Activity

  1. don-petry commented on Oct 14, 2026

    @don-petry
    ContributorAuthor

    #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.

    1. 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.
    2. As option 1, but as a Hold. A Lens that reports late would then need a person to release the item.
    3. A deadline for each Lens, counted from the push. This covers verifying only, so converged and queued could still stall unseen.
    4. §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.

    1. 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.
    2. test_staleness_counts_only_while_passes_run and test_needs_you_is_never_stale.
    3. 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.
    4. 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.

  2. don-petry commented on Oct 15, 2026

    @don-petry
    ContributorAuthor

    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.

    1. 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.
    2. 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.
    3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions