Conversation
The `import` completers (client configs and server user-CA) were supposed to look through other teamserver apps' directories and highlight config files, but several things were broken: - isConfigDir had an inverted condition: with noSelf=true (both import commands) it required the dir to equal the current app AND then rejected it, so the cross-application search always returned nothing. - ConfigsCompleter skipped every file that didn't parse as a teamclient config, so CA .pem files never showed up under `teamserver import`. - GetConfigStyle (was unexported getConfigStyle) returned "" for non-matching files. Chained onto ActionFiles(), that REPLACED carapace's default style.ForPath styling, so ordinary files - most visibly directories - lost their color. It now falls back to style.ForPath, so configs are highlighted while directories stay blue. - The server `import` CA file completion had no styling at all; it now shares the exported GetConfigStyle. Add unit tests for isConfigDir and GetConfigStyle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI intermittently failed on the unix (-race) jobs with "wasm error: out of bounds memory access" deep inside ncruces SQLite query execution (never on the windows job, which runs without -race). The optimizing wazero compiler emits native code the Go race detector cannot instrument, which occasionally traps under -race. Split the runtime configuration by build tag: normal builds keep the optimizing compiler with the persistent on-disk compilation cache (fast startup, ~19ms warm); the `race` build selects wazero's pure-Go interpreter, which is race-clean. Startup caching is irrelevant to test binaries, so nothing is lost there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
+ Coverage 29.29% 29.59% +0.30%
==========================================
Files 60 61 +1
Lines 4031 4017 -14
==========================================
+ Hits 1181 1189 +8
+ Misses 2714 2695 -19
+ Partials 136 133 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The persistent wazero compilation cache populated itself with a
temp-file-then-rename. On Windows, that rename fails ("Access is denied")
when another process holds the destination, and ncruces turns it into a
fatal connection error — so concurrent cold starts (parallel `go test`
packages, or a user launching several teamserver processes at once)
broke. It surfaced as flaky Windows CI.
Compile the module once while holding a cross-process advisory lock
(O_CREATE|O_EXCL lock file, with stale-lock stealing), so only one
process writes the cache; the rest wait and then read it warm. Reads
never collide, so warm startup stays ~20ms and query speed is unchanged.
The race build keeps the interpreter (no cache, no lock) from the
previous commit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The
importcommand completers were supposed to search other teamserver applications' directories for connection configs / user-CA files and highlight them, but the feature was effectively dead and later a fix removed default file coloring.Fixes
isConfigDirhad an inverted condition — withnoSelf=true(which bothimportcommands use) it required a directory to be the current app and then rejected it, so no other-app config was ever found.ConfigsCompleterskipped any file that didn't parse as a teamclient config, so.teamserver.pemCA files never appeared underteamserver import. It now lists matching-extension files, adding the[user] host:portdescription only when the file parses as a config.GetConfigStylereturned""for non-config files; chained ontoActionFiles()it replaced carapace's defaultstyle.ForPathcoloring, so directories (blue) and other typed files went uncolored. It now falls back tostyle.ForPath— config/CA files are highlighted red, everything else keeps its normal coloring.importCA had no styling. It now shares the exportedGetConfigStyle.Tests
Unit tests for
isConfigDir(the inversion) andGetConfigStyle(highlight + default-styling fallback). Full suite passes with-race.🤖 Generated with Claude Code