Compliance: verification improvements and task-tracker initialization#3
Compliance: verification improvements and task-tracker initialization#3
Conversation
|
Brings the repository into compliance with AGENTS.md and project standards: - Initialized task-tracker (.tasks.jsonl). - Updated .githooks/pre-commit to run the full verification suite (scripts/verify.ps1). - Filled missing email in CODE_OF_CONDUCT.md. - Added mocked unit tests for UnityEditorLibrary to improve coverage. - Regenerated AGENTS.md via compose-agentsmd. |
|
Agent runner idle completed. Repo: metyatech/robotframework-unity-editor Summary: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08a365bebd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if command -v compose-agentsmd > /dev/null 2>&1; then | ||
| compose-agentsmd --compose || true | ||
| git add AGENTS.md || true | ||
| #!/bin/sh |
There was a problem hiding this comment.
Normalize pre-commit shebang to LF line endings
The updated hook is committed with CRLF line endings, so on POSIX environments the shebang becomes #!/bin/sh\r and Git cannot execute the hook (cannot execute: required file not found). This blocks all commits for contributors running the repo from Linux/macOS (including WSL/containers), so the hook change effectively breaks the commit workflow outside Git for Windows.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR targets repository compliance with the project’s agent standards by initializing task tracking, tightening local verification via pre-commit, updating community health metadata, and adding mocked unit tests for the Unity editor library.
Changes:
- Initialized task-tracker state (
.tasks.jsonl) and updatedAGENTS.mdvia regeneration. - Updated
.githooks/pre-committo run the full verification suite (scripts/verify.ps1) before composing/stagingAGENTS.md. - Added mocked unit tests for
UnityEditorLibraryand filled in the enforcement contact email inCODE_OF_CONDUCT.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_library_mocked.py |
Adds mocked unit tests covering several UnityEditorLibrary behaviors. |
CODE_OF_CONDUCT.md |
Replaces placeholder enforcement contact with a real email address. |
AGENTS.md |
Regenerated agent rules and updated pre-commit guidance/standards text. |
.tasks.jsonl |
Initializes task-tracker entries marking this compliance work as done. |
.githooks/pre-commit |
Runs full verification via PowerShell script, then updates/stages AGENTS.md. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Source: github:metyatech/agent-rules@HEAD/rules/global/autonomous-operations.md | ||
|
|
||
| # Autonomous operations | ||
| # Autonomous operations |
There was a problem hiding this comment.
This heading appears to start with a BOM/zero-width character before # (rendered as # Autonomous operations). That hidden character can break markdown rendering/anchors and causes noisy diffs; please remove it and ensure the file is saved as UTF-8 without BOM (or regenerate with compose-agentsmd using the correct encoding).
| # Autonomous operations | |
| # Autonomous operations |
| - `&&` is not supported in PowerShell (it is a bash/Unix operator); use `;` to chain commands in PowerShell scripts and prompts. | ||
| - When writing PowerShell, always use `;` for sequential command chaining; never use `&&` or `||` as control-flow operators. |
There was a problem hiding this comment.
These lines state that &&/|| are not supported in PowerShell, but they are supported in PowerShell 7+ (pwsh), which this repo uses in CI. If the intent is Windows PowerShell 5.1 compatibility or a style ban, please reword accordingly (e.g., “Avoid &&/|| for PS5.1 compatibility; use ; / explicit conditionals”).
| - `&&` is not supported in PowerShell (it is a bash/Unix operator); use `;` to chain commands in PowerShell scripts and prompts. | |
| - When writing PowerShell, always use `;` for sequential command chaining; never use `&&` or `||` as control-flow operators. | |
| - In Windows PowerShell 5.1, `&&` / `||` are not supported (they are bash/Unix-style operators); use `;` to chain commands in cross-version PowerShell scripts and prompts. | |
| - For scripts that must run on both Windows PowerShell 5.1 and PowerShell 7+, avoid `&&` / `||` and instead use `;` plus explicit conditionals for control flow. |
| powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/verify.ps1 || exit 1 | ||
|
|
There was a problem hiding this comment.
The hook hard-codes powershell.exe, but CI runs the verification script under pwsh. To avoid failures on environments where Windows PowerShell isn’t available (or to keep consistent behavior), consider invoking pwsh when available and falling back to powershell.exe otherwise.
| powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/verify.ps1 || exit 1 | |
| if command -v pwsh > /dev/null 2>&1; then | |
| POWERSHELL_CMD="pwsh" | |
| elif command -v powershell > /dev/null 2>&1; then | |
| POWERSHELL_CMD="powershell" | |
| elif command -v powershell.exe > /dev/null 2>&1; then | |
| POWERSHELL_CMD="powershell.exe" | |
| else | |
| echo "Error: Neither 'pwsh' nor 'powershell'/'powershell.exe' found in PATH." >&2 | |
| exit 1 | |
| fi | |
| "$POWERSHELL_CMD" -NoProfile -ExecutionPolicy Bypass -File scripts/verify.ps1 || exit 1 |
| mock_window.child_window.side_effect = Exception("Not found") | ||
|
|
||
| with pytest.raises(RuntimeError, match="Unity element was not found"): | ||
| library_instance._find_element(title="Hierarchy", timeout_seconds=0.1) |
There was a problem hiding this comment.
This test uses timeout_seconds=0.1, but _find_element sleeps 0.2s per retry, so the test will always incur an unnecessary sleep. Consider using timeout_seconds=0 (or patching time.sleep) to keep the unit test fast and deterministic.
| library_instance._find_element(title="Hierarchy", timeout_seconds=0.1) | |
| library_instance._find_element(title="Hierarchy", timeout_seconds=0) |
| #!/bin/sh | ||
|
|
||
| # Run full verification suite | ||
| powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/verify.ps1 || exit 1 |
There was a problem hiding this comment.
This pre-commit hook invokes powershell.exe with -ExecutionPolicy Bypass, which disables PowerShell's execution policy and can circumvent enterprise script restrictions, allowing unsigned or tampered scripts/verify.ps1 to run even where such scripts would normally be blocked. An attacker who can modify this repository or the scripts/verify.ps1 file could abuse this hook to bypass host security controls and execute arbitrary code on developers' machines. Remove the -ExecutionPolicy Bypass flag (or adopt a stricter policy with script signing) so that PowerShell's configured execution policy continues to provide its intended protection.
| powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/verify.ps1 || exit 1 | |
| powershell.exe -NoProfile -File scripts/verify.ps1 || exit 1 |
Brings the repository into compliance with AGENTS.md and project standards: - Initialized task-tracker (.tasks.jsonl). - Updated .githooks/pre-commit to run the full verification suite (scripts/verify.ps1). - Filled missing email in CODE_OF_CONDUCT.md. - Added mocked unit tests for UnityEditorLibrary to improve coverage. - Regenerated AGENTS.md via compose-agentsmd.