Repository navigation
feat(workspace): a broker's declaration report names the box's listing and its spend - #3509
Merged
Merged
Conversation
…g and its spend (#3508) The declaration report and its answer gain two optional fields (ws-102), in the shapes studio's lobby already checks: listing, the box block's listing less the cover, and spend, the month's figures from the run records, USD per principal with runs that have no USD cost counted as unpriced. parseDeclarationReport checks and returns them, spendFromRuns computes spend from chant workspace runs --json, and the broker conformance suite gains declaration-listing-spend. Closes #3508
# Conflicts: # docs/design/decisions/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ws-097 defined the declaration report as
{ capabilities }, while studio's steward has sent the box's listing and the month's spend in it since arugula-salad/studio#369 and #384, and studio's lobby checks and keeps both. lex00 decided on 2026-10-04 to name them in chant's report schema (part of the studio#394 follow-up), recorded here as ws-102.The
declarationReportanddeclarationKeptbodies inbroker-protocol.schema.jsongain two optional fields, in the shapes the lobby already checks.listingis the box block's listing less the cover,{ published, title, line }, with published defaulting to true and the boundsbox listing setwrites with (title at most 60 characters, line at most 140, no control characters).spendis what the run records say the box spent in one month,{ month, usd, runs, unpriced, byPrincipal: [{ principal, usd, runs, unpriced }] }: USD only, runs with no USD cost counted as unpriced and never as zero, at most 50 principals, null for runs that name none.In
broker-protocol.ts,parseDeclarationReportnow checks and returnslistingandspend(a malformed one is a 400, as in the lobby),KeptDeclarationcarries them, and a newspendFromRuns(doc, month)computesspendfromchant workspace runs --jsonthe way studio's steward does. The reference broker keeps and echoes them. The broker conformance suite gainsdeclaration-listing-spend: a report that also carries both is answered 200, and an answer that echoes them echoes them unchanged. A broker that ignores the fields passes. The broker protocol reference documents the fields and the new check, and ws-102 was written withchant workspace records new --by lex00(scripts/import-decisions.mjs --checkpasses).Verification: per the burn-down's testing rule, only
tsc --noEmitfor packages/core, which is clean. I added unit cases tobroker-protocol.test.tsfor the fields, the refusals andspendFromRuns, but did not run them or the conformance suite; the coordinator runs one pass at the end. origin/main (with #3507) is merged in, and the only conflict was the decisions README's list of records.Closes #3508