Skip to content

fix(marketplace-auto-review): filter to workflow-shaped YAMLs + register providers#1645

Merged
coleam00 merged 1 commit into
devfrom
fix/validate-schema-filter-and-providers
May 11, 2026
Merged

fix(marketplace-auto-review): filter to workflow-shaped YAMLs + register providers#1645
coleam00 merged 1 commit into
devfrom
fix/validate-schema-filter-and-providers

Conversation

@coleam00

@coleam00 coleam00 commented May 11, 2026

Copy link
Copy Markdown
Owner

Two false-positive sources surfaced when running auto-review against PR #1639. (1) Provider registry empty when parseWorkflow runs standalone — every 'provider: claude' workflow got rejected. (2) Non-workflow YAMLs (brand.yaml, config.yaml, template scaffolds) were validated against the workflow schema. Filter to YAMLs with a top-level nodes: block; register providers before parseWorkflow. Tested locally against PR #1639 submission: now returns valid:true with only video-generic.yaml validated. Sixth iteration.

Summary by CodeRabbit

  • Bug Fixes
    • Improved marketplace workflow schema validation to reduce false-positive errors for non-workflow YAML files through smarter detection logic.
    • Enhanced provider registration to properly validate workflows using both community and builtin providers.

Review Change Stack

… register providers

Two false-positive sources in validate-schema:

1. Provider registry empty when parseWorkflow runs standalone. The CLI normally populates it at startup; this script must call registerBuiltinProviders + registerCommunityProviders or every workflow with provider: claude gets rejected with Unknown provider claude. Registered.

2. Non-workflow YAMLs were being parsed as workflows. Directory submissions ship brand.yaml, config.yaml, template scaffolds alongside the workflow file. parseWorkflow rejects these for missing required workflow fields. Filter to YAMLs with a top-level nodes: block before calling parseWorkflow.

Tested locally against PR #1639 submission: now returns valid: true with only video-generic.yaml validated, vs the previous 4 false-positive errors.
@coleam00 coleam00 merged commit e015836 into dev May 11, 2026
@coleam00 coleam00 deleted the fix/validate-schema-filter-and-providers branch May 11, 2026 16:50
@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e15e293-21ab-4da4-95e6-fe3694691332

📥 Commits

Reviewing files that changed from the base of the PR and between 0d4cf07 and 09a0df3.

📒 Files selected for processing (1)
  • .archon/scripts/marketplace-validate-schema.ts

📝 Walkthrough

Walkthrough

The marketplace validation script now registers workflow providers upfront for provider field validation, introduces a looksLikeWorkflow() predicate to detect workflow-shaped YAML by top-level nodes: presence, filters YAML files to workflow-only candidates before parsing, and validates only those filtered files instead of all discovered YAMLs to reduce false-positive schema failures.

Changes

Marketplace Validation Schema

Layer / File(s) Summary
Provider Registry Setup
.archon/scripts/marketplace-validate-schema.ts
Imports provider registry and registers builtin and community providers after setting fatal log level, enabling runtime provider validation.
Workflow Detection Function
.archon/scripts/marketplace-validate-schema.ts
Introduces looksLikeWorkflow(yamlContent: string) predicate that detects workflow-shaped YAML by checking for top-level nodes: block.
YAML File Filtering
.archon/scripts/marketplace-validate-schema.ts
Adds workflowFiles filter that reads each discovered YAML, applies workflow detection, retains only workflow candidates, and outputs success JSON when no workflows are found.
Validation Loop Update
.archon/scripts/marketplace-validate-schema.ts
Changes parsing loop to iterate over filtered workflowFiles instead of all discovered YAML files.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 A script hops through YAML with care,
Filtering workflows from files everywhere,
Providers registered, detection in place,
False positives banished without a trace! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/validate-schema-filter-and-providers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Wirasm Wirasm mentioned this pull request May 12, 2026
cropse pushed a commit to cropse/Archon that referenced this pull request May 19, 2026
… register providers (coleam00#1645)

Two false-positive sources in validate-schema:

1. Provider registry empty when parseWorkflow runs standalone. The CLI normally populates it at startup; this script must call registerBuiltinProviders + registerCommunityProviders or every workflow with provider: claude gets rejected with Unknown provider claude. Registered.

2. Non-workflow YAMLs were being parsed as workflows. Directory submissions ship brand.yaml, config.yaml, template scaffolds alongside the workflow file. parseWorkflow rejects these for missing required workflow fields. Filter to YAMLs with a top-level nodes: block before calling parseWorkflow.

Tested locally against PR coleam00#1639 submission: now returns valid: true with only video-generic.yaml validated, vs the previous 4 false-positive errors.
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