Skip to content

fix(ci): require SDK Value table in FINAL reviews and extend TS merge-gate parity - #4531

Merged
MervinPraison merged 1 commit into
mainfrom
fix/ts-sdk-final-review-parity
Aug 28, 2026
Merged

fix(ci): require SDK Value table in FINAL reviews and extend TS merge-gate parity#4531
MervinPraison merged 1 commit into
mainfrom
fix/ts-sdk-final-review-parity

Conversation

@MervinPraison

@MervinPraison MervinPraison commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Mandates the Phase 1 markdown table (including an explicit SDK value row) in FINAL_CLAUDE_REVIEW_BODY, so FINAL architecture reviews are consistent for Python, TypeScript, and other PRs β€” not ad-hoc prose.
  • Routes TS PRs to src/praisonai-ts/AGENTS.md Β§2.1.2 and adds a TS-specific table row (TS types / parity / tests).
  • Extends merge-gate SDK scope to src/praisonai-ts/ (test enforcement, CI check patterns) and updates the merge-gate assessor prompt to cover both Python and TypeScript SDKs.

Root cause

FINAL @claude reviews had SDK value as a bullet requirement but no mandatory output format, so Claude sometimes included the table (e.g. #4513) and sometimes skipped it (e.g. #4505, #4520). Merge-gate logic was also Python-only (SDK_PATH_PREFIXES, missingTestsReason, assessor prompt).

Test plan

  • node .github/scripts/merge-gate-selftest.js β€” 52/52 pass
  • After merge, re-trigger FINAL @claude on an open praisonai-ts PR and confirm Phase 1 table includes SDK value row

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added merge-gate coverage for the TypeScript SDK, including path recognition, required checks, and test detection.
    • Added TypeScript SDK guidance and an SDK value row to final review assessments.
  • Tests
    • Added self-tests validating TypeScript SDK detection and confirming required review content.
  • Documentation
    • Updated merge-gate review guidance to reference the relevant TypeScript agents documentation.

…-gate parity

FINAL architecture reviewer prompt now mandates the Phase 1 table with an
explicit SDK value row and TS AGENTS.md routing. Merge-gate helpers treat
src/praisonai-ts/ as SDK scope for test enforcement and CI check patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 28, 2026 06:51
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more β†’

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account β†’

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us β†’

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 reached their quota limit.

@MervinPraison MervinPraison added pipeline/blocked:ci Blocked: CI not green on HEAD pipeline/blocked:manual-review Blocked: requires manual review pipeline/blocked:no-final Blocked: no FINAL @claude trigger yet pipeline/reviews-pending Waiting for CodeRabbit/Qodo/Copilot reviews labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 76098af4-d1cf-4aa1-bc46-377c7083f0a9

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2359ed0 and d893227.

πŸ“’ Files selected for processing (3)
  • .github/scripts/merge-gate-selftest.js
  • .github/scripts/merge-gate.js
  • .github/workflows/claude-merge-gate.yml

πŸ“ Walkthrough

Walkthrough

The merge gate now recognizes the TypeScript SDK, requires matching TypeScript tests for SDK source changes, includes TypeScript checks, and directs Claude reviews to TypeScript-specific guidance and SDK value criteria.

Changes

TypeScript SDK merge-gate support

Layer / File(s) Summary
SDK path and check recognition
.github/scripts/merge-gate.js
The merge gate adds the TypeScript SDK source path and recognizes TypeScript, npm, and webview check names.
SDK-specific test enforcement
.github/scripts/merge-gate.js, .github/scripts/merge-gate-selftest.js
missingTestsReason separately validates Python and TypeScript SDK test changes. Self-tests cover TypeScript detection, path recognition, and valid test pairing.
Review prompt integration
.github/scripts/merge-gate.js, .github/workflows/claude-merge-gate.yml
Claude review prompts require TypeScript agent guidance and an explicit TypeScript SDK value row in the Phase 1 review table.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ts-sdk-final-review-parity

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.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@MervinPraison
MervinPraison merged commit 7c0870d into main Aug 28, 2026
15 of 16 checks passed
@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands merge-gate policy and review prompts to cover the TypeScript SDK and require an SDK-value table. It also adds TypeScript missing-test heuristics, CI check patterns, and self-tests, but the new enforcement paths can accept unrelated evidence and the table remains prompt-only.

  • Adds TypeScript SDK paths to merge-gate scope.
  • Splits missing-test checks between Python and TypeScript changes.
  • Adds mandatory FINAL-review formatting and TypeScript review guidance.
  • Updates the merge-gate assessor prompt for cross-SDK review.

Confidence Score: 2/5

The PR should not merge until TypeScript checks and test files are scoped to the SDK they validate and the claimed mandatory review table is actually enforced.

Unrelated test files and Python-only checks can satisfy the newly extended TypeScript gates, while an omitted SDK-value table can still lead to an accepted approval verdict.

Files Needing Attention: .github/scripts/merge-gate.js, .github/scripts/merge-gate-selftest.js, .github/workflows/claude-merge-gate.yml

Important Files Changed

Filename Overview
.github/scripts/merge-gate.js Expands SDK scope and review requirements, but test-file and CI-check matching can accept unrelated coverage and the mandatory table is not parsed.
.github/scripts/merge-gate-selftest.js Adds basic TypeScript and prompt-content assertions but omits mixed-scope tests and behavior-level validation of the mandatory table.
.github/workflows/claude-merge-gate.yml Extends the assessor prompt to TypeScript and the SDK-value table, while continuing to enforce only the assessor's verdict marker deterministically.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SDK PR] --> B[missingTestsReason]
    A --> C[sdkTestChecksReason]
    A --> D[FINAL review trigger]
    B --> E{Relevant test file?}
    C --> F{Matching check name?}
    D --> G[LLM review response]
    G --> H[Assessor verdict]
    E --> I[evaluatePipelineQuiescent]
    F --> I
    H --> J[Merge decision]
    I --> J
Loading

Reviews (1): Last reviewed commit: "fix(ci): require SDK Value table in FINA..." | Re-trigger Greptile

Comment on lines +705 to +712
const hasPyTestChange = files.some(
(f) => /\/tests?\//.test(f.filename) || /test_.*\.py$/.test(f.filename) || /_test\.py$/.test(f.filename)
);
if (!hasTestChange) return 'SDK code added without test file changes β€” requires manual review';
const hasTsTestChange = files.some(
(f) =>
f.filename.startsWith('src/praisonai-ts/tests/') ||
/\.(test|spec)\.ts$/.test(f.filename)
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Unrelated tests satisfy gate

When a PR adds Python SDK code alongside a TypeScript test, or TypeScript SDK code alongside an out-of-package .test.ts or .spec.ts file, these repository-wide predicates treat the unrelated test as SDK coverage, allowing untested SDK changes to pass the missing-tests gate.

const WORKFLOW_ONLY_LABEL = 'merge-gate-ci-only';
const CI_ONLY_PATH_PREFIXES = ['.github/workflows/', '.github/actions/', '.github/scripts/merge-gate'];
const SDK_PATH_PREFIXES = ['src/praisonai-agents/', 'src/praisonai/'];
const SDK_PATH_PREFIXES = ['src/praisonai-agents/', 'src/praisonai/', 'src/praisonai-ts/'];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Python checks satisfy TS

When a TypeScript-only SDK PR triggers the Python test-core workflow, the new TypeScript SDK prefix activates sdkTestChecksReason and the existing /core/i pattern accepts that Python-only check, allowing the merge gate to report TypeScript CI coverage even though no TypeScript tests ran.

Comment on lines 321 to +322
const FINAL_CLAUDE_REVIEW_BODY =
'@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding.\n\n**Phase 1: Review per AGENTS.md**\n1. Protocol-driven: check heavy implementations vs core SDK\n2. Backward compatible: ensure zero feature regressions\n3. Performance: no hot-path regressions\n4. SDK value: review in depth whether the change genuinely adds value to the SDK β€” never add features for the sake of adding them. It must strengthen the SDK (simpler, more user-friendly, robust, world-class, secure). If it does not clearly add value, request changes or recommend rejecting/closing rather than merging scope creep\n5. Do not bloat the Agent class with additional params β€” only if absolutely required; we already support many params.\n6. Repo routing: agent-callable tools β†’ PraisonAI-Tools; lifecycle plugins β†’ PraisonAI-Plugins; optional sandbox backends β†’ PraisonAI-Plugins (`praisonai.sandbox` entry point) β€” request changes if wrongly added to praisonaiagents/\n\n**Phase 2: FIX Valid Issues**\n7. For any VALID bugs or architectural flaws found by Gemini, CodeRabbit, Qodo, Copilot, or any other reviewer: implement the fix\n8. Also independently identify and fix any gaps or issues you find in the changed code β€” do not rely only on prior reviewer feedback\n9. Push all code fixes directly to THIS branch (do NOT create a new PR)\n10. Comment a summary of exact files modified and what you skipped\n\n**Phase 3: Final Verdict**\n11. If all issues are resolved, approve the PR / close the Issue\n12. If blocking issues remain, request changes / leave clear action items';
'@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding.\n\n**MANDATORY READ (before reviewing):**\n- Always read src/praisonai-agents/AGENTS.md\n- If this PR touches src/praisonai-ts/, also read src/praisonai-ts/AGENTS.md Β§2.1.2 (TS triage + PR review checklist)\n\n**Phase 1: Review per AGENTS.md**\n1. Protocol-driven: check heavy implementations vs core SDK\n2. Backward compatible: ensure zero feature regressions\n3. Performance: no hot-path regressions\n4. SDK value: review in depth whether the change genuinely adds value to the SDK β€” never add features for the sake of adding them. It must strengthen the SDK (simpler, more user-friendly, robust, world-class, secure). If it does not clearly add value, request changes or recommend rejecting/closing rather than merging scope creep\n5. Do not bloat the Agent class with additional params β€” only if absolutely required; we already support many params.\n6. Repo routing: agent-callable tools β†’ PraisonAI-Tools; lifecycle plugins β†’ PraisonAI-Plugins; optional sandbox backends β†’ PraisonAI-Plugins (`praisonai.sandbox` entry point) β€” request changes if wrongly added to praisonaiagents/\n\n**MANDATORY COMMENT FORMAT β€” include this Phase 1 table in your review comment:**\n#### Phase 1 β€” AGENTS.md review\n| Check | Result |\n|---|---|\n| Protocol-driven / no heavy impl in core | βœ… or ❌ + one-line rationale |\n| Backward compatible | βœ… or ❌ + one-line rationale |\n| Performance (hot path) | βœ… or ❌ + one-line rationale |\n| **SDK value** | βœ… or ❌ + one-line rationale (explicitly judge whether the change strengthens the SDK) |\n| No Agent param bloat | βœ… or ❌ + one-line rationale |\n| Repo routing | βœ… or ❌ + one-line rationale |\n\nFor TypeScript PRs (src/praisonai-ts/), also add:\n| TS types / parity / tests | βœ… or ❌ + one-line rationale (npm run build && npm test) |\n\n**Phase 2: FIX Valid Issues**\n7. For any VALID bugs or architectural flaws found by Gemini, CodeRabbit, Qodo, Copilot, or any other reviewer: implement the fix\n8. Also independently identify and fix any gaps or issues you find in the changed code β€” do not rely only on prior reviewer feedback\n9. Push all code fixes directly to THIS branch (do NOT create a new PR)\n10. Comment a summary of exact files modified and what you skipped\n\n**Phase 3: Final Verdict**\n11. If all issues are resolved, approve the PR / close the Issue\n12. If blocking issues remain, request changes / leave clear action items';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Mandatory table remains unenforced

When a FINAL review omits or malforms the Phase 1 table and the assessor still posts MERGE_GATE_VERDICT: APPROVE, completion and verdict handling never inspect the FINAL response body, so the PR can pass without the SDK-value row this change requires.

@MervinPraison

Copy link
Copy Markdown
Owner Author

@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding.

MANDATORY READ (before reviewing):

  • Always read src/praisonai-agents/AGENTS.md
  • If this PR touches src/praisonai-ts/, also read src/praisonai-ts/AGENTS.md Β§2.1.2 (TS triage + PR review checklist)

Phase 1: Review per AGENTS.md

  1. Protocol-driven: check heavy implementations vs core SDK
  2. Backward compatible: ensure zero feature regressions
  3. Performance: no hot-path regressions
  4. SDK value: review in depth whether the change genuinely adds value to the SDK β€” never add features for the sake of adding them. It must strengthen the SDK (simpler, more user-friendly, robust, world-class, secure). If it does not clearly add value, request changes or recommend rejecting/closing rather than merging scope creep
  5. Do not bloat the Agent class with additional params β€” only if absolutely required; we already support many params.
  6. Repo routing: agent-callable tools β†’ PraisonAI-Tools; lifecycle plugins β†’ PraisonAI-Plugins; optional sandbox backends β†’ PraisonAI-Plugins (praisonai.sandbox entry point) β€” request changes if wrongly added to praisonaiagents/

MANDATORY COMMENT FORMAT β€” include this Phase 1 table in your review comment:

Phase 1 β€” AGENTS.md review

Check Result
Protocol-driven / no heavy impl in core βœ… or ❌ + one-line rationale
Backward compatible βœ… or ❌ + one-line rationale
Performance (hot path) βœ… or ❌ + one-line rationale
SDK value βœ… or ❌ + one-line rationale (explicitly judge whether the change strengthens the SDK)
No Agent param bloat βœ… or ❌ + one-line rationale
Repo routing βœ… or ❌ + one-line rationale

For TypeScript PRs (src/praisonai-ts/), also add:
| TS types / parity / tests | βœ… or ❌ + one-line rationale (npm run build && npm test) |

Phase 2: FIX Valid Issues
7. For any VALID bugs or architectural flaws found by Gemini, CodeRabbit, Qodo, Copilot, or any other reviewer: implement the fix
8. Also independently identify and fix any gaps or issues you find in the changed code β€” do not rely only on prior reviewer feedback
9. Push all code fixes directly to THIS branch (do NOT create a new PR)
10. Comment a summary of exact files modified and what you skipped

Phase 3: Final Verdict
11. If all issues are resolved, approve the PR / close the Issue
12. If blocking issues remain, request changes / leave clear action items

@praisonai-triage-agent

praisonai-triage-agent Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Claude finished @MervinPraison's task β€”β€” View job β€’ claude/pr-4531-20260828-0654 β€’ Create PR βž”


FINAL Architecture Review β€” PR #4531

Note: PR #4531 is already MERGED (2026-08-28). This branch is CI-only (.github/scripts/), not Python/TS SDK source β€” so AGENTS.md core-SDK rules apply by analogy to the merge-gate policy it governs. Valid Greptile P1 findings were fixed on a follow-up branch below.

Phase 1 β€” AGENTS.md review

Check Result
Protocol-driven / no heavy impl in core βœ… CI-only change; no praisonaiagents/ core touched
Backward compatible βœ… Additive patterns/prefixes; existing Python gating unchanged
Performance (hot path) βœ… Merge-gate script only; no SDK runtime path
SDK value βœ… Strengthens the gate: makes FINAL reviews consistent (mandatory SDK-value table) and extends parity to the TS SDK. Genuine robustness improvement, not scope creep
No Agent param bloat βœ… N/A β€” no Agent class changes
Repo routing βœ… Correctly stays in monorepo .github/scripts/; TS routed to src/praisonai-ts/

(No src/praisonai-ts/ source changed, so the TS types/parity row is N/A here.)

Phase 2 β€” Reviewer feedback triage & fixes

Three Greptile P1 findings reviewed:

Finding Verdict Action
Unrelated tests satisfy gate (missingTestsReason) β€” a TS .test.ts/out-of-package .spec.ts could satisfy a Python SDK change, and a Python test could satisfy a TS change βœ… VALID Fixed β€” Python test matching now requires src/praisonai-agents/|src/praisonai/ .py paths; TS test matching now requires the src/praisonai-ts/ prefix.
Python checks satisfy TS (sdkTestChecksReason) β€” a TS-only PR's /core/i match on Python test-core reported TS CI coverage βœ… VALID Fixed β€” split REQUIRED_SDK_CHECK_PATTERNS into REQUIRED_PY_SDK_CHECK_PATTERNS and REQUIRED_TS_SDK_CHECK_PATTERNS; each touched SDK must have a matching check of its own language.
Mandatory table remains unenforced β€” verdict handling never parses the FINAL body for the SDK-value row ⚠️ VALID but deferred Skipped (see below) β€” deterministic body-parsing of the FINAL narrative is a larger design change and risks false BLOCKs on legitimately-formatted-but-reworded reviews. Left as a documented action item rather than merging a fragile regex gate.

Files modified (pushed to claude/pr-4531-20260828-0654):

  • .github/scripts/merge-gate.js β€” per-language test-path scoping in missingTestsReason; split check-pattern sets; new touchesPySdk/touchesTsSdk helpers; per-SDK enforcement in sdkTestChecksReason.
  • .github/scripts/merge-gate-selftest.js β€” added cross-SDK contamination + per-language check-pattern assertions.

Self-tests: node .github/scripts/merge-gate-selftest.js β†’ 63/63 pass (was 52).

Phase 3 β€” Verdict

Approve (original PR) with follow-up fixes applied. The two exploitable cross-SDK bypasses (P1 #1, #2) are resolved and covered by new self-tests. The unenforced-table concern (P1 #3) is intentionally deferred as a design item β€” the prompt still mandates the table, and hard body-parsing enforcement should be scoped separately to avoid false BLOCKs.

Since #4531 is already merged, changes landed on a new branch:


Job run Β· branch claude/pr-4531-20260828-0654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pipeline/blocked:ci Blocked: CI not green on HEAD pipeline/blocked:manual-review Blocked: requires manual review pipeline/blocked:no-final Blocked: no FINAL @claude trigger yet pipeline/reviews-pending Waiting for CodeRabbit/Qodo/Copilot reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants