Skip to content

fix: handle tables without uid column and remove hardcoded temperature - #104

Merged
CybotTM merged 1 commit into
mainfrom
fix/task-and-model-test
Mar 6, 2026
Merged

fix: handle tables without uid column and remove hardcoded temperature#104
CybotTM merged 1 commit into
mainfrom
fix/task-and-model-test

Conversation

@CybotTM

@CybotTM CybotTM commented Mar 6, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • All 2706 unit/integration tests pass
  • GrumPHP pre-commit checks pass (phpcsfixer, phpstan, file_size, composer, composer_normalize, securitychecker)

- fetchRecordsAction now checks for uid column before querying,
  returning empty results for tables with incomplete schemas
- testModelAction no longer sends temperature=0, which was rejected
  by reasoning models that only support temperature=1

Fixes #102
Fixes #103

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI review requested due to automatic review settings March 6, 2026 13:59
@CybotTM
CybotTM added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit 140240e Mar 6, 2026
39 checks passed
@CybotTM
CybotTM deleted the fix/task-and-model-test branch March 6, 2026 13:59
@github-actions github-actions Bot added configuration Configuration changes backend TYPO3 backend changes labels Mar 6, 2026
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the robustness and compatibility of the system by addressing two key issues. It introduces a check to gracefully handle database tables that may lack a uid column, preventing unexpected failures when querying such tables. Additionally, it removes a fixed temperature parameter from AI model requests, which improves compatibility with newer reasoning models that have stricter requirements for this setting. These changes aim to improve the stability and adaptability of the application.

Highlights

  • Table Schema Handling: The fetchRecordsAction now verifies the presence of a uid column in target tables before querying, preventing errors with incomplete schemas like tx_scheduler_task.
  • AI Model Compatibility: The testModelAction no longer sends a hardcoded temperature=0 parameter, resolving compatibility issues with reasoning models (e.g., GPT-5.2, o3) that only support temperature=1.
  • Version Bump: The extension version has been updated to 0.4.3.
Changelog
  • Classes/Controller/Backend/ModelController.php
    • Removed the hardcoded 'temperature' parameter from the model completion request.
  • Classes/Controller/Backend/TaskController.php
    • Added logic to check for the existence of a 'uid' column in the target table before fetching records.
    • Returns an empty result set if the 'uid' column is not found, preventing errors for tables with incomplete schemas.
  • ext_emconf.php
    • Updated the extension version from '0.4.2' to '0.4.3'.
Activity
  • All 2706 unit/integration tests were executed and passed successfully.
  • GrumPHP pre-commit checks (phpcsfixer, phpstan, file_size, composer, composer_normalize, securitychecker) were run and passed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot left a comment

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.

Automated approval for solo maintainer project

This PR has passed all automated quality gates:

  • ✅ Static analysis (PHPStan)
  • ✅ Code style (PHP-CS-Fixer)
  • ✅ Unit & functional tests
  • ✅ Security scanning
  • ✅ Dependency review

See SECURITY_CONTROLS.md for compensating controls documentation.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request aims to improve fetchRecordsAction by checking for a uid column and removes a hardcoded temperature parameter in testModelAction. However, a critical security vulnerability exists in fetchRecordsAction within TaskController.php due to the use of untrusted input for table names without proper validation, which could lead to unauthorized data access. Furthermore, the new schema check in fetchRecordsAction could be made more efficient by avoiding a potential duplicate database query.

Comment thread Classes/Controller/Backend/TaskController.php

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.

Pull request overview

Fixes two backend AJAX edge cases in the TYPO3 nr_llm extension: querying tables with incomplete schemas (missing uid) and testing “reasoning” models that reject non-default temperature settings.

Changes:

  • Add a schema guard in TaskController::fetchRecordsAction() to return an empty result when the selected table has no uid column (fixes #102).
  • Remove the hardcoded temperature=0.0 from ModelController::testModelAction() to avoid failures on reasoning-only temperature models (fixes #103).
  • Bump extension version to 0.4.3.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ext_emconf.php Bumps extension version to 0.4.3.
Classes/Controller/Backend/TaskController.php Adds pre-query schema check for missing uid and returns empty records instead of erroring.
Classes/Controller/Backend/ModelController.php Removes hardcoded temperature from model test request options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Classes/Controller/Backend/TaskController.php
Comment thread Classes/Controller/Backend/TaskController.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend TYPO3 backend changes configuration Configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Model test hardcodes temperature=0, fails on reasoning models bug: fetchRecordsAction crashes on tables without uid column

2 participants