Skip to content

MC-69: runs are told to add and keep megoocolab.toml up to date - #7

Merged
mmhy2003 merged 5 commits into
developfrom
megoo/MC-69-megoocolab-toml-creation
Nov 18, 2026
Merged

mmhy2003 merged 5 commits into
developfrom
megoo/MC-69-megoocolab-toml-creation

Conversation

@mmhy2003

Copy link
Copy Markdown
Owner

What changed

  • megoocolab-runner services --help now prints the format of megoocolab.toml (sets, description, compose, ports, env, ${NAME} expansion, MEGOO_SERVICES_* variables, and how to run a check through services run). A test fails if a new key is added to the loader without being documented there.
  • Planning runs (read-only, role plan, first turn of the session) get a "Test services" section:
    • without the file: if any check needs a container, the plan's first step should be "Add megoocolab.toml";
    • with the file: the sets are listed, and steps that change the checks also update megoocolab.toml.
      Other read-only roles and resumed planning sessions get no section.
  • Writable runs with the file are reminded to add any new service, port or variable that new checks or commands need to megoocolab.toml (and its Compose files) in the same commit. This follows the request on the task that the agent keep the file up to date when new commands or tests need it.
  • runner/README.md "Test services" describes what planning and writable runs are told.
  • MC-69 design and plan are under docs/superpowers/.

Why

Repos that have checks but no megoocolab.toml were left without containers for their tests. Now the planner adds the file as a step, and later runs keep it current.

How it was tested

  • go test -count=1 ./... in runner/: passes
  • go vet ./... and gofmt -l .: clean
  • MEGOO_DOCKER_TESTS=1 go test ./internal/services -run TestRealDocker: passes

🤖 Generated with Claude Code

mmhy2003 and others added 5 commits November 18, 2026 22:05
Agents that create or update megoocolab.toml need its format: the keys of
a set, the name rules, ${NAME} references, the reserved MEGOO_SERVICES_
prefix and that a .env file is never read. The text now lives once in
services.Format, and `megoocolab-runner services --help` shows it, so a
writable run can read it from the command. Later steps put the same text
in a planning run's prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p it up to date (MC-69)

PlanSection gives a planning run the text about megoocolab.toml: without
the file, it asks for an "Add megoocolab.toml" first step when a check
needs a container; with it, it says a step adding a check that needs a
new service, port or variable changes the file in that same step. The
file's format follows. PromptSection now ends with the same reminder for
writable runs. Both share loadOwn and setList.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (MC-69)

A new helper, servicesPrompt, picks what a run's prompt gets about
megoocolab.toml. A writable run gets the Test services section as before. The
first run of a planning session (read-only, role plan, no session to resume)
gets the planning section. Drafts, the other read-only roles and a continued
planning session get nothing, whether the resume works or falls back to a new
session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ab.toml (MC-69)

The Test services section of the runner README now says that writable runs are
asked to add a service, port or variable that new work needs to the file in the
same commit, and that the first run of a planning session is told to add the
file as the plan's first step, or to change it in the step that needs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mmhy2003 mmhy2003 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approved

The change does what the approved design and plan ask, step by step:

  • services.Format is written once. services --help prints it, and TestFormatNamesEveryKey fails if a key is added to setDoc without being documented in Format.
  • PlanSection covers four cases: no file (the agent is asked for an "Add megoocolab.toml" first step, but only when a check needs a container), a file with sets, a file with no sets (no "Add" text), and an invalid file (logged, and the run gets nothing). Only the worktree's own file counts.
  • servicesPrompt sends PromptSection to writable runs and PlanSection only to the first turn of a read-only plan run (ResumeSessionID == ""). Drafts, other read-only roles and continued sessions, including the resume fallback, get nothing. Tests cover each case.
  • The writable section now ends with the keep-it-up-to-date sentence, which covers the 18:50 UTC instruction. The README says what each kind of run is told.

I checked that rolePlan = "plan" matches the backend's RunRole.plan. go vet ./... and go test -count=1 ./... pass in runner/ locally, and every CI check is green.

The by-hand planning checks listed in the plan's "Final verification" need a live server and runner, so I did not run them here.

@mmhy2003
mmhy2003 merged commit aea6906 into develop Nov 18, 2026
12 checks passed
@mmhy2003
mmhy2003 deleted the megoo/MC-69-megoocolab-toml-creation branch November 18, 2026 19:36
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