mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
fix: resolve golangci-lint failures and correct audit-doc inaccuracies
A pre-merge review caught things my local verification missed, because two CI
gates could not run in the sandbox and I mis-read a third.
golangci-lint (BLOCKER — would have turned CI red on both server matrix legs).
My local binary was built for Go 1.25 against a repo targeting 1.26, so I could
not run it. Installed 2.11.3 with the repo's own toolchain: 5 issues, all in
files this PR adds, base clean. Now 0 issues:
- bodyclose x3 in api/livekit_proxy_ws_test.go — websocket.Dial's *http.Response
was discarded; adopt the repo's existing pattern from ws/ws_integration_test.go
- gocritic stringXbytes — string(got) != string(payload) -> !bytes.Equal
- staticcheck SA4000 in ws/topic_rate_limiter_test.go — `!Allow() || !Allow()`.
This was a real defect, not just a lint: || short-circuits, so a failing first
call skipped the second, left a token unspent, and the next assertion would
have reported the wrong thing. Split into two statements.
Playwright: I reported this suite as passing. It does not. I read the exit code
of `tail` through a pipeline instead of playwright's own. Re-run properly: 229
of 255 web tests fail, all cascading from the shared login helper
(navigateToMainPage never sees [data-testid='app-layout']). It reproduces on a
clean b3caceb worktree, so it is pre-existing on main and unrelated to this
diff — but it was never true that I had verified it. Recorded as new finding
T-2026-07-25-21 and promoted to backlog #2; the client-e2e job stays
continue-on-error and now carries timeout-minutes so a red suite cannot burn
unbounded Actions minutes. rust-tests gets a timeout too.
Audit-doc corrections (all confirmed by re-measurement):
- screenShare.ts was listed as "untouched by this pass" at 61.1% when this PR
takes it to 100%; T-12's wording made it the exception when it is the best
- IsEitherBlocked was NOT zero-coverage — 83.3% at base via message_test.go
- excluded LOC 2,229 -> 1,827
- "40 Playwright spec files" -> 44 (33 web + 11 native), 255 web tests
- HandleLiveKitHealthForTest callers: eight -> seven
- admin coverage: 71.4% is with only the T-01 fix; 77.9% with this PR's tests
Verified after the fixes: golangci-lint 0 issues, go vet, go test -race,
go test -tags deadlock, vitest 94.87%, cargo test --lib 74/74, tsc, prettier.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AEETs3Vh6sAHHb1jMBL75g
This commit is contained in:
@@ -178,6 +178,7 @@ jobs:
|
||||
rust-tests:
|
||||
name: Rust Unit Tests
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 30
|
||||
defaults:
|
||||
run:
|
||||
working-directory: Client/tauri-client/src-tauri/
|
||||
@@ -212,15 +213,24 @@ jobs:
|
||||
- name: Rust unit tests
|
||||
run: cargo test --lib
|
||||
|
||||
# Playwright e2e against the mocked-Tauri dev server. Non-blocking for now
|
||||
# (backlog #10): the suite has never run in CI, so it gets a soak period
|
||||
# before it becomes a gate. Remove continue-on-error to promote it.
|
||||
# Playwright e2e against the mocked-Tauri dev server. Non-blocking, and it
|
||||
# will very likely be RED at first: the suite has never run in CI, and a
|
||||
# local run of the 255 web tests on `main` itself fails ~229 of them, all
|
||||
# cascading from the shared login helper in tests/e2e/helpers.ts
|
||||
# (navigateToMainPage never sees [data-testid='app-layout']). That breakage
|
||||
# predates this PR — it reproduces on a clean 70caa6c worktree.
|
||||
#
|
||||
# The job is wired up anyway so the breakage is visible instead of invisible,
|
||||
# but it MUST stay continue-on-error until the suite is repaired, and
|
||||
# timeout-minutes caps the minutes it can burn while it is failing.
|
||||
# See docs/audit-test-coverage-2026-07-25.md T-2026-07-25-21.
|
||||
# The native config (playwright.config.native.ts) is deliberately not wired
|
||||
# up — it needs a real server and a built desktop binary.
|
||||
client-e2e:
|
||||
name: Client E2E (Playwright, non-blocking)
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
timeout-minutes: 25
|
||||
defaults:
|
||||
run:
|
||||
working-directory: Client/tauri-client/
|
||||
|
||||
Reference in New Issue
Block a user