Skip to content

fix(skeleton): declare the door back from a trial, and require a decision for every provider - #143

Merged
rodrigoteamx merged 2 commits into
mainfrom
rodrigoteamx/skeleton-declares-trials-0995
Sep 24, 2026
Merged

rodrigoteamx merged 2 commits into
mainfrom
rodrigoteamx/skeleton-declares-trials-0995

Conversation

@rodrigoteamx

Copy link
Copy Markdown
Contributor

What was wrong

A governed session running make scaffolds into a trial workspace and answers «apply it with sandbox:promote». TrialOperations is what offers that operation — and this skeleton never declared it. Every newly created app got a scaffolder that named a command the app did not have.

It had been found three times in the greenhouse and patched each time where it surfaced, never here:

where what was done
decisions/0227 «not wired in the skeleton, but in three lab apps» profiles added
decisions/0331 two authoring attempts invalidated a catalogue check added — to the lab mount
evidence/0994 a local model removed every other obstacle and stopped on exactly this, naming it house_debt —

What changed

TrialOperations is declared in config/operations.php.

Measured in an app created from this skeleton without milpa/agent — which is how every app is born:

before:  sandbox:* offered → 0
after:   sandbox:list · sandbox:discard · sandbox:promote · sandbox:undo
         sandbox:list → ok: yes · trials: (none)

The guard checks the shape, not the name

A guard that checks TrialOperations by name certifies that one instance and waves the next through. This one enumerates, by reflection, every concrete CommandProvider that milpa/app-runtime ships under Operations, and requires each to be declared or listed in EXCUSED with a written reason — so left out and forgotten stop looking the same.

Enumerating surfaced one more provider outside the list, and it is correctly outside: PresentationOverrideOperations takes a PresentationOverrideStore in its constructor and is wired by LivePlugin, like ScreenOperations. It is excused in writing rather than flagged.

test pins
every provider declared or excused the shape of the defect
every excuse names a provider that still exists an excuse outliving its provider is the same silence one step later
the door back from a trial is offered sandbox:promote and sandbox:list, directly

How it was verified

181 tests (178 → +3) · 412 assertions · 66 skipped — the same 66 as main
phpstan clean · style clean

By mutation: dropping the TrialOperations line fails twice (the enumeration names it, and sandbox:promote goes missing); dropping the excuse fails naming PresentationOverrideOperations. The enumeration also asserts it sees AgentOperations, so an empty result cannot pass everything silently.

Greenhouse: decisions/0461.

…sion for every provider

A governed session running make scaffolds into a trial workspace and answers
«apply it with sandbox:promote». TrialOperations offers that operation, and this
skeleton never declared it — so the scaffolder named a command every newly
created app lacked. It was found three times in the greenhouse (decisions/0227,
0331, evidence/0994) and each time patched in the lab mount where it surfaced.
The last time, a local model had removed every other obstacle and stopped on
exactly this, naming it as a house debt.

Measured in an app created from this skeleton WITHOUT milpa/agent, which is how
every app is born: it boots, offers sandbox:list/discard/promote/undo, and
sandbox:list answers ok with no trials.

The guard checks the shape of the defect rather than the name. It enumerates,
by reflection, every concrete CommandProvider milpa/app-runtime ships under its
Operations namespace and requires each to be declared in config/operations.php
or listed in EXCUSED with a written reason, so «left out» and «forgotten» stop
looking the same. Enumerating surfaced one more provider outside the list, and
it is correctly outside: PresentationOverrideOperations takes a store and is
wired by LivePlugin, like ScreenOperations. It is excused in writing.

181 tests (+3), 412 assertions, the same 66 skipped as main, phpstan and style
clean. Verified by mutation: dropping the TrialOperations line fails twice —
the enumeration names it and sandbox:promote goes missing — and dropping the
excuse fails naming PresentationOverrideOperations.

Greenhouse: decisions/0461.
…heir bytes

This asserted the exact string <style data-milpa-assets="components">, with the
closing > right after the attribute. milpa/live-web 0.30 added
data-milpa-components="brand-mark@1 code-block@1" before it. The page kept
emitting each tag exactly once — measured on a served app and on the bare
controller — and the assertion saw 0.

So every app this skeleton creates shipped a red test suite, and every pull
request to this repository failed Boot proof. Main's last green was 2026-09-12,
before that live-web release; CI resolves fresh because composer.lock is not
tracked, so the break arrived with the dependency, not with a commit here.

The test now counts the tag's opening, and also asserts which components the
page emitted for, so a bare opening from somewhere else cannot satisfy it.
Verified the other direction by mutation: emitting the stylesheet twice fails
with 2 against 1.

Greenhouse: evidence/0995.
@rodrigoteamx
rodrigoteamx merged commit 3e4619d into main Sep 24, 2026
2 checks passed
@rodrigoteamx
rodrigoteamx deleted the rodrigoteamx/skeleton-declares-trials-0995 branch September 24, 2026 16:39
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