Repository navigation
refactor(harness): declare adapter config checks with matchers in descriptors - #798
Merged
Merged
Conversation
…scriptors Replace files.config.<target>.locked with checks: a key of the merged config, a GoogleTest-style matcher expression every value there must match, and an optional reason. The shared render runs them before any adapter step. Move the config rules of claude, codex, dsh, hermes, pi and terminus from quirks.py into their descriptors. Reference implementation of RFC #797; not to be merged before it is accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
Contributor
|
@hanfeiyu it seems the doc rule might be relevant to this PR. just fyi |
Present checks as rules on tree nodes, with config as the node kind that takes them: config nodes merge into a target, so its checks match the merged target. Point the claude, hermes and codex text at the descriptor's checks instead of the quirks that no longer hold those defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore the claude client_env, hermes and codex text that says the quirks enforce the defaults; correcting it is tracked separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s checks This PR moved the claude updater-switch refusal and the codex defaults from the quirks into descriptor checks, so the guide now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The render writes each config file in the format its suffix names, and the hermes defaults are kept by the descriptor's checks, not the quirks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give the renderer steps their own section and move node checks after the engine and adapter seams, each with its part of the guidance on checks and steps. Wrap the page at 79 columns, turning the adapter grid table into a list-table; one link whose URL alone is longer stays as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yanxz
commented
Oct 14, 2026
…dling Remove the quirks docstrings and descriptor comments that only restate what the shared checks do; adapter-specific reasons stay beside their checks. Treat a leftover locked field like any other unknown field, and describe the matchers as tree node checks that link to the adapter guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve two conflicts: keep the matchers import beside the moved EpisodeExecutor import, and drop the guide's paragraph on the module-level finalize_render that main removed. Move the config checks tests into tests/harness/ with the other harness suites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yanxz
marked this pull request as ready for review
October 14, 2026 20:43
yanxz
requested review from
Benjamin-eecs,
BobbyZhouZijian and
quao627
as code owners
October 14, 2026 20:43
This comment has been minimized.
This comment has been minimized.
BobbyZhouZijian
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
First stage of RFC #797: config checks, which supersede
locked(#737). Checks for the other node kinds are not implemented here. Part of #681.Changes
reef/harness/adapters/matchers.py, a GoogleTest-style matcher subset and a parser formatchexpressions.files.config.<target>.lockedwithchecks. The shared render runs them before any adapter step.quirks.pyinto their descriptors. Convert opencode'slockedlist; its cross-reference checks stay in Python.Documentation impact
docs/developer-guide/harness-adapters.rst.Compatibility and operational impact
The loader no longer reads
locked; a descriptor must declarechecksinstead. Refusal messages change format. The RFC lists the refusals that are stricter or looser than before.The install route renders a release again with the model binding, and it swallows a
RenderErrorand installs the tree without a binding. A release published before this change that fails one of the stricter checks therefore installs with no model binding and no error, until the install route stops dropping render errors (a separate follow-up).Verification
pytest tests/harness/test_harness_config_checks.py: 91 passed. It loads every bundled descriptor, so a malformed match expression fails here; checked by misspelling one matcher.pytest tests/harnessafter mergingmain: 1146 passed, 15 skipped, 1 failed. The failure,test_native_plugins.py::test_every_kind_installs_into_the_host_and_leaves_nothing_when_the_entry_leaves, also fails onmain.python .github/scripts/check_test_layout.py: passed.pre-commit run --files <changed files>: passed.mypy: no new errors. The existingreef/observability/open_telemetry.pyerrors remain.tests/suite, which needs the training environment, and real-binary smoke tests.AI assistance
Claude Code implemented the change and drafted this description under the author's direction. The author is still reviewing it.
Checklist
AGENTS.md. Author review is pending.AGENTS.md. Author review is pending.README.i18n.yaml, or do not affect README content.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.