Skip to content

Implement Harness MVP core schemas - #7

Draft
BorisGuo6 wants to merge 5 commits into
mainfrom
worktree/bingsheng
Draft

Implement Harness MVP core schemas#7
BorisGuo6 wants to merge 5 commits into
mainfrom
worktree/bingsheng

Conversation

@BorisGuo6

@BorisGuo6 BorisGuo6 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Add strict, frozen Pydantic models for the Harness MVP common records, qualification payload, immutable environment package reference, and all six Text2Env compile/replay/validate input-output schemas.
  • Enforce stable SemVer and Skill identity formats, mechanical MCP tool naming, artifact typing, dependency ordering, run/event state invariants, runtime defaults, package hash binding, and fail-closed publication output semantics.
  • Add an immutable catalog for 14 public Draft 2020-12 JSON Schemas, committed deterministic snapshots, and an export/check command for schema drift.
  • Package the Harness modules and schema snapshots, register the module in the repository audit, and document the new ownership boundary.
  • Add focused positive, rejection, invariant, snapshot-drift, and packaging-adjacent tests. The unified test entry point now fails below 100% statement or branch coverage for self_improving.harness.

Why

This is PR1 of the Harness MVP implementation sequence. It freezes the typed interface and reviewable schema surface before Registry execution, Text2Env handlers, or MCP adaptation are introduced. Existing scene_gen schemas, package manifests, runtime evidence, and validation reports remain authoritative for their own payloads.

Documentation

Scope and behavior

  • Public schema identity is carried by JSON Schema $id; ArtifactRef.schema_version remains the required nullable pointer to a typed or untyped artifact payload.
  • Request text is preserved exactly, while the existing SceneSpec request bounds and authoritative robotwin.* schema versions are reused.
  • Replay defaults are precheck_steps=0, settle_steps=900, contact_window_steps=120, video_frames=120, and fps=12.
  • This PR does not implement SkillRegistry, handlers, invocation hashing, artifact resolution, retries, MCP tools, or publication side effects.
  • The Harness RFC remains Status: Proposed; this PR does not mark it Accepted.
  • No support, containment, loader, validator, or physical replay behavior changed. Repo docs now distinguish the standalone runtime CLI's current contact-window default of 60 from the Harness/validated-recipe default of 120.

Validation

  • script/run_self_improving_tests.sh: 564 passed, 6 skipped.
  • Harness coverage: 350/350 statements and 74/74 branches, 100.00%; enforced with --cov-fail-under=100.
  • python script/export_harness_schemas.py --check: 14 snapshots verified with no drift.
  • All 14 snapshots pass the Draft 2020-12 metaschema check.
  • Built wheel contains all 6 Harness Python modules and all 14 JSON Schema snapshots.
  • Targeted Ruff checks passed for all changed Python files.
  • git diff --check passed.

The skipped tests are the existing explicit runtime/physical checks requiring SAPIEN or excluded source bundles; they are not introduced or silently mocked by this PR.

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.

2 participants