Skip to content

Granular "feeling safe" control - #5045

Open
happz wants to merge 20 commits into
mainfrom
granular-feeling-safe
Open

Granular "feeling safe" control#5045
happz wants to merge 20 commits into
mainfrom
granular-feeling-safe

Conversation

@happz

@happz happz commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Instead of one big all-or-nothing switch, finer control over various dangerous action is needed. Users can still allow everything, with --feeling-safe[=all], or allow individual dangerous functionalities.

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • include a release note

@happz happz added the ci | full test Pull request is ready for the full test execution label Jul 7, 2026

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

Code Review

This pull request introduces a granular 'feeling safe' mechanism to allow enabling unsafe behaviors selectively. To improve the architecture, avoid using global state for tracking allowed functionalities. Make the DangerousFunctionality class and formatting functions context-aware by passing the Common object (or self) to retrieve options directly. Remove unused global variables, imports, and helper functions like allow_functionalities. Additionally, fix a typo in the TODO path for the local provision plugin and import Common directly under TYPE_CHECKING to avoid re-exports.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/cli/_root.py Outdated
Comment thread tmt/steps/provision/connect.py Outdated
Comment thread tmt/steps/provision/local.py Outdated
Comment thread tmt/steps/provision/mock.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
@happz
happz force-pushed the granular-feeling-safe branch from ed3d98f to 30c7fcc Compare July 7, 2026 08:18
@happz happz added this to planning Jul 7, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning Jul 7, 2026
@happz happz moved this from backlog to implement in planning Jul 7, 2026
@LecrisUT LecrisUT linked an issue Jul 8, 2026 that may be closed by this pull request
@happz happz moved this from implement to review in planning Jul 9, 2026
@happz
happz force-pushed the granular-feeling-safe branch from 35b7784 to 79d239e Compare July 13, 2026 07:46
Comment thread tests/provision/mock/fedora-rawhide-x86_64/multiple-tests/test.sh Outdated
@happz
happz force-pushed the granular-feeling-safe branch from 79d239e to 482ae37 Compare July 13, 2026 08:41
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch granular-feeling-safe

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.

@LecrisUT LecrisUT self-assigned this Jul 23, 2026
@happz
happz force-pushed the granular-feeling-safe branch from a5f5af4 to 125539c Compare July 30, 2026 18:42
@psss
psss requested a review from lukaszachy July 31, 2026 11:03

@LecrisUT LecrisUT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Other than having a more explicit none keyword, all LGTM.

Comment thread tests/core/feeling-safe/test.sh
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
@happz
happz force-pushed the granular-feeling-safe branch from 125539c to f402698 Compare August 3, 2026 11:04
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tests/unit/test_guest.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated

@LecrisUT LecrisUT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm other than a couple of non-blocking implementation details

Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/base/run.py Outdated
Comment thread tmt/utils/feeling_safe.py Outdated
@happz
happz force-pushed the granular-feeling-safe branch from eaedae0 to ee61f50 Compare August 6, 2026 08:16
@thrix
thrix self-requested a review August 6, 2026 08:31
@LecrisUT LecrisUT removed their assignment Aug 6, 2026

@thrix thrix 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.

Three findings could not be anchored to diff lines because the PR does not touch those files. All three confirmed present at ee61f50c:

File Problem
docs/overview.rst:390 "Set this variable to 1" — TMT_FEELING_SAFE=1 now exits 2
agents/AGENTS.md:72 tmt --feeling-safe -vv run ... — the option swallows -vv and errors
.claude/CLAUDE.md:72 Same command, same break

Generated-by: Claude Code

Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread tmt/options.py Outdated
Comment thread tmt/options.py Outdated
Comment thread tmt/options.py Outdated
Comment thread tmt/steps/provision/local.py
Comment thread tests/unit/test_feeling_safe.py
Comment thread docs/releases/pending/granular-feeling-safe.fmf Outdated
Comment thread tmt/utils/feeling_safe.py
@happz
happz requested a review from LecrisUT August 6, 2026 14:14
@thrix
thrix self-requested a review August 7, 2026 10:30
@happz
happz force-pushed the granular-feeling-safe branch from 38caa48 to eba467d Compare August 7, 2026 12:43
Comment thread tmt/steps/provision/mock.py
Comment thread tmt/options.py Outdated
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py
Comment thread tests/unit/test_feeling_safe.py
Comment thread tmt/utils/feeling_safe.py Outdated
Comment thread docs/overview.rst
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py
Comment thread tmt/utils/feeling_safe.py Outdated
@psss psss added this to the 1.78 milestone Aug 11, 2026
@thrix
thrix self-requested a review August 11, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

More granular feeling-safe

4 participants