Repository navigation
feat(skill-and-tool-validator): validate organization.md content, not just presence - #1942
Merged
Merged
Conversation
… just presence validate_organization_structure only required README.md and organization.md to exist, so an empty manifest, or one missing a key, passed, and every key it omitted resolved silently to the framework default instead of the organization's value. validate_organization_manifests derives the required set from organizations/_template/organization.md: every key its uncommented yaml blocks declare, which is the organization identity and the governance vocabulary. The template comments out the capability bundle, so those keys stay optional. Each adapter must declare every required key (null is a declared value), organization_identity.id must match the directory name, and a manifest declaring no keys fails. All three are HARD, in the existing organization category, wired into run_validation. Parsing stays stdlib only: the fenced yaml blocks, two levels deep, comments declaring nothing. A tree without the template skips the check. The ASF and independent adapters pass as they stand. Generated-by: Claude Code (Opus 5.5)
…ad any indent Review fixups: - The template told authors "any key you omit falls through to the framework default", which the new HARD check now contradicts. It and organizations/README.md now say the identity and governance-vocabulary keys are required (null allowed) and only the capability bundle falls through. - The parser read only two-space indented block YAML with LF endings, so a valid four-space or CRLF manifest was reported as declaring no keys. Any indent and CRLF are now read; the violation says the validator reads block-style YAML, since a flow mapping still is not. - organization-adapters.md: the "presence, not content" Known gap is closed; the enforcement section describes the content check. Generated-by: Claude Opus 5.5
potiuk
force-pushed
the
org-manifest-content-check
branch
from
November 1, 2026 11:25
e7ddaf5 to
0122d4c
Compare
potiuk
approved these changes
Nov 1, 2026
potiuk
left a comment
Member
There was a problem hiding this comment.
Thanks — deriving the required keys from the template keeps the check from drifting, and ASF and independent both pass. I rebased the branch onto main and pushed one fixup commit, 0122d4c (please pull before pushing again):
organizations/_template/organization.mdandorganizations/README.md— the template still said "any key you omit falls through to the framework default", which this HARD check now contradicts for the identity and governance-vocabulary keys. Both now say those keys are required (nullallowed) and only the commented-out capability bundle falls through.organization_manifest_keysread only two-space indented block YAML with LF endings, so a valid four-space or CRLF manifest was reported as "declares no keys". Any indent and CRLF are now read (with a test); the omitted-key message says the validator reads block-style YAML, since a flow mapping (block: { key: value }) still is not.tools/spec-loop/specs/organization-adapters.md— the "presence, not content" Known gap is closed, and the enforcement section describes the content check.
GitHub has not yet computed whether this branch merges cleanly with its base.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
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.
Summary
validate_organization_structureonly requiredREADME.mdandorganization.mdto exist, so an empty manifest, or one missing a key, passed, and every key it omitted resolved silently to the framework default instead of the organization's value.validate_organization_manifestsderives the required set fromorganizations/_template/organization.md: every key its uncommentedyamlblocks declare, which is the organization identity (id,name,url,logo) and the governance vocabulary (seven keys). The template comments out the capability bundle, so those keys stay optional. Each adapter must declare every required key (nullis a declared value, asindependentuses it),organization_identity.idmust match the directory name, and a manifest declaring no keys fails.run_validation. Stdlib-only parsing (fencedyamlblocks, two levels deep, comments declare nothing). A tree without the template skips the check.Plan item
org-manifest-content-check(specs/organization-adapters.md).Type of change
tools/*/withpyproject.toml)prek, workflows, validators)Test plan
nullvalues; an omitted required key named; optional blocks may be omitted or added; empty manifest fails;idmust match the directory; no template skips; a missing manifest is left to the structure check; reached throughrun_validation; the in-tree adapters pass.skill-and-tool-validateexits 0.uv run --directory tools/skill-and-tool-validator --group dev pytest: 502 passed, 1 skipped;mypyclean;ruffclean.prek run --all-files --skip workspace-pytest: every hook passes exceptskill-token-count(tokenizer download blocked in the authoring sandbox; noSKILL.mdtouched). RAT: 0 unapproved.RFC-AI-0004 compliance
Not applicable (validator only).
Linked issues
None.
Notes for reviewers (optional)
Generated-by:trailer.