Conversation
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Summary of ChangesHello, 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 introduces a foundational proof-of-concept for a "Claw-like" agent within the AgentStack ecosystem. The primary goal is to demonstrate an agent capable of self-learning and self-scheduling, leveraging persistent workspace files and a heartbeat mechanism. This significantly enhances agent autonomy by allowing them to evolve their personality, accumulate knowledge, log activities, and execute recurring tasks independently, laying the groundwork for more sophisticated and adaptive AI agents. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This PR introduces a new "Claw-like" agent as a Proof of Concept, along with the necessary backend support for a "heartbeat" mechanism for scheduled tasks. The changes are extensive, adding a new agent, modifying the Python SDK, and updating the server with new APIs, database models, and background jobs. My review focuses on improving security, configurability, and dependency management. I've identified a critical issue with outdated dependencies, a high-severity security risk in how environment variables are passed to subprocesses, and several medium-severity issues related to hardcoded values and loose dependency pinning that could affect reproducibility and maintainability.
|
|
||
| glob@7.1.7: | ||
| resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} | ||
| deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me |
There was a problem hiding this comment.
The lockfile indicates the use of deprecated and vulnerable dependencies. This glob@7.1.7 is one example, which has known security vulnerabilities. Another one is inflight@1.0.6 which is also deprecated and known to leak memory. These should be updated to secure versions to avoid potential security risks and bugs. You can run pnpm audit to see the full list of vulnerabilities and then update the packages accordingly.
| stdout=asyncio.subprocess.PIPE, | ||
| stderr=asyncio.subprocess.PIPE, | ||
| cwd=str(workspace), | ||
| env={**os.environ}, |
There was a problem hiding this comment.
Passing the entire os.environ to the subprocess is a security risk. It may leak sensitive environment variables from the agent server (e.g., database credentials, other service keys) to the pi subprocess that are not needed by it. It's much safer to explicitly pass only the required environment variables on a whitelist basis.
| env={**os.environ}, | |
| env={"OPENAI_API_KEY": os.getenv("OPENAI_API_KEY")}, |
| FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv | ||
| FROM python:3.14-alpine3.23@sha256:faee120f7885a06fcc9677922331391fa690d911c020abb9e8025ff3d908e510 | ||
| ARG RELEASE_VERSION="main" | ||
| RUN apk add --no-cache nodejs npm && npm install -g @mariozechner/pi-coding-agent |
There was a problem hiding this comment.
The global npm package @mariozechner/pi-coding-agent is installed without a pinned version. This can lead to non-reproducible builds if a new version of the package is released with breaking changes. It's recommended to pin the version to ensure build stability.
RUN apk add --no-cache nodejs npm && npm install -g @mariozechner/pi-coding-agent@<version>
| requires-python = ">=3.14,<3.15" | ||
| dependencies = [ | ||
| "agentstack-sdk", | ||
| "python-dotenv>=1.0.0", |
There was a problem hiding this comment.
The dependency python-dotenv>=1.0.0 is too broad. To ensure reproducible builds and avoid accidentally pulling in breaking changes from future major versions, it's better to pin dependencies more strictly. Consider using ~=1.0.0 to allow only patch releases, or pinning to an exact version with ==.
| "python-dotenv>=1.0.0", | |
| "python-dotenv~=1.0.0", |
| "--provider", "openai", | ||
| "--model", "openai/gpt-5-codex", |
There was a problem hiding this comment.
The provider (openai) and model (openai/gpt-5-codex) are hardcoded. This makes the agent less flexible and harder to configure for different environments or models. It would be better to make these configurable, for example, through environment variables.
| "--provider", "openai", | |
| "--model", "openai/gpt-5-codex", | |
| "--provider", os.getenv("PI_PROVIDER", "openai"), | |
| "--model", os.getenv("PI_MODEL", "openai/gpt-5-codex"), |
| await conn.execute( | ||
| "UPDATE public.context_heartbeats SET active = false" | ||
| ) |
There was a problem hiding this comment.
The database schema public is hardcoded in the SQL query to update context_heartbeats. This reduces flexibility and can cause issues in environments where a different schema is used. This should be made configurable, similar to how procrastinate_schema is handled.
| await conn.execute( | |
| "UPDATE public.context_heartbeats SET active = false" | |
| ) | |
| await conn.execute( | |
| f"UPDATE {configuration.persistence.db_schema}.context_heartbeats SET active = false" | |
| ) |
Summary
Linked Issues
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.