Repository navigation
fix(prompt): show the approval card of an omp run from its npm package, and close the omp Ask review follow-ups (#2280, #2233) - #2320
Conversation
…e, and close the omp Ask review follow-ups (#2280, #2233) - agentProcesses takes bun or node running @oh-my-pi/pi-coding-agent's dist/cli.js as omp, so its approval card shows again (#2280). - An omp Ask question with a mermaid fence, or options the card would show alike, keeps the card as drawn. - A typed answer's skeleton folds Unicode confusables (ASCII-target subset of confusables.txt) after case folding: rows alike across scripts name neither; a typed row number picks its row; separators alone are the typed text. - The case folding and new confusables generators refuse a source whose SHA-256 is not the pinned one. - omp.contract.test.ts waits on herdr subscriptions instead of polling, with a contract test for the npm entry point.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
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 |
|
CodeRabbit's review is rate-limited on this PR ("Review limit reached"), so these code-review agent reviews stand in for it. Each finding is listed below with how it was resolved. omo-native-code-reviewer (adversarial, read-only) on a4a0ae5's first versionHIGH H1:
LOW findings:
Clean: pin bypass (none), skeleton idempotence (a fuzz over U+0000–U+2FFFF found 0), mermaid, contract-test races, project rules. Codex Sol 6.1 fast xhighRound 1: three MEDIUM.
Round 2, on the new code only: APPROVE. All three fixes were verified with Bun, with no new findings. After the fixes
|
|
Merging a4a0ae5 (closes #2280 and #2233). omp started from its npm package ( |
Closes #2280. Closes #2233.
What it does for the user
bin,node_modules/@oh-my-pi/pi-coding-agent/dist/cli.js, under bun or node. Before this, the foreground-ownership check from fix(prompt): read omp's approval panel over every composer shape (#2059) #2245 did not count that process as omp, so the card was hidden and the answer had to be given in the terminal.```mermaidfence keeps the card as drawn. The chat would draw a diagram where omp shows the code.Keep **production**besideKeep **prоduction**with a Cyrillicо, or Greekο, capital CyrillicРorІ, and the digit0besideo. Typing either name gives the typed answer, or is refused when the card has none.,,,or spaces alone are the typed text (or refused), never{option_indices: []}, which madeanswerKeysthrow.How
server/conversation.tsagentProcesses: recognises an agent's npm entry point (NPM_ENTRIES; only omp's for now) when bun or node runs it, likePI_NPM_ENTRYinserver/pi.ts. Python running that path is not omp.ompOwnsInput, outcome binding andagentProcessInFrontall pick from here.server/omp-ask.ts: amermaidfence in the question is undrawn, so the card stays as drawn. After a call matches, the card's option labels as the card draws them (cardDrawn, folded likespacedin promptAnswer) must be distinct; otherwise the card stays as drawn.src/lib/promptAnswer.ts:skeleton()folds case first (D146, as before), then maps every letter Unicode's confusables.txt (UTS feat: gjc chat, gjc and omo marks #39) draws like one ASCII letter or digit to it, then folds again. Folding first keeps case twins together: a capitalIstaysi.src/lib/confusables.generated.ts, 1363 entries. It holds only the subset whose target is one ASCII letter or digit.scripts/generate-confusables.ts: new; it generates that table.scripts/generate-case-folding.tsand the new script check the source's SHA-256 before parsing. Both the download and--sourceare refused when the bytes differ from the reviewed file, verified against the official 17.0.0 files.generate:confusablesis in package.json, and the regeneration steps in docs/development.md.server/omp.contract.test.ts: setup and the handoff test now wait on herdr event subscriptions instead of polling. The stand-in notes its key before it draws the screen the test waits for. A new contract test starts a stand-in at.../node_modules/@oh-my-pi/pi-coding-agent/dist/cli.jsunder bun; it names itself omp throughprctl, as omp 18.13.2 does. The test asserts the approval card. It runs on Linux only.Verification
agent-process,omp-askandpromptAnswer;conversation.tsreverted:/api/pane/promptreturnsnull;,,,→{"option_indices":[]}, while the Cyrillic and Greek twins each pick a row;bun run check fast: green, 8431 unit tests pass, 0 fail;bun run check run bun test --timeout 15000 ./server/omp.contract.test.tson the isolated herdr: 6 pass;generate:case-folding --checkandgenerate:confusables --checkboth pass.bun run build:remotebuiltherdr-web-ui-linux-x64.tgz, which carriesshared/markdown.ts.scripts/remote-bundle-smoke.tsfails on this host, and on origin/main too (no bridge descriptor there, a 404 from/api/bridgehere), so it is not evidence either way. On this PR, CI's Remote PC bundles workflow built and smoke-tested the bundle on linux-x64, linux-arm64, both macOS runners and Windows: all green.REMOTE_BUNDLE_VERSION: not raised. Per docs/development.md, a release PR raises it.Reviews
omo-native-code-reviewer: one HIGH and four LOW.
Ibecameland case twins split. Fixed by folding first; regression cases and a property that every case-folding pair keeps one skeleton are added.node --inspect …/cli.jsis not recognised. This fails safe: no card and no keys.Codex Sol 6.1 fast xhigh:
Keep API./Keep api!. Fixed.I,l, typed1). Fixed: skeleton-only look-alikes no longer block a number.Known limits (from #2233)
Keep productionvsKeep [production],Keep-production,<https://…>vs a bare URL) still share a skeleton, so typing either name gives the typed answer. Their row numbers and a click pick them.mandrn.𝐈takes its plain letter's skeleton (i), notl.omp.contract.test.ts(the stopped-omp test) already used subscriptions. Nothing else polls there now.