Skip to content

Add semantic validation and integration recipes - #9

Merged
armstrongl merged 5 commits into
mainfrom
larah/integration-semantic-validation
Oct 9, 2026
Merged

armstrongl merged 5 commits into
mainfrom
larah/integration-semantic-validation

Conversation

@armstrongl

@armstrongl armstrongl commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Check integration documentation for configuration errors, not just required headings and frontmatter. Add recipes for Cribl, OpenRouter, and OpenCode.

  • Validate configuration fields, hook events, data sent to hooks, provider settings, section content, and verification steps. Support hooks that handle both pre-request and post-response events.
  • Separate provider configuration, external tool configuration, and model-access grants in the template and submission guidance. Update the existing hook recipes to match.
  • Add positive and negative fixtures for all four integration types. Run validator tests and type checks in CI, including when templates or validation guidance change.
  • Collect automatic fixes even when unresolved issues make validation fail. The downstream comment and auto-fix consumer remains unchanged.
  • Use GitHub author association for status checks. Trust members and owners, plus collaborators whose PR branch is in this repository. Restore SSN Scrubber's original official frontmatter and retain its documentation updates.

This PR does not change the Aperture runtime.

Verification

  • npm test: 26 tests passed. The mixed-event regression test failed before the fix and passed after it.
  • npx tsc --noEmit: passed.
  • npm run validate: all six integration recipes passed with no issues or automatic fixes.
  • Mixed-result CLI check: validation exited with code 1 after one automatic fix and eight unresolved issues. The collection script copied the fixed README and wrote the artifact marker. Collection remained disabled when no fixes were available.
  • Author trust checks: evaluated the workflow expression with GitHub's expression library, then exercised the validator CLI. Same-repository collaborators retained official status. Fork collaborators, contributors, and missing associations did not. Members and owners remained trusted.
  • git diff --cached --check: passed.
  • Hosted validation run: passed all 26 tests and the type check. Author trust resolved to true; all six recipes passed with no automatic fixes.

The recipes have not been tested against a live Aperture gateway. The mixed-result artifact collection was checked locally, not in the hosted run.

armstrongl and others added 4 commits September 17, 2026 16:05
Signed-off-by: Larah Vasquez <larah@tailscale.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Larah Vasquez <larah@tailscale.com>
Signed-off-by: Larah Vasquez <larah@tailscale.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The updated template guidance for non-hook integrations is incomplete (can leave validator-triggering template residue), and at least one new recipe contains a documentation formatting issue that should be corrected before merge.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

This PR expands aperture-recipes’ deterministic integration validator beyond frontmatter/heading checks by adding semantic validation of documented configuration (hooks, grants, provider settings, event/send compatibility), updating templates and submission guidance to separate provider/tool configuration from grants, and adding new integration recipes plus fixtures/tests to keep the validator behavior stable.

Changes:

  • Add semantic validation (configuration JSON parsing + type-aware rules) and corresponding positive/negative fixtures across all four integration types.
  • Update templates, contribution docs, and submission forms to clearly separate provider configuration, external tool configuration, and model-access grants (and align existing hook recipes).
  • Update CI to run validator tests/typecheck when validation-related files change, and refine “trusted author” logic for official status handling.
File Description
templates/​README.md Clarifies which template sections apply to hooks vs providers vs tools.
templates/​integration.md Restructures template into type-specific configuration/grant sections and updates warnings/callouts text.
README.md Expands the “Example submissions” list to include newly added recipes.
integrations/​tools/​opencode/​README.md Adds a new tool integration recipe for OpenCode.
integrations/​tools/​.gitkeep Retains placeholder file under tools directory.
integrations/​providers/​openrouter/​README.md Adds a new provider integration recipe for OpenRouter.
integrations/​providers/​.gitkeep Retains placeholder file under providers directory.
integrations/​hooks/​pre-request/​tsheadroom/​README.md Updates cache-impact guidance and strengthens verification/troubleshooting specificity.
integrations/​hooks/​pre-request/​ssn-scrubber/​README.md Clarifies this repo documents (but doesn’t host) the endpoint; replaces example secret; improves verification steps.
integrations/​hooks/​pre-request/​highflame/​README.md Minimizes pre-request send payload and updates security guidance accordingly.
integrations/​hooks/​post-response/​cribl/​README.md Adds a new post-response hook recipe for Cribl with minimal-cost observability wiring.
integrations/​hooks/​post-response/​.gitkeep Retains placeholder file under post-response directory.
CONTRIBUTING.md Adds local validation instructions and explains validator behavior and autofix constraints for forks.
.github/​workflows/​validate-integration.yml Expands workflow path triggers, runs validator tests/typecheck, updates trusted-author logic, and collects fixes even on failure.
.github/​scripts/​validate-integration/​tsconfig.json Updates TS config to include tests and adjust rootDir.
.github/​scripts/​validate-integration/​tests/​semantics.test.ts Adds semantic validation test coverage and fixture orchestration checks.
.github/​scripts/​validate-integration/​tests/​fixtures/​positive/​tool.md Adds a positive tool fixture for semantic validation.
.github/​scripts/​validate-integration/​tests/​fixtures/​positive/​provider.md Adds a positive provider fixture for semantic validation.
.github/​scripts/​validate-integration/​tests/​fixtures/​positive/​pre-request.md Adds a positive pre-request hook fixture (incl. dual-type coverage).
.github/​scripts/​validate-integration/​tests/​fixtures/​positive/​post-response.md Adds a positive post-response hook fixture for semantic validation.
.github/​scripts/​validate-integration/​tests/​fixtures/​negative/​tool.md Adds a negative tool fixture covering template residue/invalid grants.
.github/​scripts/​validate-integration/​tests/​fixtures/​negative/​provider.md Adds a negative provider fixture covering missing providers map / invalid grant usage.
.github/​scripts/​validate-integration/​tests/​fixtures/​negative/​pre-request.md Adds a negative pre-request hook fixture for invalid hook/grant fields/events/send.
.github/​scripts/​validate-integration/​tests/​fixtures/​negative/​post-response.md Adds a negative post-response fixture for invalid event values.
.github/​scripts/​validate-integration/​src/​types.ts Updates required section groups and adds non-hook section requirements.
.github/​scripts/​validate-integration/​src/​structure.ts Enforces provider/tool-specific required sections when non-hook types are present.
.github/​scripts/​validate-integration/​src/​semantics.ts Introduces semantic validation for hooks/providers/grants/events/send and verification substantiveness checks.
.github/​scripts/​validate-integration/​src/​index.ts Refactors validation to support testing and adds semantic validation to orchestration; updates trusted-author handling.
.github/​scripts/​validate-integration/​src/​frontmatter.ts Normalizes additional_types and updates official status gating to trusted-author logic.
.github/​scripts/​validate-integration/​src/​callouts.ts Makes callout injection type-aware for provider/tool sections and expands cache-warning detection.
.github/​scripts/​validate-integration/​package.json Adds npm test and switches scripts to local tsx.
.github/​PULL_REQUEST_TEMPLATE.md Updates contributor/reviewer checklists for type-specific examples and hook testing expectations.
.github/​ISSUE_TEMPLATE/​integration-submission.yml Updates issue submission form to capture provider/tool-specific configuration/grant sections.
.github/​instructions/​integration-review.instructions.md Updates reviewer guidance (dst/location labeling and provider/tool distinctions).
.github/​copilot-instructions.md Updates repo-level Copilot instructions to reflect semantic validation and new section requirements.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread templates/integration.md Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@armstrongl armstrongl self-assigned this Oct 9, 2026
@armstrongl
armstrongl merged commit 5c8aaaf into main Oct 9, 2026
1 check passed
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.

2 participants