Skip to content

feat: add observation freshness model#272

Merged
spytensor merged 1 commit into
mainfrom
feat/v0.8-243-observation-citation-freshness
May 23, 2026
Merged

feat: add observation freshness model#272
spytensor merged 1 commit into
mainfrom
feat/v0.8-243-observation-citation-freshness

Conversation

@spytensor
Copy link
Copy Markdown
Owner

Linked Issue

Closes #243

Scope

Implemented:

  • Added an observation module for authority, freshness, and structural citation metadata.
  • Distinguished GitHub CI facts from local validation facts at the schema level.
  • Added Evidence Packet claim citations that must carry commit/source/timestamp or explicitly report missing freshness.
  • Added Source Graph drift citations preserving source id, pin, finding kind, and trust level.
  • Required console health signals to carry at least one validated observation.
  • Extended the v0.8 console snapshot fixture with alert observations.

Not implemented:

  • No network fetching.
  • No silent remote refresh.
  • No semantic correctness claim from citations alone.

Acceptance Criteria

  • AC-1: Add an observation/citation/freshness model usable by health signals and snapshot rows.
  • AC-2: GitHub facts can cite issue, PR, check URL, head SHA, and observed-at timestamp.
  • AC-3: Local validation is clearly distinct from GitHub CI and cannot masquerade as remote CI.
  • AC-4: Evidence Packet claims can carry commit/source/timestamp or explicitly report missing freshness.
  • AC-5: Source drift citations preserve source id, pin, finding kind, and trust level.
  • AC-6: Tests cover fresh, stale, missing, and unknown observations.

Changed Files

  • src/observation.rs
  • src/console_snapshot.rs
  • src/lib.rs
  • tests/observation_test.rs
  • tests/fixtures/observation_freshness.toml
  • tests/fixtures/console_snapshot_v08.toml

Validation

Local commands executed:

cargo fmt --all -- --check
cargo test --test observation_test --quiet
cargo test --test console_snapshot_test --quiet
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features --locked --quiet

Results:

  • format: pass
  • observation tests: pass, 4 tests
  • console snapshot tests: pass, 3 tests
  • clippy: pass
  • full test suite: pass, ignored smoke tests unchanged

Evidence Packet

  • WorkOrder: WO-0243
  • GitHub issue: v0.8: Add observation, citation, and freshness model #243
  • Gate thread: not applicable for this additive schema PR
  • Evidence: observation module + freshness fixture + console snapshot alert observations + tests
  • Not verified: GitHub CI until this PR runs checks

Tracker Update

Risk

Low to medium. HealthSignal validation now requires observations, so future snapshot fixtures must cite alert sources explicitly. Runtime behavior does not consume this path yet.

Rollback

Revert this PR. No migration or runtime behavior change is included.

@spytensor spytensor merged commit 844857b into main May 23, 2026
5 checks passed
@spytensor spytensor deleted the feat/v0.8-243-observation-citation-freshness branch May 23, 2026 20:24
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.

v0.8: Add observation, citation, and freshness model

1 participant