-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmoon.yml
More file actions
104 lines (93 loc) · 2.55 KB
/
Copy pathmoon.yml
File metadata and controls
104 lines (93 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
language: 'go'
layer: 'library'
stack: 'backend'
project:
title: 'codemode'
description: 'Go library for running MCP tool calls through bounded Starlark programs.'
owner: 'meigma'
maintainers:
- 'meigma'
# Every task runs against `system` binaries that mise (mise.toml + mise.lock) puts
# on PATH; moon manages no language toolchain itself.
toolchains:
default: 'system'
fileGroups:
goSources:
- '*.go'
- 'authz/**/*.go'
- 'mcpserver/**/*.go'
- 'internal/**/*.go'
- 'go.mod'
- 'go.sum'
# Tool/version pins. Under the `system` toolchain moon does not hash the Go
# binary's version, so the mise pins are inputs here too — bumping Go (or any
# tool) in mise must invalidate the cacheable build task.
- 'mise.toml'
- 'mise.lock'
lintConfig:
- '.golangci.yml'
- 'mise.toml'
- 'mise.lock'
workspace:
inheritedTasks:
include: []
tasks:
format:
command: 'golangci-lint fmt --config .golangci.yml --diff'
inputs:
- '@group(goSources)'
- '@group(lintConfig)'
options:
cache: false
lint:
command: 'golangci-lint run --config .golangci.yml ./... --show-stats=false'
inputs:
- '@group(goSources)'
- '@group(lintConfig)'
options:
cache: false
build:
command: 'go build ./...'
inputs:
- '@group(goSources)'
test:
command: 'go test ./...'
inputs:
- '@group(goSources)'
options:
cache: false
# End-to-end guard for the real MCP transport loop: an actual MCP server, the
# real client session, and the bounded Starlark runtime wired together.
#
# `script` (not `command`) because moon's argument normalizer rewrites a
# trailing single-dash `-flag=value` into two arguments; `script` runs the line
# through the shell verbatim.
mcp-smoke:
script: "go test ./mcpserver -run '^(TestActualMCPSecureLoop|TestActualMCPCompositeProgram|TestActualMCPPureComputeProgram)$' -count=1"
inputs:
- '@group(goSources)'
options:
cache: false
# Concurrency guard: the library is used from concurrent MCP sessions, so the
# whole suite runs under the race detector. `script` for the same reason as
# `mcp-smoke`.
race:
script: 'go test -race ./... -count=1'
inputs:
- '@group(goSources)'
options:
cache: false
check:
deps:
- 'root:format'
- 'root:lint'
- 'root:build'
- 'root:mcp-smoke'
- 'root:race'
- 'docs:build'
inputs:
- '@group(goSources)'
- '@group(lintConfig)'
options:
cache: false
runInCI: true