Skip to content

docs(readme): richer real-output showcase + data-flow diagram - #3257

Merged
Sinity merged 1 commit into
masterfrom
feature/docs/readme-iteration-2
Jul 21, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/docs/readme-iteration-2

Conversation

@Sinity

@Sinity Sinity commented Jul 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Iteration 2 of the README (operator-directed: richer, more impressive real examples, better readability/aesthetics). Adds: archive-scale framing (83K sessions / 4.7M messages), per-year histogram, pytest-by-exit-status block (shows the structural unknown lane), and a Mermaid data-flow diagram. All outputs are real, captured against the live archive 2026-07-22 and privacy-reviewed (aggregates + this repo's own dev content only).

Problem

The rewritten README (#3190) shows real outputs but stays narrow: three examples, no visual structure, no sense of archive scale.

Solution

  • Mermaid flowchart: sources → source.db → index.db (+user.db) → CLI/MCP/HTTP/Python.
  • Scale sentence verified against the daemon heartbeat (83,198 / 4,761,552).
  • Year histogram with an honest note: dated top-level sessions only — fact-checking this surfaced a real P1 (polylogue-m3p9: 79% of sessions have NULL sort_key, so since: silently excludes them).
  • pytest outcome aggregate: 12,861 ok / 1,039 failed / 115 unknown.

Verification

  • devtools verify public-claims --json → ok: true (marker intact).
  • devtools verify --quick → exit 0.
  • Every console block re-run verbatim before inclusion.

Ref polylogue-93cp

🤖 Generated with Claude Code

https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ

Summary by CodeRabbit

  • Documentation

    • Updated the “See it work” section with a Mermaid diagram illustrating the ingestion-to-surfaces workflow.
    • Refreshed example descriptions to clarify that they use real archive commands.
    • Added an example showing tool activity grouped by actual pytest exit status, including unknown results.
  • Bug Fixes

    • Recorded completion of a maintenance optimization for bulk search-index deletions, with verification and regression coverage.

Adds archive-scale framing (83K sessions / 4.7M messages, verified against
the live heartbeat), a per-year dated-session histogram with an honest note
about undated subagent/sidecar sessions, a pytest-outcomes-by-exit-status
block showing the structural unknown lane, and a Mermaid data-flow diagram
(sources -> source.db -> index.db + user.db -> four read surfaces) for
visual structure. All console outputs are real command transcripts captured
2026-07-22; fact-checking the histogram surfaced polylogue-m3p9 (79% of
sessions lack sort_key_ms), noted honestly in the framing.

Ref polylogue-93cp

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The README now presents an ingestion pipeline and an additional pytest status query. The issue ledger adds a session timestamp attribution bug and closes the bulk FTS/trigram delete maintenance issue with implementation and verification notes.

Changes

README demonstrations

Layer / File(s) Summary
README pipeline and query examples
README.md
Adds a Mermaid ingestion pipeline, updates the archive example framing, and demonstrates pytest actions grouped by is_error, including an unknown group.

Issue record updates

Layer / File(s) Summary
Issue status and implementation records
.beads/issues.jsonl
Adds the polylogue-m3p9 timestamp attribution issue and closes polylogue-crd8 with bulk-delete implementation, testing, and live-ingest notes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the README-focused docs update and highlights the main additions: richer real-output examples and a data-flow diagram.
Description check ✅ Passed The description covers Summary, Problem, Solution, and Verification well; only the Changelog and Risks/Follow-ups sections are missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/docs/readme-iteration-2

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: 9bcbb9bdea

ℹ️ 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 README.md Resolved

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.beads/issues.jsonl:
- Line 61: Correct the future-dated “Found 2026-07-22” claim in the issue
description so it aligns with the existing July 21, 2026 ledger timestamps, or
update those timestamps only if the observation genuinely occurred later; keep
the provenance internally consistent.
- Line 61: The issue title inaccurately attributes the measured NULL rate to
created_at_ms, while the evidence checks sort_key_ms. Update the issue title to
reference sort_key_ms, or revise the description to report created_at_ms and
updated_at_ms NULL rates separately; keep the existing scope and findings
unchanged.

In `@README.md`:
- Around line 101-111: Update the README prose above the query to describe only
pytest invocations within Bash actions and refer to grouping by error status
rather than actual exit status. Keep the existing query and example counts
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f34ffb90-707d-4f50-bc42-d0f7c926d3e3

📥 Commits

Reviewing files that changed from the base of the PR and between b4c3d30 and 9bcbb9b.

📒 Files selected for processing (2)
  • .beads/issues.jsonl
  • README.md

Comment thread .beads/issues.jsonl
{"_type":"issue","id":"polylogue-tf2.1","title":"Rerun forensics on current archive; price origin_reported providers","description":"Rerun scripts/agent_forensics.py against the current archive (v23+); price origin_reported providers via the vendored LiteLLM catalog (match last path segment); all-provider headline or explicitly-labeled per-provenance figures that cannot be misread; record deltas vs 06-27; verify chart SVGs render. Cache-inclusion must be disambiguated (Codex input INCLUDES cached ~96%; see bd memories). Also blocked on logical-session token attribution — the headline must not be double-counted.","notes":"Correction to close_reason monetary values: stored/provider-priced subset was $239,453.14; catalog API-equivalent was $318,650.88; origin_reported catalog estimate was $79,197.74. The original close_reason text lost dollar-prefixed digits due shell expansion, not measurement drift.","status":"closed","priority":0,"issue_type":"task","assignee":"Sinity","owner":"[email protected]","created_at":"2026-07-03T04:31:33Z","created_by":"Sinity","updated_at":"2026-07-03T09:59:13Z","started_at":"2026-07-03T09:28:10Z","closed_at":"2026-07-03T09:59:02Z","close_reason":"Completed with blocker caveat preserved: scripts/agent_forensics.py now prices origin_reported rows through the shared vendored LiteLLM pricing catalog while preserving stored provenance; report separates stored/provider-priced cost from catalog API-equivalent estimates and carries logical-session/cache caveats instead of claiming final billing reconciliation. Regenerated current artifact at .agent/demos/agent-forensics against /home/sinity/.local/share/polylogue schema v23: 16,498 physical sessions, 4,142,175 messages, 356.5B tokens, ,453.14 stored/provider-priced subset, ,650.88 catalog API-equivalent, and ,197.74 origin_reported catalog estimate. SVG parse check passed for 9 charts; devtools test tests/unit/scripts/test_agent_forensics.py passed; devtools verify --quick passed run 20260703T095718Z-quick-753466-96559776; devloop-review clean. Remaining final-reconciliation blocker stays open as polylogue-4ts.2.","labels":["area:usage","campaign"],"dependencies":[{"issue_id":"polylogue-tf2.1","depends_on_id":"polylogue-4ts.2","type":"blocks","created_at":"2026-07-03T06:32:45Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-tf2.1","depends_on_id":"polylogue-sru.7","type":"blocks","created_at":"2026-07-03T06:31:33Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-tf2.1","depends_on_id":"polylogue-tf2","type":"parent-child","created_at":"2026-07-03T06:31:33Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":2,"dependent_count":2,"comment_count":0}
{"_type":"issue","id":"polylogue-tf2","title":"Campaign: agent-forensics regeneration + all-provider repricing","description":"Regenerate the agent-forensics packet on the current archive with an honest all-provider headline. The 2026-06-27 report (546.6B tokens, $89,368 API-list equivalent, 216x cache amplification) is the most stranger-legible artifact on any shelf, but its numbers are pre-dedup stale and the headline prices only the priced-provenance subset (Claude Code cost_usd rows); Codex/ChatGPT/Gemini are origin_reported token counts with no dollar value (operator estimate ~$150K all-provider). Sequenced after claim-vs-evidence per operator direction 2026-07-02.","design":"Current slice design: turn the existing agent-forensics/cost headline into a product-backed all-provider repricing artifact. First inspect devtools/scripts and polylogue analyze surfaces for agent_forensics/cost code. Use active archive usage headline (detail=headline) for authoritative physical_session and logical_session_model_high_water token totals. Keep priced-provenance dollars and origin-reported token estimates separate: do not multiply every token by one blended price without a labeled lane. Add or reuse a shared pricing/projection helper so the demo artifact is regenerated from Polylogue product code, not ad hoc SQL. Acceptance for this slice: the generated agent-forensics artifact names archive root/schema, includes physical vs logical token grain, separates priced subset from origin-reported estimate lanes, gives reproduction commands, and has focused tests for any new repricing helper/surface.","acceptance_criteria":"Terminal state: regenerated forensics packet on the current archive with an honest all-provider headline (priced subset AND origin-reported estimate lanes separated), agent_forensics.py folded into polylogue analyze (tf2.2), artifact on the demo shelf with reproduction commands, cold-reader gate passed. Epic closes only when that artifact is recorded.","status":"closed","priority":0,"issue_type":"epic","assignee":"Sinity","owner":"[email protected]","created_at":"2026-07-03T04:31:32Z","created_by":"Sinity","updated_at":"2026-07-03T19:06:44Z","started_at":"2026-07-03T18:47:23Z","closed_at":"2026-07-03T19:06:44Z","close_reason":"Completed: provider usage headline now exposes product-backed pricing lanes in polylogue analyze usage --detail headline, separating stored/provider-priced cost from catalog API-equivalent estimates for origin_reported rows. Regenerated the current .agent/demos/agent-forensics artifact against /home/sinity/.local/share/polylogue schema v23: physical-session tokens 395,320,980,423; logical high-water tokens 288,741,229,728; stored/provider-priced USD 243,392.189328; catalog API-equivalent USD 337,565.031618; priced lane 13,889 rows / 12,331 sessions / 12,650 matched rows; origin_reported lane 2,308 rows / 2,270 sessions / 2,302 matched rows. Verification: live polylogue --plain analyze usage --detail headline --format json --limit 0 wrote /realm/tmp/polylogue-usage-headline-pricing-current.json; devtools test tests/unit/storage/test_provider_usage_report.py tests/unit/cli/test_diagnostics.py passed 23 tests; devtools verify --quick passed run 20260703T190553Z-quick-2226137-d91d4e8f; devtools workspace demo-shelf --json reported ok. Non-claim preserved: this is not final billing reconciliation and physical/logical token grains stay explicitly separated.","labels":["area:usage","campaign","size:M","spine"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"polylogue-sru","title":"Campaign: claim-vs-evidence report to finding-grade","description":"Terminal state: an externally publishable finding ('how often do coding agents proceed past failed tool calls, by model/tool') with stated sample frame, calibrated markers, benign/consequential split, seeded stranger-runnable reproduction, and a passed cold-reader gate. Slice closure is NOT campaign closure; this epic stays top-of-frame until its terminal state is recorded.\\n\\nState as of 2026-07-03 after calibrated active-archive regeneration: archive root /home/sinity/.local/share/polylogue, index schema v23, 41,886 structured failures total, 5,000 origin-stratified failures inspected (3,746 claude-code-session, 1,247 codex-session, 7 claude-ai-export), 100 unpaired structured failures. Marker vocabulary was tightened to avoid broad issue/fix/block/gitignored false positives. Immediate next-turn totals: acknowledged=420, silent_proceed=1,205, ambiguous=3,375 (2,624 wordless tool continuations; 751 prose without marker). Lower-bound silent rate is 24.1%; among classified immediate next turns, silent rate is 74.2%. Next-3 sensitivity window, stopping before the next user message, finds 302 acknowledgments that appear only after the next turn; window3 silent lower bound is 37.0%. Calibration: 50 hand-labeled immediate-next-turn rows, acknowledged-marker precision=1.0, recall=0.8421052631578947, invalid rows=0. Artifact: .agent/demos/claim-vs-evidence/claim-vs-evidence.report.json.","notes":"2026-07-03 update: methodology package is now cold-read gated. .agent/demos/claim-vs-evidence contains aggregate live evidence, public-summary.json, PUBLIC_REPRODUCTION.md, COLD_READER_GATE.md, and COLD_READ_RESULT.md. Seeded reproduction is meaningful, not empty: 4 structured failures, 2 acknowledged follow-ups, 2 silent-proceed follow-ups, 0 unpaired. Cold-reader subagent PASS recovered claim/non-claim, sample frame, rates, calibration, caveats, and reproduction commands from the artifact directory only. Remaining campaign child: polylogue-sru.1 productizes action-unit outcome/followup_class capability.","status":"closed","priority":0,"issue_type":"epic","owner":"[email protected]","created_at":"2026-07-03T04:31:26Z","created_by":"Sinity","updated_at":"2026-07-03T09:28:09Z","closed_at":"2026-07-03T09:28:09Z","close_reason":"Completed: all seven campaign children are closed. The claim-vs-evidence finding now has bounded sample-frame reporting, calibrated marker precision/recall, handler-class and next-3 sensitivity splits, meaningful seeded reproduction, cold-reader PASS, and productized action-unit followup_class/followup_message_ref query capability. Current artifact lives under .agent/demos/claim-vs-evidence and was regenerated against /home/sinity/.local/share/polylogue schema v23.","labels":["area:substrate","campaign"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"polylogue-m3p9","title":"sessions.created_at_ms NULL for 79% of archive: since:/recency silently exclude 65,946 sessions","description":"Found 2026-07-22 while fact-checking README examples: SELECT count(*), sum(sort_key_ms IS NULL) FROM sessions on the promoted v43 archive = 83,198 total, 65,946 NULL (79%). sort_key_ms = COALESCE(updated_at_ms, created_at_ms), both plain columns the writer only sets when the provider payload carries session-level timestamps. Result: find since:… matched exactly 17,252 (= the non-NULL population) — date filters, --by year/month histograms, and recency ordering silently exclude four-fifths of the archive, including most claude-code subagent sessions and hermes/observer material, even though their MESSAGES carry timestamps.","design":"Derive session timestamps from message evidence at write/materialize time: created_at_ms = min(message timestamp), updated_at_ms = max(message timestamp) when the provider gives none at session level (messages table already stores per-message timestamps for these origins). Classify: additive-derived (index tier) — either benign in-place backfill on same-version open (benign-DDL/backfill registry) or fold into next semantic bump; the insight/profile layer may already compute first/last message times (session_profiles) — prefer deriving the sessions columns from the same source rather than a second scan. Verify since:/analyze --by coverage jumps from 17,252 to ~all sessions with any timestamped message; regression test: session whose payload lacks session-level timestamps but has dated messages gets non-NULL sort_key_ms.","acceptance_criteria":"since:/until:/recency and --by year/month cover every session that has at least one timestamped message; NULL sort_key remains only for genuinely undatable sessions (count them in the receipt); regression test for the derive-from-messages path; live archive backfilled with receipt.","status":"open","priority":1,"issue_type":"bug","owner":"[email protected]","created_at":"2026-07-21T22:59:34Z","created_by":"Sinity","updated_at":"2026-07-21T22:59:34Z","labels":["area:query","area:storage"],"dependency_count":0,"dependent_count":0,"comment_count":0}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Correct the future-dated discovery claim.

The description says “Found 2026-07-22,” while the issue was created and updated on July 21, 2026. Correct the observation date or update the ledger timestamps after the observation actually occurred so the provenance is internally consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.beads/issues.jsonl at line 61, Correct the future-dated “Found 2026-07-22”
claim in the issue description so it aligns with the existing July 21, 2026
ledger timestamps, or update those timestamps only if the observation genuinely
occurred later; keep the provenance internally consistent.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Name the measured column accurately.

The evidence measures sort_key_ms IS NULL, not created_at_ms IS NULL; a non-null updated_at_ms can make sort_key_ms non-null while created_at_ms remains NULL. Rename the title to reference sort_key_ms, or report both underlying columns separately.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.beads/issues.jsonl at line 61, The issue title inaccurately attributes the
measured NULL rate to created_at_ms, while the evidence checks sort_key_ms.
Update the issue title to reference sort_key_ms, or revise the description to
report created_at_ms and updated_at_ms NULL rates separately; keep the existing
scope and findings unchanged.

Comment thread README.md
Comment on lines +101 to +111
The same structure answers sharper questions. Every `pytest` invocation any
agent ever ran here, split by its **actual exit status** — including the
honest `unknown` lane for results the provider never reported:

```console
$ polylogue "actions where tool:Bash AND command:pytest | group by is_error | count"
is_error=0 count=12861
is_error=1 count=1039
is_error=unknown count=115
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align the prose with the query’s scope and grouping field.

tool:Bash excludes pytest runs recorded under other execution tools such as shell and exec_command, so “Every pytest invocation” overclaims. Also, group by is_error reports error classification, not actual exit status. Narrow the wording to Bash actions grouped by error status, or group by exit_code if exit status is intended.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 101 - 111, Update the README prose above the query to
describe only pytest invocations within Bash actions and refer to grouping by
error status rather than actual exit status. Keep the existing query and example
counts unchanged.

@Sinity
Sinity merged commit 26f02d0 into master Jul 21, 2026
3 checks passed
@Sinity
Sinity deleted the feature/docs/readme-iteration-2 branch July 21, 2026 23:18
@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.

  • 51.F098 / P2: fixed-already at the checked revision: The example is now titled query tool outcomes, shows its explicit tool:Bash predicate, and labels the counts as abbreviated historical example output (README.md:113-125). The removed Every pytest invocation claim no longer presents this exact Bash-only selection as cross-agent totals.

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