rename(phase 3): compose/DB/infra + stray code refs capakraken → nexus (#62)
CI / Lint (push) Successful in 3m4s
CI / Typecheck (push) Successful in 3m6s
CI / Architecture Guardrails (push) Successful in 3m8s
CI / Assistant Split Regression (push) Successful in 3m48s
CI / Build (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled

rename(phase 3): compose/DB/infra + stray code refs capakraken → nexus (#62)

Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
This commit was merged in pull request #62.
This commit is contained in:
2026-05-21 20:07:18 +02:00
committed by Hartmut
parent b41c1d2501
commit 19aeb2ba04
44 changed files with 406 additions and 187 deletions
@@ -105,10 +105,10 @@ describe("RBAC cache Redis pub/sub (#57)", () => {
// Simulate a peer instance publishing an invalidation: grab any
// subscriber on the channel and fire the event as if Redis delivered it.
const subs = channelSubscribers.get("capakraken:rbac-invalidate");
const subs = channelSubscribers.get("nexus:rbac-invalidate");
expect(subs).toBeDefined();
expect(subs!.size).toBeGreaterThanOrEqual(1);
for (const sub of subs!) sub.emit("message", "capakraken:rbac-invalidate", "1");
for (const sub of subs!) sub.emit("message", "nexus:rbac-invalidate", "1");
// Next load must hit the DB again.
await loadRoleDefaults();
@@ -126,6 +126,6 @@ describe("RBAC cache Redis pub/sub (#57)", () => {
const newPublishes = publishCalls.slice(countBefore);
expect(newPublishes.length).toBe(1);
expect(newPublishes[0]!.channel).toBe("capakraken:rbac-invalidate");
expect(newPublishes[0]!.channel).toBe("nexus:rbac-invalidate");
});
});
@@ -24,7 +24,7 @@ describe("assertWebhookUrlAllowed — SSRF guard", () => {
it("allows an HTTPS URL with a path and query string", async () => {
await expect(
assertWebhookUrlAllowed("https://hooks.external.io/events?source=capakraken"),
assertWebhookUrlAllowed("https://hooks.external.io/events?source=nexus"),
).resolves.toBeUndefined();
});
+3 -3
View File
@@ -22,15 +22,15 @@ export function getAppBaseUrl(): string {
if (process.env["NODE_ENV"] === "production") {
throw new Error(
"NEXTAUTH_URL must be set in production — email links will contain localhost otherwise. " +
"Set it to the public URL of this app (e.g. https://capakraken.example.com).",
"Set it to the public URL of this app (e.g. https://nexus.example.com).",
);
}
if (!warned) {
warned = true;
console.warn(
"[capakraken] NEXTAUTH_URL is not set — falling back to http://localhost:3100 for email links. " +
"Set NEXTAUTH_URL in your .env to suppress this warning.",
"[nexus] NEXTAUTH_URL is not set — falling back to http://localhost:3100 for email links. " +
"Set NEXTAUTH_URL in your .env to suppress this warning.",
);
}
+2 -2
View File
@@ -44,13 +44,13 @@ const redactConfig = { paths: REDACT_PATHS, censor: "[REDACTED]" };
export const logger = isProduction
? pino({
level: LOG_LEVEL,
base: { service: "capakraken-api" },
base: { service: "nexus-api" },
redact: redactConfig,
})
: pino(
{
level: LOG_LEVEL,
base: { service: "capakraken-api" },
base: { service: "nexus-api" },
redact: redactConfig,
formatters: {
level(label: string) {
+1 -1
View File
@@ -31,7 +31,7 @@ type RateLimiterBackend = {
reset: () => Promise<void>;
};
const DEFAULT_REDIS_KEY_PREFIX = "capakraken:ratelimit";
const DEFAULT_REDIS_KEY_PREFIX = "nexus:ratelimit";
const DEFAULT_REDIS_BACKEND = process.env["RATE_LIMIT_BACKEND"] as RateLimitBackendMode | undefined;
const DEFAULT_REDIS_URL = process.env["REDIS_URL"]?.trim();
const warnedRedisFailures = new Set<string>();
+1 -1
View File
@@ -201,7 +201,7 @@ const REDIS_URL =
: (() => {
throw new Error("REDIS_URL required in production");
})());
const CHANNEL = "capakraken:sse";
const CHANNEL = "nexus:sse";
let publisher: Redis | null = null;
let subscriber: Redis | null = null;
+1 -1
View File
@@ -42,7 +42,7 @@ const ROLE_DEFAULTS_TTL = 10_000;
// We publish a single invalidate message per change; every node subscribes and
// clears its local cache on receipt. Failure to publish/subscribe is logged
// but never thrown — the TTL above is the fall-back.
const RBAC_INVALIDATE_CHANNEL = "capakraken:rbac-invalidate";
const RBAC_INVALIDATE_CHANNEL = "nexus:rbac-invalidate";
let _rbacPublisher: Redis | null = null;
let _rbacSubscriber: Redis | null = null;