Skip to content

Release v0.10.0: Standalone Node.js & Docker Runtime, Model Sampling Profiles, and MDX Dos - #145

Merged
devarshishimpi merged 65 commits into
mainfrom
dev
Nov 2, 2026
Merged

devarshishimpi merged 65 commits into
mainfrom
dev

Conversation

@devarshishimpi

Copy link
Copy Markdown
Owner

Summary

This release merges the dev branch into main for the v0.10.0 milestone. It introduces standalone Node.js and Docker deployment support powered by Redis and BullMQ, hardens the production container runtime on Node 24 distroless, introduces AI model sampling calibration and precision gating, re-architects batch review prompts with strict file-scoping, and completely migrates the documentation to MDX.

  1. Standalone Node.js Server & Multi-Platform Hosting (apps/node & @codraoss/node-adapters)

    • Enables self-hosting Codra outside Cloudflare Workers on standard Linux VMs, Docker, Railway, Render, or Kubernetes.
    • Built on @hono/node-server with modular adapters for Redis KV, BullMQ review job queues, and Redis session stores.
    • Supports independent or combined running of API and background review workers via START_API and START_WORKER flags.
  2. Hardened Production Docker Runtime

    • Multi-stage Docker build using node:24-trixie-slim (builder) and gcr.io/distroless/nodejs24-debian13:nonroot (runner) across multi-arch targets ($TARGETARCH).
    • Pruned production dependency tree eliminating dev/peer bloat, non-root execution, and built-in health checking.
    • Updated docker-compose.yml for turnkey self-hosting with Redis and PostgreSQL.
  3. AI Model Sampling Profiles & Precision Calibration (packages/models & packages/core)

    • Built an extensive model profile registry (model-profiles.json) calibrating sampling parameters (temperature, topP, thinking budgets) across providers (Google Gemini 3.5/3.6/3.7/3.8, Gemma 4, GLM-4, NVIDIA Nemotron-3/3.5, Step-5).
    • Enforced model sampling profiles across provider adapters (apply-profile.ts, profile-sampling.ts).
    • Expanded model support with resilient retry handling (google-retry.ts).
  4. Review Quality, Evidence Grounding & Batch Review Prompts

    • Strict Batch Scoping: Restructured batch review prompts to group findings per file inside structured arrays, resolving cross-file hallucinations and line-offset mismatches.
    • Grounding Verification: Verifies diff evidence verbatim against file diffs; candidate findings lacking grounded evidence are dropped.
    • JSON Output Recovery: Robust JSON extraction and recovery (json-extract.ts, jsonrepair) to salvage truncated or malformed LLM responses.
  5. Cloudflare Worker CPU Protection

    • Introduced MAX_ATTEMPTS_PER_WORKFLOW_INSTANCE to cap review attempts per workflow instance, cleanly re-enqueuing fresh instances for large PRs to prevent Cloudflare Worker CPU timeout exhaustion.
  6. Documentation Migration to MDX (docs/)

    • Replaced legacy Markdown with interactive MDX guides covering Cloudflare, Docker, Node.js, Railway, Neon, Configuration, Providers, Operations, and Local Development.
    • Added automated docs deployment workflow (.github/workflows/trigger-docs-deploy.yml) and SEO generation (docs-seo.ts).
  7. Dashboard UX & Performance Overhaul (apps/dashboard)

    • Added an interactive onboarding guidance card in the dashboard sidebar.
    • Aligned empty states and card sizing between Jobs and Repositories views.
    • Refactored job-logs.tsx with dedicated file-row.tsx components and state reducer in repos.tsx.
    • Lighthouse performance optimizations: improved bundle chunking, fixed layout timing, and removed duplicate authentication routes.

Migration & Deployment Notes

  • Docker: Production container images now use gcr.io/distroless/nodejs24-debian13:nonroot. Healthcheck command uses /nodejs/bin/node instead of shell wrapper.
  • Node Self-Hosting: When deploying @codraoss/node-server, ensure REDIS_URL and DATABASE_URL are provided. Workers and API server can be toggled using START_WORKER=true|false and START_API=true|false.
  • Environment Variables: Verify LLM_CONFIG_ENCRYPTION_KEY, APP_URL, AUTH_CALLBACK_URL, and GitHub App credentials when provisioning new Node.js instances.

Verification & Testing

  • Monorepo package builds passing (npm run build:packages).
  • Full test suite passing across core, models, api, db, and dashboard.
  • Verified Docker build and nonroot healthcheck.
  • Verified Cloudflare Worker typechecks and bundle outputs.

devarshishimpi and others added 30 commits September 11, 2026 22:06
- Add `OnboardingCard` to UI package and bump version to 0.9.6
- Refactor `TickMeter` chart primitive to use CSS Grid
- Integrate `SidebarOnboarding` into `DashboardSidebar`
fix: update landing page for issue 110
Remove /login route in favour of / landing page
…support

Add onboarding card & redesign landing page
- build: optimize Vite chunking for heavy dependencies (react, recharts, motion) and inject __APP_VERSION__
- perf: add public/_headers for aggressive static asset caching and enforce no-cache on HTML routes
- ui: prevent iOS auto-zoom by increasing mobile input font size to 16px (text-base)
- ui: remove touch-none on sliders to fix mobile scrolling interactions
- ui: various layout and hook refinements across dashboard pages and components
- auth: redirect unauthorized HTML requests to / instead of /login
- worker: add /account* routing rule in wrangler.jsonc
- chore: bump @codraoss/api to 0.9.7 and @codraoss/ui to 0.9.10
- feat: add SVG favicon
Signed-off-by: Devarshi Shimpi <devarshishimpi@gmail.com>
- Add `apps/node` to run the Codra backend as a standalone Node.js service using `@hono/node-server`. Includes environment bindings, dependency injection (`api-deps.ts`), and build configuration.
- Extract shared API dependency injection (`createSharedApiDeps`) into `@codraoss/api`.
- Move platform-specific logic (KV, OAuth, config, updates-email) out of `apps/worker` and into `packages/api/src/platform`.
- Relocate `formatter.ts` from `apps/worker/src/services` into `packages/core/src`.
- Move `updates-email-prompt.tsx` to `shared` components in the dashboard and refresh its styling.
- Update tests, lockfiles, and `tsconfig.json` to reflect the new package structure and imports.
- core: Fix mojibake characters in formatter and tests, restoring actual emojis (✅, 👍, ℹ️, ⚪)
- dashboard: Hide `JobsTable` when there are no jobs to prevent overlap with empty state
- dashboard: Improve `ReposPage` layout with proper flexbox constraints and use `EmptyState` for empty search results
…ports

Feat: Extract Node.js backend, refine dashboard UX, and optimize performance
…port

Integrate BullMQ, add Docker support, and extract node adapters
Feat: Docker runtime hardening and AI model sampling profiles
Docs: comprehensive deployment guides for Docker, Node.js and Railway
Comment thread packages/core/src/claim-checks.ts Fixed
Comment thread packages/models/src/catalog.ts Fixed
Comment thread test/api/webhook-handling.spec.ts Fixed
Comment thread test/comment-feedback.spec.ts Fixed
codra-app-personal[bot]

This comment was marked as resolved.

Comment thread test/api/webhook-handling.spec.ts Fixed
Comment thread test/comment-feedback.spec.ts Fixed

@codra-app-personal codra-app-personal 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.

Codra Review

Here are some automated review suggestions for this pull request.

Note

6 files could not be reviewed, so this pass is incomplete.

Reviewed commit: 7ce5816a64

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready

If Codra has suggestions, it will comment; otherwise it will react with 👍.

Comment thread apps/node/Dockerfile

# Keep only the Node server's production dependency graph in the runtime image.
RUN rm -f apps/worker/package.json packages/ui/package.json \
&& npm pkg delete dependencies \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Deleting dependencies in package.json breaks subsequent npm install

Running npm pkg delete dependencies deletes the dependencies object from the root package.json. Subsequent execution of npm install --omit=dev will install no production dependencies, resulting in a runtime MODULE_NOT_FOUND crash for packages like @hono/node-server, bullmq, and ioredis.

Suggested change
&& npm pkg delete dependencies \
Remove `npm pkg delete dependencies` or use workspace pruning correctly.

Comment thread scripts/setup-helpers.js
else resolve();
});

const child = exec(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Command injection vulnerability

The setSecret function uses exec with a template literal that directly interpolates secretName into a shell command. If secretName contains shell metacharacters (e.g., ;, &, |), an attacker could execute arbitrary commands on the system. While secretName might be controlled internally, it is unsafe to use exec with unvalidated user-provided strings.

Suggested change
const child = exec(
Use `spawn` instead of `exec`, passing `secretName` as a separate argument to the command array to avoid shell interpretation.

expect(json.message).toBe('queued');
const json = (await response.json()) as any;
expect(response.status).toBe(202);
expect(json.message).toBe("queued");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Broken logic in draft PR test case

The test case 'ignores webhooks for draft PRs' asserts that the response message is 'queued' and that the queue length is 1, which contradicts the test description. If the system is intended to ignore draft PRs, it should return a different status or not queue the job. The test as written confirms that the system incorrectly processes draft PRs, but the test expectations are set up to expect this incorrect behavior, masking a functional bug in the webhook handler.

accountName: parsed.data.name,
timezone: parsed.data.timezone,
});
const account = await accounts.updateAccountSettings(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Unintended partial update in account settings

The accountUpdateSchema allows name or timezone to be optional, but the updateAccountSettings call passes both fields as parsed.data.name and parsed.data.timezone directly. If a user only provides a name in the request, parsed.data.timezone will be undefined. Passing undefined to updateAccountSettings likely causes the database column to be overwritten with NULL or result in an API error, effectively clearing the user's previously set timezone when they only intended to change their name.

path: '/login',
element: withSuspense(LoginPage, true),
path: "/",
element: <LandingPage />,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Missing Suspense boundary for routed component

The LandingPage component is loaded via React.lazy (defined on line 9 in the old code, but now implicitly lazy/imported) and is rendered directly without the withSuspense wrapper that is required for lazy-loaded components in this architecture. This will cause a runtime error when React attempts to render the lazy component without a Suspense boundary.

@devarshishimpi
devarshishimpi merged commit f39a0d9 into main Nov 2, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants