Release 0.1.0: CLI hardening, test coverage, release documentation#108
Merged
Release 0.1.0: CLI hardening, test coverage, release documentation#108
Conversation
Replace redundant depgraph.Build(snapshot) calls with result.Graph in cmd_insights.go and cmd_impact.go. The graph is already built during RunPipeline and sealed in PipelineResult.Graph. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add branding block (icon: shield, color: green) required for GitHub Marketplace listing. Create README.md with usage examples, inputs/outputs documentation, full workflow example, and requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --format html to terrain analyze, producing a single self-contained HTML file with inline CSS and minimal JS. No external dependencies. Sections: summary cards, key findings with severity badges, signal breakdown, risk posture, coverage confidence bar, repository profile, data completeness, and limitations. Uses html/template from stdlib. Template is embedded as a Go string constant. Output is printable and shareable as a standalone file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add local HTTP server for browser-based analysis viewing: - GET / serves HTML analysis report with 30s auto-refresh - GET /api/analyze returns analysis report as JSON - GET /api/health returns server status - Binds to 127.0.0.1:8421 (localhost only) - Cached pipeline result with 5s TTL to avoid redundant analysis - Graceful shutdown on SIGINT Usage: terrain serve --root . --port 8421 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[RISK] Terrain — Merge with cautionHigh-severity gaps found in changed code.
New Risks (directly changed)
Pre-existing issues on changed files (204)
Recommended Tests178 test(s) with exact coverage of 406 impacted unit(s). 393 impacted unit(s) have no covering tests in the selected set.
Owners: pmclachlansf Limitations
Terrain — Targeted Test ResultsTerrain selected 178 test(s) instead of the full suite.
|
Auto-detect device farm configurations for two additional providers: Sauce Labs (.sauce/config.yml): - Parse suites[].capabilities for platformName, browserName, deviceName - Create DeviceConfig entries with InferredFrom: "saucelabs" - Create envclass:saucelabs-device EnvironmentClass Firebase Test Lab (firebase.json with testlab field): - Parse devices[] for model, version, locale - Create DeviceConfig entries with InferredFrom: "firebase-testlab" - Create envclass:firebase-device EnvironmentClass Both integrate into existing ParseFrameworkMatrices() — no pipeline changes. Silently skip when config files are absent (zero-config principle). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add ability to compare eval metrics between baseline and current state: - CompareEvalMetrics() in internal/comparison: compares per-scenario metrics, classifies regressions (accuracy-like: lower is worse; cost/latency-like: higher is worse), sorts regressions first - EvalMetricDelta type with ScenarioID, MetricName, Delta, IsRegression - terrain ai baseline compare command: loads baseline, runs current analysis, compares scenario counts (added/removed) and metrics - Supports --json output for CI integration - Human-readable output with regression markers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HTML report: - Add section-level assertions (signal summary, coverage, risk posture, data completeness, total finding count overflow message) - Add XSS/escaping test (html/template escapes script tags and quotes) Sauce Labs detection: - Add empty suites test (zero devices for empty array) - Add malformed YAML test (no panic, graceful skip) - Add alternate path test (.sauce.yml in root) CLI smoke tests: - Add terrain ai baseline compare smoke test (verifies no panic) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code quality and bug fixes across all CLI commands and internal packages: - Fix explain command flag parsing (flags after target were silently ignored) - Fix policy check JSON output (violations serialized as null instead of []) - Fix RuntimeFormats bounds check in terrain init - Fix formatSize producing garbage output for sizes >= 10KB - Fix directionFromKey panic on malformed input - Remove dead code: executeJestToVitest*, populateLinkedCodeUnits, detectFirstExisting, wordBoundaryCache, filecache_consumers duplicates - Extract reportHelpers to eliminate 26x line/blank closure duplication - Replace custom filepathDir with filepath.Dir - Replace O(n) LookupDirection with O(1) map lookup - Add progress reporting to all analysis commands consistently - Pass verbose flag through to RenderPortfolioReport and RenderMetricsReport - Add defensive default case in runShow switch - Rename shadowing variable in runAnalyze - Add nil guard in isUniqueCodeUnitName and DetectEdgeCases - Merge double signal scan in topFilesForType - Replace triple-nested class lookup with map in matrix.go - Consolidate hasPromptPatterns/hasDatasetPatterns into generic helper - Replace custom sortStrings with sort.Strings - Fix resolveConfigValidationMode unreachable code path - Add filepath.Abs error handling in cmd_serve and cmd_insights - Add os.Stdout.Write error check in cmd_ai - Run gofmt across all 73 previously unformatted files - Use reorderCLIArgs for explain command (supports flags in any position) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add test coverage for CLI commands (ai, analyze, convert validation) - Add tests for structural detectors, pipeline helpers, depgraph building - Add tests for convert execution dispatch, parallel conversion, validation modes - Add tests for code surface model and aidetect edge cases - Fix unchecked os.WriteFile errors in test write helpers - Update golden files to match current output format - Remove test for deleted detectFirstExisting function Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite CHANGELOG for 0.1.0 (from incorrect 2.0.0) - Update README: sample outputs match actual CLI, trim architecture section, reorder Documentation before Development, remove stale hamlet-converter reference - Update cli-spec.md: add --gauntlet, --format, --verbose flags; add conversion/migration command section; fix duplicate entries - Update quickstart.md: add "What Terrain detects" section, concrete explain examples - Update CONTRIBUTING.md: current package count, command conventions, testing conventions - Update DESIGN.md: remove stale roadmap link, trim package listing - Remove strategy-revealing docs from public tree: roadmap.md, release-checklist.md, launch-assets.md, phased-implementation-roadmap.md, ui-requirements.md, positioning.md, feature-matrix.md, persona-matrix.md - Remove all "Stage NNN" references from user-facing docs - Remove all "future hosted" / "paid product" language - Remove "promote" subcommand references (not implemented) - Fix "XCTest/Espresso" overpromise in Who Uses Terrain - Update validation dates in product docs - Sanitize benchmark artifact paths (remove /Users/ and hamlet) - Remove stale internal cleanup docs - Fix telemetry.md example version (3.1.0 → 0.1.0) - Fix supply-chain.md examples (1.0.0 → 0.1.0) - Fix broken links to moved files across architecture docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update LICENSE copyright to 2024-2026 - Ensure package.json and vscode extension at 0.1.0 - Align goreleaser config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepare Terrain 0.1.0 for release. Four logical commits covering the full CLI surface, test suite, documentation, and packaging.
refactor(cli): Harden CLI commands, fix bugs, improve consistency
test: Improve test coverage, fix error handling in helpers
docs: Update all documentation for 0.1.0 release
chore: Release packaging
Verification
go build ./...— PASSgo vet ./...— PASSgofmt -l cmd/ internal/— 0 filesgo test ./... -count=1— 48/48 packages passnpm test— PASS (pack, install, CLI smoke, conversion smoke, migration smoke)make extension-verify— PASS (compile + 4/4 tests)make go-release-verify— PASS (vet, test, build, snapshot tests)Test plan
make go-release-verifypassesnpm testpassesmake extension-verifypasses🤖 Generated with Claude Code