Skip to content

refactor(daemon): generate find route from declaration kernel - #4358

Merged
Sinity merged 2 commits into
masterfrom
feature/packet/polylogue-3utv.1
Aug 27, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/packet/polylogue-3utv.1

Conversation

@Sinity

@Sinity Sinity commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register find/query with the shared DeclarationSpec kernel and generate its Starlette route + OpenAPI operation, deleting the hand-matched dispatch branch in polylogue/daemon/http.py.

Problem (evidence)

ROUTE_CONTRACTS described the route while daemon/http.py implemented dispatch independently — two authorities for the same route, with drift tests only detecting the split rather than preventing it.

Solution

polylogue/daemon/route_contracts.py builds the actual Starlette route and OpenAPI operation from one declaration; the corresponding hand-dispatch branch in http.py is removed. devtools/render_openapi.py and docs/openapi/search.yaml regenerate from the declaration.

Verification

  • nix develop --accept-flake-config --command devtools verify --quick — green.
  • nix develop --accept-flake-config --command devtools test tests/unit/daemon/test_route_contracts.py — 121 passed, 1 failed (test_implemented_daemon_routes_have_contract_metadata, flagging /api/demo/augment as an undeclared route). Confirmed inherited: identical failure reproduces on a clean origin/master checkout, unrelated to this change.

Residual risk

None beyond the pre-existing inherited /api/demo/augment census gap tracked separately.

@Sinity
Sinity merged commit 26130e8 into master Aug 27, 2026
1 of 2 checks passed
@Sinity
Sinity deleted the feature/packet/polylogue-3utv.1 branch August 27, 2026 18:57
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 366867c0-1614-4c7c-ab8a-979f3eef63d8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sinity added a commit that referenced this pull request Aug 28, 2026
## Summary
- Register `find`/`query` with the shared `DeclarationSpec` kernel and
generate its Starlette route + OpenAPI operation, deleting the
hand-matched dispatch branch in `polylogue/daemon/http.py`.

## Problem (evidence)
`ROUTE_CONTRACTS` described the route while `daemon/http.py` implemented
dispatch independently — two authorities for the same route, with drift
tests only detecting the split rather than preventing it.

## Solution
`polylogue/daemon/route_contracts.py` builds the actual Starlette route
and OpenAPI operation from one declaration; the corresponding
hand-dispatch branch in `http.py` is removed.
`devtools/render_openapi.py` and `docs/openapi/search.yaml` regenerate
from the declaration.

## Verification
- `nix develop --accept-flake-config --command devtools verify --quick`
— green.
- `nix develop --accept-flake-config --command devtools test
tests/unit/daemon/test_route_contracts.py` — 121 passed, 1 failed
(`test_implemented_daemon_routes_have_contract_metadata`, flagging
`/api/demo/augment` as an undeclared route). Confirmed **inherited**:
identical failure reproduces on a clean `origin/master` checkout,
unrelated to this change.

## Residual risk
None beyond the pre-existing inherited `/api/demo/augment` census gap
tracked separately.
Sinity added a commit that referenced this pull request Sep 1, 2026
## Summary
- Register `find`/`query` with the shared `DeclarationSpec` kernel and
generate its Starlette route + OpenAPI operation, deleting the
hand-matched dispatch branch in `polylogue/daemon/http.py`.

## Problem (evidence)
`ROUTE_CONTRACTS` described the route while `daemon/http.py` implemented
dispatch independently — two authorities for the same route, with drift
tests only detecting the split rather than preventing it.

## Solution
`polylogue/daemon/route_contracts.py` builds the actual Starlette route
and OpenAPI operation from one declaration; the corresponding
hand-dispatch branch in `http.py` is removed.
`devtools/render_openapi.py` and `docs/openapi/search.yaml` regenerate
from the declaration.

## Verification
- `nix develop --accept-flake-config --command devtools verify --quick`
— green.
- `nix develop --accept-flake-config --command devtools test
tests/unit/daemon/test_route_contracts.py` — 121 passed, 1 failed
(`test_implemented_daemon_routes_have_contract_metadata`, flagging
`/api/demo/augment` as an undeclared route). Confirmed **inherited**:
identical failure reproduces on a clean `origin/master` checkout,
unrelated to this change.

## Residual risk
None beyond the pre-existing inherited `/api/demo/augment` census gap
tracked separately.
Sinity added a commit that referenced this pull request Sep 3, 2026
## Summary
- Register `find`/`query` with the shared `DeclarationSpec` kernel and
generate its Starlette route + OpenAPI operation, deleting the
hand-matched dispatch branch in `polylogue/daemon/http.py`.

## Problem (evidence)
`ROUTE_CONTRACTS` described the route while `daemon/http.py` implemented
dispatch independently — two authorities for the same route, with drift
tests only detecting the split rather than preventing it.

## Solution
`polylogue/daemon/route_contracts.py` builds the actual Starlette route
and OpenAPI operation from one declaration; the corresponding
hand-dispatch branch in `http.py` is removed.
`devtools/render_openapi.py` and `docs/openapi/search.yaml` regenerate
from the declaration.

## Verification
- `nix develop --accept-flake-config --command devtools verify --quick`
— green.
- `nix develop --accept-flake-config --command devtools test
tests/unit/daemon/test_route_contracts.py` — 121 passed, 1 failed
(`test_implemented_daemon_routes_have_contract_metadata`, flagging
`/api/demo/augment` as an undeclared route). Confirmed **inherited**:
identical failure reproduces on a clean `origin/master` checkout,
unrelated to this change.

## Residual risk
None beyond the pre-existing inherited `/api/demo/augment` census gap
tracked separately.
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