Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inverted logic for deny_command #4563

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

erik-megarad
Copy link
Contributor

Background

  • The logic for checking deny_command is inverted. Before this change deny_command didn't work as expected.

Changes

  • Invert deny_command check so that it returns False if the command includes a deny_command

Documentation

Test Plan

  • Created a failing test and then fixed the code

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes.
  • I have run the following commands against my code to ensure it passes our linters:
    black .
    isort .
    mypy
    autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports autogpt tests --in-place

@vercel
Copy link

vercel bot commented Jun 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jun 6, 2023 8:35pm

@github-actions github-actions bot added the size/m label Jun 3, 2023
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14 🎉

Comparison is base (dafbd11) 69.38% compared to head (875ab46) 69.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4563      +/-   ##
==========================================
+ Coverage   69.38%   69.52%   +0.14%     
==========================================
  Files          72       72              
  Lines        3551     3551              
  Branches      569      569              
==========================================
+ Hits         2464     2469       +5     
+ Misses        895      892       -3     
+ Partials      192      190       -2     
Impacted Files Coverage Δ
autogpt/commands/execute_code.py 63.95% <100.00%> (+5.81%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vercel
Copy link

vercel bot commented Jun 4, 2023

Deployment failed with the following error:

Resource is limited - try again in 8 hours (more than 100, code: "api-deployments-free-per-day").

@erik-megarad erik-megarad force-pushed the fix/deny_command branch 3 times, most recently from 761ab7b to f7b7465 Compare June 4, 2023 17:23
k-boikov
k-boikov previously approved these changes Jun 6, 2023
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

Looks good (mostly). If you adjust the test to make it a bit less picky we can merge.

tests/integration/test_execute_code.py Outdated Show resolved Hide resolved
@Pwuts Pwuts self-assigned this Jun 6, 2023
@Pwuts Pwuts added this to the v0.4.1 Release milestone Jun 6, 2023
@Pwuts Pwuts merged commit 055806e into Significant-Gravitas:master Jun 6, 2023
lc0rp added a commit that referenced this pull request Jun 19, 2023
Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
Co-authored-by: k-boikov <[email protected]>
Co-authored-by: merwanehamadi <[email protected]>
Co-authored-by: Merwane Hamadi <[email protected]>
Co-authored-by: Richard Beales <[email protected]>
Co-authored-by: Luke K <[email protected]>
Co-authored-by: Luke K (pr-0f3t) <[email protected]>
Co-authored-by: Erik Peterson <[email protected]>
Co-authored-by: Auto-GPT-Bot <[email protected]>
Co-authored-by: Benny van der Lans <[email protected]>
Co-authored-by: Jan <[email protected]>
Co-authored-by: Robin Richtsfeld <[email protected]>
Co-authored-by: Marc Bornträger <[email protected]>
Co-authored-by: Stefan Ayala <[email protected]>
Co-authored-by: javableu <[email protected]>
Co-authored-by: DGdev91 <[email protected]>
Co-authored-by: Kinance <[email protected]>
Co-authored-by: digger yu <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: gravelBridge <[email protected]>
Fix Python CI "update cassettes" step (#4591)
fix CI (#4596)
Fix inverted logic for deny_command (#4563)
fix current_score.json generation (#4601)
Fix duckduckgo rate limiting (#4592)
Fix debug code challenge (#4632)
Fix issues with information retrieval challenge a (#4622)
fix issues with env configuration and .env.template (#4630)
Fix prompt issue causing 'No Command' issues and challenge to fail (#4623)
Fix benchmark logs (#4653)
Fix typo in docs/setup.md (#4613)
Fix run.sh shebang (#4561)
Fix autogpt docker image not working because missing prompt_settings (#4680)
Fix execute_command coming from plugins (#4730)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants