Skip to content

Fix default activation paths and unconfigured harness status - #64

Merged
TerminallyLazy merged 2 commits into
mainfrom
codex/fix-relative-activation-root
Sep 15, 2026
Merged

TerminallyLazy merged 2 commits into
mainfrom
codex/fix-relative-activation-root

Conversation

@TerminallyLazy

@TerminallyLazy TerminallyLazy commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Tree Ring 0.15.7 rejected integrations activate, link, and deactivate with default arguments because .tree-ring differed lexically from ./.tree-ring. Compare absolute lexical paths without following symlinks, preserving descriptor-relative filesystem checks and rejection of other stores.

Status now keeps a detected but unconfigured harness in needs-user-review when create-only initialization preserves an existing project instruction file. Document the separate roles of the root and memory-store AGENTS.md files. Bump the runtime to 0.15.8.

Validation: both new acceptance regressions failed before the fix and pass afterward; 552 workspace tests pass, including path variants, existing-instruction preservation, native hook capture/recall, and filesystem protection checks. Formatting, package/ZIP validation, installer syntax, and diff checks pass.

Review follow-up: missing-bridge review applies only to detected harness candidates; marker-free status remains non-mutating and does not request spurious review.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f2d2fc6a-0361-4adf-ac8c-5ec70a09232e

📥 Commits

Reviewing files that changed from the base of the PR and between 7d7e943 and 55c386e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • Cargo.toml
  • crates/tree-ring-memory-cli/src/actions/integrations.rs
  • crates/tree-ring-memory-cli/src/activation/bridge.rs
  • crates/tree-ring-memory-cli/tests/harness_activation_acceptance.rs
  • docs/protocol/harness-activation.md
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-relative-activation-root

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix activation path equivalence and unconfigured harness status

🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Accept equivalent relative and absolute paths for the project-local activation store.
• Keep detected harnesses without managed activation records in needs-user-review.
• Document instruction-file boundaries and release the fixes as version 0.15.8.
Diagram

graph TD
  A["Integration Command"] --> C{"Same Local Store?"}
  C -- Yes --> D["Bridge Operation"]
  C -- No --> E["Reject Request"]
  F["Status Detection"] --> G{"Activation Record?"}
  G -- Yes --> H["Receipt State"]
  G -- No --> I["Needs Review"]
Loading
High-Level Assessment

The current approach is appropriate: absolute lexical comparison accepts equivalent path spellings without following symlinks, preserving existing descriptor-relative filesystem protections. Using manifest presence to distinguish an installed bridge from a merely detected adapter also keeps status aligned with create-only initialization. Filesystem canonicalization was considered but would weaken the intended no-follow boundary and require paths to exist.

Files changed (6) +134 / -7

Bug fix (2) +29 / -3
integrations.rsKeep unconfigured detected harnesses under review +9/-2

Keep unconfigured detected harnesses under review

• Treats a detected, apparently configured harness without a manifest activation record as missing its managed bridge. Status now reports 'needs-user-review' and provides reconciliation guidance instead of implying successful configuration.

crates/tree-ring-memory-cli/src/actions/integrations.rs

bridge.rsCompare activation roots using absolute lexical paths +20/-1

Compare activation roots using absolute lexical paths

• Validates the requested memory root against the project-local '.tree-ring' path after absolute lexical resolution without canonicalizing symlinks. Adds unit coverage confirming alternate stores and parent traversal remain rejected.

crates/tree-ring-memory-cli/src/activation/bridge.rs

Tests (1) +90 / -0
harness_activation_acceptance.rsCover equivalent roots and preserved instruction status +90/-0

Cover equivalent roots and preserved instruction status

• Adds acceptance coverage for activate, link, and deactivate across relative, trailing-slash, and absolute project paths. Also verifies create-only initialization preserves an existing root 'AGENTS.md', omits unmanaged hooks, and retains 'needs-user-review'.

crates/tree-ring-memory-cli/tests/harness_activation_acceptance.rs

Documentation (1) +11 / -0
harness-activation.mdClarify path equivalence and instruction ownership +11/-0

Clarify path equivalence and instruction ownership

• Documents equivalent project-local root spellings and continued rejection of other stores and symlinked targets. Clarifies the separate roles of root and memory-store 'AGENTS.md' files and the review state for missing activation records.

docs/protocol/harness-activation.md

Other (2) +4 / -4
Cargo.lockLock workspace crates at version 0.15.8 +3/-3

Lock workspace crates at version 0.15.8

• Updates the resolved versions of the CLI, core, and SQLite workspace packages to 0.15.8.

Cargo.lock

Cargo.tomlBump the workspace release to 0.15.8 +1/-1

Bump the workspace release to 0.15.8

• Advances the shared workspace package version from 0.15.7 to 0.15.8 for the bug-fix release.

Cargo.toml

@qodo-code-review

qodo-code-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Clean projects show false warnings ✓ Resolved 🐞 Bug ≡ Correctness
Description
status defines missing_bridge without checking whether the harness was actually detected, so
marker-free Codex and Claude Code entries become NeedsUserReview. This occurs on clean projects
because maintained adapters default to ConfiguredAwaitingProof even when their scan status is
Available, and the suggested init command then skips them because initialization accepts only
detected candidates.
Code

crates/tree-ring-memory-cli/src/actions/integrations.rs[R133-134]

+            let missing_bridge = activation.is_none()
+                && detected.state == ActivationState::ConfiguredAwaitingProof;
Evidence
Status processes every scanned adapter, while Codex and Claude Code are maintained adapters whose
state is always ConfiguredAwaitingProof; absent markers only change their scan status to
Available. Initialization filters integrations through is_candidate(), which accepts only
Detected, proving that the new condition both misclassifies these entries and recommends a command
that will not configure them.

crates/tree-ring-memory-cli/src/actions/integrations.rs[117-134]
crates/tree-ring-memory-cli/src/activation/adapters.rs[342-345]
crates/tree-ring-memory-cli/src/activation/adapters.rs[394-414]
crates/tree-ring-memory-cli/src/activation/adapters.rs[629-644]
crates/tree-ring-memory-cli/src/main.rs[1369-1386]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The missing-bridge condition marks marker-free Codex and Claude Code integrations for user review and recommends initialization even though initialization skips integrations whose scan status is `Available`.

## Fix Focus Areas
- crates/tree-ring-memory-cli/src/actions/integrations.rs[130-134]

## Recommended Fix
Require `detected.is_candidate()` (or equivalently a `Detected` integration status) when calculating `missing_bridge`, and add coverage proving marker-free maintained harnesses retain their normal state while detected harnesses without activation records remain in review.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Cross-repo context — repo relationships
  Explored: repo: TerminallyLazy/tree-ring-memory-agent-zero (sha: e8712174)
  Explored: repo: TerminallyLazy/tree-ring-memory-codex-plugin (sha: 2f0adc25)
  Explored: repo: TerminallyLazy/tree-ring-memory-claude-plugin (sha: 0e55ec03)
Review mode: ⚖️ Balanced: This changes path-validation behavior and harness activation/status state handling across multiple code paths, with filesystem-boundary and initialization semantics that warrant a complete review.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread crates/tree-ring-memory-cli/src/actions/integrations.rs Outdated
@TerminallyLazy
TerminallyLazy merged commit db2034a into main Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant