Skip to content

mailbox-schema: the turn and the brief a go carries (P5.4.2) - #4200

Draft
fugaro-dev[bot] wants to merge 3 commits into
mainfrom
fugaro/20261127-015925-07e1
Draft

fugaro-dev[bot] wants to merge 3 commits into
mainfrom
fugaro/20261127-015925-07e1

Conversation

@fugaro-dev

@fugaro-dev fugaro-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Task P5.4.2 of docs/mobile/implementation-plan.md, SECURITY-SENSITIVE.

The brief. A launch — the "go" — carries its shaped task in a new bounded top-level field, brief: BRIEF_MAX = 16384 UTF-16 code units, 4× TEXT_MAX and the same 16 KiB internal/task allows a spec a run works from. The spelling is this task's to choose (the design fixes the requirement, not the name); the field set is the version, so brief joins FIELDS and the action kind's optional set.

It sits beside the action, never inside it: action.target stays {repo, pr}, so ACTION_FIELDS and what a launch means are untouched. A new mutation-proof row widens REPO_TARGET_FIELDS and is killed by the target test.

Refusals added: a launch with no brief; an empty or over-long brief; a brief on any non-launch kind; a brief inside the action record or inside the target; a brief on a message with no agent (D161 — the turn a brief travels in says which agent it is for).

Red step. Before: validateMessage(aGo()) returned {ok: true} for a launch with no brief, and brief on a launch was refused as unknown-field. After: {ok: false, code: 'missing-field', field: 'brief'}.

The agent refusal is scoped to a message carrying a brief — the one reading of the block's verification the tree can hold. The block reads "a turn message carries the agent field and validates; one without an agent is refused". Read as every prompt and answer, it reddens 37 mobile/ tests and breaks a shipped feature: mobile/src/voice/dialogue.test.js refuses the app's own queued prompt ("the fixture prompt is queued: false !== true"), because P6.5's prompt queue is a live feature — and the plan itself has P5.4.7 "sit beside" it (plan, P5.4.7's edges). The client's own agent field is P5.2.8 (level 7), mobile/ is not in this task's Files, and the block's Red step names only the brief and the target. So the refusal fires on the message that carries a brief: the front agent's turn. A plain prompt with no agent still validates, exactly as it did before. If the owner reads the clause literally, it is one condition to widen — and it takes mobile/ with it.

Known reds on this branch (the first two are the ones fugaro verify test reports; the third is the JavaScript suite, which verify does not run).

  • internal/budget/rules.TestMailboxRulesAgreeWithTheSharedSchema — expected between tasks. The rules template must gate every field the schema names, and brief joins the schema here. The template, the golden and the RulesVersion bump are P5.4.3's, which depends on this task. A template change without its generation bump would ship rules an installation already at generation 11 never re-applies, so it is not folded in here.
  • internal/cli.TestReposAddIsIdempotentOverACompletedEnrolment — pre-existing on origin/main (an image_map write over a completed enrolment); this branch does not touch internal/cli.
  • mobile/src/mailbox/client.test.js, 2 tests — shared/command's jobWrite composes a launch with no brief, and a launch now needs one. The deferral is written down in the diff, at both ends: jobWrite's own doc comment (the breakage site) and shared/mailbox-schema/index.js's brief block (the requirement's home). P5.4.7's conversation screen shapes the brief; mobile/ is not this task's Files and a typed launch's brief is not this task's to decide.

Verification. npm test in shared/ 606 pass. go test ./internal/mailbox/ ok. go build ./... && gofmt -l . && go vet ./... clean. fugaro verify build passed. shared/mailbox-schema/mutation-proof.sh: 128 guards, 128 killed, 0 survived, 0 not applied. fugaro verify test on this commit: 40062 tests, 2 failures — the rules pin and the pre-existing internal/cli one — and nothing else. (An earlier run also failed internal/orchestrator/sensitivity.TestPatternAlternationIsRefused, which measures measure(18) >= 4*measure(14) in wall-clock time; it passes 5/5 in isolation and passed on the re-run, so it is load-flaky, not this change's.)

Seven stale mutation-proof.sh rows were repaired: two are the (kind, field) table rows this change widened, five were already stale on origin/main (the tag became a pair rule; the tag requirement moved into tagFields). The harness ends with nothing unapplied.

Deferred

  • The rules generation — internal/budget/rules/rules.json.tmpl, rules.go, the golden and the RulesVersion bump are P5.4.3's by its own block, and the bump is what makes an installed project re-apply them.
  • The client's agent on a turn — P5.2.8 (level 7); requiring it here reddens 37 mobile tests in a directory this task does not own.
  • The client's brief on a typed launch — P5.2.8/P5.4.7 own mobile/src/mailbox/; 2 mobile tests stay red until the phone sends its task text as brief.
  • A brief's emptiness vs its bound — the schema refuses an empty brief and one past BRIEF_MAX; "a go whose brief is empty starts nothing" at the handoff is P5.4.6's.
  • The rules emulator's denials — a brief outside its bound and a field the inbox does not name on that kind are P5.4.3's new emulator test.
  • The 5 pre-existing stale mutation rows — repaired rather than reported, so no debt is left; the underlying staleness was origin/main's, not this task's.

🤖 Generated with Claude Code

Fugaro status

Waiting on you · review is waiting on 1 owner decision · rigor: startup (project) · tests failed on 57a2cae · senior review round 1: 1 finding (recorded: model claude-opus-5-5, at 57a2cae) · review levels: level 1: changes in round 2 on 57a2cae; level 2: changes in round 1 on 57a2cae · model cost $4.76 of $10 cap · finished 2026-11-27 04:07Z

  • shared/mailbox-schema/index.js: Making 'brief' required on every launch (shared/mailbox-schema/index.js:689, internal/mailbox/message.go:936) refuses the app's existing typed start, whose task is in 'text'. shared/command's jobWrite
    Hand-back (pr.md)

Deferred (## Deferred)

  • **The rules generation** — 'internal/budget/rules/rules.json.tmpl', 'rules.go', the golden and the 'RulesVersion' bump are P5.4.3's by its own block, and the bump is what makes an installed proje…
  • **The client's 'agent' on a turn** — P5.2.8 (level 7); requiring it here reddens 37 mobile tests in a directory this task does not own.
  • **The client's brief on a typed launch** — P5.2.8/P5.4.7 own 'mobile/src/mailbox/'; 2 mobile tests stay red until the phone sends its task text as 'brief'.
  • **A brief's emptiness vs its bound** — the schema refuses an empty brief and one past 'BRIEF_MAX'; "a go whose brief is empty starts nothing" at the handoff is P5.4.6's.
  • **The rules emulator's denials** — a brief outside its bound and a field the inbox does not name on that kind are P5.4.3's new emulator test.
  • **The 5 pre-existing stale mutation rows** — repaired rather than reported, so no debt is left; the underlying staleness was 'origin/main''s, not this task's.
    🤖 Generated with Claude Code(https://claude.com/claude-code)
    Run 07e1 (a stale time here means the run died: fugaro diagnose 20261127-015925-07e1)
    //: # (fugaro:status end)

fugaro-dev Bot and others added 3 commits November 27, 2026 02:11
The front agent's "go" is the typed `launch`, and the brief — the shaped
task it starts a run from — is a new bounded field of the MESSAGE, beside
the action and never inside `action.target`, which stays "a repo alone"
(O10, D169). Refused at the schema: a launch with no brief, an empty or
over-long one, a brief on any other verb or kind, a brief written inside
the action record or inside the target, and a brief on a message that
carries no `agent` (D161).

Spelling: `brief`, bound BRIEF_MAX = 16384 code units.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Fugaro-Run: 20261127-015925-07e1
Fugaro-Rigor: startup
Fugaro-Model: deepseek/deepseek-v4.1-flash
The (kind, field) rows quote the table line this task widened, and five
rows had gone stale on main: the tag became a pair rule and the tag
requirement moved into tagFields. Repair rather than report, so the
harness ends with nothing unapplied.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Fugaro-Run: 20261127-015925-07e1
Fugaro-Rigor: startup
Fugaro-Model: deepseek/deepseek-v4.1-flash
Review: requiring a brief on a launch refuses the app's own typed start,
because `shared/command`'s `jobWrite` composes none, and neither the diff
nor the commit message said so. Two `mobile/` tests stay red until
P5.4.7's conversation screen shapes a brief; the fix is the app's, so the
deferral is written where it is payable -- at `jobWrite` and at the
schema's own requirement -- rather than reaching into `mobile/`.

Also: the harness's section-6 counts follow its two new brief rows --
twenty-one of twenty-six move a comparison by one, not nineteen of
twenty-four.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Fugaro-Run: 20261127-015925-07e1
Fugaro-Rigor: startup
Fugaro-Model: deepseek/deepseek-v4.1-flash
@fugaro-dev fugaro-dev Bot changed the title mobile P5.4.2: the conversation turn and the brief a go carries mailbox-schema: the turn and the brief a go carries (P5.4.2) Nov 27, 2026
@fugaro-dev

fugaro-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Fugaro run 07e1

Halted: the review left findings only the owner can settle (review is waiting on 1 owner decision) at 2026-11-27 04:07:17 UTC — this run spent $4.76.

To continue: the owner answers 1 decision below, then run fugaro run --pr 4200 with --owner-ruled <text-or-file> carrying the ruling.

Waiting on you

  • shared/mailbox-schema/index.js: Making 'brief' required on every launch (shared/mailbox-schema/index.js:689, internal/mailbox/message.go:936) refuses the app's existing typed start, whose task is in 'text'. shared/command's jobWrite

Outcome: draft — review is waiting on 1 owner decision

Stage Duration
implement 1h15m34s
review_first 9m3s
triage 6s
fix 22m6s
review_first 14m52s
triage 5s
review 4m36s
triage 3s
Verify Head Result Tests Duration
build ac7029e passed (exit 0) 1m16s
test ac7029e failed (exit 1) 40062 tests 20m12s
test ac7029e failed (exit 1) 40062 tests 18m24s
test 57a2cae failed (exit 1) 40062 tests 17m52s

Verify time: 57m44s, 46% of the run's 2h6m25s wall clock

Reviews: first round 1: changes (2 findings); first round 2: changes (2 findings); senior round 1: changes (1 finding)

Rigor: startup, from project, at bootstrap, read from origin/main

Tests: failed on 57a2cae (40062 tests, 2 failures)

Cost: ≈ $5.43 (model $4.76 + compute $0.67, estimate); model $1.37 notional, counted against the Claude subscription

Log tail (fugaro verify test #4):

project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
recorded the published policy node's generation in /tmp/TestEachStageKeepsItsAgentRefusalAndAuditRecordthe_admitted_pol1120038444/001/config.yaml (backup at /tmp/TestEachStageKeepsItsAgentRefusalAndAuditRecordthe_admitted_pol1120038444/001/config.yaml.bak-20261127T034418Z)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
project: aurora (GCP proj-1234)
    update_budget_mode_test.go:103: the managed read says not managed: GCP project proj-1234 carries fugaro_managed=, not true, so aurora is not managed
    update_licence_test.go:180: the second update ended with fugaro update is not finished: 1 step(s) left for you, listed above
⚠ CONFIRM (project aurora): this raises the project's required CLI to this release: every fugaro below it is refused until it upgrades, and the node is never lowered
  confirmed by this run's own answer
required CLI: none → 0.2.0 (members below it are refused until they upgrade)
required CLI: none → 0.2.0 (members below it are refused until they upgrade)
2026/11/27 03:45:47 INFO credsvc: a workspace slip was granted slip=e2dd0ea2edbbe885285cc661b09e3e1b run=20261122-080249-2886 repository=acme-sandbox-100024cb41873d4e account=fugaro-bbjob-a1b2c3@proj-1234.iam.gserviceaccount.com launcher=person-one@example.com deadline=2026-11-27T04:15:47.258Z
2026/11/27 03:45:47 INFO credsvc: a workspace slip was claimed slip=e2dd0ea2edbbe885285cc661b09e3e1b run=20261122-080249-2886 repository=acme-sandbox-100024cb41873d4e account=fugaro-bbjob-a1b2c3@proj-1234.iam.gserviceaccount.com execution=""
2026/11/27 03:45:47 INFO credsvc: a workspace grant found no token launcher=person-two@example.com repository=acme-sandbox-100024cb41873d4e run=20261122-080249-2886
2026/11/27 03:45:47 WARN credsvc: refused type=state_unavailable status=503 repository=acme-sandbox-100024cb41873d4e run=20261122-080249-2886 message="the personal token this call's slip names is not there: a person sets one at the workspace with `fugaro secrets user set`" tried="" read=secret_read  …
2026/11/27 03:45:47 WARN credsvc: refused type=state_unavailable status=503 repository=acme-sandbox-100024cb41873d4e run=20261122-080249-2886 message="this call's member has the personal workspace token switch off, and the call carries a slip naming a personal token: the credentials service serves o …
FAIL
FAIL	github.com/dimipaun/fugaro/internal/cli	1060.798s
exit status 1
peak memory: 7634 MiB (/sys/fs/cgroup/memory/memory.max_usage_in_bytes)

Transcripts and verify records: runs/dimipaun-fugaro-a6023ed66d34a65a/20261127-015925-07e1/ in the runs bucket.

This branch has not been deployed

No deployments
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.

0 participants