Repository navigation
Done
Labels
area: protocolgRPC and protobuf API designarea: testingAutomated, contract, integration, and smoke testingenhancementNew feature or request
Description
Part of #440. Architecture record: Discussion #9.
Goal
Deliver the initial attach-only, observe-only-lifecycle, read-only inspection MVP of Briosa.Cli.exe inside the targets/2026.1.0529.7 Windows x64 server package, providing both a JSON-first CLI and a local stdio MCP server from one shared dynamic protobuf engine.
Scope
- Implement
Briosa.Cli.exeundertargets/2026.1.0529.7/src/using compiledBriosa.Protocoldescriptors (for strictJsonParser/JsonFormatterwith preservedsnake_casefield names) and bundleddescriptor/briosa.protoset(for documentation metadata). - Attach-only, observe-only lifecycle:
- Attach to an existing local loopback
Briosa.Server.exe(e.g., managed byBriosa.ControlCenter.exe); do not spawn or stop servers or mutate SDK lifecycle state in MVP. - Validate exact SA target (
2026.1.0529.7), compatibility contract (>= 3.2for caller narrowing), and server identity on connect; invalidate the session on disconnect/restart and require explicit reattachment.
- Attach to an existing local loopback
- MCP surface (
Briosa.Cli.exe mcp, UTF-8 no BOM, JSON-RPC-only stdout, separately drained stderr):briosa_status: Server info, SA/SDK states,configured_spatial_analyzer_interaction_mode(warning explicitly when notSilent, Handle state-triggered modal dialogs that block MPs until an operator clicks OK #313), activeadmission_profile,policy_fingerprint, and explicit metrology context guidance.briosa_list_categories: 20 MP service categories with admitted/denied counts.briosa_search_operations: Paginated search overoperation_id,mp_step,rpc, category, effect, and risk flags; supportsinclude_deniedwithPolicyDenialDetails.briosa_describe_operation: Emits JSON Schema, risk flags,replay_safety,execution_scope,duration_class,validation_status,OperationRequestOptionswarnings (including omission-activated UI), and requiredness/workflow notes.briosa_query: Strictly read-only execution (readOnlyHint: true) sending the server-enforced caller-narrowing header (read-only, denyinteractive_ui).
- Companion JSON-first CLI:
status,ops categories|search|describe,call <operation_id> (--json | --input) [--output], andmcp.- Deterministic structured exit codes distinguishing local validation rejection, policy/lifecycle denial, completed MP failure,
PartialSuccess(MP code4), unavailable completion evidence (transport drop/cancel), and confirmedStartedOutcomeUnknown/ failed output-file write.
- Safety, output bounding, & packaging:
- Pinned exhaustiveness test mapping every registered operation to exactly one bridge tier.
- Inspect
MpExecutionDetailson everyOKresponse and surfacePartialSuccessand per-output retrieval states prominently. - Enforce a model-facing output size cap (preserving full gRPC receive allowance) with bounded summary stats and an optional local spill-to-file session handle; never replay an MP to paginate.
- Ship a copyable exact-path MCP config snippet and one tested end-to-end inspection workflow.
- Include
Briosa.Cli.exeinNew-WindowsPackage.ps1,ReleasePackageSigning.psm1selection tests,Test-WindowsPackage.ps1, andeng/licenses/reviewed-windows-evidence.json.
Acceptance Criteria
-
Briosa.Cli.exebuilds, signs, and passes deterministic double-build verification inside the2026.1.0529.7Windows ZIP. - Pinned tier-partition and dynamic-JSON round-trip tests cover all 1,018 registered operations.
- Packaged fake-worker conformance suite verifies stdio MCP initialization, tool calls,
PartialSuccess, field-level validation errors, policy denials, malformed/missing trailers, 0.10.0 vs. 3.2 server metadata, hostile SA strings, and spill/output-write failures. - Explicitly authorized scripted local licensed SA smoke check verifies real status, discovery, and read-only inspection without model-driven test execution.
Refs #440.
Metadata
Metadata
Assignees
Labels
area: protocolgRPC and protobuf API designarea: testingAutomated, contract, integration, and smoke testingenhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
Activity
davidalucas commentedon Nov 27, 2026
Inputs from the packaging spike (2026-11-27)
The spike for #441 is done; its full report is on that issue and the proof of concept is on the unmerged branch https://github.com/spatialanalyzer/briosa/tree/441-cli-packaging-spike (
e0c12503ce67458a8c2ec5fb477aee7a377980ac). It found no blocker. These are the points this issue has to carry.Recommended layout (awaiting the maintainer's confirmation).
Briosa.Cli.exeat the package root, built onModelContextProtocol.Core2.4.0, with a framework reference toMicrosoft.AspNetCore.Appso it resolves the same runtime-pack files as the server, and the existing centralSystem.Diagnostics.DiagnosticSource11.0.0 pin. Measured cost: about 0.73 MB of ZIP, with the server, worker and Control Center files byte-identical to a package without the CLI. The runner-up, a self-containedcli/subfolder, costs about 40.7 MB.Requirements taken from the spike's follow-ups. They are tracked here instead of as separate issues:
Copy-PublishTreealready fails the package build when they differ; the packaging pull request must keep that guard for the CLI and say so indocs/operations/windows-package.md, so that a .NET servicing orDiagnosticSourceupdate that breaks alignment fails CI rather than shipping.ModelContextProtocol.Core2.4.0 (Apache-2.0; the nupkg carries neither license nor notice text, so both come from the pinned source commit4cbf42ef107763f0bc75c358af8cb2dfe47a769a) andMicrosoft.Extensions.AI.Abstractions10.11.0 (MIT; no license text in the nupkg).eng/WindowsPackageNotices.psm1needs to accept a reviewed source notice, andeng/licenses/reviewed-windows-evidence.jsonneeds the identity rows and three texts. The upstream MCP license records an MIT-to-Apache-2.0 transition; the maintainer reviews these evidence entries in the packaging pull request.Briosa.Cli.exeandBriosa.Cli.dlland run the packaged fake-worker CLI scenarios inrelease.ymlbefore a draft is created. Do not add the CLI to the unconditional required list ineng/ReleasePackageSigning.psm1: that would reject the2024.1.0508.5package and earlier releases.briosa_describe_operationand search therefore describe an operation by itsmp_step(Expose mp_step in DiscoveryService/ListCapabilities and bundle briosa.protoset in server packages #444), its JSON Schema from the compiled descriptors, and its reviewed classification. The CLI does not needdescriptor/briosa.protosetat run time; the compiledBriosa.Protocoldescriptors agree with it for all 25 files, 23 services, 1,029 RPCs and 2,148 messages.Also established. Strict proto3 JSON with preserved field names round-tripped all 2,036 request and result types of the 1,018 registered operations (4,072 default and populated cases, no failures), and a unary call made from a method name and a JSON body alone worked against the fake worker, including reading
OperationErrorfrom the trailers.davidalucas commentedon Nov 27, 2026
Independent review of the spike recommendations (2026-11-27)
A separate GPT 6.2 Astra session reviewed the spike for #441 adversarially, from the branch, the run logs, the built packages and the restored nupkgs. It agrees with the package-root layout and with using
ModelContextProtocol.Core, and adds the requirements below. They extend, and in point 4 correct, the earlier comment #445 (comment). It did not rebuild packages or run a server.Decide before
callorbriosa_queryis declared completeThe JSON input contract is not strict by default. Loading the packaged
Google.ProtobufandBriosa.Protocoland using the spike's parser settings, the reviewer observed:{"decimalPrecision":"7"}is accepted and becomes{"decimal_precision":7}(camelCase alias and a numeric string);{"overwrite_existing_file":null}becomes{}, so an explicitnullsilently turns into omission;event_listandeventListconcatenates the two arrays;Omission has operational meaning for some reviewed request options (
OperationConditionalOptions.cs), sonull-as-omitted and alias handling are safety-relevant. The bridge must define the accepted input forms, publish them indescribe, enforce them before the protobuf parser runs (reject duplicate logical fields,null, and names other than the exact proto field names; bound size and depth before dispatch), and test the same cases through both the CLI and MCP. Server policy stays authoritative.A schema derived from protobuf presence misstates what is required. Example:
GetIthPointFromGroupRequest.group_nameisoptionalin the proto, but the handwritten operation maps it withCollectionObjectNameMapper.Required, so omitting it is rejected.describemust not present protobuf presence as requiredness. It either carries reviewed exact-target requiredness and workflow guidance, or says plainly that requiredness is not described and that the server names the offending field on rejection (Add value-free field-level validation detail to OperationError #442). No second operation registry and no reproduced vendor text.Require before the package is distributed
Briosa.Cli.exeandBriosa.Cli.dllat their exact paths in the 2026 package test and again in the final signed archive, and run the fake-worker CLI and MCP scenarios against that final archive before the draft release is created.Microsoft.Extensions.AI.Abstractions10.11.0 MIT) and the proposed texts match the pinned upstream files. The shipped Core DLL also compiles inSystem.Net.ServerSentEventssources that credit MIT-licenseddotnet/runtimecode; the proposed notice already contains those terms, but the evidence should record that source-to-component relationship. The notice gate should assert the expected attribution for the shipped Core identity, so that a different validly hashed notice or a later version cannot pass unreviewed.Test gaps to close in the pinned round-trip test
oneof, and counts discovered methods without comparing them to the handwritten registry, so shrinking discovery would shrink coverage silently. Compare the method set withSpatialAnalyzerApi.Operations, cover everyoneofarm and conflicting selections, and add fixtures if maps, bytes or well-known types ever enter the schema (none today). In conformance, assert MP result, disposition and replay fields explicitly, including missing and malformed trailers.initializeand EOF. Before release, drive the packaged executable with an independent client or recorded transcripts through initialization completion, tool listing, a tool call, an error and a cancellation.One point about evidence
The byte-identical comparison (866 existing paths unchanged, only
files.sha256andlicenses/index.jsondiffering, +729,163 bytes) was made between packages built atd947d95c. The package used for the double-build and timing was built at a later spike commit, so it has no same-revision baseline. The original comparison stands; the two results are separate evidence.davidalucas commentedon Nov 27, 2026
Maintainer decisions (2026-11-27)
Briosa.Cli.exeat the package root onModelContextProtocol.Core2.4.0, as described above. Spike: Validate Briosa.Cli.exe packaging, signing, MCP SDK notices, and dynamic protobuf JSON round-trip #441 is closed.describe: the first release states plainly that requiredness is not described by the schema, and does not present protobufoptionalas "not required". A rejected call names the offending field through the validation detail from Add value-free field-level validation detail to OperationError #442. Publishing reviewed requiredness in discovery is not part of this Epic; it would touch the open decision in Decide MP omission and default semantics for optional and risky arguments (D2) #243.null, duplicate fields and unknown fields before the protobuf parser runs.davidalucas commentedon Nov 28, 2026
Slice A surface approved (2026-11-27)
The maintainer approved the public surface of #465 as its description states it, and these choices:
localhostand other hostnames are rejected, as the server rejects them.--outputnever overwrites an existing file; it is created before the call.SpatialAnalyzerApi.Operationsand the discovery builder by reflection for now, to avoid a server change in this slice.Rely on server evidence only when it is about this call and consistent
Pin the CLI's wire contract in tests as literals and document round 1
Run the CLI test classes one at a time
Add the attach-only Briosa.Cli JSON engine and commands for SA 2026.1…
davidalucas commentedon Nov 28, 2026
Slice A merged (2026-11-28)
#465 merged as the commit now at the head of
main: theBriosa.Cliproject, the shared engine, and the commandsstatus,ops categories,ops search,ops describeand a read-onlycall, for SA2026.1.0529.7. It went through eight independent review passes; the last approved the final head, and all 35 CI checks passed on it.What later slices must carry from the review:
docs/operations/briosa-cli.md: theresult-format-failedrow should say "before result bytes are written" rather than "before any file exists", and the warning list's "failed write" shorthand should also cover a write whose bytes differ on read-back.results" test saw a pre-existing file's access entry change from inherited to explicit. The product code was judged, with high confidence, unable to cause it, and the rewritten test passes there; what rewrote the entry was never established.read_onlytier (pinned by a test). The mutating tier in Add controlled mutating execution, async long-running handles, and replay interlock to Briosa.Cli.exe #446 must revisit this.Not yet done for this issue: the
mcpcommand (slice B), packaging, signing, notices and packaged fake-worker conformance (slice C), and the licensed smoke check (slice D).21 remaining items
Parse the harness transcripts strictly and keep earlier test results
Say which MCP session checks answer before the server is reached
Say when the scenario script holds its temporary directory
Package Briosa.Cli in the SA 2026.1.0529.7 Windows server package (#473)
davidalucas commentedon Nov 29, 2026
Slice C merged (2026-11-29)
#473 merged as
1fb8281e:Briosa.Cli.exeis in the2026.1.0529.7Windows x64 server package. All 35 checks passed on the merged head561ba05d.What is on
mainnowBriosa.Cli.exe,Briosa.Cli.dll,Briosa.Cli.deps.json,Briosa.Cli.runtimeconfig.json,ModelContextProtocol.Core.dllandMicrosoft.Extensions.AI.Abstractions.dllsit at the package root and share the server's runtime files. The build fails, naming the file, if a file two publishes share differs, and refuses hidden or system files. The server, worker and Control Center files are byte-identical to before; the archive goes from 867 to 876 entries. The2024.1.0508.5package is unchanged.Briosa.Cli.exeandBriosa.Cli.dll(16 first-party files for 2026, 14 for 2024). The release workflow fails if the signed 2026 archive lacks a validly signed, timestamped CLI.ModelContextProtocol.Core.dllships unsigned, like the eight unsigned third-party DLLs the package already ships.ModelContextProtocol.Core2.4.0 (Apache-2.0, with its upstream license and third-party notices) andMicrosoft.Extensions.AI.Abstractions10.11.0 (MIT). The three texts were compared with upstream at the pinned commits. The evidence states what is not established about the attribution of code compiled into the two DLLs.targets/2026.1.0529.7/eng/Test-CliScenarios.ps1andPackagedCliTestsrun the packaged CLI and MCP server against the packaged server with its fake worker and against a test server, in CI and in release validation. They cover MCP initialization and all five tools, partial success, a field-level validation rejection, policy denials, malformed and missing trailers, servers below 3.2 refused, hostile strings, a spilled result and an output-write failure, and an MCP cancellation with reattach. Every process they start runs with a profile the script creates, so the real per-user results directory is never written.Maintainer decisions during this slice (2026-11-28 and 2026-11-29): license evidence accepted; the MCP DLL ships unsigned; the conformance package's
serverfolder stays a verbatim copy and so carries the CLI; no release job runs scenarios on the signed archive (they are run on the signed draft in acceptance); the signed-CLI check stays in the sign job; the package smoke job's limit is 25 minutes.Review. Three independent review passes. The package, signing, notices, policies and scenarios were confirmed; the last pass requested harness and wording changes only. The maintainer decided to merge after the small ones, with the rest tracked in #474; the read of the final diff is recorded on the pull request.
Acceptance criteria
Run the licensed CLI smoke check with one command
Harden packaged CLI smoke evidence and verification
Preserve decisive CLI smoke outcomes and publish evidence atomically
Honor CLI smoke outcome and spill contracts
davidalucas commentedon Nov 30, 2026
Licensed smoke check passed (2026-11-29)
The scripted smoke check of the packaged CLI and stdio MCP server (#475) passed all 26 steps against a licensed SpatialAnalyzer
2026.1.0529.7. The maintainer authorized the run and prepared the station; the script ran once, unattended, with no model choosing or interpreting steps.What ran
86a6312fc7727a8b546a3800850e91e3bc37c679, checked by the script against the checkout before it started.Briosa.Cli.exefrom a local unsigned package built frommainat1fb8281e2a31e3a7a44ab81864660a8f47924c5f(0.10.3-dev.445). The pull request changes no product source, so this is the CLI the branch would package.0.10.2(5ca27a84ed7f80e7dd12cc0e6c0238e71090421e) on loopback, started and connected by the maintainer through the Control Center,standardadmission profile.What the server reported at step 1
2026.1.0529.7, verified at runtime, exact match.2026.1.0529.7, operator attestation, exact match.Result
status,ops categories,ops searchinitialize,tools/list, status, categories, searchcall: number of collections, active collection name, active units (result delivered to a file, as required)briosa_query: collection name by index, working frame properties, defined report tagscallof a mutating operationbriosa_queryasking for a results dialogAn earlier run the same day stopped at step 1
The first run stopped before any MP call because the server reported it was not ready for MP: the connected SpatialAnalyzer version had not been supplied. The script labelled it "not started" and made no further request. That finding is tracked in #476. Both runs' evidence files are kept by the maintainer outside the repository, as the script requires.
Limits of this evidence
Add the licensed smoke check for the packaged CLI and MCP server (#475)
davidalucas commentedon Nov 30, 2026
The CLI builds reproducibly and is signed in the 0.11.0 release run (2026-11-29)
The Server 0.11.0 release run (https://github.com/spatialanalyzer/briosa/actions/runs/46336324995,
mainate0f64975ed676c9ed9bc5942fd04fc65103b8a73) gives the proof for the first acceptance criterion.Build job — Build SA 2026.1.0529.7 products:
Sign job — Sign SA 2026.1.0529.7 product:
Briosa.Cli.exeandBriosa.Cli.dllcarry valid, timestamped signatures in the released ZIP.The signed package is attached to the draft release as
briosa-0.11.0-sa-2026.1.0529.7-win-x64.zip, SHA-256624d195785487d81798ad2016ceaf635351026222eb61fed5713e5af6dbe37fb.The double build proves reproducibility of the unsigned input; the signing and final-archive steps prove that this input's CLI is in the signed package. Acceptance of the signed draft, including a second licensed smoke check with the signed CLI, is tracked in #486. This issue stays open until the release is published.
davidalucas commentedon Nov 30, 2026
Released in Briosa Server 0.11.0.
Briosa.Cli.exeships signed in the SpatialAnalyzer2026.1.0529.7Windows package, and the licensed smoke check passed with the signed CLI against the signed server on 2026-11-30 (recorded on #486). All four acceptance criteria are met.