Skip to content

feat(evidence): add provenance value canaries - #3033

Merged
Sinity merged 1 commit into
masterfrom
feature/evidence/provenance-canaries
Jul 17, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/evidence/provenance-canaries

Conversation

@Sinity

@Sinity Sinity commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the first real EvidenceValue implementation slice, integrating the surviving Test Diet 06 candidate through the shared declaration kernel.

Problem

Usage, daemon status, and source freshness each collapsed distinct epistemic states into scalars or nulls, making unknown price, stale last-good state, and excluded-source byte lag hard to render honestly.

Solution

Adds storage-free EvidenceValue composition, projects FactFamilySpec through the existing DeclarationRegistry, and wires the three production canaries through their current owner routes. No universal evidence table or lifecycle is introduced.

Verification

  • devtools test tests/unit/core/test_evidence_value.py tests/unit/archive/test_source_freshness.py tests/unit/daemon/test_daemon_status.py tests/unit/daemon/test_daemon_http_contracts.py tests/unit/storage/test_provider_usage_report.py tests/unit/cli/test_diagnostics.py — 172 passed
  • devtools verify --quick — passed

Ref polylogue-cuxz.2.

Add storage-free EvidenceValue composition through the shared declaration\nkernel and project exact pricing, status freshness, and source byte lag\nwithout collapsing unknowns or provenance.\n\nRef polylogue-cuxz.2.

Co-Authored-By: Codex <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ab8a28c6-458f-4ab5-83e8-0dd9c0ea04d8

📥 Commits

Reviewing files that changed from the base of the PR and between 2986be4 and 2bbe59e.

📒 Files selected for processing (18)
  • docs/cost-model.md
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/archive/query/source_freshness.py
  • polylogue/archive/query/source_freshness_surfaces.py
  • polylogue/cli/commands/diagnostics.py
  • polylogue/core/evidence_value.py
  • polylogue/core/temporal.py
  • polylogue/daemon/status_snapshot.py
  • polylogue/daemon/web_shell.py
  • polylogue/insights/temporal_source.py
  • polylogue/storage/usage.py
  • tests/unit/archive/test_source_freshness.py
  • tests/unit/cli/test_diagnostics.py
  • tests/unit/core/test_evidence_value.py
  • tests/unit/daemon/test_daemon_http_contracts.py
  • tests/unit/daemon/test_daemon_status.py
  • tests/unit/storage/test_provider_usage_report.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/evidence/provenance-canaries

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity
Sinity merged commit efadb40 into master Jul 17, 2026
2 checks passed
@Sinity
Sinity deleted the feature/evidence/provenance-canaries branch July 17, 2026 13:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2bbe59ee0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

sources = [item.time_source for item in values if item.time_source is not None]
weakest = weakest_of(cast(Sequence[TemporalSource], sources))
timestamps = [item.observed_at for item in values if item.observed_at is not None]
chosen_observed_at = observed_at or (max(timestamps) if timestamps else None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize timestamps before selecting the latest observation

When contributors use valid ISO-8601 timestamps with different UTC offsets, taking max() over their strings can select an earlier instant as the aggregate observation time. For example, 2026-01-01T10:00:00+14:00 sorts after 2026-01-01T00:00:00+00:00 despite occurring four hours earlier; parse or normalize the timestamps before comparing them.

Useful? React with 👍 / 👎.

Comment on lines +1157 to +1158
def _observation_sort_key(observation: EvidenceObservation[object]) -> tuple[str, str, str]:
return (observation.fact_ref.format(), observation.value_state, _stable_value_key(observation.value))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include provenance fields in observation sorting

When two same-fact observations have the same state and value but different evidence refs, timestamps, coverage, or freshness, this key ties and Python's stable sort preserves the caller's input order. Consequently, reversing otherwise equivalent inputs changes the order of contributions in to_dict(), violating the advertised order-independent composition and producing unstable serialized payloads or hashes; use the full observation identity as the tie-breaker.

Useful? React with 👍 / 👎.

Sinity added a commit that referenced this pull request Jul 17, 2026
Problem: ~15 P0/P1 beads carried in_progress claims from sessions closed
on 2026-07-17, making bd ready misreport availability; some had
substantial merged work that the claim state hid.

What changed: per-bead verification against master commits since
2026-07-14. Six no-work claims reset to open (1xc.14.1.2, 1xc.14.1.3,
2qx.2, 2qx.1.1, h6r, 41ow). Eight partials reset to open with commit
receipts and residue notes (1xc.14.1, 1xc.14.1.1, b054.1.1, yeq.3,
9e5.31, 3v1, ptx, yyvg.7). Three flagged for adjudication without status
change: yyvg.6.1 (verify-for-close vs #2981-#2986), cuxz.2 (overlap with
#3033), 1xc.13 (awaiting two operator live receipts only). Lane-owned
claims (z9gh cluster, hjpx/yla8/lkrc, 866e, t8t, hjpx.2, t46.8.1) and
fifth-lane beads (yyvg.6, 1vpm.6.1) left untouched.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ
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.

1 participant