fix(schema): accept channels: in campaign schema (#296)#297
Merged
sriumcp merged 1 commit intoJul 10, 2026
Merged
Conversation
…esearch#296) The runtime reads campaign.channels at every DESIGN/FINDINGS gate (orchestrator/iteration.py -> orchestrator/channels.py) and POSTs a markdown gate summary to each configured channel, but campaign.schema.yaml never declared the property while setting additionalProperties: false at the top level. So `nous run` aborted at pre-flight with: Campaign validation error: Additional properties are not allowed ('channels' was unexpected) making the documented channels: feature impossible to use — the campaign is rejected before the run starts. Add a channels property whose item shape mirrors exactly what orchestrator/channels.py reads: kind in {webhook, slack} (optional; defaults to webhook), url (webhook), webhook_url (slack), and optional headers (webhook). additionalProperties: false on each entry catches field typos, matching the strictness of the rest of the schema. Add regression tests in tests/test_schemas.py (accept / default-kind / invalid-kind / unknown-field) so the schema and runtime can't drift apart again. Fixes AI-native-Systems-Research#296 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes #296.
Problem
The runtime reads
campaign.channelsat every DESIGN/FINDINGS gate and POSTs a markdown gate summary to each configured channel:orchestrator/iteration.py→from orchestrator.channels import notify_gate; notify_gate(channels, ...)orchestrator/channels.pydocuments the shape (kind∈ {slack,webhook},url,webhook_url,headers).But
orchestrator/schemas/campaign.schema.yamlnever declared achannelsproperty while settingadditionalProperties: falseat the top level. Sonous runaborts during pre-flight validation:The documented feature is therefore impossible to use — the campaign is rejected before the run ever starts, and
nous schema campaigndoesn't listchannels.Fix
Add a
channelsproperty to the campaign schema whose item shape mirrors exactly whatorchestrator/channels.pyreads:kind— enum[webhook, slack], optional (the dispatcher loop defaults it towebhook).url— target URL for awebhookchannel.webhook_url— incoming-webhook URL for aslackchannel.headers— optional extra HTTP headers for awebhookchannel.additionalProperties: falseon each entry catches field typos, matching the strictness of the rest of the schema.Tests
Adds regression tests under
TestCampaignSchemaintests/test_schemas.py, so the schema and runtime can't drift apart again:test_channels_accepted— achannels:-bearing campaign (slack + webhook) validates.test_channels_default_kind_accepted—kindis optional.test_channels_invalid_kind_rejected— bad enum value rejected.test_channels_unknown_field_rejected— typo'd channel field rejected.(
nous schema campaignnow listschannelswith its description.)