Skip to content

Add harness certification matrix#32

Merged
TerminallyLazy merged 12 commits into
mainfrom
codex/harness-certification-matrix
Jul 9, 2026
Merged

Add harness certification matrix#32
TerminallyLazy merged 12 commits into
mainfrom
codex/harness-certification-matrix

Conversation

@TerminallyLazy

@TerminallyLazy TerminallyLazy commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add tree-ring integrations certify to generate non-mutating harness evidence for Codex, Claude Code, OpenCode, Goose, Pi, and Agent Zero/A0.
  • Write deterministic target/tree-ring-certification/harness/*.json records and merge them into evidence-index.json without replacing metrics.json certification semantics.
  • Surface per-harness pass/fail/skip rows in TUI /evidence, and document the command/output paths and skip-state truthfulness.

Certification Evidence

  • Release binary: 6,292,960 bytes
  • Project install: 6,216KB
  • Global install: 6,172KB
  • 10k recall avg/max: 3.409ms / 6.210ms
  • 30k recall avg/max: 7.711ms / 13.922ms
  • Harness matrix fixture: pass_count=5, fail_count=0, skip_count=1
  • Harness states: Codex, Claude Code, OpenCode, Goose, Agent Zero/A0 pass; Pi skip from isolated home-only marker

Verification

  • cargo fmt --check
  • cargo test --locked
  • cargo clippy --locked --all-targets
  • git diff --check
  • sh scripts/certify-tree-ring.sh

Summary by CodeRabbit

  • New Features
    • Added tree-ring integrations certify to generate non-mutating harness certification evidence with JSON/human-readable reporting.
    • Enhanced the evidence TUI to display per-harness status rows and a “Harness matrix” section.
  • Documentation
    • Updated README and architecture docs to document the certification command, evidence output/index locations, and skip/pass semantics.
    • Added a Phase 2 implementation plan for the harness certification matrix workflow.
  • Tests
    • Added unit and rendering test coverage for pass/fail/skip behavior, evidence index handling, and TUI harness matrix presentation.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 10691aab-1006-4703-9cee-54db6aaa9d26

📥 Commits

Reviewing files that changed from the base of the PR and between a7aba54 and 75cb61c.

📒 Files selected for processing (1)
  • crates/tree-ring-memory-cli/src/harness_evidence.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/tree-ring-memory-cli/src/harness_evidence.rs

📝 Walkthrough

Walkthrough

This PR adds a harness certification workflow: a new CLI command generates per-harness evidence JSON and an evidence index, the TUI shows harness status rows and a matrix, the certification script runs and verifies the new output, and the README and architecture docs describe the workflow.

Changes

Harness Certification Matrix

Layer / File(s) Summary
Harness evidence data model and certification logic
crates/tree-ring-memory-cli/src/harness_evidence.rs, crates/tree-ring-memory-cli/Cargo.toml
Defines request/report/probe record types, certify_harnesses, guidance inspection, marker mapping, index merge/rollup logic, unit tests, and adds chrono.
CLI subcommand and output formatting
crates/tree-ring-memory-cli/src/main.rs
Adds integrations certify, routes it before store creation, formats report output, and tests certification behavior and output contracts.
TUI evidence rendering for harness matrix
crates/tree-ring-memory-cli/src/tui/render.rs
Adjusts Evidence-mode layout, renders per-harness probe rows and a Harness matrix section, and adds related tests.
Script integration and documentation
scripts/certify-tree-ring.sh, README.md, docs/architecture/rust-core-status.md, docs/superpowers/plans/...
Moves guidance files under .tree-ring/, runs and validates integrations certify, and documents the workflow.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant tree-ring CLI
  participant certify_harnesses
  participant Filesystem
  participant TUI

  User->>tree-ring CLI: tree-ring integrations certify --source-root .
  tree-ring CLI->>certify_harnesses: HarnessCertificationRequest
  certify_harnesses->>Filesystem: scan markers and read .tree-ring guidance
  certify_harnesses->>Filesystem: write harness/<id>.json
  certify_harnesses->>Filesystem: merge evidence-index.json
  certify_harnesses-->>tree-ring CLI: HarnessCertificationReport
  User->>TUI: open /evidence view
  TUI->>Filesystem: read evidence-index.json
  TUI-->>User: render harness matrix rows
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the harness certification matrix and related evidence flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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/harness-certification-matrix

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements Phase 2 of the Tree Ring Harness Certification Matrix, introducing the tree-ring integrations certify CLI command to generate non-mutating harness compatibility evidence for several agent frameworks. It adds the harness_evidence module to handle probe records, updates the TUI to render the harness matrix under the /evidence view, and integrates these checks into the repository's certification script. The feedback suggests two key improvements in harness_evidence.rs: first, updating merge_harness_index to insert or update entries in the index.harness map rather than completely overwriting it, which prevents losing existing records; second, converting the markdown guidance text to lowercase before checking for commands to make the detection case-insensitive and more robust.

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.

Comment on lines +222 to +237
index.harness = records
.iter()
.map(|record| {
(
record.harness_id.clone(),
EvidenceRecordRef {
category: "harness".to_string(),
status: record.status,
label: record.name.clone(),
path: PathBuf::from(format!("harness/{}.json", record.harness_id)),
summary_path: None,
generated_at: record.generated_at.clone(),
},
)
})
.collect::<BTreeMap<_, _>>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation of merge_harness_index completely overwrites the index.harness map with the newly certified harnesses. If there are other harness records already present in evidence-index.json (either from manual additions or other tools), they will be lost. To align with the PR description of merging records, we should insert/update the map entries instead of replacing the entire map.

    for record in records {
        index.harness.insert(
            record.harness_id.clone(),
            EvidenceRecordRef {
                category: "harness".to_string(),
                status: record.status,
                label: record.name.clone(),
                path: PathBuf::from(format!("harness/{}.json", record.harness_id)),
                summary_path: None,
                generated_at: record.generated_at.clone(),
            },
        );
    }

Comment on lines +193 to +199
HarnessGuidanceEvidence {
agents_md,
skill_md,
cli_md,
recall_guidance: combined.contains("tree-ring recall"),
remember_guidance: combined.contains("tree-ring remember"),
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The check for guidance commands is currently case-sensitive. If a user capitalizes the commands in their markdown documentation (e.g., Tree-ring recall or TREE-RING REMEMBER), the certification will fail or skip incorrectly. Converting the combined string to lowercase before performing the contains checks makes the detection significantly more robust.

    let combined_lower = combined.to_lowercase();
    HarnessGuidanceEvidence {
        agents_md,
        skill_md,
        cli_md,
        recall_guidance: combined_lower.contains("tree-ring recall"),
        remember_guidance: combined_lower.contains("tree-ring remember"),
    }

@TerminallyLazy TerminallyLazy merged commit 774975d into main Jul 9, 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