Skip to content

SDK/api contract drift: 85 SDK methods call endpoints that don't exist #447

Open

Description

@thinkclay

The @scaffald/sdk client exposes 498 distinct endpoints. The api edge
function implements 449 routes. 85 SDK methods call an endpoint that does not
exist
, so they 404 at runtime.

This is not a theoretical drift problem. It is how
#439 happened:
getProfileBySlug called /v1/profiles/slug/{slug} for months while the router
only ever defined /{username}, and every public profile page rendered
"Profile Not Found". The failure mode is silent — the SDK returns a 404, the
caller renders an empty state, and nothing logs an error anywhere near the
cause.

The full list is now enforced as a baseline by
packages/supabase/functions/api/__tests__/contract/sdk-routes.test.ts
(added in #439). That test stops the list from growing. This issue is about
shrinking it.

deno test --allow-read packages/supabase/functions/api/__tests__/contract/

Where the gaps are

Router prefix routes implemented SDK calls missing
/reviews 4 11
(unmounted) — 10
/v1/work-logs 18 10
/v1/organizations 32 9
/v1/teams 24 7
/v1/profiles/skills 14 6
/v1/projects 4 6
/v1/background-checks 5 5
/v1/webhooks 3 5
/v1/employers 4 4
/v1/jobs 10 3
/v1/profiles 8 3
/v1/inquiries 2 3
/v1/communities/posts 10 1
/v1/api-keys 6 1
/v1/profiles/portfolio 5 1

Two kinds of gap:

  • 10 endpoints have no router mounted at all. Everything under /v1/skills/*
    (skill evidence + skill snapshots). /v1/profiles/skills and
    /v1/communities/skills are mounted; /v1/skills is not. This is a whole
    feature the SDK exposes and the api has never had.
  • 75 endpoints have a mounted router but no matching route. These range from
    a router that is nearly complete (/v1/api-keys, 6 implemented / 1 missing) to
    one that is mostly absent (/reviews, 4 implemented / 11 missing).

Some highlights worth calling out:

  • /v1/jobs defines no POST, PATCH or DELETE at all. createJob,
    updateJob and deleteJob cannot work. Job writes presumably still go through
    the legacy tRPC function.
  • /reviews is the review wizard, and almost none of it exists — draft
    save/load/delete, per-step updates, skill and soft-skill ratings, analytics.
  • GET /v1/communities/posts/portfolio/{userId} is a path mismatch, not a
    missing feature.
    The route exists, mounted at /user/{userId}. The SDK has
    the wrong segment. This one is a one-line fix and worth doing first as a
    representative case.
  • /v1/profiles/slug/check and PATCH /v1/profiles/slug mean the vanity-URL
    panel can read slug history but cannot change a slug.

Suggested plan

Sequenced so the cheap, high-confidence work lands first and each phase leaves
the baseline smaller.

Phase 0 — triage (no code). For each of the 85, decide: implement the route,
fix the SDK path, or delete the SDK method. A meaningful share of these may be
methods written speculatively against an api that never materialised — deleting
a dead SDK method is a legitimate and cheap resolution, and shrinks the baseline
exactly as much as implementing it. Do this before writing anything.

Phase 1 — path mismatches. Endpoints where the route exists under a
different path. Confirmed so far: communities/posts/portfolio. Triage will
find others. Cheapest possible wins; fix in the SDK, bump the submodule pointer.

Phase 2 — near-complete routers. /v1/api-keys (1), /v1/profiles/portfolio
(1), /v1/communities/posts (1), /v1/inquiries (3), /v1/profiles (3),
/v1/jobs (3). Small, well-understood surfaces where the surrounding router
already establishes the patterns. /v1/jobs writes are the highest-value item
in this phase.

Phase 3 — vanity slug writes. /v1/profiles/slug/check and
PATCH /v1/profiles/slug. Already scoped and in progress separately; listed
here for completeness.

Phase 4 — large per-feature efforts. /reviews (11), /v1/work-logs (10),
/v1/organizations (9), /v1/teams (7), /v1/projects (6),
/v1/background-checks (5), /v1/webhooks (5), /v1/employers (4). Each is its
own piece of work with its own schema and RLS questions. Should be split into
per-router issues after triage, not tackled as one.

Phase 5 — /v1/skills/*. The unmounted feature. Needs a product decision
before any code: does skill evidence / snapshots ship, or do those SDK methods
get deleted?

Conventions for anyone picking this up

  • Response envelope matters and fails silently. The SDK returns the response
    body verbatim (packages/sdk/src/http/client.ts). Some api routes wrap in
    {data} and some do not. Pick the shape the SDK type expects — a mismatch
    gives a 200 where every field reads undefined, not an error.
  • Register static routes before param routes. A new /slug/check declared
    after /slug/{slug} will be swallowed by it.
  • assertSuccessResponse in the api test helpers requires a data key. Use
    assertStatus(response, 200) for unenveloped routes.
  • Remove the entry from KNOWN_GAPS as you land each one. The contract test
    fails on stale entries, so it will tell you if you forget.

Full list

Grouped by SDK resource file, with the method that calls each endpoint. Paths
are normalised — :p is any path parameter.

reviews.ts (11)

Endpoint SDK method
DELETE /reviews/:p/draft deleteDraft
GET /reviews/:p/draft getDraft
GET /reviews/analytics getReviewAnalytics
GET /reviews/my-reviews getMyReviews
GET /reviews/soft-skills/by-category getSoftSkillsByCategory
PATCH /reviews/:p/category-rating updateCategoryRating
PATCH /reviews/:p/comment updateComment
PATCH /reviews/:p/draft saveDraft
PATCH /reviews/:p/skill-ratings updateSkillRatings
PATCH /reviews/:p/soft-skill-votes updateSoftSkillVotes
PATCH /reviews/:p/step updateStep

skill-analytics.ts (10)

Endpoint SDK method
DELETE /v1/skills/evidence/:p deleteEvidence
GET /v1/skills/evidence listEvidence
GET /v1/skills/snapshots listSnapshots, getLatestSnapshot
GET /v1/skills/snapshots/:p getSnapshot
GET /v1/skills/snapshots/timeline getTimeline
PATCH /v1/skills/evidence/:p updateEvidence
POST /v1/skills/evidence createEvidence
POST /v1/skills/evidence/:p/verify verifyEvidence
POST /v1/skills/snapshots createSnapshot
POST /v1/skills/snapshots/compare compareSnapshots

work-logs.ts (10)

Endpoint SDK method
GET /v1/work-logs/projects/:p/rollup getProjectRollup
GET /v1/work-logs/public-feed getPublicProfileFeed
GET /v1/work-logs/skills/suggestions getSuggestedSkills
PATCH /v1/work-logs/:p/profile-visibility updateProfileVisibility
POST /v1/work-logs/:p/move moveToProject
POST /v1/work-logs/:p/move/approve approveMoveRequest
POST /v1/work-logs/:p/move/cancel cancelMoveRequest
POST /v1/work-logs/:p/move/deny denyMoveRequest
POST /v1/work-logs/check-overlap checkTimeOverlap
POST /v1/work-logs/skills addSkillToProfile

background-checks.ts (7)

Endpoint SDK method
GET /v1/background-checks/:p/disputes listDisputesForCheck
GET /v1/organizations/:p/background-checks organizationListChecks
GET /v1/organizations/:p/background-checks/:p organizationGet
POST /v1/background-checks/confirm-payment confirmCheckPayment
POST /v1/background-checks/disputes submitDispute
POST /v1/background-checks/documents addDocumentMetadata
POST /v1/background-checks/documents/upload-url createUploadUrl

organizations.ts (7)

Endpoint SDK method
GET /v1/organizations/:p/documents listDocuments
GET /v1/organizations/:p/documents/:p getDocument
GET /v1/organizations/:p/open-jobs-count getOpenJobsCount
POST /v1/organizations/:p/documents/:p/download-url createDocumentDownloadUrl
POST /v1/organizations/:p/documents/upload-session createDocumentUploadSession
POST /v1/organizations/:p/members/:p/remove removeMember
POST /v1/organizations/:p/members/invite inviteMember

teams.ts (7)

Endpoint SDK method
DELETE /v1/teams/:p/jobs/:p deleteJobAssignment
GET /v1/teams/:p/jobs listJobAssignments
GET /v1/teams/roles listRoles
POST /v1/teams/:p/invitations/:p/resend resendInvitation
POST /v1/teams/:p/jobs createJobAssignment
POST /v1/teams/invitations/:p/respond respondToInvitation
POST /v1/teams/invitations/respond respondToInvitationWithToken

projects.ts (6)

Endpoint SDK method
POST /v1/projects/:p/addresses addAddress
POST /v1/projects/:p/sites addSite
POST /v1/projects/:p/workers addWorker
POST /v1/projects/:p/workers/claim claimWork
POST /v1/projects/workers/:p/approve approveWorker
POST /v1/projects/workers/:p/reject rejectWorker

skills.ts (6)

Endpoint SDK method
GET /v1/profiles/skills/children getSkillChildren
GET /v1/profiles/skills/details getSkillDetails
GET /v1/profiles/skills/legacy getSkillsLegacy
PATCH /v1/profiles/skills updateUserSkill
PATCH /v1/profiles/skills/legacy updateSkillsLegacy
PATCH /v1/profiles/skills/multi-taxonomy updateSkillMultiTaxonomy

webhooks-management.ts (5)

Endpoint SDK method
GET /v1/webhooks/:p retrieve
GET /v1/webhooks/:p/deliveries listDeliveries
GET /v1/webhooks/event-types eventTypes
PATCH /v1/webhooks/:p update
POST /v1/webhooks/deliveries/:p/retry retryDelivery

employers.ts (4)

Endpoint SDK method
DELETE /v1/employers/employment/:p removeEmployment
DELETE /v1/employers/follow/:p unfollow
GET /v1/employers/follow/status getFollowStatus
POST /v1/employers/follow follow

profiles.ts (3)

Endpoint SDK method
GET /v1/profiles/slug/check checkSlugAvailability
PATCH /v1/profiles/slug updateSlug
POST /v1/profiles/avatar uploadAvatar

inquiries.ts (3)

Endpoint SDK method
POST /v1/inquiries/:p/respond respond
POST /v1/inquiries/bulk/archive bulkArchive
POST /v1/inquiries/bulk/mark-read bulkMarkAsRead

jobs.ts (3)

Endpoint SDK method
DELETE /v1/jobs/:p delete
PATCH /v1/jobs/:p update
POST /v1/jobs create

community-posts.ts (1)

Endpoint SDK method
GET /v1/communities/posts/portfolio/:p getUserPortfolio

portfolio.ts (1)

Endpoint SDK method
POST /v1/profiles/portfolio/upload-image uploadImage

api-keys.ts (1)

Endpoint SDK method
POST /v1/api-keys/:p/revoke revoke

Activity

  1. added
    agent-ready
    on Jul 30, 2026
  2. thinkclay commented on Jul 30, 2026

    @thinkclay
    ContributorAuthor

    Progress on the /v1/profiles row of the table (3 missing → 0 pending #439).

    Landed in #441:

    • GET /v1/profiles/slug/check — availability + suggestions, excluding the caller's own slug.
    • PATCH /v1/profiles/slug — 30-day cooldown, 409 with alternatives when taken, writes core.slug_change_history.

    In flight in #439: GET /v1/profiles/slug/{slug}.

    That closes out the vanity-URL bullet in the issue body: the panel can now check availability and change a slug, not just read history.

    Two things learned doing it that generalise to the rest of the 85:

    Envelope shape is part of the contract and fails silently. The SDK's http client returns await response.json() verbatim with no unwrapping, so an SDK-facing route that wraps in { data } deserializes into the wrong shape without erroring anywhere — the caller just sees undefined fields. These three are deliberately unenveloped to match SlugAvailability / UpdateSlugResponse / ProfileBySlug. Worth checking per-endpoint during Phase 0 triage rather than assuming the { data } convention that the public REST routes use.

    Registration order is a live hazard in this router. check and history both satisfy the slug format, so a /slug/{slug} param route registered ahead of them swallows both and they 404 — with no error, just a "profile not found" for a path that was never a profile. #441 has a test that fails if anyone reorders them. Any prefix in the table where a param route shares a segment with static siblings has the same trap.

    Not claiming a dent in the count — 3 of 85.

  3. thinkclay commented on Jul 30, 2026

    @thinkclay
    ContributorAuthor

    Two concrete instances of this drift, found independently while fixing #440, with reproductions:

    Worth noting for whoever takes this on: the drift is not only missing endpoints. It also runs the other way — endpoints and the legacy tRPC router select columns that don't exist. inquiries.getByApplication selected applied_at and application_score, neither of which is on core.applications, so that query 400s. #482 is the same shape on the profiles routes. A method existing on both sides is not evidence it works.

    The thing that makes this tractable: removing the as unknown as casts is what surfaces the real bugs. Deleting one cast in #475 immediately exposed two wrong types that had been invisible for months. Recommend the sweep be cast-removal-driven rather than endpoint-inventory-driven.

  4. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    Two more profile-path instances found in the 2026-08-11 profile audit: GET /v1/profiles/skills/user and GET /v1/profiles/skills/legacy both 404 while useUserSkills/useLegacySkills call them. Detail in #583, rollup in #594.

  5. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    Audited the list properly and closed the largest cluster. KNOWN_GAPS: 83 → 73.

    The number was soft, and the shape matters more than the count

    I re-derived the list mechanically (SDK this.get/post/... call sites → normalised paths → diffed against registered routes), then verified a sample against a running API rather than trusting the static pass. Two corrections worth recording:

    Most gaps are live, not dead code. Matching each gap to its SDK method and then to callers through the client accessor (client.workLogs.moveToProject, not a bare .moveToProject) gives 66 live / 10 dead. My first pass matched bare method names and reported 68/8 — .update(, .retrieve( and .revoke( appear all over the codebase, so that split was inflated. Worth knowing if anyone re-runs this: match the accessor.

    Some gaps present as a 400, not a 404. GET /v1/work-logs/public-feed returns

    {"issues":[{"validation":"uuid","code":"invalid_string","message":"Invalid uuid","path":["workLogId"]}]}

    because GET /{workLogId} swallows the path and zod rejects "public-feed" as an id. A missing endpoint surfacing as a validation error about a param the caller never sent is materially harder to diagnose than a 404 — and it is why these live so long. Any gap whose path collides with a sibling /{param} route behaves this way. Registering literal routes before param routes avoids it; the ten added in #614 are ordered that way deliberately.

    Closed: /reviews (10)

    #614 implements the review wizard's entire draft surface. That cluster was the largest, and unlike most of the list it was blocking a real feature — core.reviews plus five child tables have existed since migration 099 and ReviewWizard drives the whole flow, so every step 404'd.

    Three defects surfaced only by running it, not by reading it: a missing DELETE grant (same class as #481), analytics joining data.masterformat where the FK points at core.skills, and POST /{id}/submit clobbering the jsonb column that held everything the reviewer had just typed.

    Also added __tests__/contract/ to test:api:rest:suite — this guard has never run in CI, the same gap #604 fixed for __tests__/lib. It earned its place immediately: it caught the ten stale baseline entries and told me exactly which to delete.

    Remaining 73, by cluster

    /v1/work-logs 10 · /v1/organizations 9 · /v1/skills/* 10 (no router mounted at all) · /v1/teams 7 · /v1/projects 6 · /v1/profiles/skills 6 · /v1/background-checks 5 · /v1/webhooks 5 · rest scattered.

    The /v1/skills/* block is worth taking next as a unit — snapshots and evidence have no router at all, and skill-analytics-sdk-hooks calls nine of them.

  6. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    Second cluster closed. KNOWN_GAPS 73 → 64, deployed to dev, preview and prod (cf2efe587).

    #615 mounts /v1/skills — nothing was mounted at that prefix at all, while features/skills-analytics renders five widgets against core.skill_snapshots and core.skill_evidence on the live /assessments route, plus ReviewImpactSummary inside the profile ReviewsWidget. All nine calls 404'd.

    Three defects that only appeared by running it, none visible in a read:

    • Evidence with no skill reference 500'd. core.skill_evidence carries a check constraint (soft_skill_id, or skill_taxonomy and skill_ref_id); the request schema allowed all three to be omitted, so the database rejected what the API had accepted. Mirrored in zod — now a 400 naming what is missing.
    • Verification is structurally impossible through the user client. skill_evidence_update is auth.uid() = user_id, and verification is by definition someone else vouching. Relaxing the policy would be worse — RLS cannot restrict which columns a writer touches, so a wider policy would also let a stranger rewrite the title. That one write uses the service client behind handler-level checks.
    • Self-verification was possible until refused explicitly (403), and verified is not writable on PATCH. A flag anyone can set on their own evidence means nothing.

    Running tally

    cluster gaps status
    /reviews 10 closed (#614)
    /v1/skills/* 9 closed (#615)
    /v1/work-logs 10 open
    /v1/organizations 9 open
    /v1/teams 7 open
    /v1/projects 6 open
    /v1/profiles/skills 6 open
    /v1/background-checks 5 open
    /v1/webhooks 5 open
    scattered ~16 open

    The pattern has now held three times running — reviews, skills-analytics, and the profile work before them. Tables and UI exist; the router is the missing piece. Worth assuming that is true of the remaining clusters until proven otherwise, and worth checking reachability of the consuming UI first: the Profile Wizard (#584) looked identical from the API side but turned out to have no route rendering it at all.

  7. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    /v1/work-logs cluster — done: 2 built, 8 recommended for retirement

    Shipped in #616 (merged): the two gaps that had live UI consumers.

    route consumer
    GET /v1/work-logs/public-feed WorkLogPortfolioWidget — the "Verified work history" section of every public profile
    PATCH /v1/work-logs/{workLogId}/profile-visibility the show-on-profile toggle on WorkLogDetailScreen

    Both were rendering broken UI in production. Neither failed as a 404 — GET /{workLogId} matched first and returned {"validation":"uuid","path":["workLogId"]}, which reads like a client bug. Worth remembering when triaging the rest of this list: a gap in this cluster can present as a 400 about a parameter the caller never sent.

    The other 8 have no consumer

    route SDK method hook UI call sites
    GET /work-logs/projects/:id/rollup getProjectRollup useWorkLogProjectRollup 0
    GET /work-logs/skills/suggestions getSuggestedSkills useWorkLogSuggestedSkills 0
    POST /work-logs/skills addSkillToProfile useAddSkillToProfileMutation 0
    POST /work-logs/check-overlap checkTimeOverlap useCheckTimeOverlapMutation 0
    POST /work-logs/:id/move moveToProject useMoveWorkLogToProjectMutation 0
    POST /work-logs/:id/move/approve approveMoveRequest useApproveWorkLogMoveMutation 0
    POST /work-logs/:id/move/deny denyMoveRequest useDenyWorkLogMoveMutation 0
    POST /work-logs/:id/move/cancel cancelMoveRequest useCancelWorkLogMoveMutation 0

    Counted through the client accessor (workLogs.<method>(), then each hook traced to its importers excluding the hooks file itself, tests, barrel re-exports and dist/ build output. Every one of the eight is called exactly once — from inside work-logs-sdk-hooks.ts — and nothing imports the hook.

    Recommendation: do not build these; retire the SDK surface instead. They are a full SDK method + typed params + a react-query hook per route, with no product behind them. The move flow is four endpoints and a two-party approval workflow — it should be specified against a real screen before it is implemented, not reverse-engineered from an SDK signature. (The schema is partly there: core.work_logs carries pending_move_to_project_id, pending_move_reason, pending_move_requested_at, pending_move_requested_by. There is no move-request table; the design is inline columns.)

    If they stay in the SDK they should stay in KNOWN_GAPS with a note that they are unconsumed, so this list stops reading as eight missing features.

    Correction on route ordering

    I said earlier in this issue that Hono prefers static segments over params regardless of declaration order. That is wrong — I tested /work-logs/projects against PATCH /{workLogId} (line 392) without checking the method. The relevant pair is GET /projects (line 506) declared before GET /{workLogId} (711). This router matches in declaration order, and moving public-feed above the param route was the entire fix.

    #616 restores the correct guidance in reviews.ts and skill-analytics.ts and adds literal-routes-precede-params.test.ts, which parses the route files and fails with the offending line numbers — so it is checked rather than remembered.

    KNOWN_GAPS: 64 → 62.

  8. thinkclay commented on Aug 12, 2026

    @thinkclay
    ContributorAuthor

    /v1/organizations cluster — 2 built, 7 have no reachable UI

    Shipped in #617 (merged):

    route consumer
    GET /v1/organizations/{id}/open-jobs-count OrganizationPreviewModal, ProfileHoverCard, employer detail pane — all reachable from /workers/map and /employers/{id}
    GET /v1/organizations/{id}/background-checks OrganizationBackgroundChecksPage, mounted at /office/ats/checks

    The other 7 sit behind components nothing renders

    routes hook panel rendered?
    GET /{id}/documents, GET /{id}/documents/{docId}, POST /{id}/documents/upload-session, POST /{id}/documents/{docId}/download-url useOrganizationDocuments, useDocumentUploadSession, useDocumentDownloadUrl OrganizationDocumentsPanel no
    POST /{id}/members/invite, POST /{id}/members/{userId}/remove useInviteOrganizationMember, useRemoveOrganizationMember OrganizationMembersPanel no
    GET /{id}/background-checks/{checkId} — — no consumer at all

    Both panels exist and are wired all the way down to the SDK; neither is imported by any screen or route. Traced through features/organizations/api.ts, which is a thin re-export layer and not a consumer in itself — the first-level count is misleading, and it took a second hop to see that the trail ends at an unmounted component.

    Recommendation: build these when the panels get mounted, not before. Unlike the work-log move flow these are ordinary CRUD with a clear shape, so they are cheap once there is a screen — but implementing them now ships six endpoints nothing can reach.

    GET /{id}/background-checks/{checkId} (backgroundChecks.organizationGet) has no call site anywhere, not even a hook. Retire it.

    Two live bugs found in passing

    Both fixed in #617:

    • Every employer showed 0 open jobs. Both job counts in profiles.ts filtered status = "published", and core.jobs.status is CHECK (draft|open|paused|closed) — the column cannot hold that value. Counting the wrong status looks exactly like an employer having no jobs.
    • GET /v1/profiles/organizations/{slug} had never returned 200. Its select asked for industry, size, location, founded_year and filtered on is_public; none of the five exist. It answered 500 column organizations.industry does not exist for every slug. Now joins core.industries via industry_id and filters on visibility.

    The second one is why the first was invisible: the route died before reaching the count.

    GET /v1/profiles/employers/{slug} has the same disease but worse — it queries core.employers, a table that exists in no schema, and has no UI consumer. Filed as #618 rather than guessed at, since it needs a decision about whether the route should exist.

    KNOWN_GAPS: 62 → 60.

  9. thinkclay commented on Aug 27, 2026

    @thinkclay
    ContributorAuthor

    What the tracing found

    Every one of the 59 KNOWN_GAPS routes traced to the UI that calls it, through a parsed import graph: gap → SDK method (matched on verb + url, since delete/retrieve/update share one path) → the hook whose body calls it → every file importing that hook, transitively → whether any of them is an expo-router screen.

    verdict count meaning
    MOUNTED 16 a routed screen calls it today and gets an error
    UNMOUNTED 5 a component calls it, but no screen renders that component
    NO_CONSUMER 28 a hook exists; nothing imports it
    NO_HOOK 10 an SDK method exists; no hook wraps it

    Only 16 of 59 are user-visible. The other 43 are SDK surface with no product behind it.

    The 16 that are broken in the product

    route hook screen
    DELETE /v1/employers/employment/:p useRemoveEmploymentMutation /(protected)/employers/[id]
    DELETE /v1/employers/follow/:p useUnfollowOrganizationMutation /(protected)/employers/[id]
    DELETE /v1/skills/evidence/:p useDeleteEvidenceMutation /(protected)/assessments
    GET /v1/background-checks/:p/disputes useBackgroundCheckDisputes /(protected)/profile/background-check/[checkId]/dispute +1
    GET /v1/communities/posts/portfolio/:p useUserPortfolio /(public)/users/[slug]
    GET /v1/webhooks/event-types useWebhookEventTypes /(admin)/office/webhooks/create
    POST /v1/api-keys/:p/revoke useRevokeApiKeyMutation /(admin)/office/api-keys
    POST /v1/background-checks/confirm-payment useConfirmCheckPaymentMutation /(admin)/office/ats/request +1
    POST /v1/background-checks/disputes useSubmitBackgroundCheckDisputeMutation /(protected)/profile/background-check/[checkId]/dispute +1
    POST /v1/background-checks/documents useAddDocumentMetadataMutation /(protected)/profile/background-check/initiate
    POST /v1/background-checks/documents/upload-url useCreateDocumentUploadUrlMutation /(protected)/profile/background-check/[checkId]/dispute +2
    POST /v1/employers/follow useFollowOrganizationMutation /(protected)/employers/[id]
    POST /v1/profiles/avatar useUploadAvatarMutation /(admin)/office/cms/workers/[id]/edit +1
    POST /v1/projects/:p/workers/claim useClaimWorkMutation /(admin)/office/cms/projects/[id]
    POST /v1/projects/workers/:p/approve useApproveWorkerMutation /(admin)/office/cms/projects/[id]
    POST /v1/projects/workers/:p/reject useRejectWorkerMutation /(admin)/office/cms/projects/[id]

    How this was validated

    The first two versions of the tracer were wrong in both directions, so the method matters:

    • Matching a hook by "the last export function seen above the call" attributed 33 hooks to one route. Fixed by brace-scoping.
    • A balanced inline brace in a parameter list — options?: { enabled?: boolean } — closed the block before the body was scanned, hiding every hook in organizations-sdk-hooks.ts. Fixed by only opening a block when depth is still positive at end of line.
    • Treating "this file mentions the symbol" as an import edge let one shared PascalCase name bridge the whole app: an avatar upload appeared to reach 100+ screens. Replaced with edges parsed from import statements, where the symbol must appear in the import clause.
    • Walking every export of a barrel re-linked everything again. Narrowed to the symbol itself plus exports whose own body references it.

    The final version is pinned to five hand-verified cases (two UNMOUNTED, two NO_CONSUMER, one NO_HOOK) and spot-checked on four MOUNTED chains, including a renamed wrapper: useRevokeApiKeyMutation → useRevokeAPIKey → DeveloperPortal → /office/api-keys. All 59 resolve to an SDK method, with none unmatched.

    Recommended sequencing

    1. The 16 mounted gaps — grouped by cluster: background-checks (5), employers (3), projects (3), profiles (2), then api-keys, skills, teams, webhooks, communities. Each is a feature a user can reach and watch fail.
    2. The 5 unmounted — build when the panel is mounted, not before. OrganizationDocumentsPanel, OrganizationMembersPanel, OrganizationSettingsPanel are fully wired to the SDK and rendered by no screen.
    3. The 38 with no consumer or no hook — retire the SDK surface rather than implement it. Building them ships endpoints nothing can call. The work-log project-move flow (4 endpoints, a two-party approval workflow) is the clearest case: it should be specified against a real screen, not reverse-engineered from an SDK signature.

    Tracer output is reproducible; the classification for every one of the 59 is available if useful for triage.

  10. thinkclay commented on Sep 10, 2026

    @thinkclay
    ContributorAuthor

    Two live MOUNTED gaps found while fixing #476, on the inquiry thread screen:

    404   GET /v1/inquiries/templates
    404   GET /v1/inquiries/{id}/history
    

    Both are called by hooks that a routed screen renders — useInquiryTemplates and useInquiryHistory in inquiries-sdk-hooks.ts — so they are MOUNTED by this issue's taxonomy, not NO_CONSUMER.

    /v1/inquiries now serves exactly one path, /by-application/{applicationId}, after #738 deleted the two routes that read a table which never existed. Neither templates nor history was ever served by that router; they did not go away with the deletion.

    Also relevant to the count: Inquiries.list() and Inquiries.create() are retired (Scaffald/sdk#23), not implemented — nothing called them, and per the recommendation in #660 building the endpoint would have shipped a table for something no screen can reach. So two of the 59 come off by deletion rather than by being satisfied.

    One methodological note for anyone working this list. Seven SDK tests covered list() and create() and passed the whole time, against the mock server in src/__tests__/mocks/, while the real endpoint returned 500. A fixture that invents the endpoint cannot fail when the endpoint is missing — so green SDK tests are not evidence that a gap on this list is closed. Retired in Scaffald/sdk#24 with that reasoning left where the suites were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions