WP5b: consumer compat mode - git tools consume .mosaic/repo.json declarations (T51 phase 2) #1413

Closed
opened 2026-08-25 01:18:52 +00:00 by code-be-02 · 0 comments
Member

T51 phase 2 work package WP5b (spec: docs/plans/2026-08-23_repo-structure-declaration.md sec 4/5, brain repo; PHASE2-MAP row WP5b).

The five git tools learn to consume .mosaic/repo.json structure declarations in compat mode per sec 4.1:

  • pr-create.sh: base resolution order explicit -B (validated as an allowed transition per sec 4.2) -> declared integration_trunk -> legacy forge-default floor (WP5a, merged). Normalized-remote mismatch vs origin on this write path refuses (sec 5.3). Absence behavior per sec 4.3 reversible class.
  • pr-merge.sh: transition validation per declared flow (direct: trunk targets only; trunk-release: feature->trunk allowed, feature->release REJECTED, release promotion must be trunk->release). Target branches validated against the declaration, never hardcoded (replaces the hardcoded main/next check).
  • ci-queue-wait.sh: route CONTEXT only; branch-selection semantics unchanged (C4).
  • mosaic-worktree.sh: worktree_policy advisory per sec 4.5 (placement stays derived); fail-loud on an invalid declaration per sec 4.4 staged rule; loud warning when absent (rollout window).
  • mutate-push-guard.sh: spec sec 4.1 names it for push-to-trunk protection, but the tool as shipped is a mutation-coverage meta-tool for push-guard.sh with no trunk-protection logic; disposition documented in the PR (nothing force-fed).

Consumption is shared through one lib sourcing the WP1 validator (sec 5.1: all consumers invoke the same script). Hostile-input coverage per sec 5.4 classes; red-first evidence per behavior. Dependencies all merged: WP0a, WP1, WP2a, WP3.

T51 phase 2 work package WP5b (spec: docs/plans/2026-08-23_repo-structure-declaration.md sec 4/5, brain repo; PHASE2-MAP row WP5b). The five git tools learn to consume .mosaic/repo.json structure declarations in compat mode per sec 4.1: - pr-create.sh: base resolution order explicit -B (validated as an allowed transition per sec 4.2) -> declared integration_trunk -> legacy forge-default floor (WP5a, merged). Normalized-remote mismatch vs origin on this write path refuses (sec 5.3). Absence behavior per sec 4.3 reversible class. - pr-merge.sh: transition validation per declared flow (direct: trunk targets only; trunk-release: feature->trunk allowed, feature->release REJECTED, release promotion must be trunk->release). Target branches validated against the declaration, never hardcoded (replaces the hardcoded main/next check). - ci-queue-wait.sh: route CONTEXT only; branch-selection semantics unchanged (C4). - mosaic-worktree.sh: worktree_policy advisory per sec 4.5 (placement stays derived); fail-loud on an invalid declaration per sec 4.4 staged rule; loud warning when absent (rollout window). - mutate-push-guard.sh: spec sec 4.1 names it for push-to-trunk protection, but the tool as shipped is a mutation-coverage meta-tool for push-guard.sh with no trunk-protection logic; disposition documented in the PR (nothing force-fed). Consumption is shared through one lib sourcing the WP1 validator (sec 5.1: all consumers invoke the same script). Hostile-input coverage per sec 5.4 classes; red-first evidence per behavior. Dependencies all merged: WP0a, WP1, WP2a, WP3.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1413