Skip to content

feat: building block run logs, definitions and versions (experimental) - #10

Draft
JohannesRudolph wants to merge 4 commits into
feat-list-commands-fabianfrom
feat/cli-bb-run-logs
Draft

JohannesRudolph wants to merge 4 commits into
feat-list-commands-fabianfrom
feat/cli-bb-run-logs

Conversation

@JohannesRudolph

@JohannesRudolph JohannesRudolph commented Sep 22, 2026

Copy link
Copy Markdown
Member

Experimental building block commands, stacked on #7.

Design decisions:

  • A command per meshObject kind, flat. bbrun logs, bbdv list — the API has no
    definition/version hierarchy either. Aliases keep them typable; feat list commands #7's run subtree moves out of
    buildingblock with them.
  • Logs have their own endpoint. A run object carries status only, no steps.
  • Literal-style yaml. JSONToYAML picks the style from a string's first line, so a terraform
    log, opening with {, came out as one escaped line.
  • --definition is required. Reading a definition's versions takes a permission on the owning
    workspace, so a walk over all of them stops at the first foreign one with a 403.

Checked against a live meshStack (2026.38.1).

🤖 Generated with Claude Code

JohannesRudolph and others added 3 commits September 22, 2026 17:52
yaml.JSONToYAML picks the scalar style from the first line alone, so a
string whose first line opens with an indicator character is written as
one escaped line. A building block run step's log hits this: terraform
opens with a `{` version banner.

Marshal with the literal style instead, which the exported JSONToYAML
takes no options for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"meshstack buildingblock run logs <uuid>" writes the run's steps with
their status and messages, in the same formats a listing is written in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
"meshstack buildingblock definition version list" takes --definition and
is required to: the backend serves one definition's versions at a time,
and reading them takes a permission on the owning workspace, so walking
every definition would stop at the first foreign one with a 403.

"meshstack buildingblock definition list" is what reports the uuid that
flag takes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JohannesRudolph JohannesRudolph changed the title feat: show the logs of a building block run (experimental) feat: building block run logs, definitions and versions (experimental) Sep 22, 2026
The tree grew four levels deep at "buildingblock definition version
list", a hierarchy the API does not have: every kind sits flat under
/api/meshobjects. Give each kind its own top-level command instead, with
a short alias so the full name stays typable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@meshcloud-gh-actions

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on 20a9c6b45d2287e01934fae6b2a625f64c811183.

Scope Coverage
Unit tests 52.9%
Acceptance tests 14.6%
Combined 53.2%
Uncovered functions
client/api_key.go:44: newApiKeyClient 0.0%
client/api_key.go:48: meshApiKeyClient.Create 0.0%
client/api_key.go:52: meshApiKeyClient.Read 0.0%
client/api_key.go:56: meshApiKeyClient.Update 0.0%
client/api_key.go:60: meshApiKeyClient.Delete 0.0%
client/api_key_permissions.go:21: ApiKeyPermissions.AllCodes 0.0%
client/api_key_permissions.go:34: ApiKeyPermissions.WorkspaceCodes 0.0%
client/api_key_permissions.go:50: ApiKeyPermissions.MarkdownString 0.0%
client/api_key_permissions.go:226: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:231: WorkspacePermissionCodes 0.0%
client/building_block_definition.go:73: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:84: DisabledSchedule 0.0%
client/building_block_definition.go:91: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:96: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:101: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:141: newBuildingBlockDefinitionClient 0.0%
client/building_block_definition.go:155: meshBuildingBlockDefinitionClient.List 0.0%
client/building_block_definition.go:162: meshBuildingBlockDefinitionClient.ListSeq 0.0%
client/building_block_definition.go:169: meshBuildingBlockDefinitionClient.Read 0.0%
client/building_block_definition.go:173: meshBuildingBlockDefinitionClient.Create 0.0%
client/building_block_definition.go:177: meshBuildingBlockDefinitionClient.Update 0.0%
client/building_block_definition.go:181: meshBuildingBlockDefinitionClient.Delete 0.0%
client/building_block_definition_version.go:101: TagInputTargetsFor 0.0%
client/building_block_definition_version.go:237: newBuildingBlockDefinitionVersionClient 0.0%
client/building_block_definition_version.go:247: meshBuildingBlockDefinitionVersionClient.List 0.0%
... and 212 more

covdata func names a method without its receiver, so an entry can belong to an implementation nothing selects rather than to a function the tests never reached. Open the file and line before reading one as a coverage gap.

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