Repository navigation
feat(cli): capture terminal notes as candidates - #2801
Conversation
|
Warning Review limit reached
Next review available in: 55 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01f1097ae2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| else: | ||
| resolved_refs.append(parsed.format()) | ||
|
|
||
| normalized_scope_refs = [parse_public_ref(ref).format() for ref in scope_refs] | ||
| target_ref = resolved_refs[0] if resolved_refs else f"assertion:{assertion_id}" |
There was a problem hiding this comment.
Convert evidence refs before using them as targets
When the first --ref is a raw evidence ref such as codex-session:abc or codex-session:abc::msg, this branch appends parsed.format() to resolved_refs, and line 1160 then passes that value as target_ref to upsert_assertion. upsert_assertion normalizes target_ref with normalize_object_ref_text, so raw evidence refs fail at runtime even though --ref is documented as accepting evidence refs; project the first EvidenceRef to an object ref for the target while keeping it in evidence_refs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Resolved by tightening the Bead-defined contract in e1af2db: --ref accepts only session refs or last, so raw evidence refs cannot become assertion targets.
Adversarial self-review — iteration 1Findings fixed in
What survived scrutiny: candidates still write through the production assertion gate as private/non-injected; NOTE/CORRECTION are visible to review but not active-context claim readers; Verification: focused CLI/MCP contracts: 229 passed; |
Adversarial self-review — iteration 2Findings fixed in
What survived scrutiny: candidates remain private, non-injected, and candidate-statused; accepted candidates promote to active notes; strict session/ Verification: |
Adversarial self-review — iteration 3Finding fixed in
What survived scrutiny: a cold reviewer re-read every Bead criterion and note, the full branch diff, PR body/comments, root registration, candidate/judgment path, MCP registration/contracts, and zsh executable documentation test. It found no other substantive gap. Verification: |
Adversarial self-review — iteration 4Finding fixed in
What survived scrutiny: the real CLI/MCP parity test now asserts identical payload schema and candidate lifecycle while deliberately asserting their distinct source attribution; it reads the MCP assertion back from Verification: |
Adversarial self-review — iteration 5 (zero findings)A cold reviewer independently re-read It traced root CLI registration through the command, facade, user-tier assertion chokepoint, candidate queue/judgment/blackboard boundary; MCP registration, contracts, payload schema, and provenance; session/ |
Final acceptance-criteria matrix — polylogue-dmp
No criteria are deferred or misframed. Bead remains open as directed; PR is not merged. |
Problem: terminal observations lacked a one-line capture path into the existing judgment gate. What changed: add the note command and a facade-owned candidate writer with anchored, scoped, stdin, and bounded-input behavior. Extend the candidate read model so captured notes and corrections reach review. Compatibility/migration: no schema migration; candidates remain private and non-injected until explicit judgment. Ref polylogue-dmp. Co-Authored-By: Codex <[email protected]>
Problem: the initial note implementation was unreachable from the root CLI, accepted invalid non-session anchors, and omitted its MCP/documentation parity paths. What changed: register the command, constrain and resolve anchors at the repository root, expose the shared writer over write-role MCP, and document the optional zsh prefill widget. Compatibility/migration: note remains candidate-only and non-injected; claim continues to map to the existing decision assertion kind. Ref polylogue-dmp. Co-Authored-By: Codex <[email protected]>
Problem: Terminal note candidates appeared in ordinary blackboard reads before an operator judged them, while the documented zsh widget could lose the prior command status or interpolate history as executable shell syntax. What changed: Restrict blackboard listing to active note assertions, harden the widget's precmd ordering and zsh quoting, and add real CLI-to-MCP pending-queue parity coverage. Ref polylogue-dmp. Co-Authored-By: Codex <[email protected]>
Problem: A syntactically valid but unknown session ref reached the storage resolver and leaked its KeyError through the root CLI. What changed: Translate missing session anchors at the capture facade and prove the real CLI returns actionable feedback without a traceback. Ref polylogue-dmp. Co-Authored-By: Codex <[email protected]>
Problem: The MCP candidate route inherited the terminal CLI's local-user attribution, which erased the originating agent from durable assertion rows. What changed: Require an agent session reference for MCP candidate capture, preserve it with agent authorship through the shared facade, and prove the real user tier keeps that provenance while the CLI remains locally attributed. Ref polylogue-dmp. Co-Authored-By: Codex <[email protected]>
9f6a36d to
f6b455c
Compare
…807,2780,2790,2791,2795,2802,2806,2809 uwk3, jph5 (rigor-contracts #2783), bby.17 (web-cockpit #2793), dmp (terminal-note #2801), ra3w (basetemp-fix #2807), r4no/bkff/r2kb (extension-redesign #2780) fully satisfied — closed. nhjs (#2793), peo (daemon-forensics #2802), 4g3n (#2780), 67ac/212.11 (demo-corpus #2795), rsad (mcp-ergonomics #2790, real gaps remain per 5-iteration adversarial cap), 9e5.8.4/jnj.7 (provider-origin #2806), mrxt/37t.12/p5g/rxdo.4 (annotation-judgment #2791), s7ae.8/20d.2 (live-performance-2 #2809) partially satisfied — noted with disposition, left open. Also discovered and documented the actual root cause of this session's recurring bead-revert incidents: bd reimports the live database from .beads/issues.jsonl on every CLI invocation, so a write not immediately exported is lost the moment the next bd command runs. Every mutation in this commit was individually export-verified against that behavior. Co-Authored-By: Claude <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Adds zero-friction terminal memory capture:
polylogue noteand its write-role MCP twin create private, non-injected assertion candidates for later judgment.Problem
Terminal observations had no one-line route into the candidate-to-judgment loop, so useful operational memory either interrupted work or vanished.
Solution
polylogue noteat the root CLI with text/stdin input, bounded stdin, kind selection, session/lastanchors, repo/topic scopes, and JSON/text receipts.Polylogue.capture_assertion_candidate, which writes through the assertion chokepoint withstatus=candidateandinject:false.lastfrom the enclosing repository root and return clean errors for malformed, missing, or non-session anchors.capture_assertion_candidate; MCP requires anagent:<session>author reference while terminal CLI captures retainuser:localattribution.Acceptance criteria
lastanchors, repo/topic scopes, unanchored flagclaimmaps to the existing DECISION assertion kind)user:localvs supplied agent session)Verification
POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest devtools test tests/unit/mcp/test_candidate_capture_tool.py tests/unit/mcp/test_per_tool_contracts.py tests/unit/mcp/test_envelope_contracts.py tests/unit/cli/test_note.py— 231 passed.POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest devtools verify --quick— all 15 steps successful.user.db, candidate exclusion from blackboard reads until acceptance, repository-rootlastresolution, strict anchors, bounded stdin, and the published zsh snippet against hostile history text.Ref polylogue-dmp.