Skip to content

Publish a JSON Schema for each harness schema_version so other repos can validate harness YAML #9955

Backlog

Description

@jflowers

What happens

The harness YAML is the contract between fullsend and fullsend-ai/agents, but the only full description of it is fullsend's Go code. ADR 0127 gave us schema_version and the field type table in docs/contributing/harness-fields.md, and it deferred a JSON Schema per version as the natural follow on (ADR 0024 says the same). Epic #8720 lists it under out of scope, and as far as I can tell nobody has filed it.

So a repo that publishes harnesses has two choices today: install a pinned fullsend binary and run fullsend lint, or skip the check. fullsend-ai/agents does neither today.

The one piece we already publish is the env contract from #8679 (ADR 0146): docs/normative/sandbox-env/v1/harness-env.schema.json. It validates the env blocks of a harness and lets every other field through on purpose. It is generated from the runner's code and has a golden test, which is the pattern I would like to copy here.

What should happen

fullsend publishes a generated JSON Schema (Draft 2020-12) for each supported harness schema_version, under docs/normative/ beside the sandbox env schemas, so any CI job can validate harness YAML with stock tooling and no fullsend binary.

Validation criteria:

  • The schema for version 1 covers every field in Harness and ForgeConfig, including base, forge.<platform>, overlays[], and schema_version
  • It is generated from the Go types and a golden test fails when a field is added, removed, or changes type without regenerating
  • Every production harness in fullsend-ai/agents at its current pin validates clean
  • A wrong type, a misspelled field, or an unsupported schema_version fails validation with the offending path
  • Env blocks reuse the sandbox env definitions instead of restating them (ADR 0146 already expects this)
  • docs/contributing/harness-fields.md points at the schema, and the ADR 0127 rule that a field type change bumps schema_version also means publishing a new schema version

Open questions

  • Unknown keys: should the schema reject them? I am not sure the loader rejects them everywhere today, and I would rather the schema match the loader than get ahead of it.
  • Hybrid fields and the semantic types (inline command vs local path vs resource): which of these can a schema express as a pattern, and which stay with Harness.Lint() (Harness.Lint() should flag values that violate their declared field type #8723)? My gut says the schema covers structure and scalar types, and Lint keeps the heuristics and CEL trigger checks.
  • Overlays: ADR 0112 and ADR 0158 will change what an overlay may set. Do we schema the current behavior and update when those land?

Not in scope

Context

Activity

  1. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 3:58 PM UTC · Completed 4:00 PM UTC

    Commit: cca0379 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.24

  2. added
    feature
    triaged
    type/feature
    component/harness
    on Nov 30, 2026
  3. fullsend-ai-triage commented on Nov 30, 2026

    @fullsend-ai-triage

    This is a well-scoped request and ready for implementation. The Go types and the existing generator pattern (internal/envmanifest with its golden test, and the sandbox-env v1 schemas under docs/normative/) are all in this repository. No open PR or duplicate issue was found, and #8723 (Lint type checks) and the epic #8720 are related but do not block this work.

    Notes on the open questions, for whoever picks this up:

    • Unknown keys: the harness loader currently decodes with plain yaml.Unmarshal, without strict known-field checking, so it accepts unknown keys. Your criterion that a misspelled field fails validation therefore makes the schema stricter than the loader. Make that an explicit decision, and document it either way.
    • Hybrid and semantic fields: the proposed split (the schema covers structure and scalar types, Harness.Lint() keeps the heuristics and CEL trigger checks) looks workable.
    • Overlays: schema the current behavior and regenerate when ADR 0112 and ADR 0158 land.

    Suggested test coverage:

    Golden: rendered harness v1 schema == committed file; adding, removing or retyping a Harness/ForgeConfig field without regenerating fails.
    Validation (stock Draft 2020-12 validator):
      - valid harness, including base, forge.<platform> and overlays[] -> passes
      - wrong-typed field -> fails with the offending path
      - misspelled top-level field -> fails (per the unknown-keys decision)
      - schema_version: 2 -> fails
      - reserved env.sandbox name -> fails via the shared env definitions
      - in-repo example harnesses -> validate clean
    

    Labels: This is a new-capability request touching harness configuration, matching type/feature and component/harness in the repo's conventions.


    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/harnessfeaturetriagedtype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions