AMPR-323 #737: Observed interface + FreshnessProbe : Probe<Observed> with per-Probe max age - #749
Merged
wow-miley merged 2 commits intoSep 3, 2026
Conversation
|
Concept staleness check — clean. No tracked-source changes need a concept update. |
wow-miley
force-pushed
the
miley/ampr-323-observed-timestamp-interface-freshnessprobe-probeobserved
branch
from
September 3, 2026 00:54
44a0d3f to
c06f953
Compare
… age Add `Observed` (one field: `observedAt: Instant`) to the probe package and have `CanonProvenance` implement it — conformance only, no wire change. Ship `FreshnessProbe : Probe<Observed>`: within `maxAge` → Holds; beyond it → Undetermined(STALE), not Violated (convict-but-not-acquit); `observedAt` ahead of `now` → Warn for clock skew. Max-age lives on the Probe, never on the fact. Tests pin the three outcomes against a fixed clock, run the Probe over a plain `object : Observed` and over a `CanonProvenance` to prove the contravariance path, and show it listed in a `ProbeRegistry`. New `docs/concepts/probe.md` records where `observedAt` binds for each observation kind (Plug perceive, relay fetch, Recall binding) and that max-age is a Probe parameter; `domain-canon.md` gains the matching invariant. Concept-Verified: DomainCanon Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…enceProbe AMPR-322 landed the sample wiring this ticket's task 3 targets. `registerAmpereProbes(freshnessMaxAge, now)` takes the tolerance as a parameter (default 24h) because max-age is consumer policy, not a fact field. `FreshnessProbe.ID` mirrors `SequenceProbe.ID`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
wow-miley
force-pushed
the
miley/ampr-323-observed-timestamp-interface-freshnessprobe-probeobserved
branch
from
September 3, 2026 01:10
c06f953 to
7bc5c7e
Compare
wow-miley
deleted the
miley/ampr-323-observed-timestamp-interface-freshnessprobe-probeobserved
branch
September 3, 2026 01:31
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 #737. Linear: AMPR-323.
What
Observed(probe/Observed.kt): one-field interface,observedAt: Instant. Consumers implement it on their own Recall-binding types for canon-external observations; Ampere never imports the concrete type.CanonProvenance : Observed: declaration-only conformance. The field already existed, so no serialization change;CanonSerializationTestis unaffected.FreshnessProbe(maxAge, now)(probe/FreshnessProbe.kt), default idampere.freshness:maxAge→Holds("observed <age> ago")maxAge→Undetermined("observed <age> ago, max <maxAge>", STALE)— notViolatedobservedAtahead ofnow→Warn("observedAt is <skew> ahead of now")ProbeRegistry.registerAmpereProbes(freshnessMaxAge = 24.hours, now = Clock.System::now)now registersFreshnessProbebesideSequenceProbe(from AMPR-322 #736: CanonWorkItem.dependsOn, CanonWorkGraph, SequenceProbe; report batch cycles #750). The max age is a parameter because it is consumer policy, never a fact field.docs/concepts/probe.md(whereobservedAtbinds per observation kind; max-age is a Probe parameter), index row, and a matching invariant indomain-canon.md. No changelog entry: main removedCHANGELOG.mdin Remove CHANGELOG.md and stop agents from recreating it #753.Tests
FreshnessProbeTest(commonTest): fresh → Holds; exactly at max age → Holds; one second past → Undetermined(STALE); future → Warn; a plainobject : Observedand aCanonProvenanceboth run through the same Probe (contravariance); suite composition beside aProbe<Any>;registerAmpereProbeslists both shipped Probes.Validation
./gradlew :ampere-core:ktlintFormat— no changes./gradlew :ampere-core:jvmTest --tests "*probe*" --tests "*CanonSerializationTest*"— 35 tests, 0 failures./gradlew :ampere-core:compileTestKotlinIosSimulatorArm64— green🤖 Generated with Claude Code