Repository navigation
Ship installer onboarding and evidence loop - #16
Conversation
…0.10 Add installer and terminal onboarding
…0.10 Add TUI palette, agent awareness, and evidence loop
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a POSIX ChangesInstaller, Onboarding, Evidence, and TUI Theme
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant InstallScript as install.sh
participant Cargo
participant TreeRingCLI as tree-ring welcome
participant AgentAwareness as agent_awareness
User->>InstallScript: run install.sh [--project] [--init]
InstallScript->>Cargo: cargo install --path/--git tree-ring-memory-cli
Cargo-->>InstallScript: binary installed
InstallScript->>TreeRingCLI: invoke welcome --init --no-animation
TreeRingCLI->>TreeRingCLI: open/initialize SQLite store
TreeRingCLI->>AgentAwareness: ensure_agent_awareness(root)
AgentAwareness-->>TreeRingCLI: AgentAwarenessReport (created/existing)
TreeRingCLI-->>User: print welcome summary + next commands
sequenceDiagram
participant User
participant CLI as tree-ring-memory-cli
participant EvidenceLogic as evidence_event
participant Store as SQLite store
User->>CLI: tree-ring evidence --outcome promoted --evidence-ref <ref>
CLI->>EvidenceLogic: build MemoryEvent(outcome, evidence_ref, score, tags)
EvidenceLogic->>EvidenceLogic: validate fields, map outcome to ring/type/salience
EvidenceLogic-->>CLI: MemoryEvent
CLI->>Store: persist event
Store-->>CLI: confirmation
CLI-->>User: print ring, summary, evidence reference
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Code Review
This pull request bumps the project version to 0.10.0, introducing a POSIX installer script (install.sh), a Rust-native welcome onboarding command, and an evidence-driven improvement loop via the evidence command. The TUI has also been updated with a unified theme module. The review feedback identifies several portability and reliability issues: a non-portable sub-second sleep command and an unsafe $HOME reference under set -u in install.sh, a potential database initialization failure in welcome.rs due to directory creation order, and unquoted paths with spaces in the shell_path helper of agent_awareness.rs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| for pulse in "*" "+" "*" "+"; do | ||
| printf '\033[2J\033[H' | ||
| ring_frame "$pulse" | ||
| sleep 0.08 |
There was a problem hiding this comment.
The sleep 0.08 command is not portable in standard POSIX sh (which only guarantees integer seconds) and will fail on systems with strict POSIX-compliant sleep implementations (such as Alpine Linux/busybox without fancy sleep enabled). Since set -e is active, this failure will cause the entire installation script to exit immediately.
Consider redirecting stderr and appending a fallback or ignoring the error so the installation doesn't crash on non-GNU/non-BSD systems.
| sleep 0.08 | |
| sleep 0.08 2>/dev/null || : |
| if [ "$INSTALL_SCOPE" = "project" ]; then | ||
| printf '%s' ".tree-ring" | ||
| else | ||
| printf '%s' "$HOME/.local" |
There was a problem hiding this comment.
Under set -u, if the HOME environment variable is not set (which can happen in certain minimal, containerized, or non-interactive environments), referencing $HOME directly will cause the script to crash with an unbound variable error.
Using ${HOME:-} provides a safe fallback.
| printf '%s' "$HOME/.local" | |
| printf '%s' "${HOME:-}/.local" |
| SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?; | ||
| let awareness = ensure_agent_awareness(root)?; |
There was a problem hiding this comment.
If the parent directory specified by root does not exist yet, calling SQLiteMemoryStore::open(&db_path) first will fail with a SQLite error (e.g., "unable to open database file").
Swapping these calls so that ensure_agent_awareness(root) runs first guarantees that the parent directory is created before SQLite attempts to open or create the database file.
| SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?; | |
| let awareness = ensure_agent_awareness(root)?; | |
| let awareness = ensure_agent_awareness(root)?; | |
| SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?; |
| fn shell_path(path: &Path) -> String { | ||
| path.display().to_string() | ||
| } |
There was a problem hiding this comment.
The shell_path helper in agent_awareness.rs does not quote paths containing spaces, unlike the implementation in welcome.rs. If the project path contains spaces, the generated commands in AGENTS.md will be malformed and fail when executed in a shell.
Align the implementation with welcome.rs to handle paths with spaces correctly.
fn shell_path(path: &Path) -> String {
let value = path.display().to_string();
if value.contains(' ') {
format!("'{value}'")
} else {
value
}
}
Summary:
.tree-ring/: AGENTS.md, SKILL.md, and CLI.md.tree-ring evidencefor the Revolve-inspired evidence loop with promoted/rejected/deferred/observed outcome mapping.Verification:
Notes:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation