AMPR-321 #735: ProbeEvent.VerdictReached; register 14 dark event types - #754
Merged
wow-miley merged 3 commits intoSep 3, 2026
Conversation
Add `ProbeEvent.VerdictReached` to `ampere-core`'s sealed `Event` hierarchy: `probeId`, `subjectId`, the four-valued `Verdict`, and a small free-form `detail` map. Primitives plus `Verdict` by construction, because a consumer's Probe may judge a subject type Ampere cannot name, so the subject itself never crosses the boundary. `ProbeSuite` gains an optional `eventBus` (plus `eventSource`, `now`, `idGenerator` for test pinning) and publishes one event per report, in probe order, after every Probe has run; left null, evaluation stays pure. `TraceRecorder` captures it with no change. Writing the tripwire the ticket asked for surfaced 14 already-declared events missing from `EventRegistry.allEventTypes`: all 6 `GitEvent`, all 4 `PlanEvent`, all 3 `BenchEvent`, and `RoutingEvent.RouteFloorUnmet`. Unregistered means invisible to `subscribeToAll`, the relay, and every recorded trace — a whole Git workflow and a whole bench run were dark. All 14 are now registered, and `EventRegistryCompletenessTest` walks the sealed hierarchy in both directions so the next omission fails there instead of appearing as a hole in a trace. Three exhaustive `when (event)` blocks now handle verdicts by shape: `SignificanceAwareEventLogger` and the CLI `EventCategorizer` treat `Holds` as routine and every other outcome as significant, and `EventRenderer` gives `Undetermined` its own colour. An `Undetermined` is never a soft pass, which is also what the new Oscilloscope rendering note in `docs/ampere/events.md` records. I wrote this commit; Miley reviewed it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolves one conflict: `CHANGELOG.md` was removed on main (#753, "do not create one, and do not add a changelog entry as part of a PR"), so my Added/Fixed entries for this branch are dropped rather than reinstating the file. Everything the entries recorded is in the commit message and the PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…vents The merge brought in `docs/concepts/probe.md` (AMPR-323), and this branch touches `tracked_sources` for it and for `EventSerialBus`, so both are updated in this diff rather than a follow-up. `Probe` gains the bus on `ProbeSuite` and three invariants the code now enforces: a verdict event carries the subject's *id* and never the subject, publishing is opt-in and never partial, and a verdict is recomputed rather than replayed. Its "a Probe is not a trace grader" invariant is narrowed — `VerdictReached` puts the verdict *in* the trace even though it was never computable *from* one. `EventSerialBus` records that registration means an entry in `EventRegistry.allEventTypes`, names the tripwire that now guards it, and qualifies the `AgentEventApi` anti-pattern: a publisher that is genuinely not agent-owned takes an explicit `eventSource`, and taking the bus without taking a source is the real mistake. I wrote this commit; Miley reviewed it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Concept staleness check — clean. No tracked-source changes need a concept update. |
wow-miley
deleted the
miley/ampr-321-probeeventverdictreached-ampere-owned-primitives-only
branch
September 3, 2026 02:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #735
Adds
ProbeEvent.VerdictReachedtoampere-core's sealedEventhierarchy —probeId,subjectId, the four-valuedVerdict, and a small free-formdetailmap, primitives-plus-Verdictby construction so a consumer's Probe can judge a subject type Ampere cannot name — and givesProbeSuitean optionaleventBusthat publishes one event per report, in probe order, after every Probe has run (left null, evaluation stays pure;TraceRecordercaptures it with no change). Writing the registry tripwire the ticket asked for surfaced 14 already-declared events missing fromEventRegistry.allEventTypes— all 6GitEvent, all 4PlanEvent, all 3BenchEvent, andRoutingEvent.RouteFloorUnmet— which meant a whole Git workflow and a whole bench run reached nosubscribeToAllsubscriber and appeared in no recorded trace; all 14 are now registered, andEventRegistryCompletenessTestwalks the sealed hierarchy in both directions so the next omission fails there instead of surfacing as a hole in a trace. Three exhaustivewhen (event)blocks now handle verdicts by shape, withUndeterminedgiven its own treatment in the CLI renderer and in the new Oscilloscope rendering note indocs/ampere/events.md— it is never a soft pass. The branch is merged up tomain, which broughtdocs/concepts/probe.mdwith it; both it anddocs/concepts/event-serial-bus.mdare updated here, since this diff touches theirtracked_sources.Validated with
:ampere-core:jvmTest,:ampere-eval:jvmTest,:ampere-core:compileTestKotlinIosSimulatorArm64,:ampere-cli:compileTestKotlinJvm, and ktlintCheck; 22 new tests pass. One unrelated pre-existing failure remains in:ampere-cli:jvmTest(AmpereContextTest.default database path uses home directoryopens the developer's real~/.ampere/ampere.db, which predates the FTS schema from AMPR-325 and throwsno such table: main.knowledge_chunks).🤖 Generated with Claude Code