Repository navigation
Fix OMP spaced-colon working title detection after owner rewrite - #17723
shahidbeig-a11y wants to merge 4 commits into
Conversation
Greptile SummaryThe PR preserves OMP identity and working status after rewriting the WSL/ConPTY
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/shared/agent-title-identity.ts | Adds exact-case OMP identity recognition for the rewritten spaced-colon title protocol. |
| src/shared/agent-title-owner.ts | Rewrites Pi-compatible spaced-colon brands in place while preserving the semantic title label. |
| src/shared/pi-compatible-synthetic-title.ts | Extends separator parsing so spaced colons represent the Pi-compatible working state. |
| src/shared/omp-pi-semantic-title-preservation.test.ts | Covers raw and rewritten spaced-colon status, identity, preservation, and idempotence behavior. |
Reviews (3): Last reviewed commit: "Pin session label in OMP spaced-colon fi..." | Re-trigger Greptile
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds spaced-colon support for OMP/Pi synthetic titles. The parser classifies Merge Risk: ⚪ Minimal · up to The parser now recognizes spaced-colon working titles for OMP, π, and Pi, preserving working status and identity after owner rewriting. This is a localized title-classification change with regression coverage and no execution, access-control, storage, service, or deployment behavior changes; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue
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.
Important
The getAgentLabel change breaks the owner-rewrite fixed-point invariant — a second rewrite pass collapses OMP : <label> to ⠋ OMP and drops the session label. Details inline.
Reviewed changes
- Separator status:
PI_COMPATIBLE_SEPARATOR_REnow accepts a spaced:andgetPiCompatibleTitleSeparatorStatusmapsmatch[1] === ':'toworking, soπ : <label>andOMP : <label>classify as working. - OMP identity:
getAgentLabelreturnsOMPfor anOMP :-prefixed title. - Regression tests: new coverage for the raw
π :and rewrittenOMP :titles, plus spaced-colon entries in the classifier and owner-relabel tables.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 960ebf31-6a77-4560-a550-be01f162ec91
📥 Commits
Reviewing files that changed from the base of the PR and between 36d2750 and c660e0c46fb57cba21c7cdb6ef110432ac076982.
📒 Files selected for processing (2)
src/shared/agent-title-owner.tssrc/shared/omp-pi-semantic-title-preservation.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| @@ -170,6 +172,11 @@ export function normalizeCompatibleAgentTitleForOwner( | |||
| const segmentAt = title.lastIndexOf(source.sourceTitle) | |||
| return segmentAt === -1 ? ownedSegment : title.slice(0, segmentAt) + ownedSegment | |||
| } | |||
| if (PI_COMPATIBLE_SPACED_COLON_TITLE_RE.test(source.sourceTitle)) { | |||
| const ownedSegment = source.sourceTitle.replace(/^\s*(?:Pi|OMP)/u, ownerProfile.workingLabel) | |||
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -eu
echo '--- scoped repository knowledge ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print \
| sort
for f in /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/*/*.md; do
[ -f "$f" ] || continue
echo "--- $f ---"
cat "$f"
done
echo '--- target outline ---'
ast-grep outline src/shared/agent-title-owner.ts
echo '--- target implementation ---'
cat -n src/shared/agent-title-owner.ts | sed -n '1,240p'
echo '--- directly bound symbols and tests ---'
rg -n -C 4 \
"getProfileForTitle|getAgentLabel|isLegacyPiCompatibleTitle|workingLabel|Pi :|π" \
src test tests 2>/dev/null || trueRepository: stablyai/orca
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -eu
echo '--- target file ---'
cat -n src/shared/agent-title-owner.ts | sed -n '1,245p'
echo '--- bound helper locations ---'
rg -n --glob '*.ts' \
"export function getAgentLabel|function getAgentLabel|export function isLegacyPiCompatibleTitle|function isLegacyPiCompatibleTitle|export function getSyntheticAgentTitleProfile|SYNTHETIC_AGENT_TITLE_PROFILES" \
src/shared
echo '--- agent detection helper ---'
agent_file="$(rg -l --glob '*.ts' "export function getAgentLabel|function getAgentLabel" src/shared | head -n 1)"
[ -n "$agent_file" ]
cat -n "$agent_file" | sed -n '1,220p'
echo '--- Pi compatibility helper ---'
pi_file="$(rg -l --glob '*.ts' "export function isLegacyPiCompatibleTitle|function isLegacyPiCompatibleTitle" src/shared | head -n 1)"
[ -n "$pi_file" ]
cat -n "$pi_file" | sed -n '1,220p'
echo '--- focused tests ---'
rg -n -C 8 --glob '*.{test,spec}.ts' \
"agent-title-owner|getProfileForTitle|getAgentLabel|isLegacyPiCompatibleTitle|normalizeCompatibleAgentTitleForOwner|Pi :|π :" \
srcRepository: stablyai/orca
Length of output: 50370
Fix Pi : title detection before the re-ownership branch.
getAgentLabel('Pi : Run a long task') returns null: its Pi-compatible matcher accepts only bare/status labels, while isLegacyPiCompatibleTitle accepts only π titles. Therefore getProfileForTitle finds no profile, and the line-176 replacement cannot run. Add detection support and a π → Pi → OMP round-trip test.
There was a problem hiding this comment.
ℹ️ No critical issues — the fixed-point collapse from the prior review is resolved. Two minor suggestions inline.
Reviewed changes
- Fixed-point restore:
normalizeCompatibleAgentTitleForOwnernow swaps the brand in place for spaced-colonOMP : <label>titles before thesourceStatus === 'working'collapse, so a second owner-rewrite pass keepsOMP : Run a long taskinstead of collapsing it to⠋ OMP. - Regression tests: added
π :andOMP :spaced-colon entries to the fixed-point re-run table.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Stronger fixed-point assertion: the fixed-point re-run test now also asserts the session label survives for the
π :/OMP :spaced-colon entries, so theOMP : Run a long taskcase fails on the pre-fix collapse to⠋ OMPinstead of passing on it.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
This fixes the working Before the first turn, the owner-rewritten title is detectAgentStatusFromTitle('OMP > New OMP session') // 'idle'
getAgentLabel('OMP > New OMP session') // nullBecause Could this PR generalize the fix instead of special-casing only
This also removes the current identity/status asymmetry instead of adding another delimiter-specific branch. |
OMP 17.2.12+ emits π : <label> on WSL/ConPTY. Orca rewrites the brand to OMP : <label>, but getPiCompatibleTitleSeparatorStatus only matched an attached colon or spaced !/>/- separators — not spaced colon after OMP. That dropped title-derived working status and OMP identity, so hook-less panes fell back to a green active dot (stablyai#17690).
Re-running normalizeCompatibleAgentTitleForOwner on OMP : <label> was collapsing to a bare working label because getAgentLabel now recognizes the rewritten form. Route Pi/OMP spaced-colon titles through the same in-place brand swap as π-form titles instead of the bare-label path.
Derive OMP/Pi identity from the same separator grammar used for status (>, !, -, spaced :, attached :), use it in getAgentLabel, and preserve all ASCII separator titles in place during owner rewrite so idle sessions like OMP > <label> row before the first turn (stablyai#17690).
f5b0bd8 to
bc79ffb
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The delta since the prior review generalizes Pi/OMP separator detection from the spaced-colon special case to the full π/Pi/OMP separator grammar.
- Centralized separator-brand detection: added
getPiCompatibleTitleSeparatorBrandinpi-compatible-synthetic-title.ts, returningPi/OMPfor anyπ/Pi/OMPtitle carrying a:,!,>, or-separator (null when a braille spinner is present);getAgentLabelnow consumes it in place of the oldOMP :-only regex. - Generalized owner rewrite: replaced
PI_COMPATIBLE_SPACED_COLON_TITLE_REwithisPiCompatibleAsciiSeparatorTitle, so the in-place brand swap coversOMP > New OMP sessionand the other ASCII-branded idle/attention titles, not justOMP : <label>. - Regression coverage: added an idle-separator sidebar-row test and an
OMP > New OMP sessionfixed-point entry that pin the newly recognized identity and owner-rewrite surface.
Verified the changed suites pass (176 tests across the four touched test families).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
@euclodius thanks — addressed in bc79ffb. That commit derives Pi/OMP identity from the same compatible separator grammar ( |
|
Current main already contains the broader fix in merged commit (fixes #17690), with rendered spaced-colon title tests and owner-rewrite identity preservation. It also covers the idle gap noted in the issue. Closing this conflicting duplicate; credit to the original author for the separator/identity direction. |
|
Correction: Current main already contains the broader fix in merged commit 8bb48041a92, which fixes #17690 with rendered spaced-colon title tests and owner-rewrite identity preservation. It also covers the idle OMP greater-than title gap noted in the issue. This stale conflicting branch is superseded; credit to the original author for the separator and identity direction. |

ELI5
When OMP is working on WSL, its pane title looks like
π : Run a long task. Orca rewrites that toOMP : Run a long taskfor display, but the status parser only recognized the spaced colon while the brand was stillπ. After the rewrite, Orca stopped seeing the pane as working and the sidebar fell back to a green active dot.What Changed
getPiCompatibleTitleSeparatorStatusto treatOMP : <label>(and the equivalentπ/Piforms) as a working state marker, matching the existingπ :protocol.getAgentLabelto recognizeOMP : <label>as OMP identity so title-derived sidebar rows survive the owner rewrite.π :title and the rewrittenOMP :title.Why
OMP 17.2.12+ emits static
π : <label>markers on WSL/ConPTY instead of braille frames. Orca's owner rewrite swapsπ→OMPin place, but the compatible separator regex only matched an attached colon or spaced!/>/-— not spaced colon afterOMP. Hook-less panes then lost title-derived working status and identity (#17690).Linked Issue
Fixes #17690
Visual Proof
N/A — title parsing fix only; no UI layout or styling change. The sidebar spinner vs green-dot behavior is driven by this detection path.
Testing
pnpm test src/shared/omp-pi-semantic-title-preservation.test.ts src/shared/pi-state-title-marker.test.ts src/shared/agent-detection.test.tspnpm tcpnpm run check:code-quality:changeddetectAgentStatusFromTitle('OMP : Run a long task')now returnsworkingandgetAgentLabelreturnsOMPPlatforms: logic-only shared module change; no platform-specific code paths touched.
AI Disclosure
Implemented by Cursor Cloud Agent.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)