Skip to content

feat(legibility): render public claims from FINDING assertions, not a hand ledger - #3065

Merged
Sinity merged 2 commits into
masterfrom
feature/legibility/claims-view-3tl16
Jul 18, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/legibility/claims-view-3tl16

Conversation

@Sinity

@Sinity Sinity commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

Implements polylogue-3tl.16: docs/public-claims.yaml stops being a
hand-maintained ledger and becomes a generated projection over
AssertionKind.FINDING rows, the canonical judgment/supersession
lifecycle (PR #2791), and a bounded evidence-integrity verdict seam for
the not-yet-landed polylogue-37t.14 evaluator.

Problem

docs/public-claims.yaml (schema external-claims-ledger/v2) was a
second durable claim store maintained by hand, parallel to the FINDING
assertion substrate. A claim's public status could drift from what the
judgment lifecycle actually supports, and README/launch/findings-page
copy had no single source of truth to render from.

Solution

  • polylogue/insights/measurement/public_claims.py: project_public_claims()
    computes one PublicClaimProjection per stable claim key from
    list_public_finding_inputs() (new read adapter in
    storage/finding_provenance.py), the FINDING/judgment/supersession
    facts, and an injected EvidenceIntegrityProvider.verdict_for() seam.
    A missing verdict fails closed as unresolved, never
    fresh/supported. Four presets (readme, launch, findings-page,
    verified-export) only filter the one already-computed projection
    -- status is never recomputed per surface.
  • polylogue/storage/sqlite/archive_tiers/user_write.py: additive
    PublicClaimDeclaration + source_epoch/evaluation_ref/frame_ref
    fields on the existing polylogue.finding.v1 JSON payload. No
    user-tier schema migration -- these are new keys in an already-JSON
    column.
  • devtools/public_claims.py (existing validator, rewritten) +
    new devtools/render_public_claims.py: render/check command,
    registered in generated_surfaces.py/command_catalog.py/
    docs_surface.py/release_readiness.py. docs/public-claims.yaml
    is now the generated verified-export compatibility view.
  • Seeds the three current claim-vs-evidence headline findings plus the
    category.local-evidence-system capability statement via
    polylogue/scenarios/corpus.py.
  • Distinct fail-closed states for broken/circular/stale/frame-incomplete/
    private-held/unsupported evidence, verified by real negative tests
    (see Verification), not just read from the packet's own claims.

Provenance and independent verification

Originated as external-agent packet ann-05-claims-view-r01 (GPT Pro
wave 2, snapshot 536a53efac0cbe4a2473ad379e4db49ef3fce74d,
unreviewed). Verified adversarially rather than trusting its TESTS.md:

  • Confirmed against live source that no second durable claims table
    exists and no schema migration is needed for the new
    FindingAssertion fields.
  • git apply --check against current origin/master (12+ commits
    ahead of the snapshot) failed on 3 of 29 files:
    • docs/plans/topology-target.yaml / docs/topology-status.md had
      drifted from unrelated intervening commits (both are generated) --
      regenerated with devtools render topology-projection +
      render topology-status instead of force-applying stale content.
    • polylogue/storage/sqlite/archive_tiers/user_write.py conflicted
      on one import line added by PR feat: harden archive continuity closure #3051, landed after the packet's
      snapshot. Reconciled by hand: 7 of 8 hunks applied clean via
      git apply --reject, the import added manually.
  • Independently reran devtools verify public-claims --json (4
    claims, 9 artifacts, 3 monitored surfaces, 0 problems) and
    devtools verify layering (0 violations) -- both match the packet's
    own claimed output exactly, not just re-asserted from its prose.
  • The packet flagged test_archive_tiers_api_archive_debt_reads_archive_consistency
    ("database source_debt is locked") as a pre-existing baseline
    failure unrelated to its patch. Reproduced this independently on an
    unrelated worktree (clean master plus an unrelated annotations
    feature) to confirm it's a genuine environmental flake, not
    something introduced here.

Verification

devtools test tests/unit/insights/measurement/test_public_claims.py \
  tests/unit/storage/test_public_claims_projection.py tests/unit/devtools/test_public_claims.py
-> 31 passed

devtools test tests/unit/scenarios/test_demo_archive_convergence.py \
  tests/unit/storage/test_archive_tiers_assertions.py tests/unit/devtools/test_generated_surfaces.py \
  tests/unit/devtools/test_release_readiness.py tests/unit/devtools/test_render_docs_surface.py \
  tests/unit/devtools/test_project_motd.py tests/unit/daemon/test_standing_queries.py tests/unit/cli/test_import.py
-> 84 passed

devtools test (6 affected tests/unit/api/test_facade_contracts.py cases)
-> 6 passed, 1 pre-existing unrelated flake (classified above, reproduced independent of this patch)

ruff format --check / ruff check (all 16 touched Python files) -> clean
mypy --strict (all 13 touched production/test modules) -> Success, no issues
devtools render all --check -> exit 0, no drift (includes regenerated topology docs)
devtools verify public-claims --json -> ok, 0 problems
devtools verify layering -> 0 violations
devtools verify --quick -> exit_code 0

Not run: the full non-quick devtools verify (testmon inner loop) and
the post-merge heavy CI test suite; per-PR CI intentionally skips it.

Follow-ups intentionally deferred

  • polylogue-37t.14 (the shared evidence-integrity evaluator) is not
    yet landed. This PR defines the narrow consumer interface
    (EvidenceIntegrityProvider.verdict_for) it must implement; the
    three seeded findings currently render unknown · unresolved
    because no verdict/canonical judgment has been supplied yet -- this
    is the honest default, not a placeholder bug.
  • Coverage is currently README.md, docs/demos.md,
    docs/findings/claim-vs-evidence.md; a future tracked launch-post
    source should be registered against the launch preset when it exists.

Ref polylogue-3tl.16

@coderabbitai

coderabbitai Bot commented Jul 18, 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: 38 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: 47216387-9317-403f-8e95-4d90331f4601

📥 Commits

Reviewing files that changed from the base of the PR and between 1c2a07f and 236eab6.

⛔ Files ignored due to path filters (8)
  • docs/generated/public-claims/findings-page.json is excluded by !**/generated/**
  • docs/generated/public-claims/findings-page.md is excluded by !**/generated/**
  • docs/generated/public-claims/launch.json is excluded by !**/generated/**
  • docs/generated/public-claims/launch.md is excluded by !**/generated/**
  • docs/generated/public-claims/readme.json is excluded by !**/generated/**
  • docs/generated/public-claims/readme.md is excluded by !**/generated/**
  • docs/generated/public-claims/verified-export.json is excluded by !**/generated/**
  • docs/generated/public-claims/verified-export.md is excluded by !**/generated/**
📒 Files selected for processing (21)
  • README.md
  • devtools/command_catalog.py
  • devtools/docs_surface.py
  • devtools/generated_surfaces.py
  • devtools/public_claims.py
  • devtools/release_readiness.py
  • devtools/render_public_claims.py
  • docs/README.md
  • docs/demos.md
  • docs/devtools.md
  • docs/findings/claim-vs-evidence.md
  • docs/plans/topology-target.yaml
  • docs/public-claims.yaml
  • docs/topology-status.md
  • polylogue/insights/measurement/public_claims.py
  • polylogue/scenarios/corpus.py
  • polylogue/storage/sqlite/archive_tiers/user_write.py
  • polylogue/storage/sqlite/finding_provenance.py
  • tests/unit/devtools/test_public_claims.py
  • tests/unit/insights/measurement/test_public_claims.py
  • tests/unit/storage/test_public_claims_projection.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/legibility/claims-view-3tl16

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.

@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: 922aa2297a

ℹ️ 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".

Comment thread polylogue/scenarios/corpus.py Resolved
Comment thread devtools/public_claims.py Resolved
Sinity and others added 2 commits July 18, 2026 05:16
… hand ledger

Problem: docs/public-claims.yaml (schema external-claims-ledger/v2) was
a hand-maintained YAML file, a second durable claims store parallel to
the FINDING assertion substrate that PR #2791's canonical judgment
lifecycle already governs. polylogue-3tl.16 asks for public claims to
be a rendered projection over FINDING rows, judgment/supersession
state, and a shared evidence-integrity verdict instead.

Solution: polylogue/insights/measurement/public_claims.py computes one
PublicClaimProjection per stable claim key from
list_public_finding_inputs() (new adapter in
storage/finding_provenance.py) plus an injected
EvidenceIntegrityProvider.verdict_for() seam (polylogue-37t.14 is not
yet landed, so a missing verdict fails closed as unresolved, never
fresh/supported). Four presets (readme/launch/findings-page/
verified-export) filter the same computed rows -- status is computed
once, not per surface. devtools/public_claims.py + new
devtools/render_public_claims.py replace the old YAML-validator with a
render/check command; docs/public-claims.yaml becomes a generated
verified-export compatibility view. Seeds the three current
claim-vs-evidence headline findings plus the flight-recorder capability
statement via new PublicClaimDeclaration fields on the existing
additive polylogue.finding.v1 assertion payload (no user-tier schema
migration -- these are additive JSON fields on an already-JSON column).

Originated as external-agent packet ann-05-claims-view-r01 (GPT Pro
wave 2, snapshot 536a53e), unreviewed. Verified independently:

- Confirmed against live source (not the packet's claim) that no
  second durable claims table exists and no schema migration is
  required for the new FindingAssertion fields.
- git apply --check against current origin/master (12+ commits ahead
  of the packet's snapshot) failed on 3 of 29 files. Two
  (docs/plans/topology-target.yaml, docs/topology-status.md) are
  generated docs that drifted from unrelated intervening commits --
  regenerated via `devtools render topology-projection` +
  `render topology-status` rather than force-applying stale content.
  The third (user_write.py) conflicted on one import line added by
  PR #3051 (`feat: harden archive continuity closure`) landing after
  the packet's snapshot; reconciled by hand (7 of 8 hunks applied
  clean via git apply --reject, the import line added manually).
- Independently reproduced devtools verify public-claims --json (4
  claims, 9 artifacts, 3 monitored surfaces, 0 problems) and
  devtools verify layering (0 violations) -- both match the packet's
  own claimed output exactly.
- The packet flagged test_archive_tiers_api_archive_debt_reads_archive_consistency
  as a pre-existing "database source_debt is locked" failure unrelated
  to its patch. Reproduced this independently on the unrelated ann-01
  worktree (clean master plus an unrelated feature) to confirm it is
  a genuine baseline/environmental flake, not something this patch
  introduced.

Verification:
- devtools test tests/unit/insights/measurement/test_public_claims.py tests/unit/storage/test_public_claims_projection.py tests/unit/devtools/test_public_claims.py -> 31 passed
- devtools test tests/unit/scenarios/test_demo_archive_convergence.py tests/unit/storage/test_archive_tiers_assertions.py tests/unit/devtools/test_generated_surfaces.py tests/unit/devtools/test_release_readiness.py tests/unit/devtools/test_render_docs_surface.py tests/unit/devtools/test_project_motd.py tests/unit/daemon/test_standing_queries.py tests/unit/cli/test_import.py -> 84 passed
- devtools test (6 affected tests/unit/api/test_facade_contracts.py cases) -> 6 passed, 1 pre-existing unrelated flake classified above
- ruff format --check / ruff check on all 16 touched Python files -> clean
- mypy --strict on all 13 touched production/test modules -> Success, no issues
- devtools render all --check -> exit 0, no drift (includes regenerated topology projection/status)
- devtools verify public-claims --json -> ok, 0 problems
- devtools verify layering -> 0 violations
- devtools verify --quick -> exit_code 0

Ref polylogue-3tl.16

Co-Authored-By: Claude <[email protected]>
@Sinity
Sinity force-pushed the feature/legibility/claims-view-3tl16 branch from 922aa22 to 236eab6 Compare July 18, 2026 03:19
@Sinity
Sinity merged commit 05fbaa8 into master Jul 18, 2026
1 of 2 checks passed
@Sinity
Sinity deleted the feature/legibility/claims-view-3tl16 branch July 18, 2026 03:19
Sinity added a commit that referenced this pull request Jul 18, 2026
…nce (#3093)

## Summary

Stacked on #3090 (needs `report["evidence"]["member_refs"]` added
there).
Represents each claim-vs-evidence report run as durable archive evidence
—
a content-addressed AnalysisDefinition, an AnalysisRun receipt, and
Finding
rows — instead of just a committed `report.json`.

## Problem

`polylogue-rxdo` (It.12/It.13 scope correction) requires that queries
and
analyses be first-party data structures in Polylogue, not a bespoke
devtools
side-pipeline. The rxdo QUERY-evidence core (content-addressed query
identity, canonical-plan evaluator, watched names, result manifests,
durable refs) already landed via #2813/#2826/#2899, and the
`FindingAssertion`/`PublicClaimDeclaration` write kernel + public-claims
projection already landed via #3065 (`polylogue-3tl.16`) — but nothing
had
ever actually written a real `FindingAssertion` into the operator's live
`user.db`; the "3 seeded findings" mentioned in 3tl.16's notes only
exist in
a throwaway temp archive used by `render public-claims`'s
no-`--archive-root`
fallback. This PR adds the smallest finding materialization over the
landed
core, per the addendum's It.13 hard boundary (no metric/pattern/cohort/
experiment definition objects, no registries, no scheduler).

## Solution

`devtools/claim_vs_evidence_evidence.py`:

- **AnalysisDefinition identity** — `build_query_definition()` registers
the
  structured-failure-followup selection (predicate, classification/
  sensitivity scope, `n_min`, handler-class taxonomy, a bumpable
`CLASSIFIER_DEFINITION_VERSION`) as a content-addressed `QueryObject`
via
  `put_query`. Deliberately not a DSL-executable plan — the paired
  next-turn/window-3 lookahead has no predicate-grammar representation —
  but stable provenance identity, matching the "durable identity JSON is
provenance, not source syntax to reverse-compile" doctrine already
stated
  in `convergence_standing_queries.py`.
- **AnalysisRun receipt** — matched `tool_result` refs become a
`ResultSetManifest` (`exactness=capped`, `persistence_class=finding`);
an
`EvaluationReceipt` binds the run to source/user/index tier generations
and the runtime build. Both are content-addressed *including* `now_ms`,
so
  a retried call at the same instant is a safe no-op, while a genuinely
later regeneration correctly records a new run instead of colliding with
  the first.
- **Finding rows** — the headline rate is written as an
  `AssertionKind.FINDING` (`finding_kind="claim-vs-evidence"`, already a
  registered kind) wired to the identities above. `public_claim` stays
  `None` unless the run's own `n_min`/classified-outcome gates are
  satisfied — an unpublishable run still gets an honest private evidence
  record, never a fabricated public rate through the existing
  public-claims projection.
- **Privacy stamp** — reuses the existing
`PublicClaimDeclaration.disclosure`
field (`public` only when publishable, otherwise no declaration at all)
  rather than inventing new privacy/retention machinery; `rxdo.2`'s
  excision/dependency-resolver layer stays explicitly out of scope.

Writes go through `open_daemon_connection` — the same connection helper
`polylogue/daemon/convergence_standing_queries.py` uses for its own
standing-query materialization — via a new opt-in
`--materialize-evidence`
flag on `devtools workspace claim-vs-evidence` (off by default; report
generation stays read-only unless explicitly requested). Not a bare
`sqlite3.connect` against the live `user.db`, and not a generic finding
registry/metric/pattern/cohort/experiment system/scheduler.

## Verification

- `devtools test tests/unit/devtools/test_claim_vs_evidence_evidence.py
  tests/unit/devtools/test_claim_vs_evidence.py
  tests/unit/storage/test_public_claims_projection.py` — 23 passed.
- `mypy --strict` on both touched devtools modules — clean.
- `devtools verify --quick` — green.
- **Live smoke test**: ran `--materialize-evidence` against the actual
live
  archive with the daemon running concurrently (pid confirmed alive
  throughout, no lock contention). Registered 1 `QueryObject`, 1
`ResultSetManifest` (20 members), 2 `EvaluationReceipt`s (two runs a few
  seconds apart), 2 private `FINDING` assertions.
  `list_public_finding_inputs()` correctly returns zero rows — today's
  n=20 result is honestly not publishable, and the projection reflects
  that rather than a fabricated rate.

Ref polylogue-rxdo.13

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Codex <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 70.F004 / P1: stale at the checked revision: The hard-coded claim-vs-evidence report/public-summary references and their path-only validator are absent from the current source and test tree. Public claims now project supplied finding/capability declarations and integrity verdicts at polylogue/analysis/measurement/public_claims.py:834-835 rather than generating the three cited claims from missing fixed artifact paths.

Only the rows listed above are dispositioned. Held findings remain open.

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