Skip to content

Add reproducible JSON server configs, Zod validator, and admin JSON import UI#7

Open
Spbd1 wants to merge 1 commit into
codex/build-admin-dashboard-for-parcel-societyfrom
codex/create-json-config-files-and-validator
Open

Add reproducible JSON server configs, Zod validator, and admin JSON import UI#7
Spbd1 wants to merge 1 commit into
codex/build-admin-dashboard-for-parcel-societyfrom
codex/create-json-config-files-and-validator

Conversation

@Spbd1

@Spbd1 Spbd1 commented May 10, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide reproducible, shareable server configurations for experiments so servers can be created deterministically from a single JSON artifact.
  • Validate and convert those configs into engine overrides to avoid ad-hoc manual changes and ensure engine behavior matches published configs.
  • Make it easy for admins to paste/upload and validate configs in the admin UI before creating a server to reduce setup errors.

Description

  • Added five reproducible JSON configs under configs/: lowineq-stable.json, lowineq-uncertain.json, highineq-stable.json, highineq-uncertain.json, and pilot-8servers.json, each containing the requested top-level fields, defaults and a randomSeed.
  • Introduced a shared Zod-based schema and helpers at packages/shared/src/serverConfig.ts to parse/validate configs and map them to engine override keys via serverConfigToEngineOverrides.
  • Exported the config helpers from @parcel-society/shared (packages/shared/src/index.ts) and added zod to packages/shared/package.json dependencies.
  • Added a client-side admin form apps/web/app/admin/servers/new/ConfigJsonForm.tsx to paste or upload JSON, run local validation via safeParseServerConfig, show validation messages, and enable create actions only when valid; wired the form into the admin create-server page and added createServerFromConfig server action to persist the server and optionally generate the configured map (apps/web/app/admin/servers/new/actions.ts, apps/web/app/admin/servers/new/page.tsx).

Testing

  • Ran a Python structural check that parsed all files in configs/ and asserted the expected keys and default values, which passed.
  • Ran git diff --check / local whitespace checks, which passed.
  • Attempted pnpm --filter @parcel-society/shared typecheck && pnpm --filter @parcel-society/web typecheck, but TypeScript checks could not complete because node_modules are missing and the package install is blocked by registry access (TypeScript errors due to unresolved zod).
  • Attempted pnpm --filter @parcel-society/web lint, but ESLint could not run because dependencies are unavailable and @eslint/js could not be resolved.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant