Repository navigation
feat(evidence): add provenance value canaries - #3033
Conversation
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]>
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
| def _observation_sort_key(observation: EvidenceObservation[object]) -> tuple[str, str, str]: | ||
| return (observation.fact_ref.format(), observation.value_state, _stable_value_key(observation.value)) |
There was a problem hiding this comment.
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 👍 / 👎.
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
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
EvidenceValuecomposition, projectsFactFamilySpecthrough the existingDeclarationRegistry, 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 passeddevtools verify --quick— passedRef polylogue-cuxz.2.