Skip to content

feat(0.2): Align pillar foundation — repos.yaml + alignment-first migration + tier badges (Tracks 6.1/6.5/6.6)#148

Open
pmclSF wants to merge 1 commit intomainfrom
feat/0.2-track6-align-foundation
Open

feat(0.2): Align pillar foundation — repos.yaml + alignment-first migration + tier badges (Tracks 6.1/6.5/6.6)#148
pmclSF wants to merge 1 commit intomainfrom
feat/0.2-track6-align-foundation

Conversation

@pmclSF
Copy link
Copy Markdown
Owner

@pmclSF pmclSF commented May 2, 2026

Summary

Three Track 6 deliverables that establish the Align pillar's 0.2.0
foundation. Track 6 is intentionally parallel and partial-ship-OK
(Align is the secondary pillar; floor ≥ 3 soft per the parity
plan); this PR lands the parts that lift Align without requiring
the full multi-repo aggregator. The aggregator (Tracks 6.2 / 6.3)
lands in 0.2.x once the manifest format ships here.

  • Track 6.1 — Multi-repo manifest format. New
    internal/portfolio/manifest.go defines the
    .terrain/repos.yaml schema (version-pinned to 1) with
    per-repo path or pre-saved snapshot, optional owner,
    frameworks-of-record declaration, tags. Loader + validator +
    path resolution helpers ready for the aggregator.
  • Track 6.5 — Migration alignment-first reframe. New
    docs/product/alignment-first-migration.md documents the
    framing shift: declare a framework of record per repo, see
    drift, converge gradually. Conversion is one tool inside
    convergence, not the headline.
  • Track 6.6 — Per-direction tier badges in migrate list.
    terrain migrate list and terrain migrate shorthands now
    surface Tier vocabulary (Stable / Experimental / Preview /
    Cataloged) instead of raw GoNativeState strings.

Test plan

  • go build ./... clean
  • go test ./internal/portfolio/... — 12 new manifest tests
    (canonical + every validation rule + path resolution variants)
  • go test ./cmd/terrain/... — new tier label test + existing
    smoke tests pass
  • make docs-verify passes
  • Manual smoke: terrain migrate list renders the new tier
    badges (separate verification — needs a built binary)

Plan tracker

Closes Track 6.1, 6.5, 6.6. Track 6 remaining (post-0.2.0 or
0.2.x): 6.2 per-repo snapshot ingestion + 6.3 cross-repo
aggregator + 6.4 multi-repo example fixture + 6.7 conversion-
corpus calibration to A-grade. Per the plan, those are partial-
ship-OK; the manifest format ships in 0.2.0 with Tier 3 /
experimental marketing on multi-repo until 6.2/6.3 land.

🤖 Generated with Claude Code

…ration + tier badges

Three Track 6 deliverables that establish the Align pillar's 0.2.0
foundation. Track 6 is intentionally parallel and partial-ship-OK
per the parity plan (Align is the secondary pillar; floor ≥ 3
soft); these three deliverables are the parts that lift Align
without requiring the full multi-repo aggregator. The aggregator
(Tracks 6.2 / 6.3) lands in 0.2.x once the manifest format ships
here.

Track 6.1 — Multi-repo manifest format
  New `internal/portfolio/manifest.go` with `RepoManifest` and
  `RepoEntry` types matching the parity plan's `.terrain/repos.yaml`
  schema: per-repo path or pre-saved snapshot, optional owner,
  frameworks-of-record declaration, free-form tags. Loader +
  validator + path resolution helpers.

  Validation enforced (rather than trusting YAML schema):
    - schema version is the only currently-supported value (1)
    - non-empty repos list
    - per-repo non-empty Name + at least one of Path / SnapshotPath
    - unique Name across the manifest
    - error messages cite the repo position so adopters can find
      the bad entry without grepping

  12 new tests covering the canonical happy path plus every
  validation rule; ResolveRepoPath / ResolveSnapshotPath helpers
  for the aggregator that lands in 0.2.x.

Track 6.5 — Migration alignment-first reframe
  New `docs/product/alignment-first-migration.md` documents the
  framing shift the launch-readiness review surfaced: most teams
  care about *aligning* (declare a framework of record per repo,
  see drift, converge gradually), not just *converting*. Conversion
  is one tool inside convergence, not the headline.

  Spells out single-repo and multi-repo flows end-to-end; pins the
  per-direction tier matrix (Stable / Experimental / Preview /
  Cataloged); names anti-goals (we don't auto-convert, don't pick
  the "best" framework, don't block convergence on calibration).

Track 6.6 — Per-direction tier badges in `migrate list`
  New `tierLabelForState` helper renders GoNativeState as the
  Tier-badge vocabulary used elsewhere in 0.2 (Stable / Experimental
  / Preview / Cataloged). `terrain migrate list` and
  `terrain migrate shorthands` now surface tier badges instead of
  raw state strings.

  `humanizeGoNativeState` is preserved so any other call sites that
  depend on the raw state string don't break — only the user-facing
  list renderers switched. Tier label test locks the mapping;
  renaming a label is a public-facing change and the test surfaces
  the dependency.

Verification: full Go test suite green; make docs-verify clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Terrain AI Risk Review

Metric Value
AI surfaces 13
Eval scenarios 16
Impacted scenarios 0
Uncovered surfaces 13

Decision: PASS — AI surfaces are covered.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

[RISK] Terrain — Merge with caution

High-severity gaps found in changed code.

Metric Value
Changed files 5 (2 source · 2 test)
Impacted units 8
Protection gaps 2
Tests selected 2 of 774 (0% of suite)

Coverage gaps in changed code

  • cmd/terrain/cmd_convert.go [MED] — Exported function Error has no observed test coverage.
    → Add unit tests for exported function Error — this is public API surface.
  • internal/portfolio/manifest.go [MED] — Exported function RepoManifest has no observed test coverage.
    → Add unit tests for exported function RepoManifest — this is public API surface.

Pre-existing issues (2)

  • cmd/terrain/cmd_convert.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 163 tests (163 direct, 0 indirect). High blast radius increases regression risk.
  • internal/portfolio/manifest.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 1657 tests (85 direct, 1572 indirect). High blast radius increases regression risk.

Recommended tests

2 test(s) with exact coverage of 5 impacted unit(s). 3 impacted unit(s) have no covering tests in the selected set.

Test Confidence Why
cmd/terrain/cmd_convert_tier_test.go exact test file directly changed
internal/portfolio/manifest_test.go exact exact coverage of LoadRepoManifest, ParseRepoManifest, RepoEntry + 2 more

Owners: PMCLSF

Limitations
  • No coverage artifacts provided; protection gaps reflect missing data, not measured absence. Provide --coverage to improve accuracy.
  • Mixed test cultures reduce cross-framework optimization confidence. Consider standardizing on fewer frameworks.

Generated by Terrain · terrain pr --json for machine-readable output

Targeted Test Results

Terrain selected 2 test(s) instead of the full suite.

  • Go tests: passed

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