Skip to content

[JOI-8/15] feat(insight): add optional Friction Log summary - #1938

Open
salmonumbrella wants to merge 78 commits into
kenn-io:mainfrom
salmonumbrella:feat/friction-log-pr08
Open

salmonumbrella wants to merge 78 commits into
kenn-io:mainfrom
salmonumbrella:feat/friction-log-pr08

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Adds an optional model-written summary for a stored Friction Log digest using the existing insights generators.
  • Saves the summary for the digest and generator, lets users regenerate it, and labels it as model-written. It cannot change findings, digests, recurrence, or issues.

Saved model-written summary of a synthetic Friction Log digest

Why

A digest can be long. An opt-in overview helps a reader spot the main patterns while the deterministic findings and linked sessions remain the evidence.

Usage

Open a digest and choose Generate summary. The model receives digest counts, selected pattern titles, and P0 alerts, which may contain session IDs and brief text from a correction, workaround, or deferral. It does not receive finding text, evidence, or transcripts.

Part 8 of 15 in the stacked Friction Log series. Depends on #1937. GitHub shows the cumulative diff against main; review the PR08-only diff. Merge PR07 first. Refresh this branch against main and confirm its diff is scoped to PR08 before merging.

Refs #1908

@roborev-ci

roborev-ci Bot commented Sep 24, 2026

Copy link
Copy Markdown

roborev: Combined Review (425207a)

Verdict: Changes require fixes for 3 findings.

High

  • internal/sync/engine.go:19568: Incremental writes with signalsMaintained == false never enqueue friction recomputation, leaving friction findings stale after new messages or tool results. Queue friction recomputation for every successful incremental write, independently of signalsMaintained.

    Reported by: codex

Medium

  • internal/postgres/friction_digest.go:27: The PostgreSQL capability probe checks only digest tables, while friction_findings and friction_session_dims are also read unconditionally, allowing partial schemas to be advertised as available and fail at runtime. Include friction_findings and friction_session_dims in the capability checks.

    Reported by: codex

  • internal/db/friction_list.go:108: ListFrictionFindings queries friction_findings unconditionally, so read-only SQLite archives without the optional table return a 500 instead of an empty result. Check hasFrictionTables before querying and return an empty page when the optional tables are absent.

    Reported by: codex


Reviewers: 2 done | Synthesis: codex, 5s | Total: 14m19s

@salmonumbrella salmonumbrella changed the title [JOI-8/9] feat(insight): add optional Friction Log summary [JOI-8/15] feat(insight): add optional Friction Log summary Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant