Skip to content

Commit 8781bdc

Browse files
committed
docs: prepare documentation for v0.7.2 release
1 parent c5a2d54 commit 8781bdc

File tree

8 files changed

+519
-129
lines changed

8 files changed

+519
-129
lines changed

CHANGELOG.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,70 @@ See [docs/limitations.md](docs/limitations.md).
1919

2020
---
2121

22+
## [0.7.2] - 2026-03-11
23+
24+
### Added
25+
26+
- **Git baseline comparison** ([#135](https://github.com/LogicStamp/logicstamp-context/pull/135))
27+
- New `--baseline git:<ref>` option to compare the current project against any git ref (branch, tag, commit)
28+
- Uses temporary git worktrees to generate baseline context safely
29+
- Useful for CI validation, PR reviews, and release checks
30+
31+
- **Backend API signature comparison** ([#140](https://github.com/LogicStamp/logicstamp-context/pull/140))
32+
- Detects changes in API parameters, request/response types, and return types
33+
- Displays detailed parameter-level diffs
34+
35+
- **State and module variable comparison** ([#136](https://github.com/LogicStamp/logicstamp-context/pull/136))
36+
- Detects added, removed, and changed state variables with type information
37+
- Tracks module-level variables similar to imports and hooks
38+
39+
- **Prop and emit type change detection** ([#142](https://github.com/LogicStamp/logicstamp-context/pull/142))
40+
- Detects type changes in component props and emits
41+
- Example: `~ propName: "string" → "number"`
42+
- Aligns compare command behavior with watch mode
43+
44+
- **Expanded test coverage for compare command** ([#138](https://github.com/LogicStamp/logicstamp-context/pull/138))
45+
46+
### Fixed
47+
48+
- **False drift detection in git baseline comparisons** ([#135](https://github.com/LogicStamp/logicstamp-context/pull/135), [#137](https://github.com/LogicStamp/logicstamp-context/pull/137))
49+
- Resolved issues caused by `.gitignore`, `.stampignore`, and git-ignored files
50+
- Prevents hash-only drift and incorrect “added component” detection
51+
52+
- **Deterministic hashing issues** ([#141](https://github.com/LogicStamp/logicstamp-context/pull/141))
53+
- Fixed null handling and normalized object ordering to prevent hash churn
54+
55+
### Changed
56+
57+
- **Additions no longer count as drift** ([#141](https://github.com/LogicStamp/logicstamp-context/pull/141))
58+
- Newly added components and folders are treated as growth rather than drift
59+
- Only removals and modifications trigger `DRIFT`
60+
61+
- **Improved robustness of prop, state, and API comparisons** ([#141](https://github.com/LogicStamp/logicstamp-context/pull/141))
62+
- Normalizes contract structures and filters invalid identifiers
63+
64+
### Security
65+
66+
- **Safer git command execution** ([#137](https://github.com/LogicStamp/logicstamp-context/pull/137))
67+
- Replaced `exec` with `spawn` to prevent command injection risks
68+
69+
- **Improved git ref validation and timeout handling** ([#139](https://github.com/LogicStamp/logicstamp-context/pull/139))
70+
71+
### Refactor
72+
73+
- **Modularized compare command implementation** ([#136](https://github.com/LogicStamp/logicstamp-context/pull/136))
74+
- Split the large `compare.ts` file into smaller modules for maintainability
75+
76+
### Tests
77+
78+
- **Stabilized file lock tests** ([#134](https://github.com/LogicStamp/logicstamp-context/pull/134))
79+
- Fixed race condition causing intermittent failures
80+
81+
- **Added E2E coverage for git baseline comparison** ([#143](https://github.com/LogicStamp/logicstamp-context/pull/143))
82+
- Covers branches, tags, commit hashes, cleanup behavior, and error scenarios
83+
84+
---
85+
2286
## [0.7.1] - 2026-03-05
2387

2488
### Improved
@@ -1499,7 +1563,8 @@ First public release of LogicStamp Context - a fast, zero-config CLI tool that g
14991563
---
15001564

15011565
## Version links
1502-
[Unreleased]: https://github.com/LogicStamp/logicstamp-context/compare/v0.7.1...HEAD
1566+
[Unreleased]: https://github.com/LogicStamp/logicstamp-context/compare/v0.7.2...HEAD
1567+
[0.7.2]: https://github.com/LogicStamp/logicstamp-context/releases/tag/v0.7.2
15031568
[0.7.1]: https://github.com/LogicStamp/logicstamp-context/releases/tag/v0.7.1
15041569
[0.7.0]: https://github.com/LogicStamp/logicstamp-context/releases/tag/v0.7.0
15051570
[0.6.0]: https://github.com/LogicStamp/logicstamp-context/releases/tag/v0.6.0

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,14 @@ stamp context compare --approve # update (like jest -u)
226226

227227
Useful for reviewing changes before committing or validating context is up-to-date.
228228

229-
> ⚠️ **Note:** Context files are gitignored by default. For CI-based drift detection, the `--baseline git:<ref>` option (e.g., `--baseline git:main`) is **not yet implemented**. Until automation is available, use the manual workflow: generate context from current code, checkout baseline branch, generate context from baseline, then compare. See the [roadmap](https://logicstamp.dev/roadmap) for planned automation.
229+
**Git baseline comparison** *(v0.7.2)*: Compare against any git ref:
230+
```bash
231+
stamp context compare --baseline git:main # Compare against main branch
232+
stamp context compare --baseline git:HEAD # Compare against HEAD
233+
stamp context compare --baseline git:v1.0.0 # Compare against a tag
234+
```
235+
236+
> **ℹ️ Note:** Context files are gitignored by default. Git baseline comparison uses git worktrees to generate context for both the baseline ref and the current working tree, then performs a structural contract comparison. See [docs/cli/compare.md](docs/cli/compare.md) for complete documentation.
230237
231238
## How it Works
232239

@@ -286,6 +293,8 @@ npm install -g logicstamp-mcp
286293

287294
Then configure your AI assistant to use the LogicStamp MCP Server.
288295

296+
🔗 **See [LogicStamp MCP Server Repository](https://github.com/LogicStamp/logicstamp-mcp)**
297+
289298
📋 **See [MCP Getting Started Guide](https://logicstamp.dev/docs/mcp/getting-started)** for setup instructions.
290299

291300
## Example Output

ROADMAP.md

Lines changed: 82 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ This roadmap outlines the planned features, improvements, and known limitations
44

55
## Current Status
66

7-
**Current Version:** v0.7.1 (Beta)
7+
**Current Version:** v0.7.2 (Beta)
88

99
For detailed release notes and completed features, see [CHANGELOG.md](CHANGELOG.md).
1010

1111
Recent major milestones include:
12+
- ✅ Git baseline comparison (v0.7.2) - Compare against any git ref with `--baseline git:<ref>`
13+
- ✅ Full contract comparison (v0.7.2) - State, variables, API signatures, prop/emit type changes
1214
- ✅ Strict watch mode enhancements (v0.7.1) - Session status tracking, automatic watch enablement, enhanced summaries
1315
- ✅ Developer experience improvements (v0.7.1) - Normalized path display, `--verbose` flag, watch mode file organization
1416
- ✅ Lean style mode default (v0.7.0)
@@ -404,60 +406,104 @@ These are longer-term features and improvements planned for future releases.
404406
### Comparison & Drift Detection
405407

406408
#### Git Baseline for Compare
407-
**Status:** 🔴 Not Started
409+
**Status:****Complete in v0.7.2**
410+
411+
Git-based baseline support for context comparison, enabling meaningful drift detection against known reference points.
408412

409-
Add git-based baseline support for context comparison, enabling meaningful drift detection against known reference points.
413+
**What Works (v0.7.2):**
414+
-`--baseline git:<ref>` option to compare against any local git ref
415+
- ✅ Uses git worktrees for clean isolation during comparison
416+
- ✅ Generates context for both baseline and current code, then compares
417+
- ✅ Automatic cleanup of worktrees and temp directories
418+
- ✅ Works with branches, tags, and commit hashes
410419

411420
**Current Behavior:**
412421
- ✅ Watch mode compares against previous state (rolling baseline)
413422
-`stamp context compare` compares disk files vs freshly generated
414-
- ❌ No git baseline support
423+
- `stamp context compare --baseline git:main` compares against git ref
415424

416-
**Why This Is Non-Trivial:**
417-
Context files are gitignored by design - they don't exist in git history. So git baseline can't simply "checkout context files from a ref". Instead, it must:
418-
1. Generate context from source code at the current state
419-
2. Generate context from source code at the baseline git ref
420-
3. Compare the two generated contexts
425+
**How It Works:**
426+
Context files are gitignored by design - they don't exist in git history. Git baseline generates context at two points and compares them:
421427

422-
**Planned Implementation:**
423-
- `--baseline git:HEAD` - Compare against last commit
424-
- `--baseline git:main` - Compare against main branch
425-
- `--baseline git:<ref>` - Compare against any git ref (branch, tag, commit)
426-
427-
**Under the hood:**
428428
```
429429
stamp context compare --baseline git:main
430430
431-
1. Generate context for current working tree → temp/current/
432-
2. Create git worktree at ref (or stash + checkout)
433-
3. Generate context for baseline ref → temp/baseline/
434-
4. Restore working directory
435-
5. Compare temp/baseline/ vs temp/current/
436-
6. Report drift/violations
437-
7. Cleanup temp directories
431+
1. Validate git repo and resolve ref
432+
2. Create git worktree at ref → temp/worktree/
433+
3. Generate context for baseline → .logicstamp/compare/baseline/
434+
4. Generate context for current working tree → .logicstamp/compare/current/
435+
5. Compare baseline vs current
436+
6. Report drift
437+
7. Cleanup worktree and temp directories
438438
```
439439

440-
**Implementation Considerations:**
441-
- Use `git worktree` for clean isolation (avoids disrupting working directory)
442-
- Fallback to stash/checkout if worktrees unavailable
443-
- Cache baseline context if ref hasn't changed (optimization)
444-
- Handle uncommitted changes gracefully
440+
**Implementation Details:**
441+
- Uses `git worktree` for clean isolation (avoids disrupting working directory)
442+
- Context stored in `.logicstamp/compare/` (already gitignored)
443+
- Worktrees stored in system temp directory
444+
- Automatic cleanup on success or failure
445+
446+
**Hash Behavior in Git Baseline Comparisons:**
447+
448+
Semantic hashes track meaningful structural and logical changes to components (props, emits, state, imports, hooks, functions, components). In git baseline mode, hash behavior differs from regular comparisons:
449+
450+
- **Hash-only changes are filtered**: When only the semantic hash differs (with no changes to imports, hooks, functions, components, props, emits, or exports), the hash change is ignored to prevent false positives
451+
- **Hash changes with other changes are reported**: When the hash differs AND there are other structural changes, the hash is still reported to provide context
452+
- **Why filter hash-only?** TypeScript project resolution can produce slightly different AST structures between worktree and working directory contexts (different absolute paths, module resolution contexts, or TypeScript compiler state) even for functionally identical code. Filtering hash-only changes ensures deterministic structural comparison while preserving hash information when there are real changes.
453+
454+
**Hash Behavior in Other Comparison Modes:**
455+
456+
- **Regular comparison modes** (single-file, multi-file, auto-mode): All hash changes are reported, as both sides are generated from the same environment context
457+
- **Watch mode**: Hashes are used for incremental rebuild detection and bundle hashing
458+
459+
**Why Hashes Are Still Needed:**
460+
461+
Even though hash-only changes are filtered in git baseline mode, semantic hashes are still computed and used because:
462+
- Context for real changes: When there ARE other changes, the hash provides context about what changed
463+
- Regular comparisons: In non-git-baseline comparisons, hashes are always reported
464+
- Watch mode: Hashes drive incremental rebuild detection
465+
- Bundle hashing: Bundle-level hashes depend on component semantic hashes
466+
- Contract integrity: Hashes are part of the contract structure
467+
468+
The filtering only suppresses hash-only noise in git baseline mode—hashes still provide value when there are real structural changes.
445469

446470
**Use Cases:**
447-
- PR review: "What changed in this branch vs main?"
448-
- CI integration: "Did this PR introduce breaking changes?"
449-
- Pre-commit: "Am I about to push breaking changes?"
450-
- Release validation: "What changed since last release tag?"
471+
- PR review: `stamp context compare --baseline git:main`
472+
- CI integration: `stamp context compare --baseline git:origin/main`
473+
- Release validation: `stamp context compare --baseline git:v1.0.0`
474+
- Pre-commit: `stamp context compare --baseline git:HEAD`
475+
476+
**Limitations:**
477+
- Only works with local refs (must `git fetch` first for remote branches)
478+
- No caching yet (regenerates on every run)
451479

452-
**Enables:**
480+
**Future Enhancements:**
453481
- `--fail-on-breaking` flag for `stamp context compare` (exit non-zero on breaking changes)
482+
- Baseline caching when ref hasn't changed (optimization)
483+
- Remote ref auto-fetch option
454484

455-
**Note:** Can't use `--strict` as it already exists for missing dependency checking. No need for a `--no-fail` flag - without `--fail-on-breaking`, compare just shows drift without breaking change detection.
456-
- Meaningful CI integration for contract drift detection
485+
**Impact:** Enables meaningful drift detection against stable reference points, making CI integration straightforward.
457486

458-
**Impact:** Enables meaningful drift detection against stable reference points. This is the prerequisite for CI-friendly strict mode.
487+
---
459488

460-
**Priority:** High
489+
#### Enhanced Compare Command
490+
**Status:****Complete in v0.7.2**
491+
492+
Full contract comparison support for all contract fields, aligning compare command behavior with watch mode.
493+
494+
**What Works (v0.7.2):**
495+
- ✅ State comparison - Detects added/removed/changed state variables with type information
496+
- ✅ Variables comparison - Detects added/removed module-level variables
497+
- ✅ API signature comparison - Detects changes to backend API parameters, return types, request/response types
498+
- ✅ Prop/emit type change detection - Detects when prop/emit types change (not just added/removed)
499+
- ✅ New delta types: `state`, `variables`, `apiSignature`, `propsChanged`, `emitsChanged`
500+
501+
**Prop/Emit Type Changes:**
502+
- Displays type changes as: `~ propName: "string" → "number"`
503+
- Only detected in direct file comparisons (not in git baseline mode due to TypeScript resolution differences)
504+
- Aligns with watch mode behavior
505+
506+
**Impact:** Compare command now provides comprehensive drift detection across all contract fields, matching watch mode capabilities for consistent behavior.
461507

462508
---
463509

0 commit comments

Comments
 (0)