Skip to content

fix(schema): accept channels: in campaign schema (#296)#297

Merged
sriumcp merged 1 commit into
AI-native-Systems-Research:mainfrom
Tomas2D:fix/campaign-schema-channels
Jul 10, 2026
Merged

fix(schema): accept channels: in campaign schema (#296)#297
sriumcp merged 1 commit into
AI-native-Systems-Research:mainfrom
Tomas2D:fix/campaign-schema-channels

Conversation

@Tomas2D

@Tomas2D Tomas2D commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #296.

Problem

The runtime reads campaign.channels at every DESIGN/FINDINGS gate and POSTs a markdown gate summary to each configured channel:

  • orchestrator/iteration.pyfrom orchestrator.channels import notify_gate; notify_gate(channels, ...)
  • orchestrator/channels.py documents the shape (kind ∈ {slack, webhook}, url, webhook_url, headers).

But orchestrator/schemas/campaign.schema.yaml never declared a channels property while setting additionalProperties: false at the top level. So nous run aborts during pre-flight validation:

Campaign validation error: Additional properties are not allowed ('channels' was unexpected)

The documented feature is therefore impossible to use — the campaign is rejected before the run ever starts, and nous schema campaign doesn't list channels.

Fix

Add a channels property to the campaign schema whose item shape mirrors exactly what orchestrator/channels.py reads:

  • kind — enum [webhook, slack], optional (the dispatcher loop defaults it to webhook).
  • url — target URL for a webhook channel.
  • webhook_url — incoming-webhook URL for a slack channel.
  • headers — optional extra HTTP headers for a webhook channel.

additionalProperties: false on each entry catches field typos, matching the strictness of the rest of the schema.

Tests

Adds regression tests under TestCampaignSchema in tests/test_schemas.py, so the schema and runtime can't drift apart again:

  • test_channels_accepted — a channels:-bearing campaign (slack + webhook) validates.
  • test_channels_default_kind_acceptedkind is optional.
  • test_channels_invalid_kind_rejected — bad enum value rejected.
  • test_channels_unknown_field_rejected — typo'd channel field rejected.
$ pytest tests/test_schemas.py tests/test_nous_schema_command.py
63 passed

(nous schema campaign now lists channels with its description.)

…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>
@sriumcp
sriumcp merged commit 2435e2c into AI-native-Systems-Research:main Jul 10, 2026
2 checks 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.

channels: is wired into the runtime but rejected by the campaign schema validator (additionalProperties: false)

2 participants