Skip to content

Add capability-checked Pi model and thinking options - #15

Merged
fakoli merged 8 commits into
mainfrom
codex/pi-run-options-20261112
Nov 12, 2026
Merged

fakoli merged 8 commits into
mainfrom
codex/pi-run-options-20261112

Conversation

@fakoli

@fakoli fakoli commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Add optional provider/model and thinking choices to coordination task v2; omitted choices keep the configured default. Native Pi RPC checks the exact available selection and effective readback before a task prompt. Unsupported or clamped choices refuse without fallback. Add private, idempotent default-profile registration and metadata-only capability discovery; bump the plugin to 0.2.0.

Review repairs preserve exact provider/model pairs, isolate RPC diagnostics from check names, and let discovery report the actual idle model without applying profile defaults. Registration and the native extension agree on bounded qualified model syntax, including slash-bearing names. Historical recovery retains old model selectors. Version 1 task identifiers retain their 80-character/no-colon boundary and reject run options; the separate historical native run identifier retains its 128-character grammar.

Validation on d0de41f72a56862fc27d7add694d90c1e85b5878:

  • Four fresh native captures passed: 75 Python tests, 19 extension tests, six repository tests, and diff check. Zero ResourceWarnings; owned capture processes stopped.
  • Actual Python-to-JavaScript tests cover public/native version boundaries, long qualified defaults, exact-pair ambiguity, malformed input and historical recovery without model/check reexecution. Earlier failed revisions and captures remain retained.
  • Exact tracked source and the complete outgoing commit range have zero secret-scan findings, using pinned default rules with no exclusions. No new dependencies, credentials, operator files or evidence attachments.

Retained actual-runtime evidence is tied to earlier source 67e7399: Pi 0.87.1 with GLM in NVIDIA OpenShell completed default-low and explicit-medium edit assignments, each passing 14 frozen sandbox checks and 14 checks on returned host bytes. Separate discovery used four metadata queries with zero prompts/setters. Independent audits verified those runs and stopped custody; protected runtime/router identities were unchanged. These results are not relabeled as final-source or installed validation. Observed GLM accounting has truncated history and incomplete coverage.

Three independent whole-task source reviews and the native-proof audit passed on this head. Current-head CI passed (75 Python, 19 Node, six repository tests). Copilot's latest review reports no new source defect or unresolved inline issue; its COMMENTED verdict explicitly leaves native compatibility and the installed default-profile end-to-end journey for further validation. Normal installation and the final installed-default actual runtime journey remain delivery gates after confirmed merge. The live runtime exposes one configured model alias; alternate-provider execution is unqualified. Thinking readback does not establish reasoning quality; auto/dynamic remain unsupported. Saved-session Continue, approval-bound Anvil CLI/web execution, latency qualification and large-scale executing agents remain separate work.

@fakoli
fakoli requested a balanced review from Copilot November 12, 2026 22:00
@fakoli
fakoli marked this pull request as ready for review November 12, 2026 22:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Provider/model validation can accept an explicitly mismatched configuration and inject task instructions into the wrong context.

3 open issues
What changed in this PR

This PR adds capability-checked model and thinking selection to the Codex–Pi coordination plugin while preserving profile defaults and historical v1 recovery.

Changes:

  • Add optional v2 task settings with bounded native RPC preflight and configuration evidence.
  • Add private default-profile registration and metadata-only capability discovery.
  • Expand synthetic tests and documentation, and bump the plugin to 0.2.0.
File Description
plugins/​codex-pi-coordination/​tests/​test_coordinate.py Tests RPC handling, configuration, discovery, and recovery.
plugins/​codex-pi-coordination/​tests/​extension.test.mjs Tests v2 option validation and effective configuration binding.
plugins/​codex-pi-coordination/​skills/​codex-pi-coordination/​SKILL.md Documents configuration, discovery, and run workflows.
plugins/​codex-pi-coordination/​skills/​codex-pi-coordination/​references/​task-contract.md Defines v2 options, RPC lifecycle, and evidence contracts.
plugins/​codex-pi-coordination/​scripts/​coordinate.py Implements profile registration, RPC execution, and evidence verification.
plugins/​codex-pi-coordination/​README.md Introduces the new commands and selection behavior.
plugins/​codex-pi-coordination/​package.json Bumps package version to 0.2.0.
plugins/​codex-pi-coordination/​extensions/​coordination.js Validates v2 tasks and records effective run settings.
plugins/​codex-pi-coordination/​.codex-plugin/​plugin.json Bumps plugin version to 0.2.0.

Review effort: Balanced

@fakoli
fakoli requested a balanced review from Copilot November 12, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Two moderate active issues remain: profile model identifiers are not validated at registration, and semantically equivalent profiles can be rejected because defaults are compared inconsistently.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Validate profile model identifiers during registration

plugins/​codex-pi-coordination/​scripts/​coordinate.py:879

configure now exposes this profile as a supported default, but profile_settings still accepts any non-empty model string. For example, registration succeeds for "bad model", even though the v2 RPC catalog only admits bounded identifiers and desired_configuration can never resolve that default, so every subsequent run refuses before its prompt. Validate the profile model with the same model_identifier rule at registration time.

Medium severity Compare profiles after applying defaults for idempotent registration

plugins/​codex-pi-coordination/​scripts/​coordinate.py:912

profile_settings applies defaults when this profile is used (thinking defaults to high, and the other optional fields have defaults), but this comparison uses the raw key sets. Registering a profile without an explicit thinking key and then re-registering the semantically identical profile with "thinking": "high" is rejected as a conflict, so the documented idempotent registration is not actually idempotent across equivalent default representations. Compare canonicalized profiles with defaults applied before deciding that an existing destination conflicts.

3 resolved since last review

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The native loader still has an active compatibility issue because it accepts version-2 task IDs and run_options in version-1 manifests, diverging from the validator’s required version-specific rules.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Enforce version-1 task ID and run_options rules

plugins/​codex-pi-coordination/​extensions/​coordination.js:86

The native loader now accepts the version-2 task ID syntax for version-1 manifests as well, and it does not reject a run_options field on version 1. That makes a direct extension load accept manifests that the Python validator rejects, despite the contract explicitly preserving the version-1 80-character ID grammar and forbidding run_options there. Keep the ID validation version-specific and reject run_options for version-1 tasks.

Review effort: Lite

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Source contracts and synthetic RPC tests are covered, but native Pi/OpenShell compatibility, CLI/API semantics, and the installed default-profile end-to-end runtime journey still require human or CI validation.

No open issues 🎉

Review effort: Lite

@fakoli
fakoli merged commit 1b51a42 into main Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants