Skip to content

feat(pi): add artifact candidate review tools - #1625

Merged
Teingi merged 5 commits into
oceanbase:masterfrom
wutongyuonce:feat/pi-artifact-candidate-review
Sep 16, 2026
Merged

Teingi merged 5 commits into
oceanbase:masterfrom
wutongyuonce:feat/pi-artifact-candidate-review

Conversation

@wutongyuonce

Copy link
Copy Markdown
Contributor

Summary

Add the missing Pi tools for reviewing generated Artifact candidates:

  • pc_review_approve → approve_artifact_candidate
  • pc_review_reject → reject_artifact_candidate
  • pc_review_revise → revise_artifact_candidate

Refs #1338.

Dependency

Depends on #1621 and should be reviewed/merged after #1621. This PR builds on the Pi candidate generation and inspection surface so the flow is generation → inspection → explicit review decision.

Plan and final design

The original plan was to complete the candidate governance seam identified during the Pi profile audit, while keeping approval separate from installation, publication, activation, and execution.

The final design matches that plan:

  1. Inspect the exact candidate and version with the existing pc_review_list / pc_review_get tools.
  2. Require explicit user intent for the decision:
    • pc_review_approve approves the exact pending candidate/version only.
    • pc_review_reject rejects the exact candidate/version and requires a non-empty reason.
    • pc_review_revise submits an explicitly requested content/provenance revision using the exact expected version; the result remains a new reviewable candidate.
  3. Keep the operations scoped and safe: all three are marked mutating, included in Pi's write-operation set, require interactive confirmation, refuse writes without a UI, inject the resolved Scope, and retain secret filtering.
  4. Align the Pi TypeBox schemas with the OpenAPI limits, including closed objects, candidate/version bounds, proposal shapes, Skill package digests and size limits, nullable memory citations, and a combined maximum of 32 source/artifact references.
  5. Document the decision boundary in project-context and the Pi guidance. Returned candidate references, versions, and Handoff values must be passed unchanged; assessment or generation never counts as approval.

This PR intentionally does not add installation, publication, activation, execution, profile promotion, or candidate generation. It only completes explicit candidate review decisions.

Verification

  • Pi tests: 14 files, 95 tests passed
  • Pi TypeScript typecheck passed
  • Integration manifest tests: 28 passed
  • Integration manifest check passed
  • Python typecheck (ty check) passed
  • git diff --check passed

Review disclosure

Implemented and verified with Codex using GPT-5.6 Sol. A separate GPT-5.6 Luna review (medium reasoning) found three schema mismatches during review; all were fixed and the final review was clean. Luna did not modify files or run formatters.

@Teingi
Teingi merged commit 534460e into oceanbase:master Sep 16, 2026
23 of 24 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.

1 participant