Skip to content

Commit 905ac73

Browse files
rcursoragent
andcommitted
v0.47.0: remove v0.45 inspect aliases + add Session/Eval Rust aliases
Vocabulary unification, part 2 — fifth release of the multi-phase "make morph intuitive" effort. Remove the v0.45-deprecated `morph trace`, `morph tap`, and `morph traces` namespaces (only `morph inspect` remains), and introduce Rust-level type aliases (`Session`, `SessionTrace`, `SessionEvent`, `Eval`, `EvalItem`) so newer call sites can match the user vocabulary without renaming the storage-layer structs. Added - Rust type aliases in `morph-core/src/objects.rs` and re-exported from `morph_core`: pub type Session = Run; pub type SessionTrace = Trace; pub type SessionEvent = TraceEvent; pub type Eval = EvalSuite; pub type EvalItem = EvalCase; Pure type renames; serialization, hashing, and `MorphObject` dispatch all go through the underlying struct, so on-disk bytes are unchanged. - New spec `removed_inspect_aliases.yaml` (3 cases) pins that `morph trace`, `morph tap`, and `morph traces` exit with code 2 and "unrecognized subcommand" after removal. Removed - `morph trace show`, `morph tap {summary, inspect, diagnose, export, trace-stats, preview}`, `morph traces {summary, task-structure, target-context, final-artifact, semantics, verification}` — use the corresponding `morph inspect` subcommand. The companion `TraceCmd`, `TapCmd`, `TracesCmd` enums and dispatch arms are gone from cli.rs + main.rs; `handle_traces_command` is removed. - Spec files `tap.yaml`, `traces.yaml`, and `inspect_deprecated_aliases.yaml` deleted; the unified `inspect.yaml` covers every subcommand. Changed - `morph --help` Inspect docstring no longer mentions the removed fall-back commands. - Doc + site sweep for the v0.45 removal: README, docs/v0-spec.md, internal doc-comments in morph-core/src/{store,structured}.rs rewritten to point at `morph inspect`. Architectural prose ("the morph trace contract") is left alone per the dual-vocabulary rule for v0-spec.md, THEORY.md, morph-paper.tex. - inspect::deprecation_notice helper now points at v0.48 so the v0.46-deprecated `morph run` / `eval add-case` aliases emit the right wording. Tests - Workspace 1217 / 1217 passing (1244 minus 30 cases in the three deleted spec files plus 3 new removal-proof cases). Cucumber 34 / 37 (3 skipped, 0 failed) — no change. - Quality gates clean: cargo build --workspace, cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4c0837c commit 905ac73

20 files changed

Lines changed: 298 additions & 652 deletions

‎CHANGELOG.md‎

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,86 @@ metrics — see `.cursor/rules/behavioral-commits.mdc`.
1616

1717
## [Unreleased]
1818

19+
## [0.47.0] — 2026-05-02
20+
21+
Vocabulary unification, part 2: remove the v0.45-deprecated
22+
`morph trace`, `morph tap`, and `morph traces` namespaces and
23+
introduce Rust-level type aliases (`Session`, `SessionTrace`,
24+
`SessionEvent`, `Eval`, `EvalItem`) so newer call sites can match
25+
the user vocabulary without renaming the storage-layer structs.
26+
Fifth release of the multi-phase "make morph intuitive" effort.
27+
The on-disk object format is unchanged; existing `.morph/`
28+
directories keep deserializing without migration. The
29+
v0.46-deprecated `morph run` and `morph eval add-case` /
30+
`suite-show` / `suite-from-specs` aliases continue to ride along
31+
through v0.47 — only the v0.45 ones are removed in this release.
32+
33+
### Added
34+
35+
- **Rust type aliases** in `morph-core/src/objects.rs` and
36+
re-exported from `morph_core`:
37+
38+
```rust
39+
pub type Session = Run;
40+
pub type SessionTrace = Trace;
41+
pub type SessionEvent = TraceEvent;
42+
pub type Eval = EvalSuite;
43+
pub type EvalItem = EvalCase;
44+
```
45+
46+
Pure type renames: serialization, hashing, and `MorphObject`
47+
discrimination all go through the underlying struct, so on-disk
48+
bytes are unchanged. Lets newer call sites match the user
49+
vocabulary; existing code keeps compiling against the storage
50+
names.
51+
- New spec `removed_inspect_aliases.yaml` (3 cases) pins that
52+
`morph trace`, `morph tap`, and `morph traces` exit with code 2
53+
and an "unrecognized subcommand" error after removal — so a
54+
future re-introduction is intentional, not an accident.
55+
56+
### Removed
57+
58+
- **`morph trace show`** — removed (was deprecated in v0.45). Use
59+
`morph inspect show <hash>`.
60+
- **`morph tap {summary, inspect, diagnose, export, trace-stats,
61+
preview}`** — removed (was deprecated in v0.45). Use the
62+
corresponding `morph inspect` subcommand.
63+
- **`morph traces {summary, task-structure, target-context,
64+
final-artifact, semantics, verification}`** — removed (was
65+
deprecated in v0.45). Use the corresponding `morph inspect`
66+
subcommand.
67+
- The companion `TraceCmd`, `TapCmd`, `TracesCmd` Clap enums and
68+
the `Command::Trace` / `Command::Tap` / `Command::Traces` arms
69+
are gone from `morph-cli/src/cli.rs` and `main.rs`. The
70+
`handle_traces_command` dispatcher is removed.
71+
- Spec files `tap.yaml`, `traces.yaml`, and
72+
`inspect_deprecated_aliases.yaml` deleted. The unified
73+
`inspect.yaml` (16 cases) covers every subcommand.
74+
75+
### Changed
76+
77+
- **`morph --help` Inspect docstring** updated: no longer mentions
78+
the now-removed `morph trace` / `morph tap` / `morph traces`
79+
fall-back paths.
80+
- **Doc + site sweep** for the v0.45 removal: `README.md`,
81+
`docs/v0-spec.md`, and stale internal doc-comments in
82+
`morph-core/src/store.rs` and `morph-core/src/structured.rs`
83+
rewritten to point at `morph inspect`. The v0-spec call-out
84+
sections "Tap" and "structured trace views" now note the
85+
removal target. Architectural prose ("the morph trace
86+
contract", "morph traces live in the commit graph") is left
87+
alone per the dual-vocabulary rule for `v0-spec.md`,
88+
`THEORY.md`, and `morph-paper.tex`.
89+
- The `inspect::deprecation_notice` helper now points at v0.48
90+
(the next removal target) so the v0.46-deprecated
91+
`morph run` / `eval add-case` aliases emit the right wording.
92+
93+
### Tests
94+
95+
- Workspace **1217 / 1217 passing** (1244 minus 30 cases in the
96+
three deleted spec files plus 3 new removal-proof cases).
97+
Cucumber 34 / 37 (3 skipped, 0 failed) — no change.
98+
1999
## [0.46.0] — 2026-05-02
20100

21101
Vocabulary unification, part 1: introduce `morph session` as the
@@ -1335,7 +1415,8 @@ Three coordinated changes to repo setup, adoption, and migration.
13351415
- 15 new YAML acceptance spec cases in the default eval suite:
13361416
`init_at_latest:*` ×4, `init_in_git_dir:*` ×6, `upgrade:*` ×5.
13371417

1338-
[Unreleased]: https://github.com/r/morph/compare/v0.46.0...HEAD
1418+
[Unreleased]: https://github.com/r/morph/compare/v0.47.0...HEAD
1419+
[0.47.0]: https://github.com/r/morph/compare/v0.46.0...v0.47.0
13391420
[0.46.0]: https://github.com/r/morph/compare/v0.45.0...v0.46.0
13401421
[0.45.0]: https://github.com/r/morph/compare/v0.44.0...v0.45.0
13411422
[0.44.0]: https://github.com/r/morph/compare/v0.43.0...v0.44.0

‎Cargo.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ resolver = "2"
33
members = ["morph-core", "morph-cli", "morph-mcp", "morph-serve", "morph-e2e"]
44

55
[workspace.package]
6-
version = "0.46.0"
6+
version = "0.47.0"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The IDE hooks parse the agent's full transcript (tool calls, file reads/edits, s
193193
- `morph inspect recent` / `morph inspect task <ref>` / `morph inspect artifact <ref>` — structured task views for replay or eval generation.
194194
- `morph session record --prompt "..." --response "..."` — record a session manually (v0.46+; was `morph run record-session`).
195195

196-
The older `morph trace` / `morph tap` / `morph traces` spellings still work in v0.45 and v0.46 with a deprecation notice; they're removed in v0.47. Likewise `morph run` / `morph eval add-case` / `morph eval suite-show` / `morph eval suite-from-specs` work in v0.46 and v0.47 and are removed in v0.48; new code should use `morph session` and the flat `morph eval add` / `show` / `rebuild`.
196+
The older `morph trace` / `morph tap` / `morph traces` spellings were removed in v0.47 — only `morph inspect` works now. The v0.46-deprecated `morph run` / `morph eval add-case` / `morph eval suite-show` / `morph eval suite-from-specs` still work through v0.47 with a deprecation notice and are removed in v0.48; new code should use `morph session` and the flat `morph eval add` / `show` / `rebuild`.
197197

198198
See [docs/SESSION-TRACKING.md](docs/SESSION-TRACKING.md).
199199

‎docs/v0-spec.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,8 @@ morph inspect stats <trace_hash> # detailed event-level statistics for
923923
morph inspect preview <run_hash> [--mode M] # labeled prompt/context/response preview
924924
```
925925

926-
(Through v0.46 the older `morph tap <subcommand>` and `morph trace
927-
show` spellings still work with a deprecation notice; they're
928-
removed in v0.47.)
926+
(The older `morph tap <subcommand>` and `morph trace show` spellings
927+
were removed in v0.47.)
929928

930929
Tap reads traces and runs from the store, groups events into logical steps (prompt, response, tool calls, file operations), and produces structured output for evaluation frameworks. `export` supports filtering by model (`--model`), agent (`--agent`), and minimum step count (`--min-steps`), and writes to a file with `--output`.
931930

@@ -940,8 +939,8 @@ morph inspect semantics <run_or_trace_hash>
940939
morph inspect verification <run_or_trace_hash>
941940
```
942941

943-
(Through v0.46 the older `morph traces <subcommand>` spellings still
944-
work with a deprecation notice; they're removed in v0.47.)
942+
(The older `morph traces <subcommand>` spellings were removed in
943+
v0.47.)
945944

946945
Higher-level views over the same traces, for replay and eval-case construction: task classification (phase, scope, target files/symbols, goal), target file/function context, final artifact (function text / file snippet / patch summary), change semantics, and verification commands. These are also exposed as MCP tools (`morph_get_recent_trace_summaries`, `morph_get_trace_task_structure`, etc.).
947946

‎morph-cli/src/cli.rs‎

Lines changed: 9 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -662,37 +662,14 @@ pub enum Command {
662662
},
663663
/// Remove unreachable objects from the store
664664
Gc,
665-
/// Inspect runs and traces (Phase 3, v0.45+: consolidates the
666-
/// older `morph trace`, `morph tap`, and `morph traces`
667-
/// commands into one namespace; the old commands remain as
668-
/// deprecated aliases through v0.46).
665+
/// Inspect recorded sessions (Run + Trace pairs). Phase 3
666+
/// (v0.45+) consolidated the older `morph trace`, `morph tap`,
667+
/// and `morph traces` namespaces into this single one;
668+
/// Phase 4.2 (v0.47+) removed the old commands.
669669
Inspect {
670670
#[command(subcommand)]
671671
sub: InspectCmd,
672672
},
673-
/// [DEPRECATED v0.45+] Inspect traces. Use `morph inspect show`
674-
/// instead. Removed in v0.47.
675-
#[command(hide = true)]
676-
Trace {
677-
#[command(subcommand)]
678-
sub: TraceCmd,
679-
},
680-
/// [DEPRECATED v0.45+] Extract and analyze traces for
681-
/// evaluation. Use `morph inspect <subcommand>` instead.
682-
/// Removed in v0.47.
683-
#[command(hide = true)]
684-
Tap {
685-
#[command(subcommand)]
686-
sub: TapCmd,
687-
},
688-
/// [DEPRECATED v0.45+] Structured trace views for replay / eval
689-
/// generation. Use `morph inspect <subcommand>` instead.
690-
/// Removed in v0.47.
691-
#[command(hide = true)]
692-
Traces {
693-
#[command(subcommand)]
694-
sub: TracesCmd,
695-
},
696673
/// Browse repo in browser
697674
#[cfg(feature = "visualize")]
698675
#[command(name = "visualize")]
@@ -718,11 +695,6 @@ pub enum Command {
718695
},
719696
}
720697

721-
#[derive(clap::Subcommand)]
722-
pub enum TraceCmd {
723-
Show { hash: String },
724-
}
725-
726698
#[derive(clap::Subcommand)]
727699
pub enum MergeCmd {
728700
/// Pick a side for a single pipeline-node conflict surfaced by
@@ -739,102 +711,11 @@ pub enum MergeCmd {
739711
},
740712
}
741713

742-
#[derive(clap::Subcommand)]
743-
pub enum TapCmd {
744-
/// Show summary statistics for all traces in the repo
745-
Summary {
746-
/// Emit a JSON envelope with the summary fields.
747-
#[arg(long)]
748-
json: bool,
749-
},
750-
/// Inspect a single run/trace and show extracted steps
751-
Inspect {
752-
/// Run hash to inspect (or "all" for every run)
753-
run_hash: String,
754-
},
755-
/// Diagnose recording quality for a run or all runs
756-
Diagnose {
757-
/// Run hash to diagnose (or "all" for every run)
758-
#[arg(default_value = "all")]
759-
run_hash: String,
760-
},
761-
/// Export traces as evaluation cases (JSON)
762-
Export {
763-
/// Export mode: prompt-only, with-context, agentic
764-
#[arg(long, default_value = "with-context")]
765-
mode: String,
766-
/// Output file (default: stdout)
767-
#[arg(short, long)]
768-
output: Option<std::path::PathBuf>,
769-
/// Filter by model name (substring match)
770-
#[arg(long)]
771-
model: Option<String>,
772-
/// Filter by agent id (substring match)
773-
#[arg(long)]
774-
agent: Option<String>,
775-
/// Only include runs with at least N steps
776-
#[arg(long)]
777-
min_steps: Option<usize>,
778-
},
779-
/// Show detailed statistics for a single trace
780-
TraceStats {
781-
/// Trace hash to inspect
782-
trace_hash: String,
783-
},
784-
/// Preview how a run would be exported (labeled sections)
785-
Preview {
786-
/// Run hash to preview
787-
run_hash: String,
788-
/// Export mode to preview: prompt-only, with-context, agentic
789-
#[arg(long, default_value = "agentic")]
790-
mode: String,
791-
},
792-
}
793-
794-
#[derive(clap::Subcommand)]
795-
pub enum TracesCmd {
796-
/// Browse recent traces with structured summaries (newest first)
797-
Summary {
798-
/// Maximum number of traces to show
799-
#[arg(long, default_value = "20")]
800-
limit: usize,
801-
/// Output JSON instead of human-readable
802-
#[arg(long)]
803-
json: bool,
804-
},
805-
/// Show the task structure (phase, scope, target files/symbols, task_goal)
806-
TaskStructure {
807-
/// Run hash (or trace hash)
808-
hash: String,
809-
},
810-
/// Show the target file/function context for replay or eval
811-
TargetContext { hash: String },
812-
/// Show the final artifact produced by the agent
813-
FinalArtifact { hash: String },
814-
/// Show change / preserved / restored semantic summaries
815-
Semantics { hash: String },
816-
/// Show verification commands/tests/demo steps
817-
Verification { hash: String },
818-
}
819-
820-
/// Phase 3 (v0.45+): the single `morph inspect` namespace that
821-
/// supersedes the older `morph trace`, `morph tap`, and `morph
822-
/// traces` commands. Subcommand names map roughly:
823-
///
824-
/// | new | old |
825-
/// |--------------------------------|------------------------------|
826-
/// | `inspect summary` | `tap summary` |
827-
/// | `inspect recent` | `traces summary` |
828-
/// | `inspect show <hash>` | `trace show` + `tap inspect` |
829-
/// | `inspect diagnose [<hash>]` | `tap diagnose` |
830-
/// | `inspect export ...` | `tap export` |
831-
/// | `inspect stats <trace_hash>` | `tap trace-stats` |
832-
/// | `inspect preview <run_hash>` | `tap preview` |
833-
/// | `inspect task <ref>` | `traces task-structure` |
834-
/// | `inspect target <ref>` | `traces target-context` |
835-
/// | `inspect artifact <ref>` | `traces final-artifact` |
836-
/// | `inspect semantics <ref>` | `traces semantics` |
837-
/// | `inspect verification <ref>` | `traces verification` |
714+
/// The single `morph inspect` namespace for browsing recorded
715+
/// sessions (Run + Trace pairs) and exporting them as evaluation
716+
/// cases. Introduced in Phase 3 (v0.45) and the only spelling since
717+
/// Phase 4.2 (v0.47); the predecessors `morph trace`, `morph tap`,
718+
/// and `morph traces` were removed in v0.47.
838719
#[derive(clap::Subcommand)]
839720
pub enum InspectCmd {
840721
/// Repo-wide aggregate: total runs / traces / events, event-kind

‎morph-cli/src/inspect.rs‎

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
//! Phase 3 (v0.45+): handlers for the `morph inspect` namespace,
2-
//! the consolidation of the older `morph trace`, `morph tap`, and
3-
//! `morph traces` commands. The factored handlers live here so:
1+
//! Handlers for the `morph inspect` namespace — the user-facing
2+
//! interface for browsing recorded sessions (Run + Trace pairs) and
3+
//! exporting them as evaluation cases. Introduced in Phase 3 (v0.45)
4+
//! as a consolidation of the older `morph trace`, `morph tap`, and
5+
//! `morph traces` commands; the predecessors were removed in
6+
//! Phase 4.2 (v0.47).
47
//!
5-
//! 1. `Command::Inspect` in `main.rs` dispatches via [`run_inspect`].
6-
//! 2. The deprecated `Command::Trace` / `Command::Tap` /
7-
//! `Command::Traces` arms call into the same handlers after
8-
//! printing a one-line stderr deprecation notice; the old
9-
//! behavior is preserved bit-for-bit so users can migrate at
10-
//! their own pace.
11-
//!
12-
//! The deprecated arms ride along until v0.47.
8+
//! The factored handlers also back the v0.46-deprecated `morph run`
9+
//! aliases (which still ride along as deprecated commands, slated
10+
//! for removal in v0.48).
1311
1412
use crate::cli::InspectCmd;
1513
use crate::resolve_obj_hash;
1614
use anyhow::Result;
1715
use morph_core::store::{ObjectType, Store};
1816
use morph_core::MorphObject;
1917

20-
/// Print the one-line stderr deprecation notice for an old command,
21-
/// pointing the user at the new spelling. Called from the
22-
/// deprecated `Command::Trace` / `Command::Tap` / `Command::Traces`
23-
/// dispatch arms in `main.rs`. Format chosen to match `git`'s
24-
/// own deprecation style (`warning: ...`):
18+
/// Print a one-line stderr deprecation notice for a v0.46-deprecated
19+
/// command, pointing the user at the new spelling. Called from the
20+
/// deprecated `Command::Run` / `EvalCmd::AddCase` / `EvalCmd::SuiteShow`
21+
/// / `EvalCmd::SuiteFromSpecs` arms in `main.rs`. Format chosen to
22+
/// match `git`'s own deprecation style (`warning: ...`):
2523
///
2624
/// ```text
27-
/// warning: `morph tap summary` is deprecated; use `morph inspect summary` instead (removed in v0.47).
25+
/// warning: `morph eval add-case` is deprecated; use `morph eval add` instead (removed in v0.48).
2826
/// ```
2927
pub(crate) fn deprecation_notice(old: &str, new: &str) {
3028
eprintln!(
31-
"warning: `{}` is deprecated; use `{}` instead (removed in v0.47).",
29+
"warning: `{}` is deprecated; use `{}` instead (removed in v0.48).",
3230
old, new
3331
);
3432
}

0 commit comments

Comments
 (0)