release: v0.9.3

Merged
SA
4mo ago
+577-28

Issue for this PR

Closes #1040

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation
  • Release

What does this PR do?

Cuts the v0.9.3 stable release. Bundles three groups of changes for maintainer approval:

1. Pre-release review fixes (fix(review): v0.9.3 pre-release review findings, ae52fe0)

  • Stamp Installation.VERSION into engine.cliVersion on the signed verdict envelope so an auditor can reconstruct which policy version generated a stored verdict months later. Covered by the HMAC signature.
  • Add staleManifest: true to the envelope when a change-affecting source file has been modified after the manifest was written. Rename the internal warnIfStale to detectStaleManifest and remove the opts.head gate so the local working-tree workflow (compile once, edit for an hour, then review) surfaces the signal instead of silently under-warning.
  • Emit tierReasons[] on the envelope whenever the classifier lands on full tier (not only under --explain-tier / --force-tier / pathTokenConfigError). A REQUEST_CHANGES on a schema.yml diff now carries the "why" in the PR-comment blockquote by default; trivial / lite stay silent to avoid approval noise.
  • Document --explain-tier, --force-tier, riskTierPathTokens, and manifest auto-discovery in docs/docs/usage/dbt-pr-review.md.

2. Flaky CI test skip (test(tui): skip flaky phase-label e2e when CI env is set, 4cb6e9d)

  • The phase-label.tui-e2e "Discovering tools" assertion depends on the bootstrap.resolve-tools span (~30-100 ms while listing MCP tools) outlasting the PTY harness's 50 ms poll interval. On a cold CI runner MCP listing can complete faster than the harness samples, dropping the label between polls. A local sample observed 4/5 passes; the flake mode is real. Gate on CI env so cold runners skip while local dev still runs it.

3. Release commit (release: v0.9.3, afcca83)

  • CHANGELOG.md entry describing the seven Added items (grain-key not_null detector, --explain-tier, --force-tier, riskTierPathTokens, engine.cliVersion, staleManifest, bootstrap phase labels) and the five Changed items (never-auto-approve risky metadata, --no-ai fix, manifest auto-discovery, column-aware schema.yml test-removal, working-tree stale-manifest detection).
  • test/skill/release-v0.9.3-adversarial.test.ts — ten regression tests covering the envelope audit fields, tier-reason PR-comment leak, stale-manifest detection, and manifest auto-discovery under hostile filesystem shapes.

How did you verify your code works?

  • Full altimate test suite: 3863 pass, 636 skip, 0 fail after applying every fix (bun test test/altimate/ from packages/opencode)
  • v0.9.3 adversarial suite: 10 pass, 0 fail
  • bun run typecheck on packages/opencode — clean
  • Marker guard bun run script/upstream/analyze.ts --markers --base origin/main --strict — clean
  • bun script/release-preflight.ts --version 0.9.3 --stage tag — 9/9 PASS after fixing a stale fork-inherited v0.9.3 tag from upstream OpenCode's Sep 2025 release
  • Pre-release binary smoke: (cd packages/opencode && OPENCODE_VERSION=0.9.3 bun run pre-release) built the dist binary; --version reports 0.9.3 exactly
  • Multi-persona pre-release review across five reviewers (CTO, PM, Data Engineer, Tech Lead, Compliance Officer chaos-gremlin) — all SHIP WITH NOTES, one P0 and multiple P1s addressed in this PR; six deferred findings filed as #1034 - #1039

Screenshots / recordings

n/a — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Note to reviewer

Prefer merge commit or rebase-and-merge (not squash) so my local v0.9.3 tag on afcca831b9 stays reachable from origin/main. Squash would still work — release.yml checks out from the tag directly — but the linear history and tag reachability are cleaner with merge/rebase.

After this lands on main, I'll push the v0.9.3 tag (already created locally on afcca831b9) to trigger release.yml for the npm publish.


Summary by cubic

Release v0.9.3 for the dbt PR reviewer. Improves auditability, explains full-tier decisions by default, hardens stale-manifest detection (including deletes/renames), and stabilizes CI runs.

  • New Features

    • Add engine.cliVersion to the signed verdict envelope for audit trails; add staleManifest when change‑affecting files are newer than the manifest. Staleness check now runs for CI and local working-tree reviews.
    • Emit tierReasons[] when the classifier lands on full so PR comments explain REQUEST_CHANGES without extra flags.
    • Update docs for --explain-tier, --force-tier, riskTierPathTokens (now clearly boundary-matched, with examples), and manifest auto-discovery; add v0.9.3 CHANGELOG.
  • Bug Fixes

    • Default engine.cliVersion in reviewPullRequest so dbt_pr_review tool-invoked runs also stamp the CLI version.
    • Treat deleted/renamed manifest-affecting files as stale and record it in the envelope.
    • Skip the flaky TUI phase-label e2e in CI; fix a branding-audit false positive by wrapping the upstream-remote instruction in altimate_change markers.

Summary by CodeRabbit

  • New Features
    • Added --explain-tier and experimental --force-tier for more control and richer tier-reason output.
    • Added riskTierPathTokens (including preset:finops and pii tokens) with case-insensitive, boundary-aware matching and improved invalid-token reporting.
    • Included engine CLI version plus stale-manifest indicators in review results.
    • Improved TUI startup phase labels.
  • Improvements
    • Auto-discovers target/manifest.json by searching upward for dbt_project.yml; better stale detection (including local changes and deletes/renames).
    • dbt risk metadata now consistently escalates to full review.
  • Bug Fixes
    • Fixed --no-ai to truly disable the AI review lane.
  • Documentation / Tests
    • Updated dbt review docs and added adversarial/envelope-verification coverage; reduced TUI test flakiness on CI.