Skip to content

Commit 8442ce1

Browse files
Prepare btc-risk-lab v0.5.0 release
1 parent f42f2fb commit 8442ce1

3 files changed

Lines changed: 12 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Changelog
22

3-
## Unreleased
3+
## v0.5.0 - 2026-07-06
44

55
### Added
66

7+
- Added `policy-pack --input DIR --format json|markdown [--output FILE]` for local custody, audit, and technical policy evidence review.
8+
- Added schema version `0.5` `PolicyPackReport` output with artifacts detected, evidence document summaries, per-artifact summaries, consolidated findings, warnings, missing evidence, review questions, and limitations.
9+
- Added Markdown/YAML/JSON policy note evidence summaries and optional metadata evidence summaries.
10+
- Added policy-pack fixtures and CLI/unit regression tests, including missing policy notes coverage.
11+
- Added a public sample report at `docs/policy-pack-sample.md`.
712
- Added a real `ai` feature implementation for `summarize --input report.json --provider openai` using an OpenAI-compatible `/chat/completions` endpoint configured by `BTC_RISK_LAB_AI_BASE_URL`, `BTC_RISK_LAB_AI_API_KEY`, and optional `BTC_RISK_LAB_AI_MODEL`.
813
- Added a global `--offline` flag that turns network-backed commands into explanatory errors before any HTTP client is used.
914
- Added property tests covering transaction, PSBT, and script analysis against arbitrary bytes and mutated valid fixtures.
@@ -18,19 +23,6 @@
1823

1924
- The AI provider HTTP client uses a hard 20 second timeout and does not read or upload raw transaction, PSBT, descriptor, script, policy, wallet, private key, seed phrase, or signing material artifacts.
2025
- Documented network egress boundaries: `fetch-tx` sends only the public txid to mempool.space Esplora, while AI summaries send only the already-produced btc-risk-lab JSON report to the configured AI endpoint.
21-
22-
## v0.5.0 - 2026-06-19
23-
24-
### Added
25-
26-
- Added `policy-pack --input DIR --format json|markdown [--output FILE]` for local custody, audit, and technical policy evidence review.
27-
- Added schema version `0.5` `PolicyPackReport` output with artifacts detected, evidence document summaries, per-artifact summaries, consolidated findings, warnings, missing evidence, review questions, and limitations.
28-
- Added Markdown/YAML/JSON policy note evidence summaries and optional metadata evidence summaries.
29-
- Added policy-pack fixtures and CLI/unit regression tests, including missing policy notes coverage.
30-
- Added a public sample report at `docs/policy-pack-sample.md`.
31-
32-
### Security
33-
3426
- `policy-pack` performs local file analysis only. It does not sign, create wallets, handle keys, broadcast transactions, or make network calls.
3527

3628
## v0.4.0 - 2026-06-19

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ btc-risk-lab analyze-tx --input examples/tx.json --format markdown
8686
Analyze a raw transaction hex string directly:
8787

8888
```bash
89-
btc-risk-lab analyze-tx --hex 0200000001... --format markdown
89+
btc-risk-lab analyze-tx --hex 02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff02e80300000000000016001400000000000000000000000000000000000000006400000000000000160014111111111111111111111111111111111111111100000000 --format markdown
9090
```
9191

9292
When no prevouts are provided, fee analysis is reported as unavailable instead of guessed.
@@ -120,7 +120,7 @@ btc-risk-lab analyze-script --script "OP_CHECKMULTISIG OP_CHECKSEQUENCEVERIFY" -
120120
Analyze an output descriptor:
121121

122122
```bash
123-
btc-risk-lab analyze-descriptor --descriptor "wsh(sortedmulti(2,02...,03...,04...))" --format markdown
123+
btc-risk-lab analyze-descriptor --descriptor "wsh(sortedmulti(2,020e0338c96a8870479f2396c373cc7696ba124e8635d41b0ea581112b67817261,0250863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352,03fff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556))" --format markdown
124124
```
125125

126126
Analyze a local review pack directory:
@@ -172,7 +172,8 @@ The schema `0.5` `PolicyPackReport` includes artifacts detected, evidence docume
172172
Generate an optional executive summary from an existing JSON report:
173173

174174
```bash
175-
BTC_RISK_LAB_AI_API_KEY=... cargo run --features ai -- summarize --input report.json --provider openai
175+
cargo run -- analyze-tx --input examples/tx.json --format json > report.json
176+
BTC_RISK_LAB_AI_API_KEY=sk-your-key cargo run --features ai -- summarize --input report.json --provider openai
176177
```
177178

178179
The `summarize` command is behind the non-default `ai` feature. Builds compiled without that feature return `compiled without ai feature`.
@@ -189,7 +190,7 @@ Transactions are provided as JSON so fee analysis can explain whether the requir
189190

190191
```json
191192
{
192-
"hex": "0200000001...",
193+
"hex": "02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff00ffffffff02e80300000000000016001400000000000000000000000000000000000000006400000000000000160014111111111111111111111111111111111111111100000000",
193194
"prevouts": [
194195
{
195196
"value_sats": 2000,

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ fn main() -> Result<()> {
192192
Ok(())
193193
}
194194

195+
#[cfg(any(feature = "fetch", feature = "ai"))]
195196
fn ensure_online(offline: bool, explanation: &str) -> Result<()> {
196197
if offline {
197198
bail!("network access disabled by --offline; {explanation}");

0 commit comments

Comments
 (0)