Skip to content

Overnight automated review: 98 test-gated fixes (11 bug, 6 risk, 81 quality) - #111

Merged
holkexyz merged 107 commits into
feat/positioning-redesignfrom
overnight-review
May 29, 2026
Merged

Overnight automated review: 98 test-gated fixes (11 bug, 6 risk, 81 quality)#111
holkexyz merged 107 commits into
feat/positioning-redesignfrom
overnight-review

Conversation

@hb-agent

Copy link
Copy Markdown
Collaborator

Overnight automated review — Phase 1 (survey) + Phase 2 (test-gated fixes)

Two-phase autonomous code review of feat/positioning-redesign, run as sequential workflows on this branch. Nothing here changes external behavior beyond the specific defects fixed — anything that would (API/contract/schema/dependency/architecture) was held for human decision.

Read these two files first:

  • REVIEW.md — the prioritized findings report (86 findings, each independently verified).
  • CHANGES.md — per-item change log + the Held list awaiting your decision.

Phase 1 — survey (read-only)

18 module reviewers + 6 cross-cutting lenses (authz/repo-ownership, input/XSS, session/CSRF, data-loss/privacy, dead-code/dup, deps/config). Every bug/risk/high finding was re-derived by an independent skeptic agent before inclusion. Result: 86 findings — 11 bug, 9 risk, 56 quality, 10 judgment (2 refuted/dropped).

Phase 2 — implementation (test-gated, one commit per item)

Each item: failing test first where behavior is testable → minimal fix → commit only if the full vitest suite + tsc --noEmit + lint stay green; otherwise reverted and logged BLOCKED.

Category Result
Bugs 11 / 11 implemented
Risks 6 / 6 actionable implemented (3 held — see below)
Quality 81 implemented, 3 blocked, 3 skipped
Total 98 IMPLEMENTED · 3 BLOCKED · 3 SKIPPED · 107 commits

Highlights (fixed)

  • Stored XSS — context-update attachment URIs were rendered as href with no scheme allowlist (javascript: was one-click executable); now gated through safeHttpUrl.
  • Secret leakage — XRPC proxy echoed un-redacted 4xx upstream messages; groups/register logged raw DPoP/Bearer-bearing errors. Both redacted/logSafe'd.
  • Silent data/edit loss — group-write InvalidSwap detection was dead (conflict-rebase never ran); inline-edit Save dropped in-flight avatar/banner uploads; project location was written as a strongRef but read as a string (never displayed). All fixed.
  • Broken share previews — 5 pages referenced a non-existent OG image (404 unfurls).
  • Plus crawlability/noindex compliance, dead-code removal, effect-cleanup/abort guards, a11y, design-token compliance, shared-helper extraction, and new unit tests for previously-untested security-relevant utilities.

Verification

  • Final gate: vitest 474 passing (from 291) · tsc --noEmit 0 errors · lint 0 errors / 67 warnings (down from 69; now over the broader eslint . scope).
  • No baseline test was weakened — every test-file change is an addition (audited across all 107 commits; the only deletion is an import-line expansion in badges.test.ts).
  • main untouched. No force-push. No --no-verify.

⚠️ Held for your decision (NOT implemented — see CHANGES.md § Held)

  • 10 judgment items (judgment-001…010): OAuth prompt allowlist, BFF defense-in-depth role checks, custom-domain group-awareness, profile swap-protection (lost-update), autoprefixer dependency, popover-primitive consolidation, canonical landing URL, foreign-blob caching cap, etc.
  • risk-005 / risk-007 / risk-009: write-envelope contract change, /api/resolve-did rate limiter (= judgment-002), and a new deleteFollow API surface.
  • quality-024 (= judgment-007), quality-042 (refuted), quality-004 (clean fix would require deleting a test), and 056 sub-items approot-sitemap-public-gap (coupled to judgment-005) + quality-overexport-1 (too broad).

Blocked (reverted, branch stayed green)

  • quality-002 — deleting dead cert-context.ts: 4 other branches import it (its own recommendation gated deletion on this). quality-003 still fixed the module's pagination bug.
  • quality-033useBskyPosts race not reproducible (existing requestIdRef guard already covers it).
  • quality-045 — the two list-modals diverge in user-visible behavior; no pure extraction exists → escalated to judgment.

Known follow-up (not blocking; not in CI)

quality-010 added a typecheck:test tool (tsconfig.test.json) that surfaces ~21 pre-existing type errors in test files (mostly notifications.test.ts), never type-checked before. ci.yml runs only the main tsc --noEmit (excludes tests), so CI stays green; cleaning these up is a separate effort.

Test plan

  • npm test — 474 passing
  • npx tsc --noEmit — 0 errors
  • npm run lint — 0 errors / 67 warnings
  • Review REVIEW.md judgment items and decide the Held list
  • Decide whether to delete cert-context.ts (quality-002) given cross-branch usage

Opened as Draft — not merging; that's your call.

🤖 Generated with Claude Code

holkexyz and others added 30 commits May 28, 2026 22:53
REVIEW.md: 86 verified findings from an 18-module + 6-lens read-only
review (11 bug, 9 risk, 56 quality, 10 judgment). CHANGES.md: running
log for the test-gated Phase 2 auto-implementation. Judgment items and
behavior/API/dependency-changing items are held for human decision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Single chronological Log section so Phase 2 agents append deterministically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ug-001]

Closes a stored javascript: XSS reachable from federated PDS records.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Five pages referenced a non-existent certified-hero file, serving 404 unfurls.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Group activity/project routes now echo the atproto error code so writeToRepo re-raises InvalidSwapError and conflict-rebase runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Save fired mid-upload no longer re-persists the stale base image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Project location was written as { uri, cid } but read via asString, so the Location meta row never rendered; resolve the strongRef to its place name like the edit page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Map permitted/denied to their color classes instead of always --unknown

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…007]

Owner inbox now passes includeRejected:true so rejected endorsements stay visible and can be un-rejected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Failed image uploads no longer publish silently without the previewed image

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Show the picked banner immediately instead of the stale saved banner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…010]

Push a ReactNode meta entry so the pin travels with the locations text

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-011]

Stale-DID loadMore no longer appends to the reset list after a profile switch; appended records are deduped by uri.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
atproto 4xx errors can embed JWT/DPoP/Bearer fragments; redact before returning to the client

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Raw console.error leaked DPoP/Bearer tokens via err.cause/stack/message

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…[risk-004]

Sanitize untrusted input server-side per AGENTS.md §17.6/§24.5 instead of forwarding it verbatim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prevents orphaning a fresh location record when the org-marker write fails and the user retries.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep /home, /explore, /search, /activity out of search indexes per AGENTS §18.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
401 on the getRecord re-read now fires onUnauthorized instead of being swallowed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removes unreachable component with 0 importers; also closes bug-011's reachable path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ity-003]

Walk the listRecords cursor so matches past the first page aren't dropped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-005]

EndorseShortcut was never rendered and the optimistic overlay was inert; collapse displayReceived to received.endorsements.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-011]

Remove never-imported helpers incl. a deprecated, filter-inverting fn

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Zero importers; superseded by inline CertHeadlineColumns in ActivityDetail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removes unused component and corrects the stale comment referencing it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop phantom GlobalFeed/PersonalFeed/UserFeed names; cite profile-certs and project-detail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Enforces the documented lint/tsc/vitest baseline on PRs into staging/main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Surface previously-unchecked test-file type errors without touching the production tsc gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match Vercel runtime (Next 16 requires Node >=20.9.0) to avoid build drift

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
holkexyz and others added 22 commits May 29, 2026 02:51
…uality-056-explore-3]

Sort and quality-filter popover triggers now announce a popup to AT, matching sibling dropdown triggers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…6-groups-3]

Replaces hand-rolled signin-modal backdrop with shared ConfirmDialog for focus trap/Esc/scroll-lock (CLAUDE.md rule 7).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ity-056-groups-4]

Both components have zero importers; removes invariant-token inline styles (resolves groups-5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…quality-056-auth-redirect-1]

Original test reassigned a module-level var inside a render component, tripping the React-Compiler lint rule (1 error); renderHook avoids it. Restores 0-error lint gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-groups-6]

Avoid double-adding members the service already accepted on retry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ofile-edit-2]

onRemove is live via the inline-edit flow; dropping it would regress behavior

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…by [quality-056-profile-edit-3]

Raw profile-edit fields now point screen readers at their validation error <p>.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ality-056-profile-edit-5]

Drop write-once hasPending; release local preview when parent banner clears so it can't desync from the displayed image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e-edit-4]

Use --navy-overlay-70 scrim + --color-white icon instead of raw bg-black/text-white

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…landing-deadcode-1]

Removes 354 lines of unreferenced code with embedded raw rgba/box-shadow/zIndex

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…056-landing-darkmode-1]

Replace raw text-blue/text-gray utilities (pinned to light mode) with --color-accent/--fg-muted tokens so legal/marketing pages flip in dark mode; drop inert prose-navy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…6-approot-global-error-tokens]

Match var(--radius) and document why tokens are inlined in the root error boundary

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…056-approot-agents-dep-version-drift]

Correct stale @atproto/api version and add next-themes/tiptap/leaflet rows

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uality-056-authz-repo-3]

Eliminates two duplicated bare role arrays that could silently drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ity-056-authz-repo-4]

Stop paginating a group's member list once the owner's self-added entry is found; behavior-preserving.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…y-056-notif-row-1]

Drops the drifted local truncateDid copy and hand-rolled initials for the shared utils.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…LABELS [quality-056-deadcode-4]

Removes unused filter vocabulary and helpers with zero importers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…Viewed/ORG_PROFILE_COLLECTION [quality-056-deadcode-6]

Remove three unreferenced exports (0 importers each) to shrink dead surface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ils-tests-2]

Lock in DID validator behavior gating route guards.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uality-056-utils-tests-3]

Lock in eviction/cap, UTC formatting, IP header parsing, and dedupe/cap behavior

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
certified-app Ready Ready Preview, Comment May 29, 2026 9:33am

Request Review

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f5c1ffd9-23dd-4fc9-9653-d85edc322ce6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch overnight-review

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 and usage tips.

@holkexyz
holkexyz marked this pull request as ready for review May 29, 2026 09:33

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@holkexyz
holkexyz merged commit b75955f into feat/positioning-redesign May 29, 2026
3 checks passed
@holkexyz
holkexyz deleted the overnight-review branch May 29, 2026 09:33
hb-agent pushed a commit that referenced this pull request May 29, 2026
Resolves PR #110 conflicts against the merged overnight-review work
(PR #111). PR #110 and overnight-review's quality-005 independently
removed the same dead received-overlay + EndorseShortcut; the conflicts
were reconciled to keep BOTH intents:

- profile-endorsements.tsx: kept the base (extracted PersonCard via
  quality-012, useClickOutsideClose, stable comparators); PR #110's
  overlay removal was already satisfied. Re-added PR #110's accurate
  'overlay now lives in the hook' comment.
- use-received-endorsements.ts: auto-merged — PR #110's shared optimistic
  overlay (module store + useSyncExternalStore) AND quality-032's
  focus-revalidation AbortController both retained.
- profile-sidebar.tsx + endorse-reason-confirm.ts: kept quality-048's
  testable orchestrator and threaded PR #110's optimistic push through a
  new optional onAwardCreated callback (fires the instant the award
  lands), so the sidebar still updates the counter + Received tab
  immediately. Added two unit tests for the new callback path.

Gate: vitest 476 passing, tsc 0 errors, lint 0 errors / 67 warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants