Skip to content

SysSettingsPlugin#133

Open
bargajda-amd wants to merge 9 commits intodevelopmentfrom
bargajda_cursor_test
Open

SysSettingsPlugin#133
bargajda-amd wants to merge 9 commits intodevelopmentfrom
bargajda_cursor_test

Conversation

@bargajda-amd
Copy link
Collaborator

@bargajda-amd bargajda-amd commented Feb 23, 2026

SysSettingsPlugin, sample plugin_config.py:

{
  "name": "plugin_config",
  "desc": "Local test config for SysSettingsPlugin (sysfs settings) – includes paths that fail to show multi-failure output",
  "global_args": {},
  "plugins": {
    "SysSettingsPlugin": {
      "collection_args": {
        "paths": [
          "/sys/kernel/mm/transparent_hugepage/enabled",
          "/sys/kernel/mm/transparent_hugepage/defrag",
          "/sys/kernel/mm/transparent_hugepage/shmem_enabled",
          "/sys/kernel/mm/transparent_hugepage/nonexistent_attr",
          "/sys/kernel/fake_setting",
          "/sys/module/nonexistent_module/parameters/foo"
        ]
      },
      "analysis_args": {
        "checks": [
          {"path": "/sys/kernel/mm/transparent_hugepage/enabled", "expected": ["never"], "name": "thp_enabled"},
          {"path": "/sys/kernel/mm/transparent_hugepage/defrag", "expected": ["defer"], "name": "thp_defrag"},
          {"path": "/sys/kernel/mm/transparent_hugepage/shmem_enabled", "expected": [], "name": "thp_shmem"},
          {"path": "/sys/kernel/mm/transparent_hugepage/nonexistent_attr", "expected": ["ok"], "name": "thp_missing"},
          {"path": "/sys/kernel/fake_setting", "expected": ["x"], "name": "kernel_fake"},
          {"path": "/sys/module/nonexistent_module/parameters/foo", "expected": ["y"], "name": "module_missing"},
          {
            "path": "/sys/class/net",
            "expected": [],
            "name": "net_interfaces",
            "pattern": "^(lo|eth|enp|wl|br-|docker|ens)"
          }
        ]
      }
    }
  },
  "result_collators": {}
}

How to run:

node-scraper --plugin-configs plugin_config.json

Co-authored-by: Cursor <cursoragent@cursor.com>
@bargajda-amd
Copy link
Collaborator Author

Hi everyone, I am testing Cursor and figured it would be cool to make it create a new plugin and create a PR. Looks like it's done :) I don't want it to get merged though as the functionality of the plugin does not make too much sense. Don't delete the PR yet either. Thanks and sorry for messing up with you repo ;)

bargajda and others added 2 commits February 23, 2026 18:27
Copy link
Collaborator

@alexandraBara alexandraBara left a comment

Choose a reason for hiding this comment

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

Keep in mind that any new files added to the repo in the year of 2026 need to have the copyright at top of the file with the correct year. So 2025->2026 for new files.

@alexandraBara alexandraBara marked this pull request as draft February 23, 2026 20:40
@alexandraBara
Copy link
Collaborator

Hi everyone, I am testing Cursor and figured it would be cool to make it create a new plugin and create a PR. Looks like it's done :) I don't want it to get merged though as the functionality of the plugin does not make too much sense. Don't delete the PR yet either. Thanks and sorry for messing up with you repo ;)

i turned it into a draft until its in better shape for review

…n design, remove backward compat and section 3)

Co-authored-by: Cursor <cursoragent@cursor.com>
@bargajda-amd
Copy link
Collaborator Author

Summary of what was committed in the latest push:

Copyright

  • Updated copyright year from 2025 to 2026 in all ThpPlugin-related files (plugin package and unit tests), per review feedback.

CMD variable for docs

  • Added a class-level CMD = "cat {}" in ThpCollector so the automated doc generator can pick up the command pattern ({} = sysfs path). Kept CMD_ENABLED and CMD_DEFRAG for the concrete commands.

Design proposal

  • Added docs/THP_TO_SYSFS_DESIGN_PROPOSAL.md describing the proposed evolution from ThpPlugin to a generic SysfsPlugin: config-driven checks list (path, expected, name), list-based data model, and CMD usage. Removed the backward-compatibility section and the "Suggested next steps" section (section 3).

@alexandraBara alexandraBara changed the title Test PR – ThpPlugin (do not merge) SysSettingsPlugin Feb 24, 2026
@alexandraBara alexandraBara marked this pull request as ready for review February 24, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants