Skip to content

refactor: isolate Featured evidence reads - #5003

Merged
vincentkoc merged 1 commit into
mainfrom
refactor-featured-evidence-reader
Nov 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor-featured-evidence-reader

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Search report assembly imported the registered Featured action module to collect read-only evidence. That tied a read consumer to action registration and a broader runtime context than it uses.

User Impact

No user-visible change or data migration. Featured and search reports keep their existing results, ordering, errors, and authorization checks, including the distinct ordinary-download and weekly-install rankings.

Why This Change Was Made

The existing collector and monthly reads now have one reader owner with only runQuery and runAction capabilities. All five registered functions remain unchanged. The change adds four production lines, including generated API metadata, while removing the search-report reader's dependency on the registered Featured module.

Evidence

  • Both revisions passed the 33 existing focused tests. All 74 fixed-clock cases produced identical results/errors and ordered query/action traces. The import-graph check confirms the consumer no longer reaches the registered owner; five compiler assertions verify the narrower context and unchanged result type.
  • Real disposable local Convex reads matched for plugins, skills, ordinary and weekly rankings, and moderator access. Anonymous and ordinary-user requests were rejected; complete fixture documents remained unchanged. The native run's final generated-API assertion failed because four unrelated modules already lacked generated entries on the frozen baseline. That output is retained; only this reader's two generated lines are included.
  • bun run ci:static, bun run ci:unit (10,639 passed, 6 skipped), bun run ci:types-build, bunx tsc -p packages/schema/tsconfig.json --noEmit, bunx tsc -p packages/clawhub/tsconfig.json --noEmit, bun run --cwd packages/clawhub-admin typecheck, and bunx tsc -p convex/tsconfig.json --noEmit passed. The initial unit run lacked unzip and Go on the fresh runner; after installing those system prerequisites, all 15 tests in the affected three suites and full unit coverage passed. Repository dependencies were unchanged.

Focused command: bunx vitest run convex/featuredIntelligence.test.ts convex/lib/featuredIntelligence.test.ts convex/searchReports.test.ts convex/searchWeeklyDigest.test.ts.

Source/caller review and P3 review found no remaining issue. P3 was source-only; the later unused-import, formatter-order, and generated-metadata changes received separate source review. Runtime and compiler evidence were checked separately.

AI assistance was used for implementation, validation, and review. I understand and can maintain the change.

@clawsweeper

clawsweeper Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clawhub Ready Ready Preview Nov 30, 2026 7:00am UTC

Request Review

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 30, 2026 07:00
@vincentkoc
vincentkoc merged commit 90e23fc into main Nov 30, 2026
38 checks passed
@vincentkoc
vincentkoc deleted the refactor-featured-evidence-reader branch November 30, 2026 07:05

This branch was successfully deployed

1 active deployment
Preview – clawhub — 75a71d24 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant