2.7 KiB
2.7 KiB
Event observation (observe → confirm → emit)
IdleSpectator learns about the game through Harmony sensors.
Those sensors must not treat AI noise as catalog truth.
Pipeline
Patch (Observe) → EventOutcome (Confirm) → Feed Emit (EventReason + catalog)
| Layer | Responsibility | Lives in |
|---|---|---|
| Observe | Thin Harmony Prefix/Postfix; snapshot before when needed | Events/Patches/* |
| Confirm | Did the semantic claim happen? | Events/EventOutcome.cs |
| Bridge | Drop unconfirmed with InterestDropLog; else run emit |
Events/EventObservation.cs |
| Emit | Catalog dials, keys, EventReason labels |
Events/Feeds/* |
Rules
- Never treat
BehResult.Continueas success by itself. - Prefer state setters when they exist (
setLover,setParent*,newFamily,setFamily,addNewStatusEffect). - Beh hooks need before/after confirmation (
EventOutcome.GainedFamily,StillSeekingLover, …). - Unconfirmed attempts log
outcome_unconfirmedviaInterestDropLog(not silent). - New catalog events must name their confirm predicate (or setter) in the audit TSV
game_call_site/fix_action.
Example (family join)
Vanilla BehFamilyGroupJoin returns Continue even when no nearby family exists.
Confirm with GainedFamily(before, actor) before Emit family_group_join.
Negative harness: Beh Continue with no family gain must log outcome_unconfirmed and must not register rel:family_group_join.
Adding an event
For every new camera-worthy catalog id, record three things up front:
| Field | Meaning | Example |
|---|---|---|
| Confirm predicate | EventOutcome helper, or “setter is the transition” |
GainedFamily, setLover(null) |
| Fire API | Vanilla call the live harness will invoke | BehFamilyGroupLeave.execute, Actor.addTrait |
| Expected live level | Honest target after the runner claims | id, id_drop, pipeline (shared=…), or unsupported |
Then implement:
- Find the real game call site (setter or Beh).
- Add/extend an
EventOutcomepredicate if Beh Continue is ambiguous. - Patch calls
EventObservation.Confirm/ConfirmAfterthen the domain feed. - Mark the audit row with the confirm rule (
event-trigger-audit.tsv= design/call-site only). - Harness: live path asserts key or authored drop; assert absence /
outcome_unconfirmedwhen the outcome fails. - Do not call
domain_feed/ inject and label it live. - Live proof lands in
.harness/event-live-coverage.tsvviaEventLiveCoverageLedger.Claim- that file is the source of truth for live levels, not the audit TSV.
See event-live-verification-plan.md for claiming rules and suite wiring.