| name | audit-open-grok-parity |
| description | Audit and verify feature, security, protocol, and TUI parity between Rust open-grok (reference pin 650c1db7) and swift-open-grok. Use when evaluating what is live vs unwired vs absent, proving protocol compatibility, or finding behavioral gaps before/after porting waves. |
Audit Open Grok Parity
Instructions for performing systematic parity audits between the upstream Rust reference open-grok (at pinned commit 650c1db7 or the location that houses the Rust repository) and the Swift port swift-open-grok (or the local directory that houses the Swift repository).
1. Golden Rule: Enumerate from Rust First
Auditing from the Swift port's perspective only reveals what someone set out to build; it cannot find what nobody claimed.
- Locate the reference repository:
- Reference source:
github.com/mweinbach/open-grok (or the location that houses the Rust repository, e.g. ../open-grok or ../grok-build).
- Current reference pin:
650c1db7c2e73c59cec88bf3c6359751d6cef1bd (recorded in PORT_STATUS.md).
- Inspect Rust reference code directly:
git show 650c1db7:crates/codegen/<crate>/src/<file>.rs
git grep -n "<pattern>" 650c1db7 -- crates/codegen/
- Map Rust crate to Swift target:
2. The Four Parity Classifications
Every audited feature must be classified using the standard ledger conventions:
| Classification | Meaning | Rule |
|---|
| LIVE | Reachable from the running open-grok binary, TUI, or CLI. | Must be connected through Sources/OpenGrokCLI (LiveComposition.swift / LiveInteractiveControllerRenderer.swift). |
| IMPLEMENTED-UNWIRED | Implemented and unit-tested in a Swift target, but NOT wired into the CLI entry point. | Document as unwired; do NOT claim live. |
| ABSENT | Feature or flag does not exist in the Swift codebase. | Document as absent with reference Rust file:line. |
| DIVERGED | Deliberate behavioral or architectural divergence. | Must record the rationale and trade-offs in PORT_STATUS.md. |
3. Seven Audit Domains Checklist
A. Session & Agent Runtime (OpenGrokShell, OpenGrokSessionRuntime)
B. Tools & Execution (OpenGrokToolRegistry, OpenGrokFileTools, OpenGrokExecutionTools)
C. Workspace, Permissions & Sandbox (OpenGrokWorkspace, OpenGrokSandbox)
D. TUI & Terminal Protocol (OpenGrokPager, OpenGrokTerminalCore)
E. Multi-Provider & Auth Isolation (OpenGrokSampler, OpenGrokAuth)
F. ACP, MCP & Code Mode (OpenGrokACPRuntime, OpenGrokCodeMode)
G. Config, CLI & Paths (OpenGrokConfig, OpenGrokPaths)
4. Ledger Documentation Standard
When recording audit results in PORT_STATUS.md or PARITY_ROADMAP.md:
- Cite exact
file:line in both Rust reference and Swift codebase.
- Include dated verification evidence:
- Exit codes.
- Swift Testing test and suite counts (e.g.
6,470 tests / 1,017 suites / 106 summaries, exit 0).
- Isolated CLI smoke proofs (
verify-open-grok run id).
- Never claim CI green based solely on local macOS runs.