Skip to content

Mount one spec registry on all six transports, after a sweep of the spec line - #173

Merged
Artui merged 2 commits into
mainfrom
test/spec-portability
Dec 2, 2026
Merged

Artui merged 2 commits into
mainfrom
test/spec-portability

Conversation

@Artui

@Artui Artui commented Dec 2, 2026

Copy link
Copy Markdown
Owner

What

Sweep. The lock and PyPI agree on these versions:

Package Version
django-service-specs 0.40.0
django-spec-mcp 0.19.0
django-spec-html 0.18.0 (new declaration)
django-spec-cli 0.9.0 (new declaration)
django-spec-tasks 0.3.0
django-spec-agents 0.32.0
django-spec-rest 0.18.0 (unchanged)

Each floor is raised to that release. django-spec-html and django-spec-cli are newly declared because the new test imports them, and test_dependencies_are_declared enforces that.

The conformance test. backend/board/portable_specs.py declares two specs once:

  • a FormValidator write;
  • a LIST selector whose output marks a FieldMarking.label() field.

Both use a kernel PermissionCheck and flat scalars.

backend/tests/test_spec_portability.py mounts that registry unchanged on all six transports. Each test asserts the payload the transport presents:

  • MCP: register_tools plus call_tool.
  • Agents: SpecToolset under TestModel(call_tools=[...]), with get_user.
  • CLI: a SpecCommand run through call_command --json.
  • Tasks: TaskBinding plus enqueue under django_capture_on_commit_callbacks(execute=True) on Django Tasks' immediate backend, ending in SUCCEEDED.
  • REST: ServiceCreateView and SelectorListView.
  • HTML: SpecFormView answers 302 and SpecSelectorView answers 200.

Every list test has one of the user's own events that its search leaves out. A transport that dropped the read would fail the test.

One variant per gap the releases closed:

  • mcp: a SpecSource tool, and an object question answered input_required with its schema.
  • html: the label fallback, and shapes rendered as a form.
  • cli: an object parameter given as a JSON option.
  • tasks: a file result saved to storage, and a file parameter taken as a storage key.
  • agents: row links that name the target tool and its arguments.

A further agents test checks that a spec's json_schema fragment reaches what the tool advertises. It is a plain conformance check: agents 0.31.0 already advertised the fragment.

Evidence

Each variant fails on the release before. Each old release was installed with uv pip install --no-deps, then uv sync restored the lock. Only the matching variants failed, each on its own refusal or assertion:

Release Variants that failed
mcp 0.18.0 source and question (2)
html 0.17.0 label fallback and shapes (2)
cli 0.8.1 JSON option (1)
tasks 0.2.0 file result and file parameter (2)
agents 0.31.0 links (1)

A mutant that ignores the search fails the list test on every transport.

Suites:

  • Full backend suite: 205 passed.
  • The lowest-direct resolution (Python 3.11, Django 5.2) passes every test except the upstream-drift workflow tests. Those failed only because the copy holding that run had no .github/.
  • pnpm build passes in react, vue, svelte and angular.

Review:

  • reviewer: fix first, with 3 blocking findings. All three are fixed in the second commit.
  • reviewer-delta: ready to merge.

🤖 Generated with Claude Code

Artui and others added 2 commits December 2, 2026 07:51
…pec line

Sweep onto django-service-specs 0.40.0, django-spec-mcp 0.19.0, django-spec-html
0.18.0, django-spec-cli 0.9.0, django-spec-tasks 0.3.0 and django-spec-agents
0.32.0, declaring django-spec-html and django-spec-cli, which the new test imports.

board/portable_specs.py declares a FormValidator write and a LIST selector with a
label-marked output, kernel permission checks and flat scalars.
tests/test_spec_portability.py mounts that registry unchanged on MCP, the agent
spec toolset, a SpecCommand, a TaskBinding on Django Tasks' immediate backend,
the REST views and the HTML views, asserting each transport's presented payload,
then one variant per shape each release now serves: a SpecSource and an object
question on MCP, the label fallback and shapes on HTML, a JSON option on the CLI,
a file result and a file parameter on tasks, the schema fragment and row links on
agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each list test now has one of the user's own events its search leaves out, so a
transport that loses the read fails; the agent's list call names its search
through a FunctionModel, since TestModel sends no optional argument. The two
file specs get a binding each, built on first use with a fixed name, so each
fails on its own refusal. The agents floor rests on row links, the one change
the test sees; the schema test sits with the plain agent calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Artui
Artui merged commit 80b7a3e into main Dec 2, 2026
9 checks passed
@Artui
Artui deleted the test/spec-portability branch December 2, 2026 07:37
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