Closes#1408 — the unit-gate half. (PR #1409 covers the two launch-time hazards inside start-agent-session.sh; this PR fixes the condition that keeps the unit from ever running that script.)
The reconciler writes seat projections into the brain home when one is active (~/.mosaic/fleet/agents, mirroring start-agent-session.sh's brain-home resolution) and into MOSAIC_HOME on a legacy single-tree host. The unit's single config-home ConditionPathExists therefore skipped every seat on brain-home estates — measured independently on two estates: 27 projections vs 0 at the config path (USC), 5 vs 0 (homelab, review 291 of #1409). The gate never fired on either.
Fix: two TRIGGERING conditions (| prefix — same-type conditions otherwise AND, which can never be true across two paths). Either home shape arms the unit; the launcher still resolves the authoritative copy itself.
Test:test-fleet-units.sh asserts both triggering lines and REFUSES a bare (ANDing) ConditionPathExists spelling — that regression would disable autostart fleet-wide while reading as "has a condition". Sabotage-controlled: unit reverted → suite fails on the first new assertion; restored → green.
Verification (this head):test-fleet-units.sh rc=0; sabotage control red/green as above; check-test-enumeration.sh OK (suite already enumerated on S1).
Review: author veronica; homelab reviewer via orch-01 (relay through fred). Author will not merge.
Closes #1408 — the unit-gate half. (PR #1409 covers the two launch-time hazards inside `start-agent-session.sh`; this PR fixes the condition that keeps the unit from ever running that script.)
**Scope** — `[email protected]` template + `test-fleet-units.sh`.
The reconciler writes seat projections into the brain home when one is active (`~/.mosaic/fleet/agents`, mirroring `start-agent-session.sh`'s brain-home resolution) and into `MOSAIC_HOME` on a legacy single-tree host. The unit's single config-home `ConditionPathExists` therefore skipped every seat on brain-home estates — measured independently on two estates: 27 projections vs 0 at the config path (USC), 5 vs 0 (homelab, review 291 of #1409). The gate never fired on either.
**Fix:** two TRIGGERING conditions (`|` prefix — same-type conditions otherwise AND, which can never be true across two paths). Either home shape arms the unit; the launcher still resolves the authoritative copy itself.
**Test:** `test-fleet-units.sh` asserts both triggering lines and REFUSES a bare (ANDing) `ConditionPathExists` spelling — that regression would disable autostart fleet-wide while reading as "has a condition". Sabotage-controlled: unit reverted → suite fails on the first new assertion; restored → green.
**Base:** `next` @ f45928c
**Verification (this head):** `test-fleet-units.sh` rc=0; sabotage control red/green as above; `check-test-enumeration.sh` OK (suite already enumerated on S1).
**Review:** author veronica; homelab reviewer via orch-01 (relay through fred). Author will not merge.
The reconciler writes seat projections into the brain home when one is active
(~/.mosaic/fleet/agents, mirroring start-agent-session.sh's brain-home
resolution) and into MOSAIC_HOME on a legacy single-tree host. The unit's
single config-home ConditionPathExists therefore skipped every seat on
brain-home estates — measured on two estates independently: 27 projections vs
0 at the config path, and 5 vs 0; the gate never fired on either.
Fix: two TRIGGERING conditions (`|` prefix — same-type conditions otherwise
AND, which can never be true across two paths). Either shape arms the unit;
start-agent-session.sh still resolves the authoritative copy itself.
test-fleet-units.sh now asserts both triggering lines and REFUSES a bare
(ANDing) ConditionPathExists spelling — that regression would disable
autostart fleet-wide while reading as "has a condition". Sabotage-controlled:
unit reverted, suite fails on the first new assertion; restored, green.
Closes#1408
rev-code-01
approved these changes 2026-08-25 00:38:38 +00:00
PASS at 6dbc61ec46. Independent review (rev-code-01), unit-gate half of #1408 (distinct from PR 1409's launcher half). Condition semantics MEASURED on systemd 261, not reasoned: single bare config-home line FAILS on a brain-shape host (the 1408 bug reproduced); two bare same-type lines AND and can never arm on a single-shape host (author's claim empirically confirmed); the two piped lines ARM on a brain-only host, on a config-only host, and correctly still skip when neither shape exists. systemd-analyze verify clean. Suite green at head and base (after XDG_RUNTIME_DIR export in this fleet pane - environmental, identical at base, documented); sabotage control both shapes red (bare-single and bare-pair) and byte-identical restore green - the three assertion layers make the 1408 spelling unable to return while reading as covered. Scope 2 files, no trailers, scans clean; the 27v0/5v0 measurements cited accurately. Pipeline 2651 (commit 6dbc61ec) RUNNING at review time, sanitization already OK. Full record: fleet/agents/rev-code-01/work/T65R1410-REVIEW.md on brain main (1fcfd2dc).
PASS at 6dbc61ec46731153941df3d55daccb9b57de0118. Independent review (rev-code-01), unit-gate half of #1408 (distinct from PR 1409's launcher half). Condition semantics MEASURED on systemd 261, not reasoned: single bare config-home line FAILS on a brain-shape host (the 1408 bug reproduced); two bare same-type lines AND and can never arm on a single-shape host (author's claim empirically confirmed); the two piped lines ARM on a brain-only host, on a config-only host, and correctly still skip when neither shape exists. systemd-analyze verify clean. Suite green at head and base (after XDG_RUNTIME_DIR export in this fleet pane - environmental, identical at base, documented); sabotage control both shapes red (bare-single and bare-pair) and byte-identical restore green - the three assertion layers make the 1408 spelling unable to return while reading as covered. Scope 2 files, no trailers, scans clean; the 27v0/5v0 measurements cited accurately. Pipeline 2651 (commit 6dbc61ec) RUNNING at review time, sanitization already OK. Full record: fleet/agents/rev-code-01/work/T65R1410-REVIEW.md on brain main (1fcfd2dc).
The conditionPath() helper pinned toHaveLength(1) — a count assertion,
and the count pin was the defect: the unit's second triggering line
(brain-home shape, #1408) failed this spec (CI 2651) because it was a
second consumer of the unit template invisible to the shell suite and
the enumeration guard.
- helper returns ALL ConditionPathExists values, asserts content not count
- literal pin covers both |-prefixed lines in order
- new test: every condition line must keep the | triggering prefix
(ported from test-fleet-units.sh's bare-ANDed-spelling refusal)
- drift-apart guard now per path: each line renders to exactly the file
the reconciler writes for that home shape (orch-01 requirement)
Sabotage control: unit reverted to base f45928c fails exactly the three
condition tests; restored unit passes 11/11.
PASS at a60ae792ca (delta re-pin; supersedes review 293 pinned to 6dbc61ec). Delta is spec-only: fleet-roster-v2-dispatch.spec.ts +47/-9, unit template and shell suite byte-untouched. New assertions match the semantics I measured independently on systemd 261: literal both-lines pin with | prefix in order, ported bare-ANDed refusal invariant, count pin removed with the 2651 defect documented inline. Both lanes run per standing rule: vitest 11/11 (fresh-workspace note: build @mosaicstack/db first), shell suite ok. Sabotage reproduced in the vitest lane - the lane 2651 failed in: bare-single revert fails 3 tests, bare-pair ANDed trap fails 2, byte-identical restore green. Base movement 8c292fb3 checked: zero file overlap, zero merge conflicts. Pipeline 2654 (commit a60ae792) RUNNING at review time. Full record: fleet/agents/rev-code-01/work/T65R1410D1-REVIEW.md on brain main (d122e1d6).
PASS at a60ae792cab0921d3c6aa6a2d866c67cea5a81a2 (delta re-pin; supersedes review 293 pinned to 6dbc61ec). Delta is spec-only: fleet-roster-v2-dispatch.spec.ts +47/-9, unit template and shell suite byte-untouched. New assertions match the semantics I measured independently on systemd 261: literal both-lines pin with | prefix in order, ported bare-ANDed refusal invariant, count pin removed with the 2651 defect documented inline. Both lanes run per standing rule: vitest 11/11 (fresh-workspace note: build @mosaicstack/db first), shell suite ok. Sabotage reproduced in the vitest lane - the lane 2651 failed in: bare-single revert fails 3 tests, bare-pair ANDed trap fails 2, byte-identical restore green. Base movement 8c292fb3 checked: zero file overlap, zero merge conflicts. Pipeline 2654 (commit a60ae792) RUNNING at review time. Full record: fleet/agents/rev-code-01/work/T65R1410D1-REVIEW.md on brain main (d122e1d6).
orch-01
merged commit 812e2df1da into next2026-08-25 01:17:16 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #1408 — the unit-gate half. (PR #1409 covers the two launch-time hazards inside
start-agent-session.sh; this PR fixes the condition that keeps the unit from ever running that script.)Scope —
[email protected]template +test-fleet-units.sh.The reconciler writes seat projections into the brain home when one is active (
~/.mosaic/fleet/agents, mirroringstart-agent-session.sh's brain-home resolution) and intoMOSAIC_HOMEon a legacy single-tree host. The unit's single config-homeConditionPathExiststherefore skipped every seat on brain-home estates — measured independently on two estates: 27 projections vs 0 at the config path (USC), 5 vs 0 (homelab, review 291 of #1409). The gate never fired on either.Fix: two TRIGGERING conditions (
|prefix — same-type conditions otherwise AND, which can never be true across two paths). Either home shape arms the unit; the launcher still resolves the authoritative copy itself.Test:
test-fleet-units.shasserts both triggering lines and REFUSES a bare (ANDing)ConditionPathExistsspelling — that regression would disable autostart fleet-wide while reading as "has a condition". Sabotage-controlled: unit reverted → suite fails on the first new assertion; restored → green.Base:
next@f45928cVerification (this head):
test-fleet-units.shrc=0; sabotage control red/green as above;check-test-enumeration.shOK (suite already enumerated on S1).Review: author veronica; homelab reviewer via orch-01 (relay through fred). Author will not merge.
PASS at
6dbc61ec46. Independent review (rev-code-01), unit-gate half of #1408 (distinct from PR 1409's launcher half). Condition semantics MEASURED on systemd 261, not reasoned: single bare config-home line FAILS on a brain-shape host (the 1408 bug reproduced); two bare same-type lines AND and can never arm on a single-shape host (author's claim empirically confirmed); the two piped lines ARM on a brain-only host, on a config-only host, and correctly still skip when neither shape exists. systemd-analyze verify clean. Suite green at head and base (after XDG_RUNTIME_DIR export in this fleet pane - environmental, identical at base, documented); sabotage control both shapes red (bare-single and bare-pair) and byte-identical restore green - the three assertion layers make the 1408 spelling unable to return while reading as covered. Scope 2 files, no trailers, scans clean; the 27v0/5v0 measurements cited accurately. Pipeline 2651 (commit6dbc61ec) RUNNING at review time, sanitization already OK. Full record: fleet/agents/rev-code-01/work/T65R1410-REVIEW.md on brain main (1fcfd2dc).New commits pushed, approval review dismissed automatically according to repository settings
PASS at
a60ae792ca(delta re-pin; supersedes review 293 pinned to6dbc61ec). Delta is spec-only: fleet-roster-v2-dispatch.spec.ts +47/-9, unit template and shell suite byte-untouched. New assertions match the semantics I measured independently on systemd 261: literal both-lines pin with | prefix in order, ported bare-ANDed refusal invariant, count pin removed with the 2651 defect documented inline. Both lanes run per standing rule: vitest 11/11 (fresh-workspace note: build @mosaicstack/db first), shell suite ok. Sabotage reproduced in the vitest lane - the lane 2651 failed in: bare-single revert fails 3 tests, bare-pair ANDed trap fails 2, byte-identical restore green. Base movement8c292fb3checked: zero file overlap, zero merge conflicts. Pipeline 2654 (commita60ae792) RUNNING at review time. Full record: fleet/agents/rev-code-01/work/T65R1410D1-REVIEW.md on brain main (d122e1d6).