Skip to content

feat(0.2): final pillar lifts — Understand pillar PASSES at floor=3#171

Merged
pmclSF merged 2 commits into
mainfrom
feat/0.2-pillar-lift-4
May 7, 2026
Merged

feat(0.2): final pillar lifts — Understand pillar PASSES at floor=3#171
pmclSF merged 2 commits into
mainfrom
feat/0.2-pillar-lift-4

Conversation

@pmclSF
Copy link
Copy Markdown
Owner

@pmclSF pmclSF commented May 6, 2026

Summary

Stacked on PR #170. Two commits closing the remaining V-axis cells across every area where lifts are achievable without the labeled-PR corpus.

🎉 Headline result

make pillar-parity shows Understand pillar PASS for the first time: floor=3, required=3.

Before this stack: Understand floor=2 (server / ai_risk_inventory cells held it down).
After this stack: Understand floor=3 PASS.

Align stays at WARN-only (soft gate per plan). Gate stays at FAIL pending the 0.3 labeled-PR precision corpus.

What's in this PR

  1. f95ff65 — error UX across read-side commands (5 commands now share analyzeFailureRemediation); migration schema doc; portfolio evidence refresh; impact + select-tests error UX.

  2. a8264b9 — uitokens migration in 3 core reporting files (analyze_report_v2, analyze_report, insights_report_v2); evidence refresh across V/P/E cells in 8 areas; serve-local-dev.md doc.

Cells lifted (~25 across pillars, no labeled-corpus dependency)

Area Cells lifted
core_analyze V1, V2, V3
insights_impact_explain P5, P6, V1, V2, V3
summary_posture_metrics_focus P5, P6, V1, V3
ai_risk_inventory P1, P4, P5, P6, P7, E3, E4, E5, V1, V2 (P2 + E2 from 2→3 honest)
migration_conversion P7, E4, E7, V1, V3
portfolio P1, P3, P4, P6, P7, E1, E3, E5, E6, E7, V1
server P6, E7
distribution_install P5, P6, E1, V1, V2, V3

Test plan

What's left for 0.2.0

After all four PRs (#167, #168, #169, #170, this) merge, the only remaining items for "Gate floor=4 publicly claimable" are 0.3 work:

  1. Labeled-PR precision corpus — blocks 5 P2/E2 cells. Multi-week labeling effort.
  2. Sandboxed eval execution — blocks ai_execution_gating.P1. Same.
  3. Multi-repo aggregator finishing — keeps portfolio.V2 at 2 (per-pillar drift visualization).

Realistic path to ship 0.2.0:

  • Option A: Ship with Gate floor=3 + explicit "calibration tier-2 in 0.2.0; tier-1 in 0.3" marketing.
  • Option B: Hold 0.2.0 until corpus + sandboxing land.

This PR doesn't decide; it makes (A) defensible. Understand is publicly-claimable. Align is honestly emerging. Gate is workable with explicit caveat.

@pmclSF pmclSF force-pushed the feat/0.2-pillar-lift-3 branch from b214ff7 to f1c3fd8 Compare May 7, 2026 00:27
@pmclSF pmclSF changed the base branch from feat/0.2-pillar-lift-3 to main May 7, 2026 00:37
pmclSF and others added 2 commits May 6, 2026 17:41
…+ portfolio evidence refresh

Lifts 14 cells across Understand and Align pillars without
labeled-corpus dependency.

cmd/terrain/cmd_insights.go — read-side error UX (4 P5 cells lifted):
- runPosture, runMetrics, runSummary, runFocus, runInsights all
  now call analyzeFailureRemediation when the underlying analyze
  pipeline fails. Replaces five copies of bare `analysis failed:
  %w` with the shared three-branch designed remediation block
  (timeout, cancelled, generic).

docs/schema/migration.md (new) — migration_conversion.E4 (3→4):
- MigrationEstimate / MigrationFileRecord / MigrationResult /
  MigrationStatus / MigrationDoctorResult contract published
  with field-level Stability tiers, jq integration examples,
  per-direction tier metadata.

migration_conversion further lifts (P7, E7):
- P7 (3→4): alignment-first framing doc + tier badges + per-file
  confidence preview-before-apply read as a coherent Align-pillar
  job framing.
- E7 (3→4): cancellation propagates through the analyze portion
  via runPipelineWithSignals; per-file converter loops are
  bounded.

portfolio evidence refresh (P1, P3, P4, P6, P7, E1, E3, E5, E6, E7):
- 10 cells refreshed reflecting the schema doc, EmptyNoPortfolio,
  manifest validation tests, and runPortfolio cancellation.
- Still at 2: P2 (multi-repo corpus, 0.3 work), E2 (same).
- Still at 3: V1 (uitokens inheritance) and V2 (per-pillar drift
  visualization needs multi-repo aggregator).

distribution_install evidence refresh (P5, P6, E1):
- PR #133 (already merged on main) closes the postinstall
  surface: marker file + framed banner + remediation pointer.
  Per-platform install matrix documented.

Net effect on `make pillar-parity`:
  Migration / conversion area floor: 2 → 2 (held only by E2
                                           corpus + V1/V3 inheritance)
  Portfolio area floor: 2 → 2 (held only by P2/E2 corpus + V1/V2
                              inheritance)
  Distribution / install area floor: 2 → 3 (P5/P6/E1 lifted)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…idence refresh

Lifts ~25 cells across Understand, Align, and Cross-cutting pillars
via uitokens migration in core renderers + comprehensive V/P/E
evidence refresh.

internal/reporting — uitokens migration:
- analyze_report_v2.go: Key Findings now use uitokens.BracketedSeverity
  instead of strings.ToUpper inline mapping.
- analyze_report.go: per-signal severity badge uses
  uitokens.BracketedSeverity.
- insights_report_v2.go: per-finding + edge-case badges use
  uitokens.BracketedSeverity.
- analyze_report_v2_test.go: assertions updated to canonical short-
  form vocabulary ([CRIT] / [HIGH] / [MED]).
- No raw severity-bracket patterns remain in user-visible
  Understand-pillar paths.

cmd/terrain/cmd_insights.go — read-side error UX:
- runPosture / runMetrics / runSummary / runFocus / runInsights
  all call analyzeFailureRemediation. Three-branch designed
  remediation (timeout / cancelled / generic) replaces five
  bare `analysis failed: %w` surfaces.

cmd/terrain/cmd_impact.go — impact + select-tests error UX:
- runImpact and runSelectTests now surface designed remediation
  blocks (--base ref missing, shallow clone, empty diff) with
  "run terrain analyze for the root cause" pointer.

docs/examples/serve-local-dev.md (new on this branch — also on PR #167):
- Closes server.P6 audit gap.

Cells lifted (evidence refresh + concrete code work, all without
labeled-corpus dependency):
- core_analyze: V1 (3→4), V2 (3→4), V3 (3→4)
- insights_impact_explain: V1 (3→4), V2 (3→4), V3 (3→4),
  P5 (3→4), P6 (3→4)
- summary_posture_metrics_focus: P5 (3→4), P6 (3→4),
  V1 (3→4), V3 (3→4)
- ai_risk_inventory: P1 (3→4), P2 (2→3), P4 (3→4), P5 (3→4),
  P6 (3→4), P7 (3→4), E2 (2→3), E3 (3→4), E4 (3→4),
  E5 (3→4), V1 (3→4), V2 (3→4)
- migration_conversion: V1 (3→4), V3 (3→4)
- portfolio: V1 (3→4)
- server: P6 (2→3), E7 (2→4)
- distribution_install: V1 (3→4), V2 (3→4), V3 (3→4)

`make pillar-parity` after this commit:
  understand: floor 2 → floor 3 PASS  ✓
  align:      floor 2, soft WARN (unchanged — held by E2 corpus)
  gate:       floor 2, hard FAIL (unchanged — held by E2 corpus)

The Understand pillar now passes the publicly-claimable floor for
0.2.0. Gate floor=4 remains gated on the labeled-PR precision
corpus (multi-week 0.3 work) per the original plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pmclSF pmclSF force-pushed the feat/0.2-pillar-lift-4 branch from 1751e71 to 5e13258 Compare May 7, 2026 00:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Terrain AI Risk Review

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

Decision: PASS — AI surfaces are covered.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

[RISK] Terrain — Merge with caution

High-severity gaps found in changed code.

Metric Value
Changed files 8 (5 source · 1 test)
Impacted units 6
Protection gaps 4
Tests selected 5 of 800 (<1% of suite)

Coverage gaps in changed code

  • cmd/terrain/cmd_impact.go [LOW] — cmd_impact.go has no observed test coverage.
    → Add unit tests for cmd_impact.go.
  • cmd/terrain/cmd_insights.go [LOW] — cmd_insights.go has no observed test coverage.
    → Add unit tests for cmd_insights.go.
  • internal/reporting/analyze_report.go [MED] — Exported class AnalyzeReportOptions has no observed test coverage.
    → Add unit tests for exported class AnalyzeReportOptions — this is public API surface.
  • internal/reporting/insights_report_v2.go [MED] — Exported function RenderInsightsReport has no observed test coverage.
    → Add unit tests for exported function RenderInsightsReport — this is public API surface.
5 pre-existing issues on changed files
  • cmd/terrain/cmd_impact.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 183 tests (183 direct, 0 indirect). High blast radius increases regression risk.
  • cmd/terrain/cmd_insights.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 183 tests (183 direct, 0 indirect). High blast radius increases regression risk.
  • internal/reporting/analyze_report.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 1898 tests (120 direct, 1778 indirect). High blast radius increases regression risk.
  • internal/reporting/analyze_report_v2.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 1898 tests (120 direct, 1778 indirect). High blast radius increases regression risk.
  • internal/reporting/insights_report_v2.go [HIGH] — [blastRadiusHotspot] Changes to this file propagate to 1898 tests (120 direct, 1778 indirect). High blast radius increases regression risk.

Recommended tests

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

Confidence: 5 exact (5 tests selected)

Test Confidence Why
internal/reporting/analyze_report_test.go exact exact coverage of RenderAnalyzeReport
internal/reporting/analyze_report_v2_test.go exact exact coverage of RenderAnalyzeReportV2
internal/testdata/e2e_analysis_test.go exact exact coverage of RenderAnalyzeReport
internal/testdata/e2e_workflows_test.go exact exact coverage of RenderAnalyzeReport
internal/testdata/golden_test.go exact exact coverage of RenderAnalyzeReport

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 5 test(s) instead of the full suite.

  • Go tests: passed

@pmclSF pmclSF merged commit 631379b into main May 7, 2026
11 checks passed
@pmclSF pmclSF deleted the feat/0.2-pillar-lift-4 branch May 7, 2026 00:46
pmclSF added a commit that referenced this pull request May 9, 2026
…171)

* feat(0.2): error UX across read-side commands + migration schema doc + portfolio evidence refresh

Lifts 14 cells across Understand and Align pillars without
labeled-corpus dependency.

cmd/terrain/cmd_insights.go — read-side error UX (4 P5 cells lifted):
- runPosture, runMetrics, runSummary, runFocus, runInsights all
  now call analyzeFailureRemediation when the underlying analyze
  pipeline fails. Replaces five copies of bare `analysis failed:
  %w` with the shared three-branch designed remediation block
  (timeout, cancelled, generic).

docs/schema/migration.md (new) — migration_conversion.E4 (3→4):
- MigrationEstimate / MigrationFileRecord / MigrationResult /
  MigrationStatus / MigrationDoctorResult contract published
  with field-level Stability tiers, jq integration examples,
  per-direction tier metadata.

migration_conversion further lifts (P7, E7):
- P7 (3→4): alignment-first framing doc + tier badges + per-file
  confidence preview-before-apply read as a coherent Align-pillar
  job framing.
- E7 (3→4): cancellation propagates through the analyze portion
  via runPipelineWithSignals; per-file converter loops are
  bounded.

portfolio evidence refresh (P1, P3, P4, P6, P7, E1, E3, E5, E6, E7):
- 10 cells refreshed reflecting the schema doc, EmptyNoPortfolio,
  manifest validation tests, and runPortfolio cancellation.
- Still at 2: P2 (multi-repo corpus, 0.3 work), E2 (same).
- Still at 3: V1 (uitokens inheritance) and V2 (per-pillar drift
  visualization needs multi-repo aggregator).

distribution_install evidence refresh (P5, P6, E1):
- PR #133 (already merged on main) closes the postinstall
  surface: marker file + framed banner + remediation pointer.
  Per-platform install matrix documented.

Net effect on `make pillar-parity`:
  Migration / conversion area floor: 2 → 2 (held only by E2
                                           corpus + V1/V3 inheritance)
  Portfolio area floor: 2 → 2 (held only by P2/E2 corpus + V1/V2
                              inheritance)
  Distribution / install area floor: 2 → 3 (P5/P6/E1 lifted)

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

* feat(0.2): final V-axis lifts — uitokens migration + comprehensive evidence refresh

Lifts ~25 cells across Understand, Align, and Cross-cutting pillars
via uitokens migration in core renderers + comprehensive V/P/E
evidence refresh.

internal/reporting — uitokens migration:
- analyze_report_v2.go: Key Findings now use uitokens.BracketedSeverity
  instead of strings.ToUpper inline mapping.
- analyze_report.go: per-signal severity badge uses
  uitokens.BracketedSeverity.
- insights_report_v2.go: per-finding + edge-case badges use
  uitokens.BracketedSeverity.
- analyze_report_v2_test.go: assertions updated to canonical short-
  form vocabulary ([CRIT] / [HIGH] / [MED]).
- No raw severity-bracket patterns remain in user-visible
  Understand-pillar paths.

cmd/terrain/cmd_insights.go — read-side error UX:
- runPosture / runMetrics / runSummary / runFocus / runInsights
  all call analyzeFailureRemediation. Three-branch designed
  remediation (timeout / cancelled / generic) replaces five
  bare `analysis failed: %w` surfaces.

cmd/terrain/cmd_impact.go — impact + select-tests error UX:
- runImpact and runSelectTests now surface designed remediation
  blocks (--base ref missing, shallow clone, empty diff) with
  "run terrain analyze for the root cause" pointer.

docs/examples/serve-local-dev.md (new on this branch — also on PR #167):
- Closes server.P6 audit gap.

Cells lifted (evidence refresh + concrete code work, all without
labeled-corpus dependency):
- core_analyze: V1 (3→4), V2 (3→4), V3 (3→4)
- insights_impact_explain: V1 (3→4), V2 (3→4), V3 (3→4),
  P5 (3→4), P6 (3→4)
- summary_posture_metrics_focus: P5 (3→4), P6 (3→4),
  V1 (3→4), V3 (3→4)
- ai_risk_inventory: P1 (3→4), P2 (2→3), P4 (3→4), P5 (3→4),
  P6 (3→4), P7 (3→4), E2 (2→3), E3 (3→4), E4 (3→4),
  E5 (3→4), V1 (3→4), V2 (3→4)
- migration_conversion: V1 (3→4), V3 (3→4)
- portfolio: V1 (3→4)
- server: P6 (2→3), E7 (2→4)
- distribution_install: V1 (3→4), V2 (3→4), V3 (3→4)

`make pillar-parity` after this commit:
  understand: floor 2 → floor 3 PASS  ✓
  align:      floor 2, soft WARN (unchanged — held by E2 corpus)
  gate:       floor 2, hard FAIL (unchanged — held by E2 corpus)

The Understand pillar now passes the publicly-claimable floor for
0.2.0. Gate floor=4 remains gated on the labeled-PR precision
corpus (multi-week 0.3 work) per the original plan.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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