Repository navigation
sidecall: fall back to omp for Pi side calls and drop unknown flags - #325
Open
Emre Sırmalı (lynicis) wants to merge 2 commits into
Open
Emre Sırmalı (lynicis) wants to merge 2 commits into
Emre Sırmalı (lynicis) wants to merge 2 commits into
Conversation
When pi_cli is unset, resolve the Pi executable via pi on PATH first, then oh-my-pi's omp on PATH (or bare omp when OMPCODE is set), falling back to pi so missing-CLI errors stay unchanged. Generalize pi_call's flag retry from --no-mcp alone to all --flags named as unknown options/flags in stderr, so oh-my-pi's multi-flag error (--no-prompt-templates, --no-mcp) strips both and succeeds in one retry. Document oh-my-pi (omp 19.1.1, experimental) and pi_cli fallback behavior, and cover both behaviors in tests/test_live_core.py.
Author
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pi_cliis unset,_host_call("pi", ...)defaulted to"pi", so side calls (the micro-skills proposer and the loop guard's judge/redirect writer) failed in oh-my-pi (omp) environments wherepiis not onPATH.pi_call()only retried whenstderrcontainedUnknown option: --no-mcp. oh-my-pi rejects unsupported Pi flags together on one line (Error: unknown flags: --no-prompt-templates, --no-mcp), causing side calls onompto fail rather than dropping unknown flags and retrying.Fix
sidecall.pi_cli()intokeneconomizer/plugin/sidecall.py: preferpionPATH, fall back toomponPATH(or bare"omp"whenOMPCODEis set), and otherwise return"pi"so missing-CLI errors stay unchanged.pi_call()flag stripping via_unknown_flags(stderr): extract all--flagnames reported on anunknown option(s)/unknown flag(s)line instderr, omit them from the flag list, and retry without a separate--helpsubprocess probe.omp19.1.1) support inREADME.mdandpi_clifallback / unknown-flag handling inplugin/README.md.Verification
tests/test_live_core.py:test_a_pi_side_call_drops_every_flag_the_cli_reports_unknowntest_a_pi_side_call_prefers_pi_and_falls_back_to_oh_my_pi_s_omppytest tests/test_live_core.py: 318 passed.testsandexperiments/tests): 1,792 passed, 46 skipped (only the 3 pre-existing local marketplace install-copy failures intests/test_plugin_package.py, unchanged frommain).python scripts/dead_code.py --json(no new findings) andgit diff --check(clean).