M3a: Freeze REST and MCP interface contracts #46
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router!46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "m3a-interface-contracts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #45 (via human merge gate; the issue closes when this PR is merged).
What
M3a — REST/MCP planning gate. Freezes the machine-interface semantics for M3 before any REST or MCP runtime is implemented. This is a documentation/contracts-only change.
docs/machine-interfaces.mdGET /healthz,GET /v1/status,POST /v1/select,POST /v1/simulate(earlier/v1/providersideas deferred with rationale);CapacitySnapshotv3 /SelectionDecision/SimulationResultserializations inside a small{"schema_version": 1, ...}envelope;selected = null,no_eligible_candidate); invalid client requests are HTTP 400 with a safe closed-vocabulary envelope (invalid_request); application failures are HTTP 500 (internal_error); provider telemetry degradation remains domain data, never a transport error;scarcity_status,scarcity_select,scarcity_simulateover stdio, calling the application layer directly in-process — no REST runtime dependency;docs/decisions.md: new D-028 recording the full contract; U-008 narrowly resolved for M3 (scarcity_routerremains the stable Python module identity; final branding deferred).docs/architecture.md/docs/roadmap.md/README.md: interface sections updated to the frozen surface, M3 sequence frozen (M3a → M3b → M3c → closeout; M3b waits for this merge; M3c never depends on REST runtime), documentation map linked.Why
CLI selection/status semantics were accepted under M2; transport-specific code must not invent or diverge from that behavior. Freezing envelopes, error classes, security boundaries and parity first keeps the transports thin and makes parity testable.
Explicit non-scope
No REST/MCP runtime, no HTTP listener, no MCP SDK or framework dependency (
pyproject.tomluntouched), no authentication, no model execution, no prompt proxying, no product source or test changes.Validation
git diff --check: cleanuv sync --only-dev+make check: 796 tests pass, basedpyright 0 errors / 0 warnings / 0 notesgit diff --stat origin/develop...HEAD: 5 files, docs only (README.md, docs/architecture.md, docs/decisions.md, docs/machine-interfaces.md, docs/roadmap.md)git log --merges origin/develop..HEAD: empty (no merge commits); branch is one commit ahead oforigin/develop(49115c6)origin/developunchanged by the feature-branch push (49115c6before and after)kilo referenced this pull request2026-10-04 23:43:29 +00:00