Skip to content

[serve] Address the review of compass's service models - #198

Merged
mcraveiro merged 8 commits into
mainfrom
feature/service-models-review-fixes
Nov 23, 2026
Merged

mcraveiro merged 8 commits into
mainfrom
feature/service-models-review-fixes

Conversation

@mcraveiro

Copy link
Copy Markdown
Member

Addresses the review of #193, which merged before the review was posted. The models now take the decisions of the alignment design from #192, and the evidence scripts prove what the task page claims.

What changes for the next tasks

  • No identity from a body. The six write requests lose tester. A read needs a view and a write a view and a subject, from Compass-View, Compass-Subject and Compass-Actor. The component overview states the body schema (exactly the body fields, unknown members refused) and the MCP argument schema. The C++ structs still carry tester. Serve the documents over HTTP changes them, and until then the struct check pins the difference.
  • Every route starts at /v1/{environment}. The step, finish, attach, note and address writes gain environment, so a gateway can scope every call by its path. environments, version and catalogue are reserved first segments.
  • Tools and areas. Reads take ORE Studio's read prefixes (search_documents, list_facets, list_backlinks, get_version, get_sprint_state, list_scenarios_to_test), and sync becomes sync_environment. Areas are compass's own documents, agile and qa. /mcp lists one tool per route. :destructive: true and :idempotent: true are flags on the writes they apply to, and the tool always states both hints. They are flags because compass's loader refuses :destructive: false. The first probe run found that.
  • Binding and refusals. The overview gives the rules for required fields, repeated vector parameters and the name:value split, and derives takes_no_body. A new model, compass.serve.errors, holds error_response (a code and a message, ORE Studio's api_error shape). A table maps each code to its HTTP status and to MCP's isError.
  • New reads. get_run and list_notes let a tester resume a run and a developer find a note's id.
  • Attachments. bytes is :encoding: base64 under :max_body_size: 16777216.
  • System Model lists compass.serve, planned, in the application layer.

Evidence

All of these are in doc/agile/versions/v0/sprint_01/own_the_masd_meta_model/evidence/, and each committed .txt is the script's output on this branch.

  • service_model_struct_check.py: 54 messages, 32 match their struct (six with the pinned write changes), 22 pinned new, and every request's :response: is its query function's return type.
  • service_model_binding_check.py (new, adapted from the reviewer's lint): 18 routes and tools, 0 failures.
  • service_model_mutations.sh (new): 24 mutations, the review's ten among them, and each one fails a check.
  • service_model_load_probe.sh: the scratch path is fixed and stderr is printed in full, with the exit code explained. It runs the struct check on each generated protocol header. The first run found that compass's loader refuses :destructive: false. On the rerun all four models load, and each header holds exactly its model's messages. The compile claim is now marked as inferred.

Declined

    1. get_document keeps one default for both HTTP and MCP, because one request type has one default.

After #192 and #196 merged

Each finding's decision is in the task page's Review table.

compass generate, then compass check --ratchet --no-blame, with a binary built from this branch at 52a6609: nothing written to the tree, 0 new diagnostics.

🤖 Generated with Claude Code

mcraveiro and others added 8 commits November 23, 2026 17:43
The caller comes from the gateway's three headers, never from a body: the
six write requests lose tester and every write states :caller: subject.
Every route starts at /v1/{environment}. Tools take ORE Studio's read
prefixes and compass's own areas, documents, agile and qa. The overview
states the body and argument schemas, the query binding rules, the MCP
tool list and hints, and maps each refusal code of the new errors model
to its HTTP status. get_run and list_notes read a run and a campaign's
notes; the screenshot is base64 under a 16 MiB body limit. The System
Model lists compass.serve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The struct check pins the new messages, the unmodelled structs and the
write requests' changes, so a renamed or deleted message, a new struct, a
stale pin, a :values: list that drifts from its enum class and a
:response: that is not the query function's return type all fail. A new
binding check holds the routes to the overview's rules. The mutation
script runs 22 edits, the review's ten among them, and each fails a
check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compass's loader reads :destructive: as a flag and refuses false, so the
load probe stopped at two of the models. :destructive: and :idempotent:
are now true or absent, the binding check refuses any other value, and
three more mutations prove it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The probe resolves a relative scratch directory, prints compass-ng's
stderr whole with the scratch path masked, says what diff's exit means
and runs the struct check on every generated protocol header. All four
models load and each header is its model's messages. The task page
records the review's 24 findings, the departures and the measurements,
and calls the compile claim inferred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#196 generates compass.db's row types, and the struct check failed on
six new *_row structs. A table row is never a message, so the check
excuses every struct named *_row by rule instead of by name. step_outcome
moved into a generated header, so its mutation now edits every header.
The committed outputs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ORE Studio's catalogue knows a read by its prefix, and count_ is not one.
The tool table also lists get_run and list_notes, which the review of
#193 added, and the task page records that #192 replaced cpp-httplib
and nlohmann-json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mcraveiro
mcraveiro merged commit 211b799 into main Nov 23, 2026
4 checks passed
@mcraveiro
mcraveiro deleted the feature/service-models-review-fixes branch November 23, 2026 18:40
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