fix(discovery): ignore unrelated JSON type fields - #396
Merged
schickling merged 1 commit intoAug 31, 2026
Merged
Conversation
agent-identity: dev3.direct.omp.vjwqaz7t agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.11 agent-runtime: OMP 18.0.11 tooling-profile: dotfiles@000f2b3
schickling-assistant
marked this pull request as ready for review
August 30, 2026 23:18
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.
Problem
Folder discovery treated any JSON
typefield as an Agent Spec marker. An ordinary ESMpackage.jsonwith"type":"module"became a phantom agent and could receive st2 state inside the project directory.Goal
Recognize a standalone
typemarker only for the supported Agent Spec value, while preserving validation for files with other agent-shaped markers.Decisions
Narrow the existing candidate predicate instead of adding filename-specific exclusions. This keeps declaration classification semantic across JSON, TOML, and KDL.
Verification
CI=1 nix develop -c cargo test -p agent-spec only_service_type_is_a_spec_candidate_by_itself --lib— 1 passedCI=1 nix develop -c cargo test --test validate type_batch_is_retired_and_flagged_unknown— 1 passednix flake check --print-build-logs --no-write-lock-file— passed all 16 Linux checksComplexity
No new complexity. One predicate now checks the supported value rather than field presence.
Concerns
A file with another strong Agent Spec marker and an unknown
typeremains a candidate, so validation still reports the unknown type.Friction & bottlenecks
Local Nix tracing emitted an ignored permissions warning. Validation itself passed.
Follow-ups
None.
References
Closes #247
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile