Published version comparison

Evidence-Grounded Laravel Pull Request Review with Codex

1.0.02.0.0

Source version 1.0.0

Published

Initial: Initial published snapshot.

Destination version 2.0.0

Published

Major: Replace the legacy Safe and Thorough Pull Request Review for Laravel Projects with Codex template with a domain-specific input, evidence, authority, safety, workflow, output, and verification contract.

Public field comparison

Title Changed

1.0.0
Safe and Thorough Pull Request Review for Laravel Projects with Codex
2.0.0
Evidence-Grounded Laravel Pull Request Review with Codex

Summary Changed

1.0.0
Guide Codex to safely review Laravel pull requests by inspecting changed files, detecting bugs, security risks, regressions, missing tests, and verification gaps, then producing a clear review summary without rewriting unrelated code.
2.0.0
Use Codex to conduct a read-only, evidence-grounded review of a Laravel pull request across application behavior, authorization, data migrations, queues, caches, compatibility, deployment safety, and test coverage. Findings are tied to code locations or execution evidence, while unverified work and merge authority remain explicit.

Share-purpose line Changed

1.0.0
2.0.0
Review high-risk Laravel pull requests with traceable findings, severity-based merge guidance, migration and rollout analysis, and a concrete verification ledger without claiming unperformed fixes or tests.

Best use cases Changed

1.0.0
Laravel Change Review
Database Migration Planning
Zero-Downtime Deployment Review
Rollback Planning
Regression Testing
Production Readiness Checks
2.0.0
Evidence-grounded Laravel pull request review
Laravel migration and rolling-deployment compatibility review
Authorization and multi-tenant isolation review
Queue, transaction, cache, and concurrency regression review
Pre-merge test coverage and verification gap analysis
High-risk Laravel production readiness assessment

Variables Changed

1.0.0
Goal or task
Project context
Relevant files
Error message or logs
Current behavior
Expected behavior
Constraints
Environment details without secrets
Verification commands
Definition of done
2.0.0
Pull request objective and acceptance criteria
Pull request diff or commit range
Repository context and relevant files
Laravel stack and target environments
Project conventions and risk constraints
Authorized Codex access and execution scope
Verification commands and supplied evidence
Deployment migration and rollback context

How to Use Changed

1.0.0
Replace every bracketed placeholder with the specific information related to the pull request and project before running the prompt. Provide detailed diffs, relevant related files, error logs if any, and project conventions to enable a comprehensive review by Codex.
2.0.0
In Codex, replace every bracketed variable with pull-request-specific information. Provide the PR diff or commit range, relevant Laravel files, framework and database versions, acceptance criteria, project conventions, tests or logs, deployment topology, migration and rollback details, and an explicit read-only or command-execution authorization boundary. Remove secrets and identify any unavailable evidence, then run the prompt. Review Codex’s cited findings and independently authorize any fixes, commands, merge, migration, or deployment.

Example use case Changed

1.0.0
A Laravel SaaS team wants to automate their code review process. They provide Codex with the PR diff, related controllers, routes, migrations, and test files along with project conventions. Codex inspects these inputs and generates a review highlighting security risks, missing tests, and regression concerns, ending with a verification checklist and next steps.
2.0.0
A multi-tenant Laravel SaaS team is reviewing a pull request that adds an account export endpoint, a queued export job, and a migration for export status tracking. The team gives Codex the diff, routes, Form Request, policy, tenant scopes, job, migration, tests, MySQL version, rolling-deployment model, and permission to run selected tests in an isolated CI workspace. Codex traces authorization and tenant boundaries, examines job retries and transaction timing, assesses migration compatibility, records any tests it actually runs, and returns evidence-linked blocking and conditional findings. The maintainers then decide whether to remediate, obtain database-operator approval, or merge; Codex does not make or execute those decisions.

Difficulty Unchanged

1.0.0
Expert
2.0.0
Expert

Tool Unchanged

1.0.0
Codex
2.0.0
Codex

Prompt type Unchanged

1.0.0
coding
2.0.0
coding

Tags Changed

1.0.0
laravel
codex
debugging
security
regression
testing
verification
pull-request
code-review
safe-review
2.0.0
laravel
codex
pull-request
code-review
security-review
database-migrations
multi-tenancy
regression-testing
deployment-safety
evidence-based-review

SEO title Changed

1.0.0
Safe and Thorough Laravel Pull Request Review with Codex
2.0.0
Evidence-Grounded Laravel Pull Request Review with Codex

SEO description Changed

1.0.0
Use Codex to review Laravel pull requests safely by detecting bugs, security risks, regressions, and missing tests with a clear, actionable summary.
2.0.0
Use Codex to review Laravel PRs with cited findings, migration safety checks, verification evidence, and explicit merge and execution boundaries.

Prompt-body line comparison

Removed Added Unchanged context

You are an expert Laravel software engineer and code reviewer specializing in safe, precise pull request reviews for SaaS applications.
Review the supplied Laravel pull request as a bounded, evidence-grounded assessment. Identify defects, security risks, regressions, migration hazards, compatibility problems, and verification gaps without changing the repository or making the merge decision.

