Skip to content

AMPR-321 #735: ProbeEvent.VerdictReached; register 14 dark event types - #754

Merged
wow-miley merged 3 commits into
mainfrom
miley/ampr-321-probeeventverdictreached-ampere-owned-primitives-only
Sep 3, 2026
Merged

AMPR-321 #735: ProbeEvent.VerdictReached; register 14 dark event types#754
wow-miley merged 3 commits into
mainfrom
miley/ampr-321-probeeventverdictreached-ampere-owned-primitives-only

Conversation

@wow-miley

@wow-miley wow-miley commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #735

Adds 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 so a consumer's Probe can judge a subject type Ampere cannot name — and gives ProbeSuite an optional eventBus that 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 registry 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 — which meant a whole Git workflow and a whole bench run reached no subscribeToAll subscriber and appeared in no recorded trace; all 14 are now registered, and EventRegistryCompletenessTest walks the sealed hierarchy in both directions so the next omission fails there instead of surfacing as a hole in a trace. Three exhaustive when (event) blocks now handle verdicts by shape, with Undetermined given its own treatment in the CLI renderer and in the new Oscilloscope rendering note in docs/ampere/events.md — it is never a soft pass. The branch is merged up to main, which brought docs/concepts/probe.md with it; both it and docs/concepts/event-serial-bus.md are updated here, since this diff touches their tracked_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 directory opens the developer's real ~/.ampere/ampere.db, which predates the FTS schema from AMPR-325 and throws no such table: main.knowledge_chunks).

🤖 Generated with Claude Code

wow-miley and others added 3 commits September 2, 2026 20:31
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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Concept staleness check — clean. No tracked-source changes need a concept update.

@wow-miley
wow-miley merged commit 8e84391 into main Sep 3, 2026
11 checks passed
@wow-miley
wow-miley deleted the miley/ampr-321-probeeventverdictreached-ampere-owned-primitives-only branch September 3, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProbeEvent.VerdictReached — Ampere-owned, primitives-only verdict event with subjectId; published by ProbeSuite

1 participant