Repository navigation
CLI-1727 Remove Git setup from malformed-input hook tests - #1414
Conversation
Co-Authored-By: Nicolas QUINQUENEL <14952624+nquinquenel@users.noreply.github.com>
✅ Deploy Preview for sonarqube-cli canceled.
|
Code Review ✅ Approved 🟢 Low riskMoving two unchanged malformed-input assertions into fresh test harnesses avoids Git initialization; production behavior and other fixtures remain unchanged. Removes Git repository setup from the OpenCode and Pi malformed-input hook tests, using fresh harnesses without Git initialization so the tests reach their assertions without timing out. Stdin input and assertions are unchanged. No issues found. Verification Rules 3/3 met PRs 2 inspectedFunctional validation No results Rules 3 passed 2 not applicable
Broader impact PRs 2 inspectedCross-PR 2 PRs inspected 0 open impacts
Auto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



CLI-1727 https://sonarsource.atlassian.net/browse/CLI-1727
Human description
The OpenCode and Pi malformed-input hook tests could time out during Git setup before reaching their assertions. These two cases now use fresh harnesses without Git initialization. Their input and assertions stay unchanged. Tests that need repository state keep their existing fixtures.
Agent description
Approach: move each malformed JSON case to a sibling setup scope with harness creation and disposal. No production behavior or other agent fixtures change. The selected cases match the ticket's stdin and output requirements. The reviewer should confirm this scope.
Acceptance coverage: both complete affected suites passed on Linux: 33 tests and 117 assertions. Inspection confirms that neither lightweight scope calls fixture Git helpers. The original stdin, exit-code, parsed-output assertions and timeouts are unchanged. Windows and full compatibility coverage remain with CI.
Validation: typecheck and repository lint passed. Lint reported six warnings in untouched source. Formatting and changed-file ESLint passed. Secrets scan found no secrets in the changed files.
Vortex: context and agentic entitlement enabled; project SonarSource_sonarqube-cli is bound. Vortex supplied testing and async guidelines; the change keeps deterministic harness isolation and teardown. DEEP analysis of both changed files found no issues.
Dependency scan: 15 risks in unchanged dependencies and test fixtures, including three HIGH risks in the vulnerable npm test fixture. Dependency remediation is outside this test-only scope.
Validation gaps: Windows execution cannot run in this Linux workspace; the current-head CI result must establish Windows coverage before validation is recorded. Full compatibility suites are left to CI.
Repository guidance warning: the repository has no ADR directory. A separate reviewed change can add the missing skeletons. This change needs no decision record.
Attachments used: none.
Opened as a draft by the autonomous Fabrik. Readiness requires all mechanical gates. Human approval and merge are still required.
Independent review: clean, round 1, gpt-6.1-sol, zero blocking findings. The reviewer independently passed all 33 focused tests. Windows remains pending. Agentic analysis ran clean on the host; the isolated reviewer had no agentic capability.
Usage: gpt-6.1-sol 3,707,443 processed tokens across run sessions, including 562,955 review tokens; this is not billing.
🤖 Co-authored by Fabrik and @nquinquenel