Context:
- Goal or task: [Goal or task]
- Project context: [Project context]
- Relevant files: [Relevant files]
- Error message or logs: [Error message or logs]
- Current behavior: [Current behavior]
- Expected behavior: [Expected behavior]
- Constraints: [Constraints]
- Environment details without secrets: [Environment details without secrets]
- Verification commands: [Verification commands]
- Definition of done: [Definition of done]
## Review inputs
- Pull request objective and acceptance criteria: [Pull request objective and acceptance criteria]
- Pull request diff or commit range: [Pull request diff or commit range]
- Repository context and relevant files: [Repository context and relevant files]
- Laravel stack and target environments: [Laravel stack and target environments]
- Project conventions and risk constraints: [Project conventions and risk constraints]
- Authorized Codex access and execution scope: [Authorized Codex access and execution scope]
- Verification commands and supplied evidence: [Verification commands and supplied evidence]
- Deployment, migration, and rollback context: [Deployment migration and rollback context]

Instructions:
1. Carefully inspect all changed files and related code areas to understand the intended behavior and scope of the pull request.
2. Identify any bugs, security vulnerabilities, regressions, missing or incomplete tests, and gaps in verification coverage.
3. Avoid suggesting broad rewrites or changes unrelated to the pull request scope.
4. Do not expose or request any secrets or sensitive information.
5. Distinguish clearly between blocking issues that must be fixed before merging and non-blocking suggestions.
6. Summarize your findings in a clear, concise review comment, including:
   - A list of blocking issues with detailed explanations.
   - Suggestions for improvements or best practices.
   - Verification checklist items to confirm before merging.
7. End with a clear next steps section advising what actions the developer should take.
## Input gate
The minimum prerequisites are the pull request objective, acceptance criteria, diff or commit range, Laravel and PHP versions, relevant repository access, and the authorized inspection scope. If the diff, objective, or access boundary is missing or unusable, stop and request it rather than producing a merge assessment.

Output format:
Provide your review in markdown format with the following sections:
Treat tests, logs, deployment details, schema snapshots, production topology, traffic assumptions, and rollback procedures as optional unless the change affects those areas. When optional context is absent, continue only with a bounded static review, identify the resulting blind spots, and mark affected conclusions as unverified. If inputs conflict, record the conflict and do not silently choose one version. Never infer omitted code, configuration, database state, runtime behavior, or organizational policy.

# Pull Request Review Summary
## Codex access and authority boundaries
1. Inspect only the supplied diff, files, repository content, and artifacts that Codex can actually access. State what was and was not inspected.
2. Default to read-only review. Do not edit files, create commits, push branches, merge or approve the pull request, deploy code, run production migrations, alter data, rotate credentials, contact people, or change external systems.
3. Run commands only when the authorized scope explicitly permits execution and the environment is confirmed non-production. Do not run destructive commands, commands requiring secrets, dependency updates, irreversible migrations, or commands that may affect shared services. Stop and request human authorization if a command could mutate persistent or shared state.
4. Redact secrets, tokens, credentials, personal data, and sensitive tenant data from quotations and command output. Flag exposed secrets without reproducing their values.
5. Recommendations are advisory. A human maintainer retains responsibility for remediation, risk acceptance, merge approval, rollout, and rollback decisions.

## Blocking Issues
- List blocking issues that must be fixed before merging, with clear explanations.
## Evidence and claim rules
- Separate supplied facts, direct code observations, command execution evidence, assumptions, hypotheses, unknowns, and conflicts.
- Support every finding with a file and line, diff hunk, configuration location, schema artifact, log excerpt, or command result. If exact lines are unavailable, cite the nearest symbol or file and say why precision is limited.
- Explain the failure mechanism and affected request, job, migration, data path, or deployment phase. Do not report a theoretical pattern as a confirmed defect without showing that the relevant code path is reachable.
- Assign confidence as high, medium, or low and explain material uncertainty. Downgrade or omit findings that cannot be connected to the supplied change.
- Code inspection is not execution evidence. Supplied historical test output is not evidence that the reviewed commit currently passes unless its commit and environment match.
- Use the terms passed, failed, fixed, tested, verified, deployed, approved, or completed only when corresponding actions actually occurred and evidence is available. Otherwise use proposed, not run, unavailable, blocked, or unverified.

## Suggestions
- List non-blocking improvements, best practices, or cleanup recommendations.
## Review workflow
### 1. Establish scope and coverage
Summarize the intended behavior, affected entry points, trust boundaries, persistence changes, asynchronous paths, public contracts, and deployment implications. Map changed files to related Laravel components that may need inspection, including routes, middleware, controllers, Form Requests, policies and gates, models, casts, scopes, services, events, listeners, jobs, notifications, API resources, views, configuration, migrations, factories, seeders, and tests.

## Verification Checklist
- List concrete checks, tests, commands, and manual review steps to complete before merging.
Identify related files that were expected but unavailable. Keep unrelated legacy issues out of scope unless the pull request activates or materially worsens them.

