*Continent · 3 territory* ## Summary A governance specification and a changelog describe the same caller-supplied history of actions, areas and times: how it is shaped, validated, merged into a request, and written back after a decision, with the event's time standing in as the request's now. ## Explanation - In Neuroverseos-governance:doc:SPEC.md, `history` is a list of `{ action, areaId, at? }` recording what a participant did recently, as the caller reports it. - `history` (optional) is a list of `{ action, areaId, at? }` — what this participant did recently, as the caller reports it. - The same specification says a request whose history is not a list, or whose entry is not that shape with non-empty strings and a timestamp when `at` is given, or which lacks `at` where a rule uses withinMinutes, is a problem. - If request.history is not a list, or an entry is not { action, areaId, at? } with non-empty strings and a timestamp when `at` is given, or some rule in N has w… - The specification says each event carries when it was asked, exactly what the participant asked, and optionally what happened next, and README.md describes that event shape as SPEC.md § 13, in time order, with the request being exactly what the evaluation receives and the outcome reported and never decided on. - events[].at is required: when it was asked, a timestamp, reported as given; the implementation MUST process events in the order given and MUST NOT sort them; i… - events[].request is required: exactly what the participant asked; a malformed request is a row refused as missing facts (request), never an error. - events[].outcome is optional: happened, did_not_happen or unknown, what the record says happened next; it is used only for differences and MUST NOT influence a… - The event format is SPEC.md § 13: `{ at, request, outcome? }`, in time order, where `request` is exactly what `evaluateDomainAction` receives and `outcome` is… - The specification says a malformed request is a row refused as missing facts, never an error, and that the outcome is used only for differences and must not influence any decision. - events[].request is required: exactly what the participant asked; a malformed request is a row refused as missing facts (request), never an error. - events[].outcome is optional: happened, did_not_happen or unknown, what the record says happened next; it is used only for differences and MUST NOT influence a… - For each event, when the request is an object it is combined with the participant's history when it has no history member and names a participant with a string id, and with now = event.at when it has no now. - For each event, when the request is an object it is combined with the participant's history when it has no history member and names a participant with a string… - After deciding, if the request named a participant id and an action, history[id] gains { action, areaId, at: event.at }. - After deciding, if the request named a participant id and an action, history[id] gains { action, areaId, at: event.at }. - In robot-domain-rules-CHANGELOG.md, a rule may carry history of { actions, areas?, sameArea?, withinMinutes?, clock?, op, value } over request.history, which is caller-supplied [{ action, areaId, at? }]. - A rule may carry history of { actions, areas?, sameArea?, withinMinutes?, clock?, op, value } over request.history, which is caller-supplied [{ action, areaId,… - The specification's history entries and the changelog's history condition describe the same caller-supplied list of actions, areas and optional times, and the changelog's `clock` member is not described in the specification's entry shape. - `history` (optional) is a list of `{ action, areaId, at? }` — what this participant did recently, as the caller reports it. - If request.history is not a list, or an entry is not { action, areaId, at? } with non-empty strings and a timestamp when `at` is given, or some rule in N has w… - A rule may carry history of { actions, areas?, sameArea?, withinMinutes?, clock?, op, value } over request.history, which is caller-supplied [{ action, areaId,… ## Threads - The shape of a caller-supplied history entry: action, area, and an optional time. - `history` (optional) is a list of `{ action, areaId, at? }` — what this participant did recently, as the caller reports it. - If request.history is not a list, or an entry is not { action, areaId, at? } with non-empty strings and a timestamp when `at` is given, or some rule in N has w… - What an event record holds: when it was asked, what was asked, and optionally what happened next. - events[].at is required: when it was asked, a timestamp, reported as given; the implementation MUST process events in the order given and MUST NOT sort them; i… - events[].request is required: exactly what the participant asked; a malformed request is a row refused as missing facts (request), never an error. - events[].outcome is optional: happened, did_not_happen or unknown, what the record says happened next; it is used only for differences and MUST NOT influence a… - The event format is SPEC.md § 13: `{ at, request, outcome? }`, in time order, where `request` is exactly what `evaluateDomainAction` receives and `outcome` is… - Merging history into a request and writing the action back after a decision. - For each event, when the request is an object it is combined with the participant's history when it has no history member and names a participant with a string… - After deciding, if the request named a participant id and an action, history[id] gains { action, areaId, at: event.at }. - A rule condition over history, with a `clock` member the entry shape does not describe. - A rule may carry history of { actions, areas?, sameArea?, withinMinutes?, clock?, op, value } over request.history, which is caller-supplied [{ action, areaId,… ## Two sides The specification's history entry is { action, areaId, at? } and its validation checks that shape, while the changelog's rule condition adds a `clock` member the entry shape does not describe. - One side - `history` (optional) is a list of `{ action, areaId, at? }` — what this participant did recently, as the caller reports it. - If request.history is not a list, or an entry is not { action, areaId, at? } with non-empty strings and a timestamp when `at` is given, or some rule in N has w… - The other side - A rule may carry history of { actions, areas?, sameArea?, withinMinutes?, clock?, op, value } over request.history, which is caller-supplied [{ action, areaId,… ## Consultant **Where it shows up** — History keeps coming up as the caller-supplied list of { action, areaId, at? }: it is validated in the specification, merged into a request that names a participant, and written back after a decision. The changelog's rule condition adds a `clock` member the entry shape does not describe. **A question to sit with** — When a rule condition reads a `clock` that the history entry shape does not carry, where does that clock come from in the request? **A way forward** — Keep the entry shape and the rule condition side by side and write down, for each condition member, which part of the request supplies it. ## Ideas - An event's time should stand in as the request's now when the request has none, and stamp each built history entry. - Events should be processed in the order given and never sorted. - A history condition on a rule should be able to test actions, areas, same-area recurrence, a time window and a clock, combined by an operator against a value. - A malformed request should be refused as a row missing facts rather than treated as an error. - What happened next should be recorded but never allowed to influence a decision. - The caller, not the engine, supplies the current time and the record of what happened. ## Territories - [[Bevia/World/Territories/Caller-supplied history in a governance spec|Caller-supplied history in a governance spec]] - [[Bevia/World/Territories/Rule history over caller-supplied request events|Rule history over caller-supplied request events]] - [[Bevia/World/Territories/Event record shape- time, request, outcome|Event record shape: time, request, outcome]]