Skip to content

Feat/string keyed harness#143

Merged
slowdini merged 5 commits into
devfrom
feat/string-keyed-harness
Jul 14, 2026
Merged

Feat/string keyed harness#143
slowdini merged 5 commits into
devfrom
feat/string-keyed-harness

Conversation

@slowdini

Copy link
Copy Markdown
Owner

Closes #135

slowdini and others added 5 commits July 14, 2026 00:34
…zation

The stock serde impl for Option<Option<T>> collapses an explicit JSON null
to the outer None, so parsing conditions.json and re-serializing it dropped
the staged_skill_slug key — the documented tri-state (absent / null / slug)
did not survive a round-trip. A present-key deserializer keeps null as
Some(None). Behavior-neutral for consumers: the only reader flattens both
states to None.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixture conditions.json artifacts captured from the current binary (one per
harness, plus a no-harness variant) with byte-identical round-trip tests,
and CLI tests pinning the unknown---harness error text and the possible
values in run --help. Green before and after #135's registry-keyed harness
identifier lands; guards its serde- and CLI-compat acceptance criteria.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The registry becomes a Vec of (label, adapter) entries keyed by each
loaded descriptor's own label instead of a three-field struct built
positionally from EMBEDDED_DESCRIPTORS. This dissolves the positional
index coupling and the label-to-variant lockstep assertion (the label is
the identity now); duplicate labels panic at build. adapter_for bridges
the enum to a label lookup via its serde form until #135's string-keyed
identifier replaces the enum outright; the config-dir and tool-vocabulary
unions iterate registry entries directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Harness is no longer a closed enum deriving clap::ValueEnum and serde:
it becomes a Copy handle to a descriptor-registry entry, constructible
only through Harness::resolve, so adapter lookup stays infallible and
pass-through call sites keep their signatures. Resolution, iteration
(Harness::known), the registry-level default (claude-code), artifact
Deserialize, and the registry-driven --harness value parser live next to
the registry; the parser keeps clap's [possible values] help, suggestions,
and error text without a compile-time harness set. Guard teardown and the
armed check discover skills dirs through the registry; the manifest-based
restore and no-manifest stray-marker sweep are unchanged and now pinned
by a sweep test. conditions.json keeps the exact kebab-case strings
(fixture round-trip tests from the previous commit stay green); unknown
names now fail with the known-harness list wherever they surface.

Closes #135.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The registry and harness-identifier resolution (entries, build, resolve/
known/Default/Deserialize, the --harness value parser, adapter_for, the
config-dir and tool-vocabulary unions) move from harness.rs into a new
adapters::registry module with their tests. harness.rs had grown two jobs
past readable size; it keeps only the HarnessAdapter trait surface. The
adapters::* re-exports are unchanged, and #136's registry construction
now has a dedicated home.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@slowdini
slowdini merged commit 18e2674 into dev Jul 14, 2026
6 checks passed
@slowdini
slowdini deleted the feat/string-keyed-harness branch July 14, 2026 21:15
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.

feat(cli): open the --harness identifier to a string-keyed registry

1 participant