Skip to content

Declare each Harness's support once - #531

Merged
SaladDay merged 2 commits into
aos/cutoverfrom
aos/r5-harness-declaration
Oct 7, 2026
Merged

SaladDay merged 2 commits into
aos/cutoverfrom
aos/r5-harness-declaration

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Each Harness now declares what it supports in one place, and one validator checks every selection against that declaration.

  • One declaration. Each internal/harnessconfig/<kind> returns a proto.Declaration next to its Configuration(): the capabilities, message and image limits, MCP origins, reserved labels and patterns, output-schema rules, and Conflicts. Each daemon adapter starts from it and can only clear support.
  • The heartbeat only narrows. Core closes a connection whose heartbeat widens the static declaration or names an unknown kind. Fields that never narrow at runtime are not sent.
  • One validator. proto.ValidateSelection is the only check of a declared rule.
    • Core runs it when an Agent with a saved Harness is created or updated (new), at Session creation, at input and function-result admission, at device selection and at the final claim.
    • The Runtime runs it once, when dispatch admits an execution_prepare, before any Executor factory.
    • Errors. A rejection is 400 unsupported_or_invalid_configuration, with the configuration path as param.
  • Deleted.
    • services/core/internal/engine/, including the generated constructor map and the catalog profile;
    • the execution policy callbacks;
    • the adapter and bridge re-checks;
    • the capabilities that never narrowed;
    • ExecutionControls.WebSearch with WebSearchControl;
    • the hand-written harness-capabilities.md. The coverage ledger now lists each Harness's differences.
  • Docs. harness-onboarding.md drops step 4 and gains "Declare support". runtime-protocol.md covers the heartbeat. zh translations updated.

Public behavior changes

  • Three rejections move from invalid_request to unsupported_or_invalid_configuration, the code whitespace-only text already used: unsupported message images, Claude function-result images that are failed, remote or not inline PNG/JPEG, and MiniMax Code function results. Each is a Harness limitation, not a malformed request.
  • Claude now treats a function-parameter root that has no type, or a union that includes object, as an object. A union root used to be rejected.

Checks

  • Go:
    • Focused tests on 21 packages, including TestCoreErrorCatalog.
    • Integration tests.
    • -race -count=50 on the changed concurrent tests.
    • darwin and windows builds.
  • Generated outputs: make check-harness-catalog; make openapi produces no diff.
  • Web and docs:
    • pnpm test in claude-sdk-adapter.
    • The website build and tests.
    • make check-names check-docs check-ci.

No live Harness qualification ran on this PR. It runs once after R6, because R6 changes the same adapters. A shared blind review covers this PR together with R6 and PR5b.

Net change: -1,498 lines.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Each internal/harnessconfig/<kind> returns one proto.Declaration beside its
Configuration. proto.ValidateSelection is the only check of a declared rule:
saved Agents with a Harness, Session creation, input admission, device
selection, the final claim and delivery check it in Core, and the Runtime
checks it before the Executor factory. A heartbeat only narrows the static
declaration; Core closes a connection whose heartbeat widens it.

Delete services/core/internal/engine, the execution policy callbacks, the
adapter and bridge re-checks, the capabilities that never narrowed
(WorkspaceReadPreparation, WorkspaceOutputExport, ProgrammaticToolCallingDisable,
WebSearchControl, SubagentControl), ExecutionControls.WebSearch and the
hand-written Harness capabilities page.
@SaladDay
SaladDay merged commit ca876ff into aos/cutover Oct 7, 2026
@SaladDay
SaladDay deleted the aos/r5-harness-declaration branch October 7, 2026 23:30
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