Skip to content

fix(gateway): enforce server-side model policy - #127

Merged
winrey merged 12 commits into
devfrom
codex/model-policy-incident-design
Jul 28, 2026
Merged

fix(gateway): enforce server-side model policy#127
winrey merged 12 commits into
devfrom
codex/model-policy-incident-design

Conversation

@winrey

@winrey winrey commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the Team9 gateway the authoritative allowlist for staff model creation and mutation
  • reject fixed base-model bots and unsupported provider/model pairs before persistence or dispatch
  • persist durable model-change decisions and dispatch through an idempotent PostgreSQL outbox
  • expose the authenticated server catalog and update the client for pending model changes
  • align the integration with current agent-pi: use caller-provided messageId and remove the obsolete /api/workers/readiness dependency

Security and operations

  • bounded audit values and low-cardinality metrics; no request bodies, credentials, or prompts in logs
  • migrations 0066_model_change_attempts.sql and 0067_model_change_publication.sql
  • rollout runbook keeps the outbox disabled until the deployed agent-pi build passes model-registry and idempotency smokes

Verification

  • pnpm check:migrations — 68 migrations passed
  • pnpm lint:ci — passed with 32 existing warnings and 0 errors
  • pnpm build — 17/17 tasks passed
  • Gateway — 190 files, 3587 tests passed
  • Client — 233 files, 2724 tests passed
  • Database — 7 suites, 21 tests passed with required test DB environment values
  • claw-hive client — 45 tests passed
  • focused model-policy regression set — 242 tests passed

The root pnpm test command still exposes an existing nested-Turbo environment-filtering issue in seed.spec.ts; that file is unchanged from dev, and the database suite passes when its documented required variables are supplied.

@winrey
winrey merged commit f96b3a7 into dev Jul 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant