Skip to content

Comments

feat: expose moderation v2 API and schema contracts#334

Open
ArthurzKV wants to merge 2 commits intoopenclaw:mainfrom
ArthurzKV:codex/skill-verification-v2-clawhub-api
Open

feat: expose moderation v2 API and schema contracts#334
ArthurzKV wants to merge 2 commits intoopenclaw:mainfrom
ArthurzKV:codex/skill-verification-v2-clawhub-api

Conversation

@ArthurzKV
Copy link

@ArthurzKV ArthurzKV commented Feb 15, 2026

Summary

Expose moderation v2 API/schema contracts with additive compatibility.

Why

Clients need structured moderation verdicts/reason codes/evidence while preserving existing booleans for backward compatibility.

Focused scope

This PR is scoped to one theme: API + schema surface for moderation v2.

What changed

  • Extended GET /api/v1/skills/:slug moderation payload with additive fields.
  • Added GET /api/v1/skills/:slug/moderation endpoint with role-based evidence visibility.
  • Updated API handler tests for new behavior.
  • Updated shared schema + CLI schema contracts.
  • Follow-up fix included: hidden skill owners/staff using API tokens now receive structured moderation JSON (instead of plaintext hidden-state response); removed unsafe evidence type assertion.

Local validation

  • bun run lint:oxlint
  • bunx vitest run convex/httpApiV1.handlers.test.ts

AI assistance transparency

  • AI-assisted: Yes (implemented with Codex assistance)
  • Testing level: Targeted local validation on API/schema and handler tests
  • I reviewed the final diffs and understand the behavior changes.

@vercel
Copy link
Contributor

vercel bot commented Feb 15, 2026

@ArthurzKV is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

7 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@ArthurzKV
Copy link
Author

Addressed moderation endpoint review feedback in commit 485fae8:

  • /api/v1/skills/:slug/moderation now returns structured moderation JSON for owner/staff API-token callers even when the skill is hidden and getBySlug returns null.
  • removed unsafe moderationEvidence type assertion by modeling moderation fields in local handler types.
  • added regression coverage for hidden-owner moderation response path in convex/httpApiV1.handlers.test.ts.

Validation run: lint + API handler tests.

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