18 Commits

Author SHA1 Message Date
coreci-chat-po f8a36b9e29 test(db): cover the tenant-scope pinning (coreci-chat#14)
ci / test-pglite (PGlite, default) (push) Failing after 1m48s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Successful in 1m33s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m48s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Successful in 1m34s
2026-10-27 08:36:20 +00:00
coreci-chat-po 41566a1987 fix(db): make the R-009 pen test isolation-proof against the shared CI database
ci / test-pglite (PGlite, default) (push) Failing after 1m47s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Successful in 1m32s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m48s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Successful in 1m33s
2026-10-27 08:33:16 +00:00
coreci-chat-po 063cf85248 test(db): cover the tenant-scope pinning (coreci-chat#14)
ci / test-pglite (PGlite, default) (push) Failing after 1m48s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m33s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m48s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m32s
2026-10-27 08:32:51 +00:00
coreci-chat-po cf098f2b9d fix(db): pin the tenant scope to one connection (coreci-chat#14)
ci / test-pglite (PGlite, default) (push) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m34s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m34s
2026-10-27 08:32:18 +00:00
coreci-chat-po 53532fbdb5 fix(db): pin the tenant scope to one connection (coreci-chat#14)
ci / test-pglite (PGlite, default) (push) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m32s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m33s
2026-10-27 08:32:00 +00:00
coreci-chat-po d9da54b3bf fix(db): pin the tenant scope to one connection (coreci-chat#14)
ci / test-pglite (PGlite, default) (push) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m33s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m35s
2026-10-27 08:31:45 +00:00
coreci-chat-po db158255c0 fix(db): one DROP+CREATE per policy (drop the duplicated targets block) (coreci-chat#13)
ci / test-pglite (PGlite, default) (push) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m33s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m51s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m31s
2026-10-27 06:58:49 +00:00
coreci-chat-po 68139ea307 fix(auth): resolve the tenant membership inside the tenant scope (coreci-chat#13)
ci / test-pglite (PGlite, default) (push) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m24s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m24s
2026-10-27 06:58:13 +00:00
coreci-chat-po 9b4bbd01af fix(db): harden the RLS tenant scope against an empty app.tenant_id (coreci-chat#13)
ci / test-pglite (PGlite, default) (push) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m22s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m22s
2026-10-27 06:57:51 +00:00
coreci-chat-po 585f15f5de fix(test): seed tenant_memberships in the tenant scope - the M1 migration forces RLS on that table
ci / test-pglite (PGlite, default) (push) Failing after 1m47s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m21s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m47s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m25s
2026-10-27 05:08:45 +00:00
coreci-chat-po a7d55b9ec9 chore(ci): drop the duplicated CREATE DATABASE statement from the roles script
ci / test-pglite (PGlite, default) (push) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m10s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m50s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m11s
2026-10-27 04:58:48 +00:00
coreci-chat-po bf4271308b fix(ci): correct the CI role grants - apply them in coreci_ci and FOR ROLE migrator (the app role had no table grants)
ci / test-pglite (PGlite, default) (push) Failing after 1m51s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 1m12s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m49s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 1m11s
2026-10-27 04:58:14 +00:00
coreci-chat-po b25e949dbe fix(ci): apply the CI role grants in coreci_ci and FOR ROLE migrator - the app role had no table grants (42501)
ci / test-pglite (PGlite, default) (push) Failing after 1m52s
ci / test-postgres (Postgres 16, G-022 RLS) (push) Failing after 50s
ci / test-pglite (PGlite, default) (pull_request) Failing after 1m51s
ci / test-postgres (Postgres 16, G-022 RLS) (pull_request) Failing after 51s
2026-10-27 04:57:14 +00:00
CIAgent 0c15d3d0b2 docs(milestone): complete M2 — MCP Layer & Day 1 Adapters (v0.2)
M2 delivers the read-only MCP capability broker gateway and four Day-1
infrastructure adapters (Proxmox, SSH/Linux, GitHub, Gitea). 13 REQs (015-027)
all pass. 656 tests green. M1 non-regression verified.

MCP spec 2025-06-18 conformance verified (PROTOCOL.md + 7 tests).
Defense-in-depth SSH (broker layer 1 + Relay Agent layer 2 + no-shell exec).
Two-track LLM smoke (Track A mock-path P0 gate passes).
CI: Gitea Actions (.gitea/workflows/ci.yml) with Postgres 16 + RLS verification.

Phases shipped:
  P0  pre-execution          v0.1.0
  P1  Wave F — MCP gateway   v0.1.1
  P2  Wave G — Proxmox       v0.1.2
  P3  Wave H — SSH/Linux     v0.1.3
  P4  Wave I — Git adapters   v0.1.4
  P5  Wave J — SSE+smoke+UI  v0.1.5
  P6  Final — review+ship    v0.1.6 ← milestone release

---ci---
phase: 6
milestone: v0.2
status: complete
phase_role: final
milestone_complete: true
requirements:
  covered: [REQ-015, REQ-016, REQ-017, REQ-018, REQ-019, REQ-020, REQ-021, REQ-022, REQ-023, REQ-024, REQ-025, REQ-026, REQ-027]
  partial: []
---/ci---
2026-08-25 06:14:21 +00:00
CIAgent a7bce7e44a Merge phase/03-byom into milestone/v0.1-bootstrap
Wave C (BYOM) complete.

---ci---
phase: 3
milestone: v0.1
status: complete
---/ci---

# Conflicts:
#	apps/control-plane/package.json
#	apps/control-plane/tsconfig.json
#	pnpm-lock.yaml
2026-08-25 02:04:16 +00:00
CIAgent 3b8345dfe0 feat(P3): Wave C BYOM — endpoint registry, validate-on-save, routing shim
REQ-006: configure BYOM endpoint (URL in DB, key in secret manager)
REQ-007: validate-on-save test inference call (OpenAI-compatible)
REQ-008: route all inference to BYOM (G-001: test-inference proxy endpoint)
REQ-009: reject when unconfigured/unreachable (ByomUnconfiguredError/ByomUnreachableError)

---ci---
phase: 3
milestone: v0.1
status: execute
---/ci---
2026-08-25 01:54:20 +00:00
CIAgent bcca7686ee feat(P2): Wave B identity & RBAC — WorkOS SSO, tenant provisioning, RBAC at gateway
REQ-001: SSO session via WorkOS (getAuthorizationUrl + exchangeCodeForSession)
REQ-002: tenant provisioning on first signup (admin role)
REQ-003: invitations via single-use acceptance link
REQ-004: RBAC role assignment (admin/operator/viewer)
REQ-005: RBAC enforcement at API gateway from first endpoint (/api/me)

---ci---
phase: 2
milestone: v0.1
status: execute
---/ci---
2026-08-25 01:47:56 +00:00
CIAgent be70f56657 feat(P1): Wave A foundations — monorepo, DB+RLS, audit, secrets, runtime
Wave A (Phase 1) implements the M1 foundations for REQ-038, REQ-039, REQ-040:

Monorepo scaffold (pnpm workspaces, TS strict, NodeNext):
- apps/control-plane (Next.js App Router scaffold — Wave B adds routes)
- apps/relay-agent (Go module scaffold — Wave D adds WebSocket + install)
- packages/db, packages/secrets, packages/runtime, packages/config

packages/db (REQ-038, REQ-039):
- 0001_init.sql: tenants, users, tenant_memberships, targets, byom_endpoints,
  invitations, audit_log (append-only hash-chain), runtime_health (not audited)
- RLS policies on all tenant-scoped tables + FORCE ROW LEVEL SECURITY
- withTenant(tenantId, fn): SET LOCAL app.tenant_id + transaction
- audit.ts: appendAudit with sha256(prev_hash || canonical(payload)) chain;
  AuditWriteHaltError on write failure (Edge 7 — halts + rolls back)
- BEFORE INSERT trigger enforces chain integrity (G-006: per-tenant
  concurrent-write serialization documented; M3 mitigation noted)
- create-db.ts: PGlite (dev/test) + pg Pool (prod) behind DbClient interface
- pen-test scaffold: cross-tenant isolation (PGlite RLS limitation documented;
  prod RLS test runs at M1 review)
- 12 tests, 98% coverage

packages/secrets (REQ-040, G-005, G-010):
- SecretProvider interface: get/put/delete + SecretRef + SecretValue
  (toString returns [REDACTED]; unwrap is the only read path)
- AwsSecretsManagerProvider (prod): coreci/<tenantId>/<name>, KMS-backed
- LocalEncryptedProvider (dev): AES-256-GCM, PBKDF2 from SECRET_MASTER_KEY_DEV
- relay-token.ts: JWT HS256 sign/verify/issue (G-005 contract — locked so
  Wave B + Wave D parallelize without blocking)
- 24 tests (14 provider + 10 relay-token)

packages/runtime (G-002, G-003):
- Trigger.dev bootstrap (initRuntime) — pre-investment for M3 (G-003)
- runtimeHealthCheck task: writes to runtime_health, NOT audit_log (G-002)
- 6 tests

packages/config (G-010):
- Two-tier credential taxonomy: infra env vars (tier a) vs tenant creds
  (SecretProvider only, tier b). PO's 'no env vars' applies to tenant creds.

Coverage: db 98%, secrets/runtime/config typecheck clean.
All 45 tests passing. Go relay-agent builds.

---ci---
phase: 1
milestone: v0.1
status: verify
---/ci---
2026-08-25 01:29:25 +00:00