Skip to content

Modernize project and evaluate profiles locally - #16

Merged
rahelmartim merged 2 commits into
mainfrom
local-evaluator
Nov 11, 2026
Merged

rahelmartim merged 2 commits into
mainfrom
local-evaluator

Conversation

@rahelmartim

@rahelmartim rahelmartim commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

The external evaluator API is being shut down. This PR moves the evaluation into this repo. It follows #15, which upgraded the stack.

  • Adds the endpoint GET /api/evaluation?user=<username>. It reads public data from the GitHub GraphQL and REST APIs and calculates the 10 criteria.
  • Runs the endpoint as a Vercel function in api/ and also in npm run dev, through a Vite middleware.
  • Adds the evaluation logic in server/ and the shared types in shared/.
  • Adds unit tests with Vitest and runs them in CI.
  • Updates the README for the new setup.

Changes in the criteria

  • "Profile photo shows your face" is now "custom profile photo", because the endpoint cannot detect faces. It checks that the avatar is not the default identicon.
  • Pinned repositories now work. The old API always returned 0.
  • Repository counts exclude forks.

Required setup

Add a GITHUB_TOKEN environment variable in the Vercel project before you merge. A fine-grained token with public repository access only is enough. Without it, the endpoint returns 500 and the site shows the error page.

Pending before merge

  • Add package-lock.json. The install could not run because the local registry token expired. CI fails until the lockfile exists, on this branch and on main.
  • Test the app in the browser after GITHUB_TOKEN is set.

Test results

The 14 unit tests pass. They ran with Bun, because Vitest is not installed yet. The endpoint was tested against real GitHub users, a user that does not exist (404), and an invalid username (400).

The Vercel preview build passes. On the preview, /evaluation/:username loads, and /api/evaluation runs and returns 500 Server is not configured, because GITHUB_TOKEN is not set yet.

🤖 Generated with Claude Code

Summary by Sourcery

Move GitHub profile evaluation into the project and expose it through a locally and remotely hosted API.

New Features:

  • Add a local GitHub profile evaluation endpoint that calculates all 10 criteria from GitHub data.
  • Run the evaluation endpoint locally through Vite and deploy it as a Vercel serverless function.
  • Share evaluation result types and username validation between the server and front end.

Bug Fixes:

  • Correct profile evaluation to support pinned repositories and exclude forked repositories from repository counts.
  • Replace face-detection grading with custom-avatar detection based on GitHub’s default identicon.

Enhancements:

  • Detect technologies from README text and common technology badge/icon URLs.
  • Document the local evaluation architecture, GitHub token setup, criteria, deployment, and development workflow.

CI:

  • Run the Vitest unit test suite in CI alongside the build.

Deployment:

  • Add Vercel serverless evaluation handling and document the required GITHUB_TOKEN configuration.

Documentation:

  • Update the README to describe the local evaluation endpoint, revised criteria, setup, routes, scripts, project structure, and deployment.

Tests:

  • Add unit tests covering avatar detection, profile evaluation, request validation, and technology detection.

The external evaluator API is being shut down. The app now calculates the
grade in its own endpoint, GET /api/evaluation?user=<username>, which reads
public profile data from the GitHub GraphQL and REST APIs.

- Add the evaluation logic in server/ and a Vercel function in api/
- Serve the same endpoint from the Vite dev server
- Detect the default identicon from the avatar PNG size
- Find technologies in skillicons, devicon, shields.io and README text
- Count pinned repositories, which the old API always returned as 0
- Add unit tests with Vitest and run them in CI
- Document the GITHUB_TOKEN setup for local use and for Vercel

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

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tge Ready Ready Preview Nov 11, 2026 12:56pm UTC

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Define the shared evaluation result, criterion keys, and username validation that the server and front end rely on.

  • shared/evaluation.ts L1-38

API

Expose the evaluation endpoint as a Vercel function and define its request validation, response, and caching behavior.

  • api/evaluation.ts L1-6
  • server/handler.ts L1-40

Uses of the API

Switch the front-end evaluation client to the local endpoint and shared result contract, and update the grade criteria type and photo label.

  • src/api/evaluator.ts L1-6, L24-33
  • src/lib/grade.ts L1, L24

Implementation

Implement GitHub profile and avatar retrieval, profile evaluation, identicon detection, and README technology detection.

  • server/avatar.ts L1-21
  • server/evaluate.ts L1-55
  • server/github.ts L1-90
  • server/technologies.ts L1-124

Add Vite middleware so local development serves the same evaluation handler as the deployed endpoint.

  • vite.config.ts L1-29

Configuration

Add the test command and configure CI to run it, while updating TypeScript, Vercel, and Vite project configuration for the server endpoint.

  • .github/workflows/ci.yml L18
  • package.json L6, L15-16, L38-39
  • tsconfig.app.json L5-9, L22-25
  • tsconfig.node.json L5-7, L14-24
  • vercel.json L2
  • src/vite-env.d.ts L2 (removed lines)

Documentation

Document the local evaluation criteria, endpoint architecture, token setup, scripts, project structure, and deployment steps.

  • README.md L16-48, L124-137, L142-154 (+6 small edits)

Tests

Add unit tests for avatar detection, profile evaluation, request handling, and technology extraction.

  • server/avatar.test.ts L1-27
  • server/evaluate.test.ts L1-54
  • server/handler.test.ts L1-22
  • server/technologies.test.ts L1-27

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

HeadersInit exists only in the DOM type library, so the type check of
the server project failed on Vercel.

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

@sourcery-ai sourcery-ai 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.

Hey - I've found 9 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="api/evaluation.ts" line_range="4" />
<code_context>
+import { handleEvaluationRequest } from "../server/handler.js";
+
+// Vercel serverless function: GET /api/evaluation?user=<username>
+export function GET(request: Request): Promise<Response> {
+  return handleEvaluationRequest(request, process.env.GITHUB_TOKEN);
+}
</code_context>
<issue_to_address>
**Production evaluation endpoint is unavailable**

When the app is deployed to Vercel using this `api/` file, vercel does not register the named `GET` export as a function handler, so requests never reach `handleEvaluationRequest` and profile evaluations fail in production.

Export the handler in the format Vercel expects for this function, or configure the deployment to use the named `GET` export.
</issue_to_address>

### Comment 2
<location path="package.json" line_range="39" />
<code_context>
     "typescript": "^5.9.3",
-    "vite": "^8.3.8"
+    "vite": "^8.3.8",
+    "vitest": "^5.1.0"
   }
 }
</code_context>
<issue_to_address>
**CI stops before tests and build**

When CI runs without a committed lockfile, `npm ci` exits because the repository has no `package-lock.json`, so the workflow never reaches the test or build steps.

Commit a `package-lock.json` that matches the dependency manifest.

Also at `.github/workflows/ci.yml:17`.
</issue_to_address>

### Comment 3
<location path="server/handler.ts" line_range="31" />
<code_context>
+  }
+
+  try {
+    const result = await evaluateProfile(new GitHubClient(token), username);
+    if (!result) return json(404, { error: "User not found" });
+    return json(200, result, {
</code_context>
<issue_to_address>
**Unauthenticated requests exhaust GitHub quota**

When an unauthenticated caller repeatedly requests uncached or nonexistent usernames, `handleEvaluationRequest` calls `evaluateProfile` for cache misses, spending the shared GitHub token’s quota; not-found responses return before receiving a cache header, so repeated misses exhaust the quota and evaluations fail for everyone.

Rate-limit uncached requests and cache not-found responses.
</issue_to_address>

### Comment 4
<location path="server/github.ts" line_range="46" />
<code_context>
+  /** Returns `null` when the user does not exist. */
+  async getProfile(login: string): Promise<GitHubProfile | null> {
+    const response = await this.fetchImpl(`${GITHUB_API}/graphql`, {
+      method: "POST",
+      headers: this.headers(),
+      body: JSON.stringify({ query: PROFILE_QUERY, variables: { login } }),
</code_context>
<issue_to_address>
**Stalled upstream calls exhaust requests**

When gitHub or the avatar host accepts a request but does not complete it promptly, `GitHubClient` awaits `fetchImpl` without a timeout or abort signal for the GraphQL, README, and avatar requests. If an upstream connection stalls, `handleEvaluationRequest` remains pending until the platform terminates the invocation, and the caller receives a failed evaluation.

Apply a bounded timeout to each upstream request and return a controlled error when it expires.

Also at `server/github.ts:67`, `server/github.ts:84`.
</issue_to_address>

### Comment 5
<location path="server/github.ts" line_range="76" />
<code_context>
+// Vercel serverless function: GET /api/evaluation?user=<username>
+export function GET(request: Request): Promise<Response> {
+  return handleEvaluationRequest(request, process.env.GITHUB_TOKEN);
+}
</code_context>
<issue_to_address>
**Large READMEs exhaust function resources**

When a public profile README is unusually large, `getProfileReadme` buffers the entire raw README, then `evaluateProfile` passes it to `findTechnologies`, which scans it repeatedly. A caller can target a profile with a very large README to consume excessive memory and CPU in the serverless function, causing evaluations to time out or fail.

Enforce a maximum README response size before buffering or parsing its contents.
</issue_to_address>

### Comment 6
<location path="server/handler.ts" line_range="31" />
<code_context>
+  }
+
+  try {
+    const result = await evaluateProfile(new GitHubClient(token), username);
+    if (!result) return json(404, { error: "User not found" });
+    return json(200, result, {
</code_context>
<issue_to_address>
**Development loads duplicate GitHub calls**

When a developer loads an evaluation page with the development server running, react StrictMode runs the evaluation effect twice in development; aborting the first browser fetch does not cancel `handleEvaluationRequest` or its `evaluateProfile` call, so both requests make the GitHub profile, README, and avatar requests and consume the configured token’s quota.

Coalesce concurrent evaluations for the same username in the development server, or otherwise prevent the StrictMode cleanup request from starting duplicate GitHub work.
</issue_to_address>

### Comment 7
<location path="server/handler.ts" line_range="34" />
<code_context>
+    const result = await evaluateProfile(new GitHubClient(token), username);
+    if (!result) return json(404, { error: "User not found" });
+    return json(200, result, {
+      "Cache-Control": "public, s-maxage=600, stale-while-revalidate=3600",
+    });
+  } catch (error) {
</code_context>
<issue_to_address>
**Profile grades stay stale too long**

When a profile changes after its cached result has expired and a request arrives during the stale-while-revalidate window, vercel can serve the cached response for up to an additional hour while revalidating it, so a changed profile continues to show its old grade and `evaluatedAt` after the documented 10-minute cache period.

Remove the extra stale window or shorten it to the maximum staleness the app intends to expose.
</issue_to_address>

### Comment 8
<location path="server/technologies.ts" line_range="99" />
<code_context>
+  for (const match of readme.matchAll(/skillicons\.dev\/icons\?i=([\w,+#.-]+)/gi)) {
+    ids.push(...match[1].split(","));
+  }
+  for (const match of readme.matchAll(/devicons?\/(?:devicon\/[^"'\s)]*?)?icons\/([\w+#.-]+)\//gi)) {
+    ids.push(match[1]);
+  }
</code_context>
<issue_to_address>
**Devicon technologies are omitted**

When a README uses a Devicon image URL with a version suffix such as `@latest`, the URL pattern in `findTechnologies` does not match that Devicon path, so it removes the URL without extracting its icon ID and awards too few technology points.

Update the Devicon URL pattern to match version-suffixed paths such as `devicon@latest/icons/...`.
</issue_to_address>

### Comment 9
<location path="server/evaluate.test.ts" line_range="5" />
<code_context>
+import { evaluateProfile } from "./evaluate.js";
+import type { GitHubClient, GitHubProfile } from "./github.js";
+
+const PHOTO = new Uint8Array([0xff, 0xd8, 0xff]);
+
+function fakeClient(profile: GitHubProfile | null, readme: string | null): GitHubClient {
</code_context>
<issue_to_address>
**Default avatars still earn photo points**

When the evaluator is changed to grant the photo point without checking whether the avatar is a default identicon, the “gives 10 points for each passed criterion” test still passes if `evaluateProfile` unconditionally awards the photo point: its fake client returns this JPEG for the avatar, which the current identicon check already treats as non-identicon. The test therefore does not catch default avatars earning points.

Use a valid default-identicon PNG fixture in an `evaluateProfile` test and assert that `hasPhoto` is false.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 9 findings to address first, and if the evaluation logic is wrong, the endpoint can return an incorrect grade that may remain in Vercel’s shared cache after a revert until it expires or is refreshed. The result is bounded and repairable; the endpoint only reads public GitHub data and does not persist changes or trigger external actions.

Blocking findings: api/evaluation.ts:4, package.json:39, server/handler.ts:31, server/github.ts:46, server/github.ts:76, and 4 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread api/evaluation.ts
import { handleEvaluationRequest } from "../server/handler.js";

// Vercel serverless function: GET /api/evaluation?user=<username>
export function GET(request: Request): Promise<Response> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical · Production evaluation endpoint is unavailable

When the app is deployed to Vercel using this api/ file, vercel does not register the named GET export as a function handler, so requests never reach handleEvaluationRequest and profile evaluations fail in production.

Export the handler in the format Vercel expects for this function, or configure the deployment to use the named GET export.

Prompt for AI agents
In `api/evaluation.ts` at line 4:

**Production evaluation endpoint is unavailable**

When the app is deployed to Vercel using this `api/` file, vercel does not register the named `GET` export as a function handler, so requests never reach `handleEvaluationRequest` and profile evaluations fail in production.

Export the handler in the format Vercel expects for this function, or configure the deployment to use the named `GET` export.

Comment thread package.json
"typescript": "^5.9.3",
"vite": "^8.3.8"
"vite": "^8.3.8",
"vitest": "^5.1.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical · CI stops before tests and build

When CI runs without a committed lockfile, npm ci exits because the repository has no package-lock.json, so the workflow never reaches the test or build steps.

Commit a package-lock.json that matches the dependency manifest.

Also at .github/workflows/ci.yml:17.

Prompt for AI agents
In `package.json` at line 39:

**CI stops before tests and build**

When CI runs without a committed lockfile, `npm ci` exits because the repository has no `package-lock.json`, so the workflow never reaches the test or build steps.

Commit a `package-lock.json` that matches the dependency manifest.

Also at `.github/workflows/ci.yml:17`.

Comment thread server/handler.ts
}

try {
const result = await evaluateProfile(new GitHubClient(token), username);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Unauthenticated requests exhaust GitHub quota

When an unauthenticated caller repeatedly requests uncached or nonexistent usernames, handleEvaluationRequest calls evaluateProfile for cache misses, spending the shared GitHub token’s quota; not-found responses return before receiving a cache header, so repeated misses exhaust the quota and evaluations fail for everyone.

Rate-limit uncached requests and cache not-found responses.

Prompt for AI agents
In `server/handler.ts` at line 31:

**Unauthenticated requests exhaust GitHub quota**

When an unauthenticated caller repeatedly requests uncached or nonexistent usernames, `handleEvaluationRequest` calls `evaluateProfile` for cache misses, spending the shared GitHub token’s quota; not-found responses return before receiving a cache header, so repeated misses exhaust the quota and evaluations fail for everyone.

Rate-limit uncached requests and cache not-found responses.

Comment thread server/github.ts
/** Returns `null` when the user does not exist. */
async getProfile(login: string): Promise<GitHubProfile | null> {
const response = await this.fetchImpl(`${GITHUB_API}/graphql`, {
method: "POST",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Stalled upstream calls exhaust requests

When gitHub or the avatar host accepts a request but does not complete it promptly, GitHubClient awaits fetchImpl without a timeout or abort signal for the GraphQL, README, and avatar requests. If an upstream connection stalls, handleEvaluationRequest remains pending until the platform terminates the invocation, and the caller receives a failed evaluation.

Apply a bounded timeout to each upstream request and return a controlled error when it expires.

Also at server/github.ts:67, server/github.ts:84.

Prompt for AI agents
In `server/github.ts` at line 46:

**Stalled upstream calls exhaust requests**

When gitHub or the avatar host accepts a request but does not complete it promptly, `GitHubClient` awaits `fetchImpl` without a timeout or abort signal for the GraphQL, README, and avatar requests. If an upstream connection stalls, `handleEvaluationRequest` remains pending until the platform terminates the invocation, and the caller receives a failed evaluation.

Apply a bounded timeout to each upstream request and return a controlled error when it expires.

Also at `server/github.ts:67`, `server/github.ts:84`.

Comment thread server/github.ts
throw new Error(`GitHub REST API responded with ${response.status}`);
}
return response.text();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Large READMEs exhaust function resources

When a public profile README is unusually large, getProfileReadme buffers the entire raw README, then evaluateProfile passes it to findTechnologies, which scans it repeatedly. A caller can target a profile with a very large README to consume excessive memory and CPU in the serverless function, causing evaluations to time out or fail.

Enforce a maximum README response size before buffering or parsing its contents.

Prompt for AI agents
In `server/github.ts` at line 76:

**Large READMEs exhaust function resources**

When a public profile README is unusually large, `getProfileReadme` buffers the entire raw README, then `evaluateProfile` passes it to `findTechnologies`, which scans it repeatedly. A caller can target a profile with a very large README to consume excessive memory and CPU in the serverless function, causing evaluations to time out or fail.

Enforce a maximum README response size before buffering or parsing its contents.

Comment thread server/handler.ts
}

try {
const result = await evaluateProfile(new GitHubClient(token), username);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Development loads duplicate GitHub calls

When a developer loads an evaluation page with the development server running, react StrictMode runs the evaluation effect twice in development; aborting the first browser fetch does not cancel handleEvaluationRequest or its evaluateProfile call, so both requests make the GitHub profile, README, and avatar requests and consume the configured token’s quota.

Coalesce concurrent evaluations for the same username in the development server, or otherwise prevent the StrictMode cleanup request from starting duplicate GitHub work.

Prompt for AI agents
In `server/handler.ts` at line 31:

**Development loads duplicate GitHub calls**

When a developer loads an evaluation page with the development server running, react StrictMode runs the evaluation effect twice in development; aborting the first browser fetch does not cancel `handleEvaluationRequest` or its `evaluateProfile` call, so both requests make the GitHub profile, README, and avatar requests and consume the configured token’s quota.

Coalesce concurrent evaluations for the same username in the development server, or otherwise prevent the StrictMode cleanup request from starting duplicate GitHub work.

Comment thread server/handler.ts
const result = await evaluateProfile(new GitHubClient(token), username);
if (!result) return json(404, { error: "User not found" });
return json(200, result, {
"Cache-Control": "public, s-maxage=600, stale-while-revalidate=3600",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Profile grades stay stale too long

When a profile changes after its cached result has expired and a request arrives during the stale-while-revalidate window, vercel can serve the cached response for up to an additional hour while revalidating it, so a changed profile continues to show its old grade and evaluatedAt after the documented 10-minute cache period.

Remove the extra stale window or shorten it to the maximum staleness the app intends to expose.

Prompt for AI agents
In `server/handler.ts` at line 34:

**Profile grades stay stale too long**

When a profile changes after its cached result has expired and a request arrives during the stale-while-revalidate window, vercel can serve the cached response for up to an additional hour while revalidating it, so a changed profile continues to show its old grade and `evaluatedAt` after the documented 10-minute cache period.

Remove the extra stale window or shorten it to the maximum staleness the app intends to expose.

Comment thread server/technologies.ts
for (const match of readme.matchAll(/skillicons\.dev\/icons\?i=([\w,+#.-]+)/gi)) {
ids.push(...match[1].split(","));
}
for (const match of readme.matchAll(/devicons?\/(?:devicon\/[^"'\s)]*?)?icons\/([\w+#.-]+)\//gi)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Devicon technologies are omitted

When a README uses a Devicon image URL with a version suffix such as @latest, the URL pattern in findTechnologies does not match that Devicon path, so it removes the URL without extracting its icon ID and awards too few technology points.

Update the Devicon URL pattern to match version-suffixed paths such as devicon@latest/icons/....

Prompt for AI agents
In `server/technologies.ts` at line 99:

**Devicon technologies are omitted**

When a README uses a Devicon image URL with a version suffix such as `@latest`, the URL pattern in `findTechnologies` does not match that Devicon path, so it removes the URL without extracting its icon ID and awards too few technology points.

Update the Devicon URL pattern to match version-suffixed paths such as `devicon@latest/icons/...`.

Comment thread server/evaluate.test.ts
import { evaluateProfile } from "./evaluate.js";
import type { GitHubClient, GitHubProfile } from "./github.js";

const PHOTO = new Uint8Array([0xff, 0xd8, 0xff]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Default avatars still earn photo points

When the evaluator is changed to grant the photo point without checking whether the avatar is a default identicon, the “gives 10 points for each passed criterion” test still passes if evaluateProfile unconditionally awards the photo point: its fake client returns this JPEG for the avatar, which the current identicon check already treats as non-identicon. The test therefore does not catch default avatars earning points.

Use a valid default-identicon PNG fixture in an evaluateProfile test and assert that hasPhoto is false.

Prompt for AI agents
In `server/evaluate.test.ts` at line 5:

**Default avatars still earn photo points**

When the evaluator is changed to grant the photo point without checking whether the avatar is a default identicon, the “gives 10 points for each passed criterion” test still passes if `evaluateProfile` unconditionally awards the photo point: its fake client returns this JPEG for the avatar, which the current identicon check already treats as non-identicon. The test therefore does not catch default avatars earning points.

Use a valid default-identicon PNG fixture in an `evaluateProfile` test and assert that `hasPhoto` is false.

@rahelmartim
rahelmartim merged commit 4d05bee into main Nov 11, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 22456cfa Deployed Nov 11, 2026 by vercel[bot]
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.

1 participant