fix: address valid AI code quality findings#85
Merged
Conversation
- install.sh: replace `head -c` with POSIX-compliant `cut -c1-200` - tests/commands/plugin/index.test.ts: extract duplicated setup into helper - tests/helpers/binary-upgrade.test.ts: assert non-null instead of silent return
Deploying archgate-cli with
|
| Latest commit: |
4d4744c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6f60de21.archgate-cli.pages.dev |
| Branch Preview URL: | https://claude-epic-easley.archgate-cli.pages.dev |
Merged
rhuanbarreto
added a commit
that referenced
this pull request
Mar 20, 2026
- install.sh: replace `head -c` with POSIX-compliant `cut -c1-200` - tests/commands/plugin/index.test.ts: extract duplicated setup into helper - tests/helpers/binary-upgrade.test.ts: assert non-null instead of silent return
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reviewed the 7 AI findings from GitHub Code Quality and fixed the 3 that are genuinely valid:
head -c 200withcut -c1-200for POSIX compliance (BSD/macOSheaddoesn't support-c)createProgramAndPlugin()helperif (info === null) returnwithexpect(info).not.toBeNull()so unsupported platforms fail explicitly instead of passing silentlyFindings deemed not valid (no fix needed)
toBeTruthy()too weaktoContain("plugin")is brittle!assertionfind()returns undefined the next assertion fails clearlyprocess.platformObject.definePropertyonprocess.platformis fragile in Bun; platform-skip pattern is standard and CI runs across platformsi <= retriesoff-by-onei === retriesguard on line 42 confirms this designTest plan
bun run validatepasses (lint, typecheck, format, 314 tests, ADR check, build)