Repository navigation
A need can ask for a fresh item: one produced since a person last acted - #139
Conversation
The bag never drops an item, so a run that goes back to a person many times handed a station a verdict or a briefing from a round long past. A need with fresh: true is filled only by an item produced by the visit at which a person last acted, or by one after it: a human station's visit, or a visit started by hand. An older item counts as not there, so an optional need is left out and a required one refuses the visit, naming the reason. Until a person acts, every item is fresh. A visit a person starts by hand opens with nothing fresh. Nothing is stored and nothing leaves the bag. The boundary is the one an edge's unattended_max already uses, now exported by the kernel as personLastActedAt. A need cannot be both fresh and collect. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Lore is reviewing this PR — 884c03f0-7d0d-4729-8769-4ce0b944cb91. Submit a review that requests changes to have Lore push a fix for it. Comment |
Lore code reviewReviewed revision The story the tests tellA need on a station can now be marked fresh. A fresh need only takes a value produced since a person last acted, so stale machine output isn't passed on after a human has weighed in. A fresh need that nothing fresh can fill is left out if optional and reported missing if required. The full story, with its testsThe change adds a way to mark a station's need as fresh. A fresh need accepts a value only if it was produced at or after the last visit where a person acted. To support that, a new function, Tests: When needs are resolved, a fresh need is checked against who produced the value. Suppose a person acted at visit-2 and the verdict came from visit-1. An optional fresh verdict is then left out. A required one is reported missing as "verdict (not produced since a person last acted)". A fresh verdict produced by the visit where the person acted is filled. So is a fresh verdict from an event such as a PR opening when nobody has acted yet. A need without the fresh flag still takes the older verdict, so nothing changes for existing stations. Tests: The store applies the same rule when it opens a visit. In a line where a judge station produces a verdict and then a human station acts, a later station with a fresh verdict need gets nothing in its brief if the judge produced it before the human reported. If the need is required, opening the visit is refused with a missing-need error that says the value was not produced since a person last acted. A fresh need for something the human did produce, such as feedback, is passed on. A fresh need for a start item is passed on when no human visit has happened yet. A visit opened by hand with no human visit yet leaves an optional fresh verdict out. Tests: Definition validation knows about the flag too. Fresh is accepted on a need and reports no unknown key. On a produce it is reported as an unknown key. A station body is refused when a need is both fresh and collects, with the message that fresh is for a bag item and takes no collect. Tests: What the checks readThe story holds. The story holds: personLastActedAt, fresh need resolution, store opening of visits, and definition validation (fresh on need, unknown on produce, fresh+collect refused) are all told, with no contradiction or untold behaviour. All five statements about |
There was a problem hiding this comment.
Lore review — Approved
The implementation, the issue and the changed documents tell the story the tests tell.
Must fix (0) · Consider (0) · Nits (0)
Reviewed by claude-sonnet-5-5
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Posted by floor, visit 79329f4c-7db4-4592-8daf-89a48f212bac.
The bag never drops an item. A later item of the same name replaces the earlier one, and that is all. So in a run that goes back to a person many times, a station was handed whatever was last produced under a name, however long ago. Two collection reviews found three cases of this: a stale description, a stale repository and verdict, and a stale briefing.
A need can now set
fresh: true:A fresh need is filled only by an item produced by the visit at which a person last acted, or by a visit after it. A person acts at a
humanstation's visit, or by starting a node by hand. An older item counts as not in the bag: an optional need is left out, and a required one refuses the visit withnode "N": missing required need(s) X (not produced since a person last acted). Until a person acts, every item is fresh, the start items included. What the human station's own visit produced is fresh. A visit a person starts by hand opens with nothing fresh, because the person is acting now and the new visit has produced nothing.Nothing is stored for this and nothing leaves the bag, so "the bag only grows" stays true and a run's history still explains every item. The boundary is the one an edge's
unattended_maxand the node ceiling already use. The kernel now exports it aspersonLastActedAt, and the node ceiling calls the same function. A station with no fresh need costs nothing extra when its visit opens. One with a fresh need costs a lookup of the line's station kinds.The other way considered was a node that clears items when it reports. That would have said it once per line, where this makes each consumer mark its own need. It lost because it needs the fold to remove items and ends a property the storage design relies on.
A need cannot be both
freshandcollect; the schema refuses it.freshon a produce is an unknown key, which lint reports.Limits, stated in the docs too. The floor's rules for a line and lint's need coverage do not know when a person acts, so a required fresh need that nothing produces after a person last acted passes them and is found when its visit opens, where the run ends as
error. Studio's inspector lists the need but does not mark it as fresh.Docs: the bag page, both specifications, the storage design document, the decision log, and the regenerated field table and JSON Schema.
Checked in one run with nothing else going on: every package's tests pass (assembly-lines 207, graph 316, store 418, pipeline 269, Studio 459, API 414, cluster-agent 132, docs-reference 37, and the three small ones), with the typecheck, ESLint on the whole repo and the docs check clean. I did not run a line with a fresh need against a live floor.
🤖 Generated with Claude Code