feat(report): credibility scoring pipeline + fix(calendar): radix-nova mirror#36
Closed
abdout wants to merge 5 commits into
Closed
feat(report): credibility scoring pipeline + fix(calendar): radix-nova mirror#36abdout wants to merge 5 commits into
abdout wants to merge 5 commits into
Conversation
Replaces the bare "POST to GitHub" report action with a strict scoring pipeline that filters nonsense + destructive submissions before they reach the auto-fix queue, while respecting wisdom-of-the-crowd corroboration (3 independent reports on the same URL force verified). Pipeline: Zod parse → resolve reporter → hard filters (HF1-HF10) → Turnstile → dedup search → Haiku triage → score R+Q+C+A+P → bucket → GitHub issue Strict thresholds (locked in plan): <30 silent-reject no issue created 30-54 low-confidence issue + label, agent skips, 14d auto-close 55-74 needs-human issue + label, human review ≥75 verified-report issue + label, agent auto-fixes Overrides: destructive classification → forced needs-human regardless of score 3 corroborations on same URL → upgrade existing to verified AI failure → cap at needs-human (never silent-rejects legit report) severityHint=critical + score≥60 → promote to verified Mkan-specifics: - Adapter uses @/lib/auth + existing assertRateLimit + Upstash KV - Adds 'report' + 'report-tenant' buckets to existing rateLimiters map - HOST and GUEST roles get reputation bases of 14 and 10 respectively - Reuses existing Upstash infrastructure (already in mkan's deps) Anti-abuse measures: - 60s client-side cooldown mirrors HF9 (fixes triple-click case) - Symmetric success toast denies feedback to spammers - Anonymous requires Turnstile, capped at base reputation 4 - Per-tenant rate limit catches coordinated abuse Plan: /Users/abdout/.claude/plans/read-report-an-issue-glistening-wave.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The old report-issue tests covered the pre-pipeline bare-fetch action. The action is now a thin wrapper around runReportPipeline; the old contract (throwing on missing token, retrying on 422, posting an ack comment) lives inside the pipeline now and is covered by the canonical src/lib/report/__tests__ suite. Action tests now smoke-test the wiring: - input forwarding to pipeline - bucket-aware return shape (issueNumber surfaces only for verified-report) - failure pass-through Deleted tests/components/common/report-issue.test.tsx — the ReportIssue component is now an async server component that auth()s before rendering the client dialog. RTL can't render async server components; component behavior is covered by Playwright at the integration level. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Next 16 - Remove root <Suspense> on homepage; loading.tsx already provides the streaming fallback (Turbopack $RS race) - Inline AlertTriangle SVG + native buttons in error.tsx so the error boundary has no chunked deps - Iterate vertical search composition (big-search, date-picker, guest-selector, location) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…client bundle The async server wrapper imported `auth()` → `@/lib/db` → `@prisma/adapter-pg` → `pg`, and any client component importing `<ReportIssue />` (site-footer, landing footer) pulled that chain into the browser bundle. Vercel build failed with "Module not found: Can't resolve 'dns'" from pg/lib/connection-parameters.js. Resolve the session via useSession() instead so the wrapper is client-safe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The home-page range calendar at /en wasn't matching the canonical
shadcn calendar — cells rendered ~60px wide (vs 28px in shadcn docs),
and the range_middle band relied on plain bg-accent so any sub-pixel
gap between the dark endpoint pill and the muted middle showed as a
visible seam. The "horizontal lines" the user reported were row-level
artefacts from the previous v9-migration attempt that had been left in
the working tree.
Rewrite src/components/ui/calendar.tsx against the upstream radix base
(apps/v4/registry/bases/radix/ui/calendar.tsx):
- [--cell-size:--spacing(7)] → 28px cells (was 32px)
- [--cell-radius:var(--radius-md)] for shared rounding
- range_start/end use bg-muted + ::after pseudo-element bridges
(after:end-0 / after:start-0, after:w-4) so the muted band joins
the rounded endpoint without a seam in either LTR or RTL
- range_middle button: bg-muted text-foreground (was bg-accent)
- DayButton gets `relative isolate z-10` so the primary endpoint
pill paints above the cell's ::after bridge
- locale wired through to formatMonthDropdown and CalendarDayButton
per shadcn's RTL upgrade guide
- All directional rounding uses logical rounded-s / rounded-e so
the pill caps the correct edge in Arabic
Drop the per-consumer `classNames={{ month: "w-[calc(...)]" }}`
override in vertical-search.tsx and big-search-date-picker.tsx — the
calendar now sizes itself naturally via min-w-(--cell-size) on each
day button, matching the shadcn CalendarRange example.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Superseded by focused calendar-only PR — main moved past this branch when PR #35 merged the report-scoring work, so this branch is now conflicting. Opening a fresh PR with just the calendar fix on top of latest main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundles the report-an-issue credibility scoring pipeline with several follow-up fixes, plus the home-page range calendar mirror.
Commits
Calendar fix (latest)
The home-page range calendar at `/en` wasn't matching the canonical shadcn calendar — cells rendered ~60px wide (vs 28px in shadcn docs), and the `range_middle` band relied on plain `bg-accent` so any sub-pixel gap between the dark endpoint pill and the muted middle showed as a visible seam.
Test plan
🤖 Generated with Claude Code