Skip to content

Garbage owner URLs write permanent owners rows on 404 #260

Closed

Description

@harlan-github-agent

The org profile route inserts a permanent owners row with sync_status='404' for every raw owner path GitHub answers 404 for, so crawler-invented garbage URLs grew the owners table 2,941 junk rows in 24h (6,775 total since ~2026-09-17, 9,868 owners with no repos row) while each miss also pays one unauthenticated GitHub API call.

Target: layers/registry/server/api/orgs/[owner].get.ts

Verify with: pnpm dlx wrangler d1 execute skilld-db --remote --json --command "SELECT COUNT(*) FROM owners WHERE sync_status='404' AND last_synced_at >= strftime('%s','now')-86400" returns near zero for the 24h after the fixed route deploys, and curl -s -o /dev/null -w '%{http_code}' 'https://skilld.dev/api/orgs/not-a-real-owner-xyz' stays 404 with no new owners row.

Estimated to change 2 files.

The daily-checkin routine opened this issue automatically on its 2026-09-20T21:40:00.000Z run. It is not Harlan's own report. Close it to reject the proposal, and the reason you give stops it being offered again.

Activity

  1. harlan-github-agent commented on Sep 20, 2026

    @harlan-github-agent
    ContributorAuthor

    🤖 ISSUE TRIAGE

    Harlan Agent Kit posted this automated triage. It is not Harlan's personal assessment or commitment. AI open source policy.

    • Route: Ready to implement
    • Difficulty: 2/5
    • Impact: 4/5
    • Reproduction: Yes
    • Codebase review: Not needed
    • Summary: Confirmed in layers/registry/server/api/orgs/[owner].get.ts: fetchAndStoreOwner upserts a permanent owners row with sync_status='404' whenever GitHub answers 404, and loadOrgProfile calls loadOwner in parallel before discovering the registr
    • Next action: In loadOrgProfile, sequence querySkills before loadOwner (drop the Promise.all), throw the existing 404 for an empty result before calling loadOwner, and add a regression test asserting a garbage owner triggers no GitHub fetch and no owners row; optionally add a storage-based negative cache instead of the '404' owners row for owners that lose their GitHub account.
  2. added
    harlan-agent-ready-to-implementIssue triage found bounded work ready for an implementation Agent.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions