Skip to content

feat: add whats-new review feed#55

Merged
darron merged 1 commit into
mainfrom
whats-new-two
Jun 22, 2026
Merged

feat: add whats-new review feed#55
darron merged 1 commit into
mainfrom
whats-new-two

Conversation

@darron

@darron darron commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Add a derived, read-only review feed over local SQLite so CLI, HTTP, and MCP callers can review newly imported, updated, enriched, failed, or blocked evidence after a timestamp or continuation cursor. The feed normalizes event timestamps to UTC, uses deterministic cursor pagination, supports imports/enrichments/failures filters, and preserves empty arrays in structured JSON output.

Expose the feed as dbrain whats-new, GET /api/whats-new, and MCP dbrain_whats_new. Keep the default events view for raw pipeline chronology and add view=entities for compact item/source groups with preferred summaries, collapsed event kinds, actionability, importance, and compact event refs.

Add migration 11 with review-feed timestamp indexes for items, sources, feed entries, and item enrichments, and align fresh database schema creation with upgraded databases. Update command, MCP, README, route-capability, changelog, and dbrain MCP skill docs around the new agent review workflow.

Behavior changes:

  • adds a new root CLI command and authenticated web API route
  • adds a new read-only MCP tool with explicit output schema
  • opens the CLI store normally so review-feed indexes/migrations can apply
  • rejects ambiguous date-only since values and unknown type/view filters
  • requires exactly one of since or cursor on all surfaces

Risks:

  • this is a derived read-side feed, not a durable activity log, so it can only surface events with trustworthy existing timestamps
  • view=entities pagination is still event-based, so multi-page callers must de-duplicate entity rows by entity_key
  • review importance and actionability are deterministic hints, not filtering or ranking authority

Follow-ups:

  • consider a durable review_events table if derived unions become ambiguous or too expensive
  • add agent ack/claim state, watchlists, sync cursor output, or a web review UI only after the v1 feed proves stable
  • add categorization events once categorization writes trustworthy timestamps

Closes #54

Add a derived, read-only review feed over local SQLite so CLI, HTTP, and MCP
callers can review newly imported, updated, enriched, failed, or blocked
evidence after a timestamp or continuation cursor. The feed normalizes event
timestamps to UTC, uses deterministic cursor pagination, supports
imports/enrichments/failures filters, and preserves empty arrays in structured
JSON output.

Expose the feed as `dbrain whats-new`, `GET /api/whats-new`, and MCP
`dbrain_whats_new`. Keep the default `events` view for raw pipeline chronology
and add `view=entities` for compact item/source groups with preferred summaries,
collapsed event kinds, actionability, importance, and compact event refs.

Add migration 11 with review-feed timestamp indexes for items, sources,
feed entries, and item enrichments, and align fresh database schema creation
with upgraded databases. Update command, MCP, README, route-capability,
changelog, and dbrain MCP skill docs around the new agent review workflow.

Behavior changes:
- adds a new root CLI command and authenticated web API route
- adds a new read-only MCP tool with explicit output schema
- opens the CLI store normally so review-feed indexes/migrations can apply
- rejects ambiguous date-only `since` values and unknown type/view filters
- requires exactly one of `since` or `cursor` on all surfaces

Risks:
- this is a derived read-side feed, not a durable activity log, so it can only
  surface events with trustworthy existing timestamps
- `view=entities` pagination is still event-based, so multi-page callers must
  de-duplicate entity rows by `entity_key`
- review importance and actionability are deterministic hints, not filtering or
  ranking authority

Follow-ups:
- consider a durable `review_events` table if derived unions become ambiguous or
  too expensive
- add agent ack/claim state, watchlists, sync cursor output, or a web review UI
  only after the v1 feed proves stable
- add categorization events once categorization writes trustworthy timestamps
@darron darron self-assigned this Jun 22, 2026
@darron darron added the enhancement New feature or request label Jun 22, 2026
@github-actions

Copy link
Copy Markdown

PR Diff Stats

PR #55 changed 32 file(s), with +4,197 / -15 (4,212 changed lines).

Bucket Files Additions Deletions Changed
Docs 8 +1,188 -12 1,200
Tests 5 +1,309 -1 1,310
Migrations 1 +8 -1 9
Generated 0 +0 -0 0
Lockfiles 0 +0 -0 0
Config / Ops 0 +0 -0 0
Code 18 +1,692 -1 1,693
Total 32 +4,197 -15 4,212

Largest Changed Files

File Bucket Additions Deletions Changed
docs/whats-new.md Docs +1,078 -0 1,078
internal/store/review_events_test.go Tests +768 -0 768
internal/store/review_events_sql.go Code +263 -0 263
internal/store/review_events_group.go Code +239 -0 239
internal/mcpserver/server_test.go Tests +220 -0 220
internal/app/whats_new_output.go Code +193 -0 193
internal/store/review_events_scan.go Code +160 -0 160
internal/app/app_test.go Tests +152 -1 153
internal/store/review_events_types.go Code +144 -0 144
web/server_test.go Tests +142 -0 142
Bucket rules
  • Docs: Markdown/text docs such as docs/**, README.md, and other *.md or *.txt files
  • Tests: *_test.go, test/, tests/, e2e/, and JS/TS *.test.* or *.spec.* files
  • Migrations: schema migration/init files such as internal/store/migrations.go and internal/store/schema_init.go
  • Generated: local runtime/generated surfaces such as data/, logs/, tmp/, vault/, and web/ui/dist/
  • Lockfiles: dependency lockfiles such as go.sum and package-lock.json
  • Config / Ops: CI, config, packaging, skills, deploy, and scripting files such as .github/, packaging/, skills/, scripts/, Makefile, Dockerfile, Taskfile.yml, config.yaml.sample, and fly.toml
  • Code: everything else

@darron darron merged commit 4469c2a into main Jun 22, 2026
2 checks passed
@darron darron deleted the whats-new-two branch June 22, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

What's New

1 participant