All checks were successful
Build + deploy releases / build-and-deploy (push) Successful in 8s
Schema-driven form renderer plus zddc-server endpoints that turn any
<name>.form.yaml into a working data-collection form at <path>/<name>.form.html.
Submissions land in <path>/<name>/<YYYY-MM-DD>-<email-sanitized>.yaml,
ACL-gated by the existing .zddc cascade. The form posts back to its own URL;
the server strips ".html" and routes by what's underneath, so create and
update use the same client-side code path.
Form spec dialect: JSON Schema 2020-12 + RJSF-style ui:* hints, written in
YAML. Chosen for LLM authorability — it's the canonical structured-output
target for OpenAI/Anthropic, and the ui:* convention is the most-trained UI
hint vocabulary. Supported subset for v0: type (string/number/integer/boolean/
array/object), enum, min/max, minLength/maxLength, required, additionalProperties:
false, properties, items, format (date, email). Round-trip mode is form-as-truth:
submission YAML is regenerated each save, comments are not preserved (the v1
file-as-truth mode for hand-edited files like .zddc itself is deferred).
New components:
* form/ — sixth single-file HTML tool, vanilla JS renderer (~760 LoC)
* zddc/internal/jsonschema/ — focused JSON Schema validator covering only
the v0 keyword subset. Match-implementation-cost-to-surface-used: a full
library brings 70%+ surface we don't use; revisit when v1 adds $ref +
oneOf + if/then/else.
* zddc/internal/handler/formhandler.go — RecognizeFormRequest / ServeForm,
capability-URL re-edit, atomic submission writes via the new
zddc.WriteAtomic helper extracted from writer.go.
* dispatch() in zddc-server/main.go now intercepts *.form.html and
*.yaml.html before the static-file path; spec existence is the trigger.
Build pipeline: form joins ZDDC_RELEASE_TOOLS in lockstep, gets its own
embedded copy in handler/form.html (separate from the apps cascade —
the form renderer is fixed, not subject to per-folder version overrides).
Tests: 5 new Playwright specs (form-safety) + 14 new Go tests across the
validator and handler. All 172 Playwright tests + 10 Go packages green.
End-to-end manual verification: GET empty → POST 201 + capability URL →
GET re-edit (pre-filled) → POST update → 200, raw YAML browsable, ACL
deny → 403.
Docs: form/ section added to AGENTS.md and ARCHITECTURE.md. AGENTS.md
also documents the implementation-vs-dependency policy. CLAUDE.md repo-shape
list extended.
Deferred (v1+): .zddc editor migration onto this system, file-as-truth
lossless YAML round-trip, ui:show-when conditional visibility, oneOf/anyOf,
apps-cascade preview hook, cascade-fetched form definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
72 lines
1.4 KiB
JavaScript
72 lines
1.4 KiB
JavaScript
import { defineConfig } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests',
|
|
timeout: 30000,
|
|
retries: 0,
|
|
reporter: [['line'], ['html', { open: 'never' }]],
|
|
|
|
use: {
|
|
// Chromium only -- File System Access API requires it,
|
|
// and the ZDDC tools target "any modern Chromium-based browser"
|
|
browserName: 'chromium',
|
|
screenshot: 'only-on-failure',
|
|
trace: 'retain-on-failure',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'archive',
|
|
testMatch: 'archive.spec.js',
|
|
},
|
|
{
|
|
name: 'archive-cascade',
|
|
testMatch: 'archive-cascade.spec.js',
|
|
},
|
|
{
|
|
name: 'landing',
|
|
testMatch: 'landing.spec.js',
|
|
},
|
|
{
|
|
name: 'transmittal',
|
|
testMatch: 'transmittal.spec.js',
|
|
},
|
|
{
|
|
name: 'transmittal-init',
|
|
testMatch: 'transmittal-init-check.spec.js',
|
|
},
|
|
{
|
|
name: 'transmittal-drag-drop',
|
|
testMatch: 'transmittal-drag-drop.spec.js',
|
|
},
|
|
{
|
|
name: 'classifier',
|
|
testMatch: 'classifier.spec.js',
|
|
},
|
|
{
|
|
name: 'mdedit',
|
|
testMatch: 'mdedit.spec.js',
|
|
},
|
|
{
|
|
name: 'zddc',
|
|
testMatch: 'zddc.spec.js',
|
|
},
|
|
{
|
|
name: 'form-safety',
|
|
testMatch: 'form-safety.spec.js',
|
|
},
|
|
{
|
|
name: 'zddc-filter',
|
|
testMatch: 'zddc-filter.spec.js',
|
|
},
|
|
{
|
|
name: 'build-label',
|
|
testMatch: 'build-label.spec.js',
|
|
},
|
|
{
|
|
name: 'schema',
|
|
testMatch: 'schema.spec.js',
|
|
},
|
|
],
|
|
});
|
|
|