## Next Steps
- List the recommended actions the developer should take next.
### 2. Trace behavior and framework interactions
Trace representative success, validation-failure, authorization-failure, not-found, retry, and exception paths from entry point to side effects. Check Laravel-specific behavior such as route-model binding, middleware order, container bindings, service-provider registration, Eloquent scopes and events, transaction boundaries, exception rendering, configuration caching, and environment-dependent behavior.

Ensure your review is actionable, precise, and respects the constraints above.
Compare actual behavior with the stated acceptance criteria. Note backward-compatibility effects on HTTP APIs, console commands, scheduled tasks, events, queue payloads, serialized models, webhooks, and package or PHP requirements.

### 3. Review security and tenant isolation
Check authentication and authorization at every protected operation, including policy coverage, ownership checks, tenant scoping, elevated roles, indirect object references, and administrative bypasses. Review validation and normalization, mass assignment, unsafe query construction, output escaping, CSRF exposure, SSRF paths, file uploads, signed URLs, rate limits, secret handling, and sensitive logging where relevant.

Treat a plausible cross-tenant access path, authorization bypass, credential disclosure, injection path, or destructive unauthenticated action as blocking unless evidence disproves reachability or impact.

### 4. Review database and rollout safety
For schema or data changes, evaluate table locks or rewrites, index creation, foreign keys, defaults, nullability, type narrowing, backfill cost, duplicate or invalid existing data, transaction behavior, and database-engine differences. Determine whether old and new application versions can safely coexist during rolling deployment.

Assess expand-and-contract sequencing, read/write compatibility, backfill observability, retry and resume behavior, rollback feasibility, and irreversible data loss. Do not assume a migration down method restores transformed or deleted data. Flag migrations that require production data profiling, maintenance windows, database-specific online DDL, or operator approval.

### 5. Review queues, transactions, caches, and concurrency
Where applicable, inspect job serialization, retry policy, idempotency, uniqueness, timeout handling, after-commit dispatch, stale model state, duplicate delivery, dead-letter handling, and side effects. Check race conditions, lost updates, locking, transaction isolation, cache-key scope, invalidation, and tenant leakage. Identify failures that could appear only under retries, concurrent requests, rolling deployment, or partial outages.

### 6. Evaluate tests and verification
Map each acceptance criterion and material risk to existing or missing tests. Consider feature, unit, authorization, validation, database, migration, queue, concurrency, contract, and regression coverage as applicable. Check whether assertions prove externally meaningful behavior rather than only status codes or implementation details.

If command execution is explicitly authorized, run only the smallest relevant safe commands first. Record the exact command, environment, expected observation, actual observation, exit status, and evidence location. Reconcile failures with the reviewed commit; do not dismiss them as unrelated without evidence. If execution is unavailable or unsafe, provide commands as proposed verification and mark them not run.

### 7. Determine disposition
Classify each issue as:
- Blocking: credible risk of security breach, cross-tenant exposure, data loss or corruption, production outage, irreversible migration failure, broken acceptance criterion, or incompatible public contract.
- Conditional: disposition depends on missing environment, data, traffic, deployment, or policy evidence that must be resolved before merging.
- Non-blocking: maintainability, clarity, resilience, or test improvement with no demonstrated merge-stopping impact.

Do not inflate severity. State when no blocking issue was found, but never translate that into approval. Base the recommendation on evidence coverage and unresolved blind spots.

## Required deliverable
Return Markdown with these sections:

# Laravel Pull Request Review

## Scope and Evidence Coverage
Include the reviewed objective, diff or commit range, files and components inspected, artifacts unavailable, execution access used, and material assumptions or conflicts.

## Change and Risk Map
Provide a table with columns: Area, Changed behavior, Related Laravel components, Trust or data boundary, Deployment concern, Coverage status.

## Findings Register
Provide a table with columns: ID, Disposition, Severity, Confidence, Location, Evidence type, Observation, Failure mechanism, Impact, Required remediation, Verification needed.

For each blocking or conditional finding, add a short evidence note quoting only the minimum safe excerpt and explain why the issue is reachable. If there are no supported findings in a disposition, write that none were found within inspected scope.

## Migration and Rollout Assessment
When relevant, report database engine assumptions, lock or rewrite risk, existing-data prerequisites, old/new version compatibility, expand-and-contract needs, backfill controls, observability, rollback limits, and required operator approval. If not relevant, state why.

## Acceptance and Test Coverage Matrix
Provide a table with columns: Acceptance criterion or risk, Existing evidence, Test level, Expected observation, Actual observation, Status, Gap or follow-up. Status must be Passed, Failed, Not run, Blocked, or Unverified and must match the evidence.

## Verification Ledger
List each executed or proposed command or manual check with its purpose, target environment, safety prerequisites, expected result, actual result, execution state, and evidence location. Never present proposed commands as executed.

## Merge Guidance and Human Handoff
Choose one advisory state: Block pending remediation, Hold pending evidence, or No blocking issue found within reviewed scope. Explain the evidence basis, unresolved unknowns, required owners or approvals, safest next actions, and any rollout or rollback checkpoints. Explicitly state that Codex did not merge, approve, deploy, or modify the pull request.