Skip to content

Added Plugin and Interface rules for Thunder QA#286

Draft
workkavint-ship-it wants to merge 15 commits into
masterfrom
spec/plugin-qa-tool-integration
Draft

Added Plugin and Interface rules for Thunder QA#286
workkavint-ship-it wants to merge 15 commits into
masterfrom
spec/plugin-qa-tool-integration

Conversation

@workkavint-ship-it

@workkavint-ship-it workkavint-ship-it commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

This PR adds the rule reference documents that will be used as the basis for the automated Thunder QA checks:

  1. Plugin Rules (openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md) – 79 plugin-related rules
  2. Interface Rules (openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md) – 19 interface-related rules

If you think a rule should be added, removed, reworded, or have its severity changed, please edit the relevant .md file and push to this branch.

Copilot AI 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.

Pull request overview

This PR introduces an OpenSpec change bundle for a proposed “Thunder PluginQA” system, adding specification and planning documents for plugin/interface rule validation and CSV report generation.

Changes:

  • Added OpenSpec configuration plus a new change package (openspec/changes/thunder-plugin-qa/) containing proposal, design, tasks, and specs.
  • Added detailed rule reference documents for Thunder plugin rules (v3.3.0) and Thunder interface validation rules.
  • Added a report-generation spec describing CSV output formats for plugin and interface validation runs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
openspec/config.yaml Adds baseline OpenSpec configuration stub (schema + optional context/rules sections).
openspec/changes/thunder-plugin-qa/tasks.md Adds a comprehensive implementation task breakdown for the PluginQA system.
openspec/changes/thunder-plugin-qa/specs/reports/spec.md Defines CSV report requirements/formatting for plugin & interface review outputs.
openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md Adds the plugin rules reference document (v3.3.0) with 79 rules and examples.
openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Adds the plugin validation delta/spec (folder structure, setup script behavior, rule loading).
openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Adds the interface validation rules reference document (core + advisory rules).
openspec/changes/thunder-plugin-qa/specs/interface/spec.md Adds the interface validation + plugin generation delta/spec (commands, setup, rule updates).
openspec/changes/thunder-plugin-qa/proposal.md Adds the PluginQA proposal and delivery structure overview.
openspec/changes/thunder-plugin-qa/design.md Adds the architecture/design document describing prompts, rule loading, reporting, and setup.

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

Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/proposal.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/proposal.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.

Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/proposal.md Outdated
workkavint-ship-it and others added 2 commits June 15, 2026 19:46
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/interface/Thunder-interface-rules.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/Thunder-plugin-rules.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

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

Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/tasks.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/reports/spec.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread openspec/changes/thunder-plugin-qa/design.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/interface/spec.md
Comment thread .github/openspec/changes/thunder-plugin-qa/specs/plugin/spec.md Outdated
Comment thread .github/openspec/changes/thunder-plugin-qa/tasks.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@MFransen69 MFransen69 requested review from sebaszm and removed request for msieben June 16, 2026 06:42

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

Not conclusive yet, this is how far we got up to now


**Description:**
Thunder interface headers must follow the standard file and namespace structure:
- File must be in `ThunderInterfaces/interfaces/` (or `qa_interfaces/` for QA)

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.

will not work for entservices

4. Check for any non-declaration code (function implementations, static variables, etc.)

**Verification Logic:**
1. Verify the file is inside the `WPEFramework::Exchange` namespace

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.

or qa_ or examples

**Verification Logic:**
1. Verify the file is inside the `WPEFramework::Exchange` namespace
2. Verify the primary interface struct name matches the file name (e.g. `IDictionary` in `IDictionary.h`)
3. Verify there is no implementation code — only forward declarations, typedefs, struct/enum declarations

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.

see above


### rule_37

**No Hardcoded Numeric Tuning Parameters** | `violation`

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.

make it a warning?

| [rule_38](#rule_38) | CXX_STANDARD Uses Thunder Variable | violation | CMake |
| [rule_39](#rule_39) | COM Methods Return Core::hresult | violation | COM Interface |
| [rule_40](#rule_40) | #pragma once (all headers) | suggestion | Conventions |
| [rule_41](#rule_41) | Apache 2.0 Copyright Header | suggestion | Conventions |

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.

remove this rule

| [rule_39](#rule_39) | COM Methods Return Core::hresult | violation | COM Interface |
| [rule_40](#rule_40) | #pragma once (all headers) | suggestion | Conventions |
| [rule_41](#rule_41) | Apache 2.0 Copyright Header | suggestion | Conventions |
| [rule_42](#rule_42) | STL Types | warning | Code Quality |

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.

Let's not have this rule

| [rule_40](#rule_40) | #pragma once (all headers) | suggestion | Conventions |
| [rule_41](#rule_41) | Apache 2.0 Copyright Header | suggestion | Conventions |
| [rule_42](#rule_42) | STL Types | warning | Code Quality |
| [rule_43](#rule_43) | ASSERT vs Error Handling | warning | Code Quality |

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.

Let's not have this rule

| [rule_41](#rule_41) | Apache 2.0 Copyright Header | suggestion | Conventions |
| [rule_42](#rule_42) | STL Types | warning | Code Quality |
| [rule_43](#rule_43) | ASSERT vs Error Handling | warning | Code Quality |
| [rule_44](#rule_44) | OOP Registration Order | violation | Lifecycle Integrity |

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.

This needs more investigation, remove for now

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

Many good rules, some perhaps overly strict or non-thunder related.

**Description:**
Thunder interface headers must follow the standard file and namespace structure:
- File must be in `ThunderInterfaces/interfaces/` (or `qa_interfaces/` for QA)
- Interface must be declared inside the `WPEFramework::Exchange` namespace

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.

Or Thunder::Exchange in Thunder 5.x

**Description:**
Thunder COM interfaces must follow the correct declaration shape:
- Must be a struct (not class) with the `EXTERNAL` macro
- Must inherit virtually from `Core::IUnknown` (or from another Thunder interface)

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.

Must not inherit from any other interface than Core::IUnknown!

**Severity:** violation

**Description:**
In Thunder 5.0+, all COM interface methods annotated with `@json` (i.e. methods that generate JSON-RPC code) MUST return `Core::hresult`. Void return types and other return types are not allowed for JSON-RPC-generating methods. Methods in pure COM interfaces (no `@json`) should also use `Core::hresult` for error reporting where applicable.

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.

Except for notification methods which are required to have void return type.


**JSONRPC Inheritance When Used** | `violation` | *Conditional: skip if plugin registers no JSON-RPC handlers*

**What to check:** If the plugin registers JSON-RPC handlers (`Register()` calls in `Initialize()`), the plugin class must inherit `PluginHost::JSONRPC`.

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.

Or PluginHost::JSONRPCSupprotsStatusListener or others...


---

### rule_74

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.

same comment as for rule 61


---

### rule_76

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.

Not sure what this rule is about. Why would you need a wrapper for OOP calls? Even though changing the result could be part of the logic.


---

### rule_78

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.

This rule should not be needed, the registration is normally done via JSON-RPC glue code.

sebaszm
sebaszm previously approved these changes Jul 13, 2026

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

Looks like good to go for a first spin!

sramani-metro
sramani-metro previously approved these changes Jul 13, 2026
@workkavint-ship-it workkavint-ship-it dismissed stale reviews from sramani-metro and sebaszm via fee8994 July 14, 2026 06:24
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.

5 participants