TypeScript 6.x makes moduleResolution=node10 (the legacy "node" resolver) a
hard error (TS5107), so `tsc --noEmit` exited 2 and the backend typecheck gate
was red. Add "ignoreDeprecations": "6.0" as TS itself prescribes; node10/
CommonJS resolution semantics are retained intentionally until a deliberate
resolver bump. Typecheck now exits 0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The default jest.config.js matched tests/e2e/*.e2e.test.ts, which are meant to
run only under jest.e2e.config.js against a real Postgres + Redis (npm run
test:e2e). Running them under the default (mocked) config made the parallel
suite non-deterministic: posts.e2e and snippets.e2e collided on shared DB state
and intermittently failed, while passing in isolation/serial.
Add testPathIgnorePatterns for tests/e2e so the default unit/integration run is
deterministic and needs no Docker datastores. The e2e suite still runs via its
own config. Default suite now green in parallel (57 suites / 1434 tests).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The recruiter placement/unlock path charges and settles through Creem
(creemService + signed creemWebhooks checkout.completed), but the
talentBillingService header, its settlement section comment, and the
controller's requestUnlock JSDoc still described a Polar adapter / Polar
order webhook. Correct those comments so the money path reads
unambiguously as Creem.
Verified before changing: @polar-sh/sdk and POLAR_WEBHOOK_SECRET remain in
active use by subscriptionService, storeController, and polarWebhooks for
subscriptions and the creator store, so they are intentionally left in place.
Comment-only change; no behavior change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The talent graph's `github_activity` evidence was written only by the GitHub
App webhook, so a new user's contribution-trajectory evidence stayed empty
until an owner configured a webhook and it fired — an ops dependency, not real
first-run data. Backfill it from the GitHub GraphQL contributionsCollection.
- githubContributionsService: pure `mapContributionsToActivities` turns real
commit/PR/review/issue contributions into RepositoryActivity rows, scoped to
the user's managed repositories (RepositoryManager), attributed to their
GitHub identity (actorLogin), deduped by a deterministic eventId that mirrors
the webhook delivery-id discipline. `harvestContributionEvidence` fetches via
octokit.graphql (no new dependency) and deduped-inserts with skipDuplicates.
Injectable db + graphql client so it is unit tested without Postgres/GitHub.
- githubController.syncProjects: run the backfill after project sync, non-fatal
(a harvest failure never breaks the primary sync), and report the counts.
This makes contribution evidence real and immediate after login with no
GitHub-App-webhook ops dependency and no fabricated seed data.
Tests: mapping (all 4 contribution types), managed-repo scoping, identity
attribution, deterministic-id dedupe, malformed/empty input, and the harvester
no-op / happy-path / graphql-failure paths. 20 new assertions across 10 tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The canonical /login and /register already offered GitHub OAuth, but the
legacy /auth screen (reached via router.push('/auth') from insights, drafts,
creator-studio, follow-requests) was email/password only — a GitHub-native
new user landing there had no way in. Add a guarded "Sign in with GitHub"
button that calls githubService.connectGitHub() (redirects to GitHub's
authorize endpoint; /auth/github/callback, already in middleware publicPaths,
completes it). Also drop the emoji from the footer copy per the no-emoji UI
rule while editing this screen.
Test: connectGitHub redirects to the authorize endpoint with the configured
client_id, callback redirect_uri, and user:email,repo,read:user scopes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The recruiter placement/unlock backend was end-to-end (routes,
talentBillingService, Creem checkout + signed webhook settlement) but had
no frontend, so recruiters literally could not pay. This closes the only
fully dead-ended money surface.
Web (gitgram/web):
- talentGraphService: add listUnlocks, requestUnlock (idempotent, optional
placement success-fee), and getCandidateContact mapping the existing
owner-gated backend routes, with typed placement/contact envelopes.
- utils/talentUnlock: pure gating helpers (deriveUnlockState, findPlacement,
interpretUnlockResult, formatFee) so the owner-only logic is unit tested
without rendering.
- talent-network page: owner-only "Unlock candidate" action on each match
card — opens the Creem checkout, reveals contact + full evidence once the
entitlement is paid (poll via "check payment" and on-return via query
params), with not-owner / pending / unlocked / already-unlocked states.
Backend (gitgram/backend):
- talentBillingController: point the checkout successUrl at the real
/talent-network page (with opportunity + unlocked params) instead of a
non-existent /talent/opportunities route, so payment return is not a 404.
Tests: unit-test the three service methods (idempotency header, success-fee
body, already-unlocked, 402-when-unpaid, id encoding) and the gating helper
(not-owner/unlockable/pending/unlocked, checkout-vs-reveal). 21 new tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The talent graph's recruiter monetization was designed (Opportunity → Pilot →
Proof funnel) but never wired to charge. This adds the placement/candidate-unlock
revenue engine on top of the existing talent graph, charged through Creem (a
merchant-of-record with Turkey-based-seller payout support — the portfolio
standard used by bidstage/CalDesk), not Polar/Stripe.
Revenue gate: a recruiter (opportunity owner) unlocks a matched candidate's
contact + full evidence. Gating mirrors the referral gate (owner-only, no
self-unlock, candidate must have real matching evidence). The fee is charged via
a Creem checkout whose custom_price is the exact computed fee, and settled by the
signed checkout.completed webhook, which records the entitlement + receipt.
- Fee math (pure, configurable): flat unlock access fee (TALENT_UNLOCK_FEE_CENTS,
default $49) or a percentage placement success fee (rate + min/max clamps) when
a placement amount is supplied.
- New TalentPlacement model + migration: entitlement/receipt with a compound
unique key (opportunity, candidate, recruiter) for charge idempotency and a
unique providerOrderId; provider defaults to creem.
- Creem adapter (createCreemCheckout) mirroring the reviewed bidstage lib/creem.ts,
and a signed Creem webhook route (HMAC-SHA256, timing-safe) that settles
placements. Amount is revalidated against the quoted fee before unlocking.
- Routes: POST/GET /talent-graph/opportunities/:id/unlocks and gated
GET .../candidates/:candidateId/contact (402 until paid).
- Errors.paymentRequired (402) helper.
- Tests: fee math, gating, charge idempotency, and the signed webhook settlement
path (75 tests). Secrets are env-only (CREEM_API_KEY, CREEM_WEBHOOK_SECRET,
CREEM_PRODUCT_ID) — none committed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The backend shipped GET /talent-graph/opportunities/:id/coverage and
talentGapAnalysisService (ARCHITECTURE §3.1 CQ#7 — "which required skills does
the pool cover, and which are unmet gaps?") but no web client consumed it.
Institutions could see top candidates yet not their skill gaps.
- talentGraphService: add getOpportunityCoverage() + NeedCoverageAnalysis,
SkillCoverage, CoverageStrength types mirroring the backend contract.
- talent-network page: fetch coverage alongside matches for the selected
opportunity and render a "Beceri kapsama" panel — per-skill strength badges
(verified/evidenced/interest/unmet), the unmet-skill gap list, coverage ratio
and roll-up status. Coverage is a public read (skill tokens + counts only, no
private free text), so it renders for any viewer of the need.
- CSS: coverage panel styled in the existing Swiss/editorial system.
- tests: web service test for the coverage endpoint (path + shape).
Additive, read-only slice. No backend changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migration history reconciliation:
The autonomous-build migration history was corrupted — 20260109185732 dropped 13
tables still in the schema (Account, Advertisement, ScheduledPost, Chat,
Organization, Report, …) plus their enums/constraints without recreating them, so
a fresh `prisma migrate deploy` failed on the later repair/ALTER migrations
(ScheduledPost, Advertisement, AccountType, …). Squashed the 16 broken migrations
into a single clean 00000000000000_init generated from the current schema (93
tables, 19 enums, incl. MutedWord/MessageReaction/Post.contentLanguage). Verified:
fresh `migrate deploy` applies cleanly on an empty DB; the running DB was
re-baselined (resolve --applied init) and the backend boots healthy.
context7:
Switch the compose service from a broken raw node:20-alpine + read-only-volume +
npm-install setup to the package's upstream pnpm Dockerfile (build context =
context7 monorepo root), serving StreamableHTTP on container :8080 (host :3100);
point aitm-mcp's CONTEXT7_URL at :8080. Now Up/healthy.
Result: all 9 compose services healthy (gitgram backend+web, postgres, redis,
aitm-api/mcp/website, gitnexus, context7). E2e through containers still 201/200.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the accidental from-empty migration (which duplicated all 16 prior
migrations and would break a fresh `migrate deploy`) with a proper incremental
migration adding only the new objects: Post.contentLanguage, the MessageReaction
and MutedWord tables, their indexes, and the MessageReaction foreign keys.
Verified the DDL against the live schema. NOTE: a fresh full `migrate deploy`
still fails on a PRE-EXISTING migration-history drift —
20260514174000_repair_scheduled_posts_schema references "ScheduledPost" which no
earlier migration creates. That predates this work; the running stack baselines
the schema (applied + migrations marked resolved) to sidestep it. Reconciling the
older migration history with schema.prisma is separate follow-up.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The whole stack now comes up healthy under one `docker compose` run (gitgram
backend+web + Postgres/Redis + aitm-api/mcp/website + gitnexus); only the
optional tools-profile context7 remains (pre-existing workspace-build issue).
gitgram/backend/Dockerfile: move to a glibc base (node:20-bookworm-slim). Alpine
musl lacks the glibc loader that @tensorflow/tfjs-node's native libtensorflow
needs (ERR_DLOPEN_FAILED), so NSFW detection now runs for real (no stubbing).
Full install WITH lifecycle scripts in the builder (downloads libtensorflow),
node_modules reused in the runtime stage so devDeps like swagger-ui-express are
present for the NODE_ENV=development compose run; openssl + ffmpeg + libgomp1
runtime libs; create writable /app/logs + /app/uploads for the non-root user.
prisma schema: binaryTargets -> debian/arm64 openssl-3 for the glibc runtime.
nsfwDetectionService: lazy-load tf + nsfwjs so a genuinely-unavailable native
lib degrades gracefully instead of crashing at import (still uses real tfjs).
gitgram/web/Dockerfile: npm ci -> npm install (workspace member's standalone
lockfile drifts after dependency additions).
Verified end-to-end through containers: register/login/post/feed 201/200,
web homepage + GitHub->Gitgram /caelum0x both 200.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
aitm-api, aitm-mcp, and gitnexus now build and run healthy in the same
docker-compose stack as gitgram Postgres+Redis.
- NEW aitimemachine/mcp/Dockerfile — multi-stage; builds gitnexus-shared,
gitnexus (native tree-sitter), the root @gitgram/timemachine lib (rewritten to
file:.. + --install-links so file: engine deps are copied, not symlinked), then
the mcp server; runtime starts HTTP transport (node dist/index.js --transport http).
- NEW aitimemachine/gitnexus/Dockerfile — multi-stage (python3/make/g++ for
tree-sitter); builds gitnexus-shared then gitnexus; serve on 0.0.0.0:3010.
- compose: fix build contexts to the aitimemachine root for aitm-api, aitm-mcp,
gitnexus (so file:../ engine siblings resolve); gitnexus host port 3010->13010
(stray host process owned :3010; internal port unchanged).
- scripts/build-engines.sh: npm install before TS engine build when node_modules absent.
- api-server: regenerate stale package-lock; declare ioredis as optionalDependency
and drop the @ts-ignore in providerHealthService (typed dynamic import, tsc clean).
Verified: aitm-api :3001/health, aitm-mcp :3003/health, gitnexus :13010/api/health
all 200 healthy. aitm-website needs a Clerk key; context7 service def is pre-existing-broken.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-skin the AITimeMachine marketing site (93 pages) to GitHub's dark palette so
both products feel like one family: #0a0c10/#161b22 surfaces, #30363d borders,
#c9d1d9/#8b949e text, #58a6ff link blue, #238636/#2ea043 CTA green. Adds CSS
vars + Tailwind tokens mirroring gitgram/web, remaps default gray/blue/green
scales onto the GitHub palette, flattens off-brand gradients/glows, Space Grotesk
font + GitHub-style scrollbars. tsc clean, next build green (93/93 pages).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
End-to-end smoke (real Postgres + Redis via docker-compose) caught a real bug
that mocked unit tests missed: createPost passed the request `type` straight to
prisma.post.create, so a client sending lowercase "text" (instead of the
uppercase PostType enum) threw PrismaClientValidationError 500. Now normalized
to the PostType enum (case-insensitive, falls back to POST).
Verified end-to-end: register→login→create post→comment→like→feed all succeed
against a live DB (3 posts / 1 comment / 1 user persisted).
Also adds prisma/migrations/20260629000000_marathon_additions (full schema incl.
MutedWord, Post.contentLanguage, MessageReaction) — resolves the deploy-time
migration that was infra-blocked from generating against the Neon pooler.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
External reference repos (a2a-js, beads, bluesky, context7, gh-social, gitnexus, munia,
proximity, repo2txt, etc.) were orphaned submodule gitlinks used only as harvest sources.
All valuable features ported into gitgram/* and aitimemachine/*. No product code imports
from external/. Removed to focus the repo on the two shippable products.